食谱计划优化,直播记录优化,加上了食谱计划是否连续的字段

This commit is contained in:
xiezhijun
2021-05-17 16:29:49 +08:00
parent 85f362e775
commit ba103faaea
7 changed files with 20 additions and 10 deletions

View File

@ -282,6 +282,7 @@ public class SysOrder extends BaseEntity {
private Integer counted;
//食谱计划是否连续上个订单
private Integer recipesPlanContinue;
}

View File

@ -232,8 +232,9 @@ public class SysRecipesPlanServiceImpl implements ISysRecipesPlanService {
//查询在上一个订单最后一条食谱计划
SysRecipesPlan beforeOrderLastPlan = getLastDayRecipesPlan(sysOrder.getCusId(), sysOrder.getOrderTime());
int startNumDay = 0;
//之前是否存在食谱
if (beforeOrderLastPlan != null) {
//System.out.println(sysOrder.getRecipesPlanContinue() == null);
//之前是否存在食谱以及该订单食谱计划是否需要连续
if (beforeOrderLastPlan != null && sysOrder.getRecipesPlanContinue().intValue() == 1) {
long differDay = ChronoUnit.DAYS.between(DateUtils.dateToLocalDate(beforeOrderLastPlan.getEndDate()), serverStartDate);
//检查之前食谱的结束时间和目前该订单的开始时间是否连续
if(differDay <= 1){
@ -250,6 +251,7 @@ public class SysRecipesPlanServiceImpl implements ISysRecipesPlanService {
}
startNumDay = beforeOrderLastPlan.getEndNumDay();
}
//System.out.println(startNumDay + "-------------------------------");
List<SysRecipesPlan> planList = new ArrayList<>();
LocalDate planStartDate = null;
LocalDate planEndDate = serverStartDate.plusDays(-1);