设备告警
This commit is contained in:
@ -0,0 +1,105 @@
|
||||
package com.fuyuanshen.web.controller.device;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import com.fuyuanshen.common.idempotent.annotation.RepeatSubmit;
|
||||
import com.fuyuanshen.common.log.annotation.Log;
|
||||
import com.fuyuanshen.common.web.core.BaseController;
|
||||
import com.fuyuanshen.common.mybatis.core.page.PageQuery;
|
||||
import com.fuyuanshen.common.core.domain.R;
|
||||
import com.fuyuanshen.common.core.validate.AddGroup;
|
||||
import com.fuyuanshen.common.core.validate.EditGroup;
|
||||
import com.fuyuanshen.common.log.enums.BusinessType;
|
||||
import com.fuyuanshen.common.excel.utils.ExcelUtil;
|
||||
import com.fuyuanshen.equipment.domain.vo.DeviceAlarmVo;
|
||||
import com.fuyuanshen.equipment.domain.bo.DeviceAlarmBo;
|
||||
import com.fuyuanshen.equipment.service.IDeviceAlarmService;
|
||||
import com.fuyuanshen.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 设备告警
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-08-28
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/equipment/alarm")
|
||||
public class DeviceAlarmController extends BaseController {
|
||||
|
||||
private final IDeviceAlarmService deviceAlarmService;
|
||||
|
||||
/**
|
||||
* 查询设备告警列表
|
||||
*/
|
||||
@SaCheckPermission("equipment:alarm:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<DeviceAlarmVo> list(DeviceAlarmBo bo, PageQuery pageQuery) {
|
||||
return deviceAlarmService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 设备告警列表
|
||||
*/
|
||||
@SaCheckPermission("equipment:alarm:export")
|
||||
@Log(title = "设备告警", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(DeviceAlarmBo bo, HttpServletResponse response) {
|
||||
List<DeviceAlarmVo> list = deviceAlarmService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "设备告警", DeviceAlarmVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取设备告警详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("equipment:alarm:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<DeviceAlarmVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(deviceAlarmService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增设备告警
|
||||
*/
|
||||
@SaCheckPermission("equipment:alarm:add")
|
||||
@Log(title = "设备告警", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody DeviceAlarmBo bo) {
|
||||
return toAjax(deviceAlarmService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改设备告警
|
||||
*/
|
||||
@SaCheckPermission("equipment:alarm:edit")
|
||||
@Log(title = "设备告警", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody DeviceAlarmBo bo) {
|
||||
return toAjax(deviceAlarmService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除设备告警
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("equipment:alarm:remove")
|
||||
@Log(title = "设备告警", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(deviceAlarmService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
}
|
@ -32,6 +32,8 @@ import java.util.Map;
|
||||
public class DeviceControlCenterController extends BaseController {
|
||||
|
||||
private final DeviceBizService appDeviceService;
|
||||
|
||||
|
||||
/**
|
||||
* 查询设备列表
|
||||
*/
|
||||
|
@ -0,0 +1,99 @@
|
||||
package com.fuyuanshen.equipment.domain;
|
||||
|
||||
import com.fuyuanshen.common.tenant.core.TenantEntity;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 设备告警对象 device_alarm
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-08-28
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("device_alarm")
|
||||
public class DeviceAlarm extends TenantEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 设备ID
|
||||
*/
|
||||
private Long deviceId;
|
||||
|
||||
/**
|
||||
* 报警事项
|
||||
*/
|
||||
private String deviceAction;
|
||||
|
||||
/**
|
||||
* 设备名称
|
||||
*/
|
||||
private String deviceName;
|
||||
|
||||
/**
|
||||
* 数据来源
|
||||
*/
|
||||
private String dataSource;
|
||||
|
||||
/**
|
||||
* 内容
|
||||
*/
|
||||
private String content;
|
||||
|
||||
/**
|
||||
* 设备类型
|
||||
*/
|
||||
private Long deviceType;
|
||||
|
||||
/**
|
||||
* 经度
|
||||
|
||||
*/
|
||||
private Long longitude;
|
||||
|
||||
/**
|
||||
* 纬度
|
||||
*/
|
||||
private Long latitude;
|
||||
|
||||
/**
|
||||
* 报警位置
|
||||
*/
|
||||
private String location;
|
||||
|
||||
/**
|
||||
* 报警开始时间
|
||||
*/
|
||||
private Date startTime;
|
||||
|
||||
/**
|
||||
* 报警结束时间
|
||||
*/
|
||||
private Date finishTime;
|
||||
|
||||
/**
|
||||
* 报警持续时间
|
||||
*/
|
||||
private Date durationTime;
|
||||
|
||||
/**
|
||||
* 0已处理,1未处理
|
||||
*/
|
||||
private Long treatmentState;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,96 @@
|
||||
package com.fuyuanshen.equipment.domain.bo;
|
||||
|
||||
import com.fuyuanshen.equipment.domain.DeviceAlarm;
|
||||
import com.fuyuanshen.common.mybatis.core.domain.BaseEntity;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
/**
|
||||
* 设备告警业务对象 device_alarm
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-08-28
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = DeviceAlarm.class, reverseConvertGenerate = false)
|
||||
public class DeviceAlarmBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
@NotNull(message = "ID不能为空", groups = { EditGroup.class })
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 设备ID
|
||||
*/
|
||||
private Long deviceId;
|
||||
|
||||
/**
|
||||
* 报警事项
|
||||
*/
|
||||
private String deviceAction;
|
||||
|
||||
/**
|
||||
* 设备名称
|
||||
*/
|
||||
private String deviceName;
|
||||
|
||||
/**
|
||||
* 数据来源
|
||||
*/
|
||||
private String dataSource;
|
||||
|
||||
/**
|
||||
* 内容
|
||||
*/
|
||||
private String content;
|
||||
|
||||
/**
|
||||
* 设备类型
|
||||
*/
|
||||
private Long deviceType;
|
||||
|
||||
/**
|
||||
* 经度
|
||||
|
||||
*/
|
||||
private Long longitude;
|
||||
|
||||
/**
|
||||
* 纬度
|
||||
*/
|
||||
private Long latitude;
|
||||
|
||||
/**
|
||||
* 报警位置
|
||||
*/
|
||||
private String location;
|
||||
|
||||
/**
|
||||
* 报警开始时间
|
||||
*/
|
||||
private Date startTime;
|
||||
|
||||
/**
|
||||
* 报警结束时间
|
||||
*/
|
||||
private Date finishTime;
|
||||
|
||||
/**
|
||||
* 报警持续时间
|
||||
*/
|
||||
private Date durationTime;
|
||||
|
||||
/**
|
||||
* 0已处理,1未处理
|
||||
*/
|
||||
private Long treatmentState;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,120 @@
|
||||
package com.fuyuanshen.equipment.domain.vo;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fuyuanshen.equipment.domain.DeviceAlarm;
|
||||
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import cn.idev.excel.annotation.ExcelProperty;
|
||||
import com.fuyuanshen.common.excel.annotation.ExcelDictFormat;
|
||||
import com.fuyuanshen.common.excel.convert.ExcelDictConvert;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 设备告警视图对象 device_alarm
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-08-28
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = DeviceAlarm.class)
|
||||
public class DeviceAlarmVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
@ExcelProperty(value = "ID")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 设备ID
|
||||
*/
|
||||
@ExcelProperty(value = "设备ID")
|
||||
private Long deviceId;
|
||||
|
||||
/**
|
||||
* 报警事项
|
||||
*/
|
||||
@ExcelProperty(value = "报警事项")
|
||||
private String deviceAction;
|
||||
|
||||
/**
|
||||
* 设备名称
|
||||
*/
|
||||
@ExcelProperty(value = "设备名称")
|
||||
private String deviceName;
|
||||
|
||||
/**
|
||||
* 数据来源
|
||||
*/
|
||||
@ExcelProperty(value = "数据来源")
|
||||
private String dataSource;
|
||||
|
||||
/**
|
||||
* 内容
|
||||
*/
|
||||
@ExcelProperty(value = "内容")
|
||||
private String content;
|
||||
|
||||
/**
|
||||
* 设备类型
|
||||
*/
|
||||
@ExcelProperty(value = "设备类型")
|
||||
private Long deviceType;
|
||||
|
||||
/**
|
||||
* 经度
|
||||
|
||||
*/
|
||||
@ExcelProperty(value = "经度
|
||||
")
|
||||
private Long longitude;
|
||||
|
||||
/**
|
||||
* 纬度
|
||||
*/
|
||||
@ExcelProperty(value = "纬度")
|
||||
private Long latitude;
|
||||
|
||||
/**
|
||||
* 报警位置
|
||||
*/
|
||||
@ExcelProperty(value = "报警位置")
|
||||
private String location;
|
||||
|
||||
/**
|
||||
* 报警开始时间
|
||||
*/
|
||||
@ExcelProperty(value = "报警开始时间")
|
||||
private Date startTime;
|
||||
|
||||
/**
|
||||
* 报警结束时间
|
||||
*/
|
||||
@ExcelProperty(value = "报警结束时间")
|
||||
private Date finishTime;
|
||||
|
||||
/**
|
||||
* 报警持续时间
|
||||
*/
|
||||
@ExcelProperty(value = "报警持续时间")
|
||||
private Date durationTime;
|
||||
|
||||
/**
|
||||
* 0已处理,1未处理
|
||||
*/
|
||||
@ExcelProperty(value = "0已处理,1未处理")
|
||||
private Long treatmentState;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
package com.fuyuanshen.equipment.mapper;
|
||||
|
||||
import com.fuyuanshen.equipment.domain.DeviceAlarm;
|
||||
import com.fuyuanshen.equipment.domain.vo.DeviceAlarmVo;
|
||||
import com.fuyuanshen.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 设备告警Mapper接口
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-08-28
|
||||
*/
|
||||
public interface DeviceAlarmMapper extends BaseMapperPlus<DeviceAlarm, DeviceAlarmVo> {
|
||||
|
||||
}
|
@ -0,0 +1,68 @@
|
||||
package com.fuyuanshen.equipment.service;
|
||||
|
||||
import com.fuyuanshen.equipment.domain.vo.DeviceAlarmVo;
|
||||
import com.fuyuanshen.equipment.domain.bo.DeviceAlarmBo;
|
||||
import com.fuyuanshen.common.mybatis.core.page.TableDataInfo;
|
||||
import com.fuyuanshen.common.mybatis.core.page.PageQuery;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 设备告警Service接口
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-08-28
|
||||
*/
|
||||
public interface IDeviceAlarmService {
|
||||
|
||||
/**
|
||||
* 查询设备告警
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 设备告警
|
||||
*/
|
||||
DeviceAlarmVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 分页查询设备告警列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 设备告警分页列表
|
||||
*/
|
||||
TableDataInfo<DeviceAlarmVo> queryPageList(DeviceAlarmBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的设备告警列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 设备告警列表
|
||||
*/
|
||||
List<DeviceAlarmVo> queryList(DeviceAlarmBo bo);
|
||||
|
||||
/**
|
||||
* 新增设备告警
|
||||
*
|
||||
* @param bo 设备告警
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean insertByBo(DeviceAlarmBo bo);
|
||||
|
||||
/**
|
||||
* 修改设备告警
|
||||
*
|
||||
* @param bo 设备告警
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(DeviceAlarmBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除设备告警信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
@ -0,0 +1,143 @@
|
||||
package com.fuyuanshen.equipment.service.impl;
|
||||
|
||||
import com.fuyuanshen.common.core.utils.MapstructUtils;
|
||||
import com.fuyuanshen.common.mybatis.core.page.TableDataInfo;
|
||||
import com.fuyuanshen.common.mybatis.core.page.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.fuyuanshen.equipment.domain.bo.DeviceAlarmBo;
|
||||
import com.fuyuanshen.equipment.domain.vo.DeviceAlarmVo;
|
||||
import com.fuyuanshen.equipment.domain.DeviceAlarm;
|
||||
import com.fuyuanshen.equipment.mapper.DeviceAlarmMapper;
|
||||
import com.fuyuanshen.equipment.service.IDeviceAlarmService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 设备告警Service业务层处理
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-08-28
|
||||
*/
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class DeviceAlarmServiceImpl implements IDeviceAlarmService {
|
||||
|
||||
private final DeviceAlarmMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询设备告警
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 设备告警
|
||||
*/
|
||||
@Override
|
||||
public DeviceAlarmVo queryById(Long id){
|
||||
return baseMapper.selectVoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询设备告警列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 设备告警分页列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<DeviceAlarmVo> queryPageList(DeviceAlarmBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<DeviceAlarm> lqw = buildQueryWrapper(bo);
|
||||
Page<DeviceAlarmVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合条件的设备告警列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 设备告警列表
|
||||
*/
|
||||
@Override
|
||||
public List<DeviceAlarmVo> queryList(DeviceAlarmBo bo) {
|
||||
LambdaQueryWrapper<DeviceAlarm> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<DeviceAlarm> buildQueryWrapper(DeviceAlarmBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<DeviceAlarm> lqw = Wrappers.lambdaQuery();
|
||||
lqw.orderByAsc(DeviceAlarm::getId);
|
||||
lqw.eq(bo.getDeviceId() != null, DeviceAlarm::getDeviceId, bo.getDeviceId());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getDeviceAction()), DeviceAlarm::getDeviceAction, bo.getDeviceAction());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getDeviceName()), DeviceAlarm::getDeviceName, bo.getDeviceName());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getDataSource()), DeviceAlarm::getDataSource, bo.getDataSource());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getContent()), DeviceAlarm::getContent, bo.getContent());
|
||||
lqw.eq(bo.getDeviceType() != null, DeviceAlarm::getDeviceType, bo.getDeviceType());
|
||||
lqw.eq(bo.getLongitude() != null, DeviceAlarm::getLongitude, bo.getLongitude());
|
||||
lqw.eq(bo.getLatitude() != null, DeviceAlarm::getLatitude, bo.getLatitude());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getLocation()), DeviceAlarm::getLocation, bo.getLocation());
|
||||
lqw.eq(bo.getStartTime() != null, DeviceAlarm::getStartTime, bo.getStartTime());
|
||||
lqw.eq(bo.getFinishTime() != null, DeviceAlarm::getFinishTime, bo.getFinishTime());
|
||||
lqw.eq(bo.getDurationTime() != null, DeviceAlarm::getDurationTime, bo.getDurationTime());
|
||||
lqw.eq(bo.getTreatmentState() != null, DeviceAlarm::getTreatmentState, bo.getTreatmentState());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增设备告警
|
||||
*
|
||||
* @param bo 设备告警
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(DeviceAlarmBo bo) {
|
||||
DeviceAlarm add = MapstructUtils.convert(bo, DeviceAlarm.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setId(add.getId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改设备告警
|
||||
*
|
||||
* @param bo 设备告警
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(DeviceAlarmBo bo) {
|
||||
DeviceAlarm update = MapstructUtils.convert(bo, DeviceAlarm.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(DeviceAlarm entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验并批量删除设备告警信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
}
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.fuyuanshen.equipment.mapper.DeviceAlarmMapper">
|
||||
|
||||
</mapper>
|
Reference in New Issue
Block a user