Commit 6ef0f293 by 徐高华

如果开始时间晚于当前,终止会调整开始时间

parent 487ec55d
......@@ -24,7 +24,7 @@ public interface GroupChatPlanMapper {
@Param("clerkName") String clerkName);
public int stopById(@Param("planId") Long planId, @Param("clerkId") String clerkId,
@Param("clerkName") String clerkName);
@Param("clerkName") String clerkName, @Param("modifyStartTimeFlag") Integer modifyStartTimeFlag);
public int updateSendFlag(@Param("planId") Long planId);
......
......@@ -349,7 +349,12 @@ public class GroupChatPlanServiceImpl implements GroupChatPlanService {
@Override
public void stop(String clerkId, String clerkName, Long planId) {
logger.info("终止计划,并触发统计planId={}", planId);
this.groupChatPlanMapper.stopById(planId, clerkId, clerkName);
Integer modifyStartTimeFlag = null;
TabGroupChatPlan plan = this.groupChatPlanMapper.selectById(planId);
if (plan.getStartTime().getTime() >= new Date().getTime()) {
modifyStartTimeFlag = 1;
}
this.groupChatPlanMapper.stopById(planId, clerkId, clerkName, modifyStartTimeFlag);
this.putMQForData(planId);
}
......
......@@ -111,11 +111,15 @@
<update id="stopById">
UPDATE
tab_haoban_group_chat_plan SET status_flag = 0 , modifier_id =
#{clerkId} , modifier_name = #{clerkName} , end_time = now() , update_time=now() WHERE plan_id = #{planId}
#{clerkId} , modifier_name = #{clerkName} , end_time = now() , update_time=now()
<if test="null != modifyStartTimeFlag">
, startTime = now()
</if>
WHERE plan_id = #{planId}
</update>
<update id="updateSendFlag">
UPDATE tab_haoban_group_chat_plan SET send_flag = 2 , send_time = now() WHERE plan_id = #{planId}
UPDATE tab_haoban_group_chat_plan SET send_flag = 2 , send_time = now() WHERE plan_id = #{planId}
</update>
<!-- ==================更新 ========== -->
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment