Commit 97148c24 authored by fangxinjiang's avatar fangxinjiang

优化消息

parent 73abac63
......@@ -112,7 +112,7 @@ public class MsgInfoController {
* @Param
* @return
**/
@Operation(summary = "每5秒 处理订单待办提醒", description = "每5秒 处理订单待办提醒")
@Operation(summary = "每10分钟 处理订单待办提醒", description = "每10分钟 处理订单待办提醒")
@Inner
@PostMapping("/inner/cancelHandledMsg")
public void cancelHandledMsg() {
......
......@@ -50,5 +50,7 @@ public interface MsgInfoMapper extends BaseMapper<MsgInfo> {
List<MsgInfo> getMsgInfo(@Param("msgInfo") MsgInfo msgInfo);
int deleteHandledMsg();
int deleteHandledMsg(@Param("nos")List<String> nos);
List<String> getOrderNos();
}
......@@ -209,7 +209,10 @@ public class MsgInfoServiceImpl extends ServiceImpl<MsgInfoMapper, MsgInfo> impl
@Override
public void cancelHandledMsg() {
baseMapper.deleteHandledMsg();
List<String> orderNos = baseMapper.getOrderNos();
if (Common.isNotNull(orderNos)){
baseMapper.deleteHandledMsg(orderNos);
}
}
}
......@@ -153,17 +153,24 @@
</select>
<delete id="deleteHandledMsg">
DELETE FROM msg_info where ALERT_TYPE ='0' and ORDER_NO not in (
SELECT
b1.fd_3ac901c5184274 ORDER_NO
FROM
lbpm_workitem a
LEFT JOIN lbpm_node e ON e.fd_id = a.fd_node_id
LEFT JOIN lbpm_process p ON p.fd_id = e.fd_process_id
LEFT JOIN ekp_ea33075576149bb8a4f5 b1 ON p.fd_model_id = b1.fd_id
WHERE
e.fd_fact_node_id = 'N5'
AND b1.fd_id IS NOT NULL
)
DELETE FROM msg_info where ALERT_TYPE ='0'
<if test="nos != null and nos.size > 0">
and ORDER_NO not in
<foreach item="items" index="index" collection="nos" open="(" separator="," close=")">
#{items}
</foreach>
</if>
</delete>
<select id="getOrderNos" resultType="java.lang.String">
SELECT
b1.fd_3ac901c5184274 ORDER_NO
FROM
lbpm_workitem a
LEFT JOIN lbpm_node e ON e.fd_id = a.fd_node_id
LEFT JOIN lbpm_process p ON p.fd_id = e.fd_process_id
LEFT JOIN ekp_ea33075576149bb8a4f5 b1 ON p.fd_model_id = b1.fd_id
WHERE
e.fd_fact_node_id = 'N5'
AND b1.fd_id IS NOT NULL
</select>
</mapper>
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