935090232@qq.com
2022-02-22 bbe0a2fd03063316e50cf141986bda984599bbda
zq-erp/src/main/java/com/matrix/system/job/ServiceOvertimeNoticeJob.java
@@ -1,11 +1,12 @@
package com.matrix.system.job;
import com.matrix.component.asyncmessage.AsyncMessageManager;
import com.matrix.component.rabbitmq.RabiitMqTemplate;
import com.matrix.core.tools.LogUtil;
import com.matrix.system.hive.bean.SysProjServices;
import com.matrix.system.hive.dao.SysProjServicesDao;
import com.matrix.system.hive.plugin.util.CollectionUtils;
import com.matrix.system.shopXcx.mqTask.MQTaskRouting;
import com.matrix.system.shopXcx.mqTask.AsyncMessageRouting;
import com.matrix.system.wechart.templateMsg.UniformMsgParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
@@ -28,9 +29,9 @@
    @Value("${evn}")
    private  String evn;
    @Autowired
    private RabiitMqTemplate rabiitMqTemplate;
    @Autowired
    private AsyncMessageManager asyncMessageManager;
    /**
     * 每分钟执行一次
     */
@@ -44,7 +45,7 @@
                //发送微信公众号提醒
                UniformMsgParam uniformMsgParam=new UniformMsgParam(projServices.getCompanyId(),UniformMsgParam.GZH_YYDS);
                uniformMsgParam.put("serviceId",projServices.getId());
                rabiitMqTemplate.sendMsg(MQTaskRouting.SEND_UNIFORM_TEMPLATE_MSG+evn,uniformMsgParam.toJSONString());
                asyncMessageManager.sendMsg(AsyncMessageRouting.SEND_UNIFORM_TEMPLATE_MSG ,uniformMsgParam);
            }
            List<Long> noticedIds = needNoticeService.stream().map(SysProjServices::getId).collect(Collectors.toList());
            projServicesDao.updateNoticeTimes(noticedIds);