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,7 +153,15 @@
</select>
<delete id="deleteHandledMsg">
DELETE FROM msg_info where ALERT_TYPE ='0' and ORDER_NO not in (
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
......@@ -164,6 +172,5 @@
WHERE
e.fd_fact_node_id = 'N5'
AND b1.fd_id IS NOT NULL
)
</delete>
</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