Commit 68d362d3 authored by 赵啸非's avatar 赵啸非

添加消息发送

parent d990e14b
package com.mortals.xhx.daemon.applicationservice;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSON;
import com.hikvision.artemis.sdk.constant.Constants;
import com.mortals.framework.ap.GlobalSysInfo;
import com.mortals.framework.common.Rest;
import com.mortals.framework.springcloud.service.IApplicationStartedService;
import com.mortals.framework.util.ThreadPool;
import com.mortals.xhx.common.code.YesNoEnum;
import com.mortals.xhx.common.key.Constant;
import com.mortals.xhx.module.device.service.DeviceService;
import com.mortals.xhx.module.hik.face.model.FaceGroupEntity;
import com.mortals.xhx.module.hik.face.model.FaceGroupQuery;
import com.mortals.xhx.module.hik.event.service.IHikEventService;
import com.mortals.xhx.module.hik.face.service.FaceGroupService;
import com.mortals.xhx.module.hik.face.service.FacePlanService;
import com.mortals.xhx.module.hik.event.model.req.sub.EventSubReq;
import com.mortals.xhx.module.hik.event.model.rsp.EventInfo;
import com.mortals.xhx.module.hik.event.service.IHikEventService;
import com.mortals.xhx.module.hik.face.model.req.group.FaceGroupReq;
import com.mortals.xhx.module.hik.face.model.rsp.group.FaceGroupDataInfo;
import com.mortals.xhx.module.hik.face.service.IHikFaceService;
import com.mortals.xhx.module.hik.face.service.IHikPlanService;
import com.mortals.xhx.thread.AlarmSendMsgThread;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression;
import org.springframework.stereotype.Component;
import org.springframework.util.ObjectUtils;
import java.util.Date;
import java.util.List;
import static com.mortals.xhx.common.key.ParamKey.PARAM_FACE_GROUP;
/**
* 初始化部分计划数据等
......@@ -59,6 +38,8 @@ public class SubEventStartedService implements IApplicationStartedService {
public void start() {
ThreadPool.getInstance().init(10);
new AlarmSendMsgThread().start();
/* Constants.DEFAULT_TIMEOUT=12000;
log.info("开始服务..[事件订阅服务]");
......
......@@ -32,25 +32,14 @@ import java.util.List;
*/
@Slf4j
@Service
@Order(value = 3)
public class AlarmSendMsgThread extends AbstractThread {
@Autowired
private ICacheService cacheService;
@Autowired
private DeviceService deviceService;
@Autowired
private AlarmRecordsService recordsService;
@Autowired
private RabbitTemplate rabbitTemplate;
/*
@Autowired
private MessageProducer messageProducer;
*/
@Override
protected int getSleepTime() {
return 1000;
......
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