查询上一个订单最后一天食谱计划改为成交时间排序
This commit is contained in:
@ -1,10 +1,13 @@
|
||||
package com.stdiet.custom.mapper;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import com.stdiet.custom.domain.SysRecipesPlan;
|
||||
import com.stdiet.custom.domain.SysRecipesPlanListInfo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import javax.xml.crypto.Data;
|
||||
|
||||
/**
|
||||
* 食谱计划Mapper接口
|
||||
*
|
||||
@ -87,7 +90,7 @@ public interface SysRecipesPlanMapper
|
||||
* @param customerId
|
||||
* @return
|
||||
*/
|
||||
SysRecipesPlan getLastDayRecipesPlan(@Param("customerId")Long customerId, @Param("orderId")Long orderId);
|
||||
SysRecipesPlan getLastDayRecipesPlan(@Param("customerId")Long customerId, @Param("orderTime") Date orderTime);
|
||||
|
||||
/**
|
||||
* 根据订单ID查询食谱计划
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.stdiet.custom.service;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.stdiet.custom.domain.SysRecipesPlan;
|
||||
@ -102,7 +103,7 @@ public interface ISysRecipesPlanService
|
||||
* @param customerId
|
||||
* @return
|
||||
*/
|
||||
SysRecipesPlan getLastDayRecipesPlan(Long customerId, Long orderId);
|
||||
SysRecipesPlan getLastDayRecipesPlan(Long customerId, Date orderTime);
|
||||
|
||||
/**
|
||||
* 通过outId查询食谱计划简要
|
||||
|
@ -229,7 +229,7 @@ public class SysRecipesPlanServiceImpl implements ISysRecipesPlanService {
|
||||
*/
|
||||
private List<SysRecipesPlan> generatePlan(SysOrder sysOrder, LocalDate serverStartDate, LocalDate serverEndDate, List<SysOrderPause> pauseList) {
|
||||
//查询在上一个订单最后一条食谱计划
|
||||
SysRecipesPlan beforeOrderLastPlan = getLastDayRecipesPlan(sysOrder.getCusId(), sysOrder.getOrderId());
|
||||
SysRecipesPlan beforeOrderLastPlan = getLastDayRecipesPlan(sysOrder.getCusId(), sysOrder.getOrderTime());
|
||||
int startNumDay = 0;
|
||||
//之前是否存在食谱
|
||||
if(beforeOrderLastPlan != null){
|
||||
@ -409,11 +409,10 @@ public class SysRecipesPlanServiceImpl implements ISysRecipesPlanService {
|
||||
/**
|
||||
* 根据客户ID查询最后一天食谱计划
|
||||
* @param customerId 客户ID
|
||||
* @param orderId 不属于该订单ID的食谱
|
||||
* @return
|
||||
*/
|
||||
public SysRecipesPlan getLastDayRecipesPlan(Long customerId, Long orderId){
|
||||
return sysRecipesPlanMapper.getLastDayRecipesPlan(customerId, orderId);
|
||||
public SysRecipesPlan getLastDayRecipesPlan(Long customerId, Date orderTime){
|
||||
return sysRecipesPlanMapper.getLastDayRecipesPlan(customerId, orderTime);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user