diff --git a/bonus-modules/bonus-base/src/main/java/com/bonus/base/controller/TbDeviceController.java b/bonus-modules/bonus-base/src/main/java/com/bonus/base/controller/TbDeviceController.java new file mode 100644 index 0000000..c10e85f --- /dev/null +++ b/bonus-modules/bonus-base/src/main/java/com/bonus/base/controller/TbDeviceController.java @@ -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 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)); + } + + +} diff --git a/bonus-modules/bonus-base/src/main/java/com/bonus/base/controller/TbWarnConfigController.java b/bonus-modules/bonus-base/src/main/java/com/bonus/base/controller/TbWarnConfigController.java new file mode 100644 index 0000000..831f61e --- /dev/null +++ b/bonus-modules/bonus-base/src/main/java/com/bonus/base/controller/TbWarnConfigController.java @@ -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 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)); + } + +} diff --git a/bonus-modules/bonus-base/src/main/java/com/bonus/base/domain/TbDevice.java b/bonus-modules/bonus-base/src/main/java/com/bonus/base/domain/TbDevice.java new file mode 100644 index 0000000..7f05eab --- /dev/null +++ b/bonus-modules/bonus-base/src/main/java/com/bonus/base/domain/TbDevice.java @@ -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; +} \ No newline at end of file diff --git a/bonus-modules/bonus-base/src/main/java/com/bonus/base/domain/TbWarnConfig.java b/bonus-modules/bonus-base/src/main/java/com/bonus/base/domain/TbWarnConfig.java new file mode 100644 index 0000000..22ce796 --- /dev/null +++ b/bonus-modules/bonus-base/src/main/java/com/bonus/base/domain/TbWarnConfig.java @@ -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; +} \ No newline at end of file diff --git a/bonus-modules/bonus-base/src/main/java/com/bonus/base/mapper/TbDeviceMapper.java b/bonus-modules/bonus-base/src/main/java/com/bonus/base/mapper/TbDeviceMapper.java new file mode 100644 index 0000000..1cb101b --- /dev/null +++ b/bonus-modules/bonus-base/src/main/java/com/bonus/base/mapper/TbDeviceMapper.java @@ -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 list); + + int insert(TbDevice record); + + int insertSelective(TbDevice record); + + TbDevice selectByPrimaryKey(Long id); + + int updateByPrimaryKeySelective(TbDevice record); + + int updateByPrimaryKey(TbDevice record); + + List getAll(TbDevice record); + + int updateBatch(List list); +} \ No newline at end of file diff --git a/bonus-modules/bonus-base/src/main/java/com/bonus/base/mapper/TbWarnConfigMapper.java b/bonus-modules/bonus-base/src/main/java/com/bonus/base/mapper/TbWarnConfigMapper.java new file mode 100644 index 0000000..dc06d5c --- /dev/null +++ b/bonus-modules/bonus-base/src/main/java/com/bonus/base/mapper/TbWarnConfigMapper.java @@ -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 list); + + int insert(TbWarnConfig record); + + int insertSelective(TbWarnConfig record); + + TbWarnConfig selectByPrimaryKey(Long id); + + List getAll(TbWarnConfig record); + + + + int updateByPrimaryKeySelective(TbWarnConfig record); + + int updateByPrimaryKey(TbWarnConfig record); + + int updateBatch(List list); +} \ No newline at end of file diff --git a/bonus-modules/bonus-base/src/main/java/com/bonus/base/service/TbDeviceService.java b/bonus-modules/bonus-base/src/main/java/com/bonus/base/service/TbDeviceService.java new file mode 100644 index 0000000..e21126a --- /dev/null +++ b/bonus-modules/bonus-base/src/main/java/com/bonus/base/service/TbDeviceService.java @@ -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 list); + + int insert(TbDevice record); + + int insertSelective(TbDevice record); + + TbDevice selectByPrimaryKey(Long id); + + int updateByPrimaryKeySelective(TbDevice record); + + int updateByPrimaryKey(TbDevice record); + + List getAll(TbDevice record); + + int updateBatch(List list); + +} diff --git a/bonus-modules/bonus-base/src/main/java/com/bonus/base/service/TbWarnConfigService.java b/bonus-modules/bonus-base/src/main/java/com/bonus/base/service/TbWarnConfigService.java new file mode 100644 index 0000000..bb9399d --- /dev/null +++ b/bonus-modules/bonus-base/src/main/java/com/bonus/base/service/TbWarnConfigService.java @@ -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 list); + + int insert(TbWarnConfig record); + + int insertSelective(TbWarnConfig record); + + TbWarnConfig selectByPrimaryKey(Long id); + + int updateByPrimaryKeySelective(TbWarnConfig record); + + int updateByPrimaryKey(TbWarnConfig record); + + int updateBatch(List list); + + List getAll(TbWarnConfig record); + +} diff --git a/bonus-modules/bonus-base/src/main/java/com/bonus/base/service/impl/TbDeviceServiceImpl.java b/bonus-modules/bonus-base/src/main/java/com/bonus/base/service/impl/TbDeviceServiceImpl.java new file mode 100644 index 0000000..8702a92 --- /dev/null +++ b/bonus-modules/bonus-base/src/main/java/com/bonus/base/service/impl/TbDeviceServiceImpl.java @@ -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 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 getAll(TbDevice record) { + return tbDeviceMapper.getAll(record); + } + + @Override + public int updateBatch(List list) { + return tbDeviceMapper.updateBatch(list); + } + +} diff --git a/bonus-modules/bonus-base/src/main/java/com/bonus/base/service/impl/TbWarnConfigServiceImpl.java b/bonus-modules/bonus-base/src/main/java/com/bonus/base/service/impl/TbWarnConfigServiceImpl.java new file mode 100644 index 0000000..53d210b --- /dev/null +++ b/bonus-modules/bonus-base/src/main/java/com/bonus/base/service/impl/TbWarnConfigServiceImpl.java @@ -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 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 list) { + return tbWarnConfigMapper.updateBatch(list); + } + + @Override + public List getAll(TbWarnConfig record){ + return tbWarnConfigMapper.getAll(record); + } + + + + +} diff --git a/bonus-modules/bonus-base/src/main/resources/mapper/TbDeviceMapper.xml b/bonus-modules/bonus-base/src/main/resources/mapper/TbDeviceMapper.xml new file mode 100644 index 0000000..bed6bd8 --- /dev/null +++ b/bonus-modules/bonus-base/src/main/resources/mapper/TbDeviceMapper.xml @@ -0,0 +1,229 @@ + + + + + + + + + + + + + + + + + + + + id, dev_type, dev_code, dev_name, bd_id, config_id, dev_status, dev_warn, del_flag, + logo_url + + + + update tb_device set del_flag = 1 + where id = #{id,jdbcType=BIGINT} + + + + 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 into tb_device + + + id, + + + dev_type, + + + dev_code, + + + dev_name, + + + bd_id, + + + config_id, + + + dev_status, + + + dev_warn, + + + del_flag, + + + logo_url, + + + + + #{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}, + + + + + + update tb_device + + + 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 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 tb_device + + + + when id = #{item.id,jdbcType=BIGINT} then #{item.devType,jdbcType=VARCHAR} + + + + + when id = #{item.id,jdbcType=BIGINT} then #{item.devCode,jdbcType=VARCHAR} + + + + + when id = #{item.id,jdbcType=BIGINT} then #{item.devName,jdbcType=VARCHAR} + + + + + when id = #{item.id,jdbcType=BIGINT} then #{item.bdId,jdbcType=BIGINT} + + + + + when id = #{item.id,jdbcType=BIGINT} then #{item.configId,jdbcType=BIGINT} + + + + + when id = #{item.id,jdbcType=BIGINT} then #{item.devStatus,jdbcType=INTEGER} + + + + + when id = #{item.id,jdbcType=BIGINT} then #{item.devWarn,jdbcType=INTEGER} + + + + + when id = #{item.id,jdbcType=BIGINT} then #{item.delFlag,jdbcType=INTEGER} + + + + + when id = #{item.id,jdbcType=BIGINT} then #{item.logoUrl,jdbcType=VARCHAR} + + + + where id in + + #{item.id,jdbcType=BIGINT} + + + + delete from tb_device where id in + + #{id,jdbcType=BIGINT} + + + \ No newline at end of file diff --git a/bonus-modules/bonus-base/src/main/resources/mapper/TbWarnConfigMapper.xml b/bonus-modules/bonus-base/src/main/resources/mapper/TbWarnConfigMapper.xml new file mode 100644 index 0000000..c0f7c2f --- /dev/null +++ b/bonus-modules/bonus-base/src/main/resources/mapper/TbWarnConfigMapper.xml @@ -0,0 +1,403 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + + + update tb_warn_config set del_flag = 1 + where id = #{id,jdbcType=BIGINT} + + + + + 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 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, + + + + + #{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}, + + + + + + update tb_warn_config + + + 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 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 tb_warn_config + + + + when id = #{item.id,jdbcType=BIGINT} then #{item.configuType,jdbcType=INTEGER} + + + + + when id = #{item.id,jdbcType=BIGINT} then #{item.configName,jdbcType=VARCHAR} + + + + + when id = #{item.id,jdbcType=BIGINT} then #{item.configVal1Max,jdbcType=DECIMAL} + + + + + when id = #{item.id,jdbcType=BIGINT} then #{item.configVal1Min,jdbcType=DECIMAL} + + + + + when id = #{item.id,jdbcType=BIGINT} then #{item.configVal2Max,jdbcType=DECIMAL} + + + + + when id = #{item.id,jdbcType=BIGINT} then #{item.configVal2Min,jdbcType=DECIMAL} + + + + + when id = #{item.id,jdbcType=BIGINT} then #{item.configVal3Max,jdbcType=DECIMAL} + + + + + when id = #{item.id,jdbcType=BIGINT} then #{item.configVal3Min,jdbcType=DECIMAL} + + + + + when id = #{item.id,jdbcType=BIGINT} then #{item.configVal4Max,jdbcType=DECIMAL} + + + + + when id = #{item.id,jdbcType=BIGINT} then #{item.configVal4Min,jdbcType=DECIMAL} + + + + + when id = #{item.id,jdbcType=BIGINT} then #{item.configVal5Max,jdbcType=DECIMAL} + + + + + when id = #{item.id,jdbcType=BIGINT} then #{item.configVal5Min,jdbcType=DECIMAL} + + + + + when id = #{item.id,jdbcType=BIGINT} then #{item.configVal6Max,jdbcType=DECIMAL} + + + + + when id = #{item.id,jdbcType=BIGINT} then #{item.configVal6Min,jdbcType=DECIMAL} + + + + + when id = #{item.id,jdbcType=BIGINT} then #{item.delFlag,jdbcType=INTEGER} + + + + + when id = #{item.id,jdbcType=BIGINT} then #{item.createTime,jdbcType=TIMESTAMP} + + + + + when id = #{item.id,jdbcType=BIGINT} then #{item.createUser,jdbcType=INTEGER} + + + + + when id = #{item.id,jdbcType=BIGINT} then #{item.updateTime,jdbcType=TIMESTAMP} + + + + + when id = #{item.id,jdbcType=BIGINT} then #{item.updateUser,jdbcType=INTEGER} + + + + where id in + + #{item.id,jdbcType=BIGINT} + + + + + + delete from tb_warn_config where id in + + #{id,jdbcType=BIGINT} + + + + + + \ No newline at end of file