Commit cd213069 by 徐高华

Merge branch 'feature/xgh/202507迭代' into 'developer'

社群定时取消处理

See merge request !3084
parents f0ae0f43 0aef298d
......@@ -152,6 +152,9 @@ public interface HaobanTimerApiService {
*/
void cancelSendTimer(String params) ;
void cancelTimeOutTimer(String params);
/**
* 建联刷新数据定时任务
* @param params
......
......@@ -64,8 +64,6 @@ public interface GroupChatPlanOwnerLogMapper {
List<GroupChatPlanOwnerLogDTO> listForMsgid() ;
List<GroupChatPlanOwnerLogDTO> listForCancelSend() ;
void updateMsgid(@Param("id")Long id , @Param("msgid")String msgid) ;
void staffSendResult(@Param("staffId")String staffId, @Param("planId")Long planId, @Param("sendTime")Date sendTime, @Param("failRemark")String failRemark , @Param("statusFlag")int statusFlag);
......@@ -75,4 +73,7 @@ public interface GroupChatPlanOwnerLogMapper {
int getInvalidTask(@Param("enterpriseId")String enterpriseId , @Param("clerkId")String clerkId , @Param("time")Date time ) ;
int getTaskNum(@Param("enterpriseId")String enterpriseId, @Param("clerkId")String clerkId, @Param("storeId")String storeId, @Param("staffId")String staffId);
List<GroupChatPlanOwnerLogDTO> listForCancelSend() ;
List<GroupChatPlanOwnerLogDTO> cancelTimeOutTimer(@Param("time") Date end);
}
\ No newline at end of file
......@@ -52,4 +52,6 @@ public interface GroupChatPlanService {
MassGroupTaskData massMomentTaskData(String enterpriseId, String clerkId, Date date);
MassGroupTaskData massGroupTaskData(String enterpriseId, String clerkId, Date date);
void cancelTimeOutTimer(String params);
}
\ No newline at end of file
......@@ -832,6 +832,18 @@ public class GroupChatPlanServiceImpl implements GroupChatPlanService {
}
@Override
public void cancelTimeOutTimer(String params) {
logger.info("社群群发-超时取消-{}",params);
Date end = new Date() ;
List<GroupChatPlanOwnerLogDTO> sendList = this.groupChatPlanOwnerLogMapper.cancelTimeOutTimer(end) ;
if(CollectionUtils.isNotEmpty(sendList)) {
for(GroupChatPlanOwnerLogDTO dto : sendList) {
this.cancelSend(dto);
}
}
}
@Override
public void stopByMsgid(Long planId) {
logger.info("终止群群发送={}",planId);
List<Long> list = this.groupChatPlanOwnerLogMapper.listForTimer(planId);
......@@ -1116,4 +1128,5 @@ public class GroupChatPlanServiceImpl implements GroupChatPlanService {
int total = this.groupChatPlanOwnerLogMapper.getTaskNum(enterpriseId,clerkId,storeId,staffId) ;
return total;
}
}
\ No newline at end of file
......@@ -746,7 +746,7 @@ public class QwMomentPlanServiceImpl implements QwMomentPlanService {
@Override
public void cancelTimeOutTimer(String params) {
logger.info("朋友圈-取消超时-{}",params);
logger.info("朋友圈-超时取消-{}",params);
Date end = new Date() ;
List<TabQwMomentPlan> planList = this.qwMomentPlanMapper.cancelTimeOutTimer(end) ;
this.cancel(planList);
......
......@@ -214,6 +214,11 @@ public class HaobanTimerApiServiceImpl implements HaobanTimerApiService {
}
@Override
public void cancelTimeOutTimer(String params) {
this.groupChatPlanService.cancelTimeOutTimer(params) ;
}
@Override
public void contactDataTimer(String params) {
contactAdaptor.contactDataTimer();
}
......
......@@ -308,6 +308,19 @@
</select>
<select id="cancelTimeOutTimer" resultType="com.gic.haoban.manage.api.dto.chat.GroupChatPlanOwnerLogDTO">
SELECT
a.wx_enterprise_id wxEnterpriseId ,
a.owner_log_id ownerLogId ,
b.plan_id planId ,
a.staff_id staffId ,
a.send_time sendTime,
a.msgid msgid
FROM tab_haoban_group_chat_plan_owner_log a LEFT JOIN tab_haoban_group_chat_plan b ON a.plan_id = b.plan_id
WHERE b.exec_type = 0 AND a.send_status = 1 AND a.msgid IS not NULL and b.end_time <![CDATA[<=]]> now() and b.cancel_time_flag = 0
</select>
<!-- 查询所有任务数-->
<select id="getTotalTask" resultType="int">
select count(1) from tab_haoban_group_chat_plan_owner_log a LEFT JOIN tab_haoban_group_chat_plan b ON a.plan_id = b.plan_id
......
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