食谱计划优化,直播记录优化,加上了食谱计划是否连续的字段
This commit is contained in:
		| @@ -282,6 +282,7 @@ public class SysOrder extends BaseEntity { | ||||
|  | ||||
|     private Integer counted; | ||||
|  | ||||
|  | ||||
|     //食谱计划是否连续上个订单 | ||||
|     private Integer recipesPlanContinue; | ||||
|  | ||||
| } | ||||
| @@ -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); | ||||
|   | ||||
| @@ -28,7 +28,7 @@ | ||||
|         <result property="fanChannelName"  column="fan_channel_name"></result> | ||||
|  | ||||
|         <!-- 根据渠道查询对应微信号(微信账号分配表中) --> | ||||
|         <association property="wxAccountList" column="fan_channel" select="getWxAccountListByFanChannel"/> | ||||
|         <!--<association property="wxAccountList" column="fan_channel" select="getWxAccountListByFanChannel"/>--> | ||||
|     </resultMap> | ||||
|  | ||||
|     <resultMap type="SysLiveSchedul" id="SysLiveSchedulResultSigle"> | ||||
| @@ -60,7 +60,7 @@ | ||||
|         su_operator.nick_name as live_operator_name,fc.dict_label as fan_channel_name | ||||
|         from sys_live_schedul slc | ||||
|         left join (SELECT dict_label, dict_value FROM sys_dict_data WHERE dict_type = 'sys_live_type') AS slt ON slt.dict_value = slc.live_room | ||||
|         left join (SELECT dict_label, dict_value FROM sys_dict_data WHERE dict_type = 'fan_channel') AS fc ON fc.dict_value = slc.fan_channel | ||||
|         left join (SELECT dict_label, dict_value FROM sys_dict_data WHERE dict_type = 'cus_account') AS fc ON fc.dict_value = slc.fan_channel | ||||
|         left join sys_user su_nutritionist on su_nutritionist.user_id = slc.live_nutritionist_id and su_nutritionist.del_flag = 0 | ||||
|         left join sys_user su_plan on su_plan.user_id = slc.live_planner_id and su_plan.del_flag = 0 | ||||
|         left join sys_user su_operator on su_operator.user_id = slc.live_operator_id and su_operator.del_flag = 0 | ||||
|   | ||||
| @@ -48,6 +48,7 @@ | ||||
|         <result property="mainOrderId" column="main_order_id"/> | ||||
|         <result property="afterSaleCommissOrder" column="after_sale_commiss_order"/> | ||||
|         <result property="commissStartTime" column="commiss_start_time"/> | ||||
|         <result property="recipesPlanContinue"    column="recipes_plan_continue"    /> | ||||
|         <result property="delFlag" column="del_flag"/> | ||||
|         <result property="counted" column="counted"/> | ||||
|  | ||||
| @@ -393,6 +394,7 @@ | ||||
|         <result property="mainOrderId" column="main_order_id"/> | ||||
|         <result property="afterSaleCommissOrder" column="after_sale_commiss_order"/> | ||||
|         <result property="commissStartTime" column="commiss_start_time"/> | ||||
|         <result property="recipesPlanContinue"    column="recipes_plan_continue"    /> | ||||
|         <result property="delFlag" column="del_flag"/> | ||||
|  | ||||
|         <!-- 非持久化字段 --> | ||||
|   | ||||
| @@ -224,7 +224,7 @@ | ||||
|     <!--  根据cusId查询食谱计划--> | ||||
|     <select id="selectPlanListByCusId" parameterType="Long" resultMap="SysRecipesPlanResult"> | ||||
|         <include refid="selectSysRecipesPlanVo"/> | ||||
|         where cus_id=#{cusId} and del_flag = 0 order by id asc | ||||
|         where cus_id=#{cusId} and del_flag = 0 order by start_date asc | ||||
|     </select> | ||||
|  | ||||
|     <select id="getCusIdByOutId" parameterType="String" resultType="Long"> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user