设备管理、预警配置
This commit is contained in:
parent
df1f7f5071
commit
2d173fdb37
|
|
@ -0,0 +1,82 @@
|
|||
package com.bonus.base.controller;
|
||||
import com.bonus.base.domain.TbDevice;
|
||||
import com.bonus.base.service.TbDeviceService;
|
||||
import com.bonus.common.core.web.controller.BaseController;
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 设备信息表(tb_device)表控制层
|
||||
*
|
||||
* @author syruan
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/tbDevice")
|
||||
public class TbDeviceController extends BaseController {
|
||||
|
||||
/**
|
||||
* 服务对象
|
||||
*/
|
||||
@Autowired
|
||||
private TbDeviceService tbDeviceService;
|
||||
|
||||
/**
|
||||
* 通过主键查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@GetMapping("/{id}")
|
||||
public AjaxResult queryById(@PathVariable("id") Long id) {
|
||||
return success(tbDeviceService.selectByPrimaryKey(id));
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/list")
|
||||
public AjaxResult queryByPage(TbDevice tbDevice) {
|
||||
startPage();
|
||||
List<TbDevice> list = tbDeviceService.getAll(tbDevice);
|
||||
return AjaxResult.success(getDataTable(list));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
* @param tbDevice 实体
|
||||
* @return 新增结果
|
||||
*/
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody TbDevice tbDevice) {
|
||||
return toAjax(tbDeviceService.insertSelective(tbDevice));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 编辑数据
|
||||
*
|
||||
* @param tbDevice 实体
|
||||
* @return 编辑结果
|
||||
*/
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody TbDevice tbDevice) {
|
||||
return toAjax(tbDeviceService.updateByPrimaryKeySelective(tbDevice));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 删除数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 删除是否成功
|
||||
*/
|
||||
@DeleteMapping("/{id}")
|
||||
public AjaxResult deleteById(@PathVariable("id") Long id) {
|
||||
return toAjax(tbDeviceService.deleteByPrimaryKey(id));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,80 @@
|
|||
package com.bonus.base.controller;
|
||||
import com.bonus.base.domain.TbWarnConfig;
|
||||
import com.bonus.base.service.TbWarnConfigService;
|
||||
import com.bonus.common.core.web.controller.BaseController;
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 预警配置表(tb_warn_config)表控制层
|
||||
*
|
||||
* @author syruan
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/tbWarnConfig")
|
||||
public class TbWarnConfigController extends BaseController {
|
||||
/**
|
||||
* 服务对象
|
||||
*/
|
||||
@Resource
|
||||
private TbWarnConfigService tbWarnConfigService;
|
||||
|
||||
/**
|
||||
* 通过主键查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 单条数据
|
||||
*/
|
||||
@GetMapping("/{id}")
|
||||
public AjaxResult queryById(@PathVariable("id") Long id) {
|
||||
return success(tbWarnConfigService.selectByPrimaryKey(id));
|
||||
}
|
||||
|
||||
@GetMapping("/list")
|
||||
public AjaxResult queryByPage(TbWarnConfig tbWarnConfig) {
|
||||
startPage();
|
||||
List<TbWarnConfig> list = tbWarnConfigService.getAll(tbWarnConfig);
|
||||
return AjaxResult.success(getDataTable(list));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
* @param tbWarnConfig 实体
|
||||
* @return 新增结果
|
||||
*/
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody @Valid TbWarnConfig tbWarnConfig) {
|
||||
return toAjax(tbWarnConfigService.insertSelective(tbWarnConfig));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 编辑数据
|
||||
*
|
||||
* @param tbWarnConfig 实体
|
||||
* @return 编辑结果
|
||||
*/
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody @Valid TbWarnConfig tbWarnConfig) {
|
||||
return toAjax(tbWarnConfigService.updateByPrimaryKeySelective(tbWarnConfig));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 删除数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 删除是否成功
|
||||
*/
|
||||
@DeleteMapping("/{id}")
|
||||
public AjaxResult deleteById(@PathVariable("id") Long id) {
|
||||
return toAjax(tbWarnConfigService.deleteByPrimaryKey(id));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,85 @@
|
|||
package com.bonus.base.domain;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.io.Serializable;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @PackagePath: com.bonus.base.domain
|
||||
* @author : 阮世耀
|
||||
* @CreateTime: 2024-09-10 14:35
|
||||
* @Description: 描述
|
||||
* @version : 1.0
|
||||
*/
|
||||
@ApiModel(description="设备信息表")
|
||||
@Data
|
||||
public class TbDevice implements Serializable {
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@ApiModelProperty(value="主键")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 设备类型(码表)
|
||||
*/
|
||||
@ApiModelProperty(value="设备类型(码表)")
|
||||
@Size(max = 32,message = "设备类型(码表)最大长度要小于 32")
|
||||
private String devType;
|
||||
|
||||
/**
|
||||
* 设备编码(唯一)
|
||||
*/
|
||||
@ApiModelProperty(value="设备编码(唯一)")
|
||||
@Size(max = 64,message = "设备编码(唯一)最大长度要小于 64")
|
||||
private String devCode;
|
||||
|
||||
/**
|
||||
* 设备名称
|
||||
*/
|
||||
@ApiModelProperty(value="设备名称")
|
||||
@Size(max = 64,message = "设备名称最大长度要小于 64")
|
||||
private String devName;
|
||||
|
||||
/**
|
||||
* 所属边带
|
||||
*/
|
||||
@ApiModelProperty(value="所属边带")
|
||||
private Long bdId;
|
||||
|
||||
/**
|
||||
* 配置id
|
||||
*/
|
||||
@ApiModelProperty(value="配置id")
|
||||
private Long configId;
|
||||
|
||||
/**
|
||||
* 设备状态 0 离线 1在线
|
||||
*/
|
||||
@ApiModelProperty(value="设备状态 0 离线 1在线")
|
||||
private Integer devStatus;
|
||||
|
||||
/**
|
||||
* 告警状态 0 正常 1 告警
|
||||
*/
|
||||
@ApiModelProperty(value="告警状态 0 正常 1 告警")
|
||||
private Integer devWarn;
|
||||
|
||||
/**
|
||||
* 删除状态
|
||||
*/
|
||||
@ApiModelProperty(value="删除状态")
|
||||
private Integer delFlag;
|
||||
|
||||
/**
|
||||
* 图标路径
|
||||
*/
|
||||
@ApiModelProperty(value="图标路径")
|
||||
@Size(max = 128,message = "图标路径最大长度要小于 128")
|
||||
private String logoUrl;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
||||
|
|
@ -0,0 +1,144 @@
|
|||
package com.bonus.base.domain;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @PackagePath: com.bonus.base.domain
|
||||
* @author : 阮世耀
|
||||
* @CreateTime: 2024-09-10
|
||||
* @version : 1.0
|
||||
* 预警配置表
|
||||
*/
|
||||
@ApiModel(description="预警配置表")
|
||||
@Data
|
||||
public class TbWarnConfig implements Serializable {
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@ApiModelProperty(value="主键")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 类型(来源码表-设备类型)
|
||||
*/
|
||||
@ApiModelProperty(value="类型(来源码表-设备类型)")
|
||||
private Integer configuType;
|
||||
|
||||
/**
|
||||
* 配置名称
|
||||
*/
|
||||
@ApiModelProperty(value="配置名称")
|
||||
@Size(max = 64,message = "配置名称最大长度要小于 64")
|
||||
private String configName;
|
||||
|
||||
/**
|
||||
* 阈值1-max
|
||||
*/
|
||||
@ApiModelProperty(value="阈值1-max")
|
||||
private BigDecimal configVal1Max;
|
||||
|
||||
/**
|
||||
* 阈值1-min
|
||||
*/
|
||||
@ApiModelProperty(value="阈值1-min")
|
||||
private BigDecimal configVal1Min;
|
||||
|
||||
/**
|
||||
* 阈值2-max
|
||||
*/
|
||||
@ApiModelProperty(value="阈值2-max")
|
||||
private BigDecimal configVal2Max;
|
||||
|
||||
/**
|
||||
* 阈值2-min
|
||||
*/
|
||||
@ApiModelProperty(value="阈值2-min")
|
||||
private BigDecimal configVal2Min;
|
||||
|
||||
/**
|
||||
* 阈值3-max
|
||||
*/
|
||||
@ApiModelProperty(value="阈值3-max")
|
||||
private BigDecimal configVal3Max;
|
||||
|
||||
/**
|
||||
* 阈值3-min
|
||||
*/
|
||||
@ApiModelProperty(value="阈值3-min")
|
||||
private BigDecimal configVal3Min;
|
||||
|
||||
/**
|
||||
* 阈值4-max
|
||||
*/
|
||||
@ApiModelProperty(value="阈值4-max")
|
||||
private BigDecimal configVal4Max;
|
||||
|
||||
/**
|
||||
* 阈值4-min
|
||||
*/
|
||||
@ApiModelProperty(value="阈值4-min")
|
||||
private BigDecimal configVal4Min;
|
||||
|
||||
/**
|
||||
* 阈值5-max
|
||||
*/
|
||||
@ApiModelProperty(value="阈值5-max")
|
||||
private BigDecimal configVal5Max;
|
||||
|
||||
/**
|
||||
* 阈值5-min
|
||||
*/
|
||||
@ApiModelProperty(value="阈值5-min")
|
||||
private BigDecimal configVal5Min;
|
||||
|
||||
/**
|
||||
* 阈值6-max
|
||||
*/
|
||||
@ApiModelProperty(value="阈值6-max")
|
||||
private BigDecimal configVal6Max;
|
||||
|
||||
/**
|
||||
* 阈值6-min
|
||||
*/
|
||||
@ApiModelProperty(value="阈值6-min")
|
||||
private BigDecimal configVal6Min;
|
||||
|
||||
/**
|
||||
* 删除状态
|
||||
*/
|
||||
@ApiModelProperty(value="删除状态")
|
||||
private Integer delFlag;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ApiModelProperty(value="创建时间")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@ApiModelProperty(value="创建人")
|
||||
private Integer createUser;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
@ApiModelProperty(value="修改时间")
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 修改人
|
||||
*/
|
||||
@ApiModelProperty(value="修改人")
|
||||
private Integer updateUser;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
package com.bonus.base.mapper;
|
||||
|
||||
import com.bonus.base.domain.TbDevice;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*@PackagePath: com.bonus.base.mapper
|
||||
*@author : 阮世耀
|
||||
*@version : 1.0
|
||||
*/
|
||||
@Mapper
|
||||
public interface TbDeviceMapper {
|
||||
int deleteByPrimaryKey(Long id);
|
||||
|
||||
int deleteByPrimaryKeyIn(List<Long> list);
|
||||
|
||||
int insert(TbDevice record);
|
||||
|
||||
int insertSelective(TbDevice record);
|
||||
|
||||
TbDevice selectByPrimaryKey(Long id);
|
||||
|
||||
int updateByPrimaryKeySelective(TbDevice record);
|
||||
|
||||
int updateByPrimaryKey(TbDevice record);
|
||||
|
||||
List<TbDevice> getAll(TbDevice record);
|
||||
|
||||
int updateBatch(List<TbDevice> list);
|
||||
}
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
package com.bonus.base.mapper;
|
||||
|
||||
import com.bonus.base.domain.TbWarnConfig;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*@PackagePath: com.bonus.base.mapper
|
||||
*@author : 阮世耀
|
||||
*@CreateTime: 2024-09-10 16:34
|
||||
*@Description: 描述
|
||||
*@version : 1.0
|
||||
*/
|
||||
@Mapper
|
||||
public interface TbWarnConfigMapper {
|
||||
int deleteByPrimaryKey(Long id);
|
||||
|
||||
int deleteByPrimaryKeyIn(List<Long> list);
|
||||
|
||||
int insert(TbWarnConfig record);
|
||||
|
||||
int insertSelective(TbWarnConfig record);
|
||||
|
||||
TbWarnConfig selectByPrimaryKey(Long id);
|
||||
|
||||
List<TbWarnConfig> getAll(TbWarnConfig record);
|
||||
|
||||
|
||||
|
||||
int updateByPrimaryKeySelective(TbWarnConfig record);
|
||||
|
||||
int updateByPrimaryKey(TbWarnConfig record);
|
||||
|
||||
int updateBatch(List<TbWarnConfig> list);
|
||||
}
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
package com.bonus.base.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.bonus.base.domain.TbDevice;
|
||||
/**
|
||||
*@PackagePath: com.bonus.base.service
|
||||
*@author : 阮世耀
|
||||
*@version : 1.0
|
||||
*/
|
||||
public interface TbDeviceService{
|
||||
|
||||
int deleteByPrimaryKey(Long id);
|
||||
|
||||
int deleteByPrimaryKeyIn(List<Long> list);
|
||||
|
||||
int insert(TbDevice record);
|
||||
|
||||
int insertSelective(TbDevice record);
|
||||
|
||||
TbDevice selectByPrimaryKey(Long id);
|
||||
|
||||
int updateByPrimaryKeySelective(TbDevice record);
|
||||
|
||||
int updateByPrimaryKey(TbDevice record);
|
||||
|
||||
List<TbDevice> getAll(TbDevice record);
|
||||
|
||||
int updateBatch(List<TbDevice> list);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
package com.bonus.base.service;
|
||||
|
||||
import com.bonus.base.domain.TbWarnConfig;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author : 阮世耀
|
||||
* @CreateTime: 2024-09-10
|
||||
*/
|
||||
public interface TbWarnConfigService{
|
||||
|
||||
int deleteByPrimaryKey(Long id);
|
||||
|
||||
int deleteByPrimaryKeyIn(List<Long> list);
|
||||
|
||||
int insert(TbWarnConfig record);
|
||||
|
||||
int insertSelective(TbWarnConfig record);
|
||||
|
||||
TbWarnConfig selectByPrimaryKey(Long id);
|
||||
|
||||
int updateByPrimaryKeySelective(TbWarnConfig record);
|
||||
|
||||
int updateByPrimaryKey(TbWarnConfig record);
|
||||
|
||||
int updateBatch(List<TbWarnConfig> list);
|
||||
|
||||
List<TbWarnConfig> getAll(TbWarnConfig record);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,67 @@
|
|||
package com.bonus.base.service.impl;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import java.util.List;
|
||||
import com.bonus.base.mapper.TbDeviceMapper;
|
||||
import com.bonus.base.domain.TbDevice;
|
||||
import com.bonus.base.service.TbDeviceService;
|
||||
/**
|
||||
*@PackagePath: com.bonus.base.service.impl
|
||||
*@author : 阮世耀
|
||||
*@version : 1.0
|
||||
*/
|
||||
@Service
|
||||
public class TbDeviceServiceImpl implements TbDeviceService{
|
||||
|
||||
@Autowired
|
||||
private TbDeviceMapper tbDeviceMapper;
|
||||
|
||||
@Override
|
||||
public int deleteByPrimaryKey(Long id) {
|
||||
return tbDeviceMapper.deleteByPrimaryKey(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteByPrimaryKeyIn(List<Long> list) {
|
||||
return tbDeviceMapper.deleteByPrimaryKeyIn(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insert(TbDevice record) {
|
||||
return tbDeviceMapper.insert(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertSelective(TbDevice record) {
|
||||
return tbDeviceMapper.insertSelective(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TbDevice selectByPrimaryKey(Long id) {
|
||||
return tbDeviceMapper.selectByPrimaryKey(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateByPrimaryKeySelective(TbDevice record) {
|
||||
return tbDeviceMapper.updateByPrimaryKeySelective(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateByPrimaryKey(TbDevice record) {
|
||||
return tbDeviceMapper.updateByPrimaryKey(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<TbDevice> getAll(TbDevice record) {
|
||||
return tbDeviceMapper.getAll(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateBatch(List<TbDevice> list) {
|
||||
return tbDeviceMapper.updateBatch(list);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,72 @@
|
|||
package com.bonus.base.service.impl;
|
||||
|
||||
import com.bonus.base.domain.TbWarnConfig;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import java.util.List;
|
||||
import com.bonus.base.mapper.TbWarnConfigMapper;
|
||||
import com.bonus.base.service.TbWarnConfigService;
|
||||
/**
|
||||
*@PackagePath: com.bonus.base.service.impl
|
||||
*@author : 阮世耀
|
||||
*@CreateTime: 2024-09-10 16:34
|
||||
*@Description: 描述
|
||||
*@version : 1.0
|
||||
*/
|
||||
@Service
|
||||
public class TbWarnConfigServiceImpl implements TbWarnConfigService{
|
||||
|
||||
@Autowired
|
||||
private TbWarnConfigMapper tbWarnConfigMapper;
|
||||
|
||||
@Override
|
||||
public int deleteByPrimaryKey(Long id) {
|
||||
return tbWarnConfigMapper.deleteByPrimaryKey(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteByPrimaryKeyIn(List<Long> list) {
|
||||
return tbWarnConfigMapper.deleteByPrimaryKeyIn(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insert(TbWarnConfig record) {
|
||||
return tbWarnConfigMapper.insert(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertSelective(TbWarnConfig record) {
|
||||
return tbWarnConfigMapper.insertSelective(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TbWarnConfig selectByPrimaryKey(Long id) {
|
||||
return tbWarnConfigMapper.selectByPrimaryKey(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateByPrimaryKeySelective(TbWarnConfig record) {
|
||||
return tbWarnConfigMapper.updateByPrimaryKeySelective(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateByPrimaryKey(TbWarnConfig record) {
|
||||
return tbWarnConfigMapper.updateByPrimaryKey(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateBatch(List<TbWarnConfig> list) {
|
||||
return tbWarnConfigMapper.updateBatch(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<TbWarnConfig> getAll(TbWarnConfig record){
|
||||
return tbWarnConfigMapper.getAll(record);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,229 @@
|
|||
<?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.bonus.base.mapper.TbDeviceMapper">
|
||||
<resultMap id="BaseResultMap" type="com.bonus.base.domain.TbDevice">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table tb_device-->
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="dev_type" jdbcType="VARCHAR" property="devType" />
|
||||
<result column="dev_code" jdbcType="VARCHAR" property="devCode" />
|
||||
<result column="dev_name" jdbcType="VARCHAR" property="devName" />
|
||||
<result column="bd_id" jdbcType="BIGINT" property="bdId" />
|
||||
<result column="config_id" jdbcType="BIGINT" property="configId" />
|
||||
<result column="dev_status" jdbcType="INTEGER" property="devStatus" />
|
||||
<result column="dev_warn" jdbcType="INTEGER" property="devWarn" />
|
||||
<result column="del_flag" jdbcType="INTEGER" property="delFlag" />
|
||||
<result column="logo_url" jdbcType="VARCHAR" property="logoUrl" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
id, dev_type, dev_code, dev_name, bd_id, config_id, dev_status, dev_warn, del_flag,
|
||||
logo_url
|
||||
</sql>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
||||
<!--@mbg.generated-->
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from tb_device
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
update tb_device set del_flag = 1
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.bonus.base.domain.TbDevice">
|
||||
<!--@mbg.generated-->
|
||||
insert into tb_device (id, dev_type, dev_code,
|
||||
dev_name, bd_id, config_id,
|
||||
dev_status, dev_warn, del_flag,
|
||||
logo_url)
|
||||
values (#{id,jdbcType=BIGINT}, #{devType,jdbcType=VARCHAR}, #{devCode,jdbcType=VARCHAR},
|
||||
#{devName,jdbcType=VARCHAR}, #{bdId,jdbcType=BIGINT}, #{configId,jdbcType=BIGINT},
|
||||
#{devStatus,jdbcType=INTEGER}, #{devWarn,jdbcType=INTEGER}, #{delFlag,jdbcType=INTEGER},
|
||||
#{logoUrl,jdbcType=VARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.bonus.base.domain.TbDevice">
|
||||
<!--@mbg.generated-->
|
||||
insert into tb_device
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="devType != null and devType != ''">
|
||||
dev_type,
|
||||
</if>
|
||||
<if test="devCode != null and devCode != ''">
|
||||
dev_code,
|
||||
</if>
|
||||
<if test="devName != null and devName != ''">
|
||||
dev_name,
|
||||
</if>
|
||||
<if test="bdId != null">
|
||||
bd_id,
|
||||
</if>
|
||||
<if test="configId != null">
|
||||
config_id,
|
||||
</if>
|
||||
<if test="devStatus != null">
|
||||
dev_status,
|
||||
</if>
|
||||
<if test="devWarn != null">
|
||||
dev_warn,
|
||||
</if>
|
||||
<if test="delFlag != null">
|
||||
del_flag,
|
||||
</if>
|
||||
<if test="logoUrl != null and logoUrl != ''">
|
||||
logo_url,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
#{id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="devType != null and devType != ''">
|
||||
#{devType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="devCode != null and devCode != ''">
|
||||
#{devCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="devName != null and devName != ''">
|
||||
#{devName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="bdId != null">
|
||||
#{bdId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="configId != null">
|
||||
#{configId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="devStatus != null">
|
||||
#{devStatus,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="devWarn != null">
|
||||
#{devWarn,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="delFlag != null">
|
||||
#{delFlag,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="logoUrl != null and logoUrl != ''">
|
||||
#{logoUrl,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.bonus.base.domain.TbDevice">
|
||||
<!--@mbg.generated-->
|
||||
update tb_device
|
||||
<set>
|
||||
<if test="devType != null and devType != ''">
|
||||
dev_type = #{devType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="devCode != null and devCode != ''">
|
||||
dev_code = #{devCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="devName != null and devName != ''">
|
||||
dev_name = #{devName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="bdId != null">
|
||||
bd_id = #{bdId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="configId != null">
|
||||
config_id = #{configId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="devStatus != null">
|
||||
dev_status = #{devStatus,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="devWarn != null">
|
||||
dev_warn = #{devWarn,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="delFlag != null">
|
||||
del_flag = #{delFlag,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="logoUrl != null and logoUrl != ''">
|
||||
logo_url = #{logoUrl,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.bonus.base.domain.TbDevice">
|
||||
<!--@mbg.generated-->
|
||||
update tb_device
|
||||
set dev_type = #{devType,jdbcType=VARCHAR},
|
||||
dev_code = #{devCode,jdbcType=VARCHAR},
|
||||
dev_name = #{devName,jdbcType=VARCHAR},
|
||||
bd_id = #{bdId,jdbcType=BIGINT},
|
||||
config_id = #{configId,jdbcType=BIGINT},
|
||||
dev_status = #{devStatus,jdbcType=INTEGER},
|
||||
dev_warn = #{devWarn,jdbcType=INTEGER},
|
||||
del_flag = #{delFlag,jdbcType=INTEGER},
|
||||
logo_url = #{logoUrl,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<select id="getAll" resultMap="BaseResultMap">
|
||||
<!--@mbg.generated-->
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from tb_device
|
||||
where del_flag = 0
|
||||
</select>
|
||||
<update id="updateBatch" parameterType="java.util.List">
|
||||
<!--@mbg.generated-->
|
||||
update tb_device
|
||||
<trim prefix="set" suffixOverrides=",">
|
||||
<trim prefix="dev_type = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
when id = #{item.id,jdbcType=BIGINT} then #{item.devType,jdbcType=VARCHAR}
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="dev_code = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
when id = #{item.id,jdbcType=BIGINT} then #{item.devCode,jdbcType=VARCHAR}
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="dev_name = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
when id = #{item.id,jdbcType=BIGINT} then #{item.devName,jdbcType=VARCHAR}
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="bd_id = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
when id = #{item.id,jdbcType=BIGINT} then #{item.bdId,jdbcType=BIGINT}
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="config_id = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
when id = #{item.id,jdbcType=BIGINT} then #{item.configId,jdbcType=BIGINT}
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="dev_status = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
when id = #{item.id,jdbcType=BIGINT} then #{item.devStatus,jdbcType=INTEGER}
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="dev_warn = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
when id = #{item.id,jdbcType=BIGINT} then #{item.devWarn,jdbcType=INTEGER}
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="del_flag = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
when id = #{item.id,jdbcType=BIGINT} then #{item.delFlag,jdbcType=INTEGER}
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="logo_url = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
when id = #{item.id,jdbcType=BIGINT} then #{item.logoUrl,jdbcType=VARCHAR}
|
||||
</foreach>
|
||||
</trim>
|
||||
</trim>
|
||||
where id in
|
||||
<foreach close=")" collection="list" item="item" open="(" separator=", ">
|
||||
#{item.id,jdbcType=BIGINT}
|
||||
</foreach>
|
||||
</update>
|
||||
<delete id="deleteByPrimaryKeyIn">
|
||||
delete from tb_device where id in
|
||||
<foreach close=")" collection="list" item="id" open="(" separator=", ">
|
||||
#{id,jdbcType=BIGINT}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,403 @@
|
|||
<?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.bonus.base.mapper.TbWarnConfigMapper">
|
||||
<resultMap id="BaseResultMap" type="com.bonus.base.domain.TbWarnConfig">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table tb_warn_config-->
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="configu_type" jdbcType="INTEGER" property="configuType" />
|
||||
<result column="config_name" jdbcType="VARCHAR" property="configName" />
|
||||
<result column="config_val1_max" jdbcType="DECIMAL" property="configVal1Max" />
|
||||
<result column="config_val1_min" jdbcType="DECIMAL" property="configVal1Min" />
|
||||
<result column="config_val2_max" jdbcType="DECIMAL" property="configVal2Max" />
|
||||
<result column="config_val2_min" jdbcType="DECIMAL" property="configVal2Min" />
|
||||
<result column="config_val3_max" jdbcType="DECIMAL" property="configVal3Max" />
|
||||
<result column="config_val3_min" jdbcType="DECIMAL" property="configVal3Min" />
|
||||
<result column="config_val4_max" jdbcType="DECIMAL" property="configVal4Max" />
|
||||
<result column="config_val4_min" jdbcType="DECIMAL" property="configVal4Min" />
|
||||
<result column="config_val5_max" jdbcType="DECIMAL" property="configVal5Max" />
|
||||
<result column="config_val5_min" jdbcType="DECIMAL" property="configVal5Min" />
|
||||
<result column="config_val6_max" jdbcType="DECIMAL" property="configVal6Max" />
|
||||
<result column="config_val6_min" jdbcType="DECIMAL" property="configVal6Min" />
|
||||
<result column="del_flag" jdbcType="INTEGER" property="delFlag" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="create_user" jdbcType="INTEGER" property="createUser" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
<result column="update_user" jdbcType="INTEGER" property="updateUser" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
id, configu_type, config_name, config_val1_max, config_val1_min, config_val2_max,
|
||||
config_val2_min, config_val3_max, config_val3_min, config_val4_max, config_val4_min,
|
||||
config_val5_max, config_val5_min, config_val6_max, config_val6_min, del_flag, create_time,
|
||||
create_user, update_time, update_user
|
||||
</sql>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
||||
<!--@mbg.generated-->
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from tb_warn_config
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
update tb_warn_config set del_flag = 1
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
|
||||
<insert id="insert" parameterType="com.bonus.base.domain.TbWarnConfig">
|
||||
<!--@mbg.generated-->
|
||||
insert into tb_warn_config (id, configu_type, config_name,
|
||||
config_val1_max, config_val1_min, config_val2_max,
|
||||
config_val2_min, config_val3_max, config_val3_min,
|
||||
config_val4_max, config_val4_min, config_val5_max,
|
||||
config_val5_min, config_val6_max, config_val6_min,
|
||||
del_flag, create_time, create_user,
|
||||
update_time, update_user)
|
||||
values (#{id,jdbcType=BIGINT}, #{configuType,jdbcType=INTEGER}, #{configName,jdbcType=VARCHAR},
|
||||
#{configVal1Max,jdbcType=DECIMAL}, #{configVal1Min,jdbcType=DECIMAL}, #{configVal2Max,jdbcType=DECIMAL},
|
||||
#{configVal2Min,jdbcType=DECIMAL}, #{configVal3Max,jdbcType=DECIMAL}, #{configVal3Min,jdbcType=DECIMAL},
|
||||
#{configVal4Max,jdbcType=DECIMAL}, #{configVal4Min,jdbcType=DECIMAL}, #{configVal5Max,jdbcType=DECIMAL},
|
||||
#{configVal5Min,jdbcType=DECIMAL}, #{configVal6Max,jdbcType=DECIMAL}, #{configVal6Min,jdbcType=DECIMAL},
|
||||
#{delFlag,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{createUser,jdbcType=INTEGER},
|
||||
#{updateTime,jdbcType=TIMESTAMP}, #{updateUser,jdbcType=INTEGER})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.bonus.base.domain.TbWarnConfig">
|
||||
<!--@mbg.generated-->
|
||||
insert into tb_warn_config
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="configuType != null">
|
||||
configu_type,
|
||||
</if>
|
||||
<if test="configName != null and configName != ''">
|
||||
config_name,
|
||||
</if>
|
||||
<if test="configVal1Max != null">
|
||||
config_val1_max,
|
||||
</if>
|
||||
<if test="configVal1Min != null">
|
||||
config_val1_min,
|
||||
</if>
|
||||
<if test="configVal2Max != null">
|
||||
config_val2_max,
|
||||
</if>
|
||||
<if test="configVal2Min != null">
|
||||
config_val2_min,
|
||||
</if>
|
||||
<if test="configVal3Max != null">
|
||||
config_val3_max,
|
||||
</if>
|
||||
<if test="configVal3Min != null">
|
||||
config_val3_min,
|
||||
</if>
|
||||
<if test="configVal4Max != null">
|
||||
config_val4_max,
|
||||
</if>
|
||||
<if test="configVal4Min != null">
|
||||
config_val4_min,
|
||||
</if>
|
||||
<if test="configVal5Max != null">
|
||||
config_val5_max,
|
||||
</if>
|
||||
<if test="configVal5Min != null">
|
||||
config_val5_min,
|
||||
</if>
|
||||
<if test="configVal6Max != null">
|
||||
config_val6_max,
|
||||
</if>
|
||||
<if test="configVal6Min != null">
|
||||
config_val6_min,
|
||||
</if>
|
||||
<if test="delFlag != null">
|
||||
del_flag,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="createUser != null">
|
||||
create_user,
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time,
|
||||
</if>
|
||||
<if test="updateUser != null">
|
||||
update_user,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
#{id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="configuType != null">
|
||||
#{configuType,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="configName != null and configName != ''">
|
||||
#{configName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="configVal1Max != null">
|
||||
#{configVal1Max,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="configVal1Min != null">
|
||||
#{configVal1Min,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="configVal2Max != null">
|
||||
#{configVal2Max,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="configVal2Min != null">
|
||||
#{configVal2Min,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="configVal3Max != null">
|
||||
#{configVal3Max,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="configVal3Min != null">
|
||||
#{configVal3Min,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="configVal4Max != null">
|
||||
#{configVal4Max,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="configVal4Min != null">
|
||||
#{configVal4Min,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="configVal5Max != null">
|
||||
#{configVal5Max,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="configVal5Min != null">
|
||||
#{configVal5Min,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="configVal6Max != null">
|
||||
#{configVal6Max,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="configVal6Min != null">
|
||||
#{configVal6Min,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="delFlag != null">
|
||||
#{delFlag,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="createUser != null">
|
||||
#{createUser,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
#{updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updateUser != null">
|
||||
#{updateUser,jdbcType=INTEGER},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.bonus.base.domain.TbWarnConfig">
|
||||
<!--@mbg.generated-->
|
||||
update tb_warn_config
|
||||
<set>
|
||||
<if test="configuType != null">
|
||||
configu_type = #{configuType,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="configName != null and configName != ''">
|
||||
config_name = #{configName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="configVal1Max != null">
|
||||
config_val1_max = #{configVal1Max,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="configVal1Min != null">
|
||||
config_val1_min = #{configVal1Min,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="configVal2Max != null">
|
||||
config_val2_max = #{configVal2Max,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="configVal2Min != null">
|
||||
config_val2_min = #{configVal2Min,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="configVal3Max != null">
|
||||
config_val3_max = #{configVal3Max,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="configVal3Min != null">
|
||||
config_val3_min = #{configVal3Min,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="configVal4Max != null">
|
||||
config_val4_max = #{configVal4Max,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="configVal4Min != null">
|
||||
config_val4_min = #{configVal4Min,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="configVal5Max != null">
|
||||
config_val5_max = #{configVal5Max,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="configVal5Min != null">
|
||||
config_val5_min = #{configVal5Min,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="configVal6Max != null">
|
||||
config_val6_max = #{configVal6Max,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="configVal6Min != null">
|
||||
config_val6_min = #{configVal6Min,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="delFlag != null">
|
||||
del_flag = #{delFlag,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="createUser != null">
|
||||
create_user = #{createUser,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updateUser != null">
|
||||
update_user = #{updateUser,jdbcType=INTEGER},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.bonus.base.domain.TbWarnConfig">
|
||||
<!--@mbg.generated-->
|
||||
update tb_warn_config
|
||||
set configu_type = #{configuType,jdbcType=INTEGER},
|
||||
config_name = #{configName,jdbcType=VARCHAR},
|
||||
config_val1_max = #{configVal1Max,jdbcType=DECIMAL},
|
||||
config_val1_min = #{configVal1Min,jdbcType=DECIMAL},
|
||||
config_val2_max = #{configVal2Max,jdbcType=DECIMAL},
|
||||
config_val2_min = #{configVal2Min,jdbcType=DECIMAL},
|
||||
config_val3_max = #{configVal3Max,jdbcType=DECIMAL},
|
||||
config_val3_min = #{configVal3Min,jdbcType=DECIMAL},
|
||||
config_val4_max = #{configVal4Max,jdbcType=DECIMAL},
|
||||
config_val4_min = #{configVal4Min,jdbcType=DECIMAL},
|
||||
config_val5_max = #{configVal5Max,jdbcType=DECIMAL},
|
||||
config_val5_min = #{configVal5Min,jdbcType=DECIMAL},
|
||||
config_val6_max = #{configVal6Max,jdbcType=DECIMAL},
|
||||
config_val6_min = #{configVal6Min,jdbcType=DECIMAL},
|
||||
del_flag = #{delFlag,jdbcType=INTEGER},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
create_user = #{createUser,jdbcType=INTEGER},
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||
update_user = #{updateUser,jdbcType=INTEGER}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
|
||||
<update id="updateBatch" parameterType="java.util.List">
|
||||
<!--@mbg.generated-->
|
||||
update tb_warn_config
|
||||
<trim prefix="set" suffixOverrides=",">
|
||||
<trim prefix="configu_type = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
when id = #{item.id,jdbcType=BIGINT} then #{item.configuType,jdbcType=INTEGER}
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="config_name = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
when id = #{item.id,jdbcType=BIGINT} then #{item.configName,jdbcType=VARCHAR}
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="config_val1_max = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
when id = #{item.id,jdbcType=BIGINT} then #{item.configVal1Max,jdbcType=DECIMAL}
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="config_val1_min = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
when id = #{item.id,jdbcType=BIGINT} then #{item.configVal1Min,jdbcType=DECIMAL}
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="config_val2_max = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
when id = #{item.id,jdbcType=BIGINT} then #{item.configVal2Max,jdbcType=DECIMAL}
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="config_val2_min = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
when id = #{item.id,jdbcType=BIGINT} then #{item.configVal2Min,jdbcType=DECIMAL}
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="config_val3_max = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
when id = #{item.id,jdbcType=BIGINT} then #{item.configVal3Max,jdbcType=DECIMAL}
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="config_val3_min = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
when id = #{item.id,jdbcType=BIGINT} then #{item.configVal3Min,jdbcType=DECIMAL}
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="config_val4_max = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
when id = #{item.id,jdbcType=BIGINT} then #{item.configVal4Max,jdbcType=DECIMAL}
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="config_val4_min = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
when id = #{item.id,jdbcType=BIGINT} then #{item.configVal4Min,jdbcType=DECIMAL}
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="config_val5_max = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
when id = #{item.id,jdbcType=BIGINT} then #{item.configVal5Max,jdbcType=DECIMAL}
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="config_val5_min = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
when id = #{item.id,jdbcType=BIGINT} then #{item.configVal5Min,jdbcType=DECIMAL}
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="config_val6_max = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
when id = #{item.id,jdbcType=BIGINT} then #{item.configVal6Max,jdbcType=DECIMAL}
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="config_val6_min = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
when id = #{item.id,jdbcType=BIGINT} then #{item.configVal6Min,jdbcType=DECIMAL}
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="del_flag = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
when id = #{item.id,jdbcType=BIGINT} then #{item.delFlag,jdbcType=INTEGER}
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="create_time = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
when id = #{item.id,jdbcType=BIGINT} then #{item.createTime,jdbcType=TIMESTAMP}
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="create_user = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
when id = #{item.id,jdbcType=BIGINT} then #{item.createUser,jdbcType=INTEGER}
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="update_time = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
when id = #{item.id,jdbcType=BIGINT} then #{item.updateTime,jdbcType=TIMESTAMP}
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="update_user = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
when id = #{item.id,jdbcType=BIGINT} then #{item.updateUser,jdbcType=INTEGER}
|
||||
</foreach>
|
||||
</trim>
|
||||
</trim>
|
||||
where id in
|
||||
<foreach close=")" collection="list" item="item" open="(" separator=", ">
|
||||
#{item.id,jdbcType=BIGINT}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<delete id="deleteByPrimaryKeyIn">
|
||||
<!--@mbg.generated-->
|
||||
delete from tb_warn_config where id in
|
||||
<foreach close=")" collection="list" item="id" open="(" separator=", ">
|
||||
#{id,jdbcType=BIGINT}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<!--by syruan on 2024-09-10-->
|
||||
<select id="getAll" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from tb_warn_config
|
||||
where del_flag = 0
|
||||
</select>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue