Commit 16dd71f0 authored by fangxinjiang's avatar fangxinjiang

优化消息

parent 54d887a6
......@@ -113,7 +113,7 @@ public class MsgInfoController {
* @Param
* @return
**/
@Operation(summary = "每5秒 处理订单待办提醒", description = "每5秒 处理订单待办提醒")
@Operation(summary = "每10分钟 处理订单待办提醒", description = "每10分钟 处理订单待办提醒")
@Inner
@PostMapping("/inner/cancelHandledMsg")
public void cancelHandledMsg() {
......
......@@ -51,7 +51,9 @@ 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();
int insertMsg(@Param("vo") EkpInsertMsgVo vo);
}
......@@ -210,7 +210,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);
}
}
@Override
......@@ -223,5 +226,4 @@ public class MsgInfoServiceImpl extends ServiceImpl<MsgInfoMapper, MsgInfo> impl
}
}
}
......@@ -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,8 +172,7 @@
WHERE
e.fd_fact_node_id = 'N5'
AND b1.fd_id IS NOT NULL
)
</delete>
</select>
<insert id="insertMsg">
insert into msg_info (ID,URL,ORDER_ID,ALERT_USER,DOMAIN_NAME,CREATE_TIME,ALERT_TYPE,ORDER_NO)
......
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