同步代码
This commit is contained in:
@@ -11,6 +11,7 @@ import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.resource.api.RemoteFileService;
|
||||
import org.dromara.resource.api.domain.RemoteFile;
|
||||
import org.dromara.sis.domain.SisAlarmEvents;
|
||||
import org.dromara.sis.domain.bo.SisAlarmEventsBo;
|
||||
import org.dromara.sis.domain.vo.SisAlarmEventsVo;
|
||||
@@ -41,6 +42,7 @@ public class SisAlarmEventsServiceImpl implements ISisAlarmEventsService {
|
||||
|
||||
@DubboReference
|
||||
private RemoteFileService remoteFileService;
|
||||
|
||||
/**
|
||||
* 查询告警
|
||||
*
|
||||
@@ -48,7 +50,7 @@ public class SisAlarmEventsServiceImpl implements ISisAlarmEventsService {
|
||||
* @return 告警
|
||||
*/
|
||||
@Override
|
||||
public SisAlarmEventsVo queryById(Long id){
|
||||
public SisAlarmEventsVo queryById(Long id) {
|
||||
return baseMapper.selectVoById(id);
|
||||
}
|
||||
|
||||
@@ -125,7 +127,7 @@ public class SisAlarmEventsServiceImpl implements ISisAlarmEventsService {
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(SisAlarmEvents entity){
|
||||
private void validEntityBeforeSave(SisAlarmEvents entity) {
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
@@ -138,7 +140,7 @@ public class SisAlarmEventsServiceImpl implements ISisAlarmEventsService {
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
if (isValid) {
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
@@ -149,15 +151,13 @@ public class SisAlarmEventsServiceImpl implements ISisAlarmEventsService {
|
||||
public void createAlarmRecord(String deviceIp, Integer level, Integer type, byte[] smallImg, byte[] bigImg) {
|
||||
// 校验设备信息
|
||||
SisDeviceManageVo sisDeviceManageVo = deviceManageService.queryVoByDeviceIp(deviceIp);
|
||||
if(sisDeviceManageVo == null){
|
||||
if (sisDeviceManageVo == null) {
|
||||
log.error("设备信息不存在,放弃此条告警记录。");
|
||||
return;
|
||||
}
|
||||
// 上传图片
|
||||
remoteFileService.upload(smallImg);
|
||||
|
||||
|
||||
|
||||
RemoteFile small = remoteFileService.uploadImg(smallImg);
|
||||
RemoteFile big = remoteFileService.uploadImg(bigImg);
|
||||
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user