server_five_liuyunhu
parent
a9977b44a9
commit
00369a6052
|
@ -22,26 +22,10 @@ import java.util.List;
|
||||||
@RequestMapping("/incident")
|
@RequestMapping("/incident")
|
||||||
public class IncidentController extends BaseController {
|
public class IncidentController extends BaseController {
|
||||||
|
|
||||||
/**
|
|
||||||
* 事件列表
|
|
||||||
*/
|
|
||||||
static List<String> list=new ArrayList<>(){
|
|
||||||
{
|
|
||||||
add("breakdown");
|
|
||||||
add("electronic-fence");
|
|
||||||
add("real-time-data");
|
|
||||||
add("stored-event");
|
|
||||||
}
|
|
||||||
};
|
|
||||||
/**
|
/**
|
||||||
* 事件服务
|
* 事件服务
|
||||||
*/
|
*/
|
||||||
@Autowired
|
@Autowired
|
||||||
private IncidentService incidentService;
|
private IncidentService incidentService;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,5 +10,9 @@ import org.apache.ibatis.annotations.Mapper;
|
||||||
*/
|
*/
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface IncidentMapper {
|
public interface IncidentMapper {
|
||||||
|
/**
|
||||||
|
* 新增存储事件
|
||||||
|
* @param coupletMsgData
|
||||||
|
*/
|
||||||
public void reportMapper(CoupletMsgData coupletMsgData);
|
public void reportMapper(CoupletMsgData coupletMsgData);
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,8 @@ package com.couplet.analyze.msg.service.impl;
|
||||||
|
|
||||||
import com.couplet.analyze.msg.domain.CoupletMsgData;
|
import com.couplet.analyze.msg.domain.CoupletMsgData;
|
||||||
import com.couplet.analyze.msg.service.IncidentService;
|
import com.couplet.analyze.msg.service.IncidentService;
|
||||||
|
import com.couplet.common.log.annotation.Log;
|
||||||
|
import lombok.extern.log4j.Log4j2;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -10,6 +12,7 @@ import org.springframework.stereotype.Service;
|
||||||
* @Description: 故障事件
|
* @Description: 故障事件
|
||||||
*/
|
*/
|
||||||
@Service("breakdown")
|
@Service("breakdown")
|
||||||
|
@Log4j2
|
||||||
public class BreakdownServiceImpl implements IncidentService {
|
public class BreakdownServiceImpl implements IncidentService {
|
||||||
/**
|
/**
|
||||||
* 故障事件
|
* 故障事件
|
||||||
|
@ -19,6 +22,10 @@ public class BreakdownServiceImpl implements IncidentService {
|
||||||
@Override
|
@Override
|
||||||
public void incident(CoupletMsgData coupletMsgData) {
|
public void incident(CoupletMsgData coupletMsgData) {
|
||||||
|
|
||||||
|
log.info("故障事件开始.....");
|
||||||
|
log.info("故障事件结束.....");
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue