Commit 97148c24 authored by fangxinjiang's avatar fangxinjiang

优化消息

parent 73abac63
...@@ -112,7 +112,7 @@ public class MsgInfoController { ...@@ -112,7 +112,7 @@ public class MsgInfoController {
* @Param * @Param
* @return * @return
**/ **/
@Operation(summary = "每5秒 处理订单待办提醒", description = "每5秒 处理订单待办提醒") @Operation(summary = "每10分钟 处理订单待办提醒", description = "每10分钟 处理订单待办提醒")
@Inner @Inner
@PostMapping("/inner/cancelHandledMsg") @PostMapping("/inner/cancelHandledMsg")
public void cancelHandledMsg() { public void cancelHandledMsg() {
......
...@@ -50,5 +50,7 @@ public interface MsgInfoMapper extends BaseMapper<MsgInfo> { ...@@ -50,5 +50,7 @@ public interface MsgInfoMapper extends BaseMapper<MsgInfo> {
List<MsgInfo> getMsgInfo(@Param("msgInfo") MsgInfo 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 ...@@ -209,7 +209,10 @@ public class MsgInfoServiceImpl extends ServiceImpl<MsgInfoMapper, MsgInfo> impl
@Override @Override
public void cancelHandledMsg() { public void cancelHandledMsg() {
baseMapper.deleteHandledMsg(); List<String> orderNos = baseMapper.getOrderNos();
if (Common.isNotNull(orderNos)){
baseMapper.deleteHandledMsg(orderNos);
}
} }
} }
...@@ -153,7 +153,15 @@ ...@@ -153,7 +153,15 @@
</select> </select>
<delete id="deleteHandledMsg"> <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 SELECT
b1.fd_3ac901c5184274 ORDER_NO b1.fd_3ac901c5184274 ORDER_NO
FROM FROM
...@@ -164,6 +172,5 @@ ...@@ -164,6 +172,5 @@
WHERE WHERE
e.fd_fact_node_id = 'N5' e.fd_fact_node_id = 'N5'
AND b1.fd_id IS NOT NULL AND b1.fd_id IS NOT NULL
) </select>
</delete>
</mapper> </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