From 7bea1e047c78be65554032270cfc074f7b66409a Mon Sep 17 00:00:00 2001 From: syruan <321359594@qq.com> Date: Wed, 11 Sep 2024 17:03:43 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BE=B9=E4=BB=A3=E8=AE=BE=E5=A4=87=E7=AE=A1?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../TbBdDeviceRecordController.java | 41 +++ .../base/controller/TbBdRecordController.java | 80 +++++ .../bonus/base/domain/TbBdDeviceRecord.java | 75 ++++ .../com/bonus/base/domain/TbBdRecord.java | 127 +++++++ .../base/mapper/TbBdDeviceRecordMapper.java | 34 ++ .../bonus/base/mapper/TbBdRecordMapper.java | 35 ++ .../base/service/TbBdDeviceRecordService.java | 32 ++ .../bonus/base/service/TbBdRecordService.java | 32 ++ .../impl/TbBdDeviceRecordServiceImpl.java | 70 ++++ .../service/impl/TbBdRecordServiceImpl.java | 71 ++++ .../mapper/TbBdDeviceRecordMapper.xml | 196 +++++++++++ .../resources/mapper/TbBdRecordMapper.xml | 331 ++++++++++++++++++ 12 files changed, 1124 insertions(+) create mode 100644 bonus-modules/bonus-base/src/main/java/com/bonus/base/controller/TbBdDeviceRecordController.java create mode 100644 bonus-modules/bonus-base/src/main/java/com/bonus/base/controller/TbBdRecordController.java create mode 100644 bonus-modules/bonus-base/src/main/java/com/bonus/base/domain/TbBdDeviceRecord.java create mode 100644 bonus-modules/bonus-base/src/main/java/com/bonus/base/domain/TbBdRecord.java create mode 100644 bonus-modules/bonus-base/src/main/java/com/bonus/base/mapper/TbBdDeviceRecordMapper.java create mode 100644 bonus-modules/bonus-base/src/main/java/com/bonus/base/mapper/TbBdRecordMapper.java create mode 100644 bonus-modules/bonus-base/src/main/java/com/bonus/base/service/TbBdDeviceRecordService.java create mode 100644 bonus-modules/bonus-base/src/main/java/com/bonus/base/service/TbBdRecordService.java create mode 100644 bonus-modules/bonus-base/src/main/java/com/bonus/base/service/impl/TbBdDeviceRecordServiceImpl.java create mode 100644 bonus-modules/bonus-base/src/main/java/com/bonus/base/service/impl/TbBdRecordServiceImpl.java create mode 100644 bonus-modules/bonus-base/src/main/resources/mapper/TbBdDeviceRecordMapper.xml create mode 100644 bonus-modules/bonus-base/src/main/resources/mapper/TbBdRecordMapper.xml diff --git a/bonus-modules/bonus-base/src/main/java/com/bonus/base/controller/TbBdDeviceRecordController.java b/bonus-modules/bonus-base/src/main/java/com/bonus/base/controller/TbBdDeviceRecordController.java new file mode 100644 index 0000000..ad5fc89 --- /dev/null +++ b/bonus-modules/bonus-base/src/main/java/com/bonus/base/controller/TbBdDeviceRecordController.java @@ -0,0 +1,41 @@ +package com.bonus.base.controller; +import com.bonus.base.domain.TbBdDeviceRecord; +import com.bonus.base.domain.TbDevice; +import com.bonus.base.service.TbBdDeviceRecordService; +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_bd_device_record)表控制层 + * + */ +@RestController +@RequestMapping("/tbBdDeviceRecord") +public class TbBdDeviceRecordController extends BaseController { + /** + * 服务对象 + */ + @Autowired + private TbBdDeviceRecordService tbBdDeviceRecordService; + + /** + * 通过主键查询单条数据 + */ + @GetMapping("{/id}") + public AjaxResult selectOne(@PathVariable("id") Long id) { + return success(tbBdDeviceRecordService.selectByPrimaryKey(id)); + } + + @GetMapping("/list") + public AjaxResult queryByPage(TbBdDeviceRecord record) { + startPage(); + List list = tbBdDeviceRecordService.getAll(record); + return AjaxResult.success(getDataTable(list)); + } + +} diff --git a/bonus-modules/bonus-base/src/main/java/com/bonus/base/controller/TbBdRecordController.java b/bonus-modules/bonus-base/src/main/java/com/bonus/base/controller/TbBdRecordController.java new file mode 100644 index 0000000..34e272a --- /dev/null +++ b/bonus-modules/bonus-base/src/main/java/com/bonus/base/controller/TbBdRecordController.java @@ -0,0 +1,80 @@ +package com.bonus.base.controller; +import com.bonus.base.domain.TbBdRecord; +import com.bonus.base.service.TbBdRecordService; +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 javax.validation.Valid; +import javax.validation.constraints.NotNull; +import java.util.List; + +/** +* 边带申请记录表(tb_bd_record)表控制层 +* @author syruan +*/ +@RestController +@RequestMapping("/tb_bd_record") +public class TbBdRecordController extends BaseController { + + /** + * 服务对象 + */ + @Autowired + private TbBdRecordService tbBdRecordService; + + /** + * 通过主键查询单条数据 + */ + @GetMapping("{/id}") + public AjaxResult selectById(@PathVariable("id") Long id) { + return success(tbBdRecordService.selectByPrimaryKey(id)); + } + + @GetMapping("/list") + public AjaxResult queryByPage(TbBdRecord tbBdRecord) { + startPage(); + List list = tbBdRecordService.getAll(tbBdRecord); + return AjaxResult.success(getDataTable(list)); + } + + + /** + * 新增数据 + * + * @param tbBdRecord 实体 + * @return 新增结果 + */ + @PostMapping + public AjaxResult add(@RequestBody @NotNull(message = "参数不能为空") @Valid TbBdRecord tbBdRecord) { + return toAjax(tbBdRecordService.insertSelective(tbBdRecord)); + } + + + /** + * 编辑数据 + * + * @param tbBdRecord 实体 + * @return 编辑结果 + */ + @PutMapping + public AjaxResult edit(@RequestBody @NotNull(message = "参数不能为空") @Valid TbBdRecord tbBdRecord) { + return toAjax(tbBdRecordService.updateByPrimaryKeySelective(tbBdRecord)); + } + + + /** + * 删除数据 + * + * @param id 主键 + * @return 删除是否成功 + */ + @DeleteMapping("/{id}") + public AjaxResult deleteById(@PathVariable("id") Long id) { + return toAjax(tbBdRecordService.deleteByPrimaryKey(id)); + } + + +} diff --git a/bonus-modules/bonus-base/src/main/java/com/bonus/base/domain/TbBdDeviceRecord.java b/bonus-modules/bonus-base/src/main/java/com/bonus/base/domain/TbBdDeviceRecord.java new file mode 100644 index 0000000..59fa5f5 --- /dev/null +++ b/bonus-modules/bonus-base/src/main/java/com/bonus/base/domain/TbBdDeviceRecord.java @@ -0,0 +1,75 @@ +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-11 + * @Description: 边带记录设备表 + * @version : 1.0 +*/ +@ApiModel(description="边带记录设备表") +@Data +public class TbBdDeviceRecord implements Serializable { + /** + * id + */ + @ApiModelProperty(value="id") + private Long id; + + /** + * 记录id + */ + @ApiModelProperty(value="记录id") + private Long recordId; + + /** + * 设备名称 + */ + @ApiModelProperty(value="设备名称") + @Size(max = 255,message = "设备名称最大长度要小于 255") + private String devName; + + /** + * 设备编码-唯一校验 + */ + @ApiModelProperty(value="设备编码-唯一校验") + @Size(max = 64,message = "设备编码-唯一校验最大长度要小于 64") + private String devCode; + + /** + * 所属单位 + */ + @ApiModelProperty(value="所属单位") + @Size(max = 64,message = "所属单位最大长度要小于 64") + private String unitName; + + /** + * 所属区域 + */ + @ApiModelProperty(value="所属区域") + @Size(max = 64,message = "所属区域最大长度要小于 64") + private String areaName; + + /** + * 设备负责人 + */ + @ApiModelProperty(value="设备负责人") + @Size(max = 64,message = "设备负责人最大长度要小于 64") + private String devUser; + + /** + * 负责人电话-sm4加密 + */ + @ApiModelProperty(value="负责人电话-sm4加密") + @Size(max = 128,message = "负责人电话-sm4加密最大长度要小于 128") + private String devUserPhone; + + 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/TbBdRecord.java b/bonus-modules/bonus-base/src/main/java/com/bonus/base/domain/TbBdRecord.java new file mode 100644 index 0000000..6fb5d31 --- /dev/null +++ b/bonus-modules/bonus-base/src/main/java/com/bonus/base/domain/TbBdRecord.java @@ -0,0 +1,127 @@ +package com.bonus.base.domain; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.Serializable; +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-11 15:46 + *@Description: 描述 + *@version : 1.0 +*/ +/** + * 边带申请记录表 + */ +@ApiModel(description="边带申请记录表") +@Data +public class TbBdRecord implements Serializable { + /** + * 主键 + */ + @ApiModelProperty(value="主键") + @NotNull(message = "主键不能为null") + private Long id; + + /** + * 项目部id + */ + @ApiModelProperty(value="项目部id") + private Long departId; + + /** + * 项目部名称 + */ + @ApiModelProperty(value="项目部名称") + @Size(max = 64,message = "项目部名称最大长度要小于 64") + private String departName; + + /** + * 工程id + */ + @ApiModelProperty(value="工程id") + private Long proId; + + /** + * 工程名称 + */ + @ApiModelProperty(value="工程名称") + @Size(max = 255,message = "工程名称最大长度要小于 255") + private String proName; + + /** + * 申请人 + */ + @ApiModelProperty(value="申请人") + @Size(max = 64,message = "申请人最大长度要小于 64") + private String relUser; + + /** + * 联系方式(SM4 加密) + */ + @ApiModelProperty(value="联系方式(SM4 加密)") + @Size(max = 128,message = "联系方式(SM4 加密)最大长度要小于 128") + private String relPhone; + + /** + * 删除状态 + */ + @ApiModelProperty(value="删除状态") + private Integer delFlag; + + /** + * 审核状态 0 待审核 1 通过 2 驳回 + */ + @ApiModelProperty(value="审核状态 0 待审核 1 通过 2 驳回") + private Integer auditStatus; + + /** + * 备注(驳回原因-重复驳回进行覆盖) + */ + @ApiModelProperty(value="备注(驳回原因-重复驳回进行覆盖)") + @Size(max = 255,message = "备注(驳回原因-重复驳回进行覆盖)最大长度要小于 255") + private String remarks; + + /** + * 创建时间-申请时间 + */ + @ApiModelProperty(value="创建时间-申请时间") + private Date createTime; + + /** + * 创建人 + */ + @ApiModelProperty(value="创建人") + private Long createUser; + + /** + * 修改时间 + */ + @ApiModelProperty(value="修改时间") + private Date updateTime; + + /** + * 修改人 + */ + @ApiModelProperty(value="修改人") + private Long updateUser; + + /** + * 审核人 + */ + @ApiModelProperty(value="审核人") + private Long auditUser; + + /** + * 审核时间 + */ + @ApiModelProperty(value="审核时间") + private Date auditTime; + + 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/TbBdDeviceRecordMapper.java b/bonus-modules/bonus-base/src/main/java/com/bonus/base/mapper/TbBdDeviceRecordMapper.java new file mode 100644 index 0000000..341027e --- /dev/null +++ b/bonus-modules/bonus-base/src/main/java/com/bonus/base/mapper/TbBdDeviceRecordMapper.java @@ -0,0 +1,34 @@ +package com.bonus.base.mapper; + +import com.bonus.base.domain.TbBdDeviceRecord; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +/** + * @PackagePath: com.bonus.base.mapper + * @author : 阮世耀 + * @version : 1.0 +*/ +@Mapper +public interface TbBdDeviceRecordMapper { + + int deleteByPrimaryKey(Long id); + + int deleteByPrimaryKeyIn(List list); + + int insert(TbBdDeviceRecord record); + + int insertSelective(TbBdDeviceRecord record); + + TbBdDeviceRecord selectByPrimaryKey(Long id); + + int updateByPrimaryKeySelective(TbBdDeviceRecord record); + + int updateByPrimaryKey(TbBdDeviceRecord record); + + int updateBatch(List list); + + List getAll(TbBdDeviceRecord record); + +} \ No newline at end of file diff --git a/bonus-modules/bonus-base/src/main/java/com/bonus/base/mapper/TbBdRecordMapper.java b/bonus-modules/bonus-base/src/main/java/com/bonus/base/mapper/TbBdRecordMapper.java new file mode 100644 index 0000000..8e31571 --- /dev/null +++ b/bonus-modules/bonus-base/src/main/java/com/bonus/base/mapper/TbBdRecordMapper.java @@ -0,0 +1,35 @@ +package com.bonus.base.mapper; + +import com.bonus.base.domain.TbBdRecord; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +/** + *@PackagePath: com.bonus.base.mapper + *@author : 阮世耀 + *@version : 1.0 +*/ +@Mapper +public interface TbBdRecordMapper { + + int deleteByPrimaryKey(Long id); + + int deleteByPrimaryKeyIn(List list); + + int insert(TbBdRecord record); + + int insertSelective(TbBdRecord record); + + TbBdRecord selectByPrimaryKey(Long id); + + int updateByPrimaryKeySelective(TbBdRecord record); + + int updateByPrimaryKey(TbBdRecord record); + + int updateBatch(List list); + + List getAll(TbBdRecord record); + + +} \ No newline at end of file diff --git a/bonus-modules/bonus-base/src/main/java/com/bonus/base/service/TbBdDeviceRecordService.java b/bonus-modules/bonus-base/src/main/java/com/bonus/base/service/TbBdDeviceRecordService.java new file mode 100644 index 0000000..4e1de75 --- /dev/null +++ b/bonus-modules/bonus-base/src/main/java/com/bonus/base/service/TbBdDeviceRecordService.java @@ -0,0 +1,32 @@ +package com.bonus.base.service; + +import java.util.List; +import com.bonus.base.domain.TbBdDeviceRecord; + /** + *@PackagePath: com.bonus.base.service + *@author : 阮世耀 + *@CreateTime: 2024-09-11 15:36 + *@Description: 描述 + *@version : 1.0 +*/ +public interface TbBdDeviceRecordService{ + + int deleteByPrimaryKey(Long id); + + int deleteByPrimaryKeyIn(List list); + + int insert(TbBdDeviceRecord record); + + int insertSelective(TbBdDeviceRecord record); + + TbBdDeviceRecord selectByPrimaryKey(Long id); + + int updateByPrimaryKeySelective(TbBdDeviceRecord record); + + int updateByPrimaryKey(TbBdDeviceRecord record); + + int updateBatch(List list); + + List getAll(TbBdDeviceRecord record); + +} diff --git a/bonus-modules/bonus-base/src/main/java/com/bonus/base/service/TbBdRecordService.java b/bonus-modules/bonus-base/src/main/java/com/bonus/base/service/TbBdRecordService.java new file mode 100644 index 0000000..76ce0a8 --- /dev/null +++ b/bonus-modules/bonus-base/src/main/java/com/bonus/base/service/TbBdRecordService.java @@ -0,0 +1,32 @@ +package com.bonus.base.service; + +import com.bonus.base.domain.TbBdRecord; +import java.util.List; + /** + *@PackagePath: com.bonus.base.service + *@author : 阮世耀 + *@CreateTime: 2024-09-11 15:46 + *@Description: 描述 + *@version : 1.0 +*/ +public interface TbBdRecordService{ + + int deleteByPrimaryKey(Long id); + + int deleteByPrimaryKeyIn(List list); + + int insert(TbBdRecord record); + + int insertSelective(TbBdRecord record); + + TbBdRecord selectByPrimaryKey(Long id); + + int updateByPrimaryKeySelective(TbBdRecord record); + + int updateByPrimaryKey(TbBdRecord record); + + int updateBatch(List list); + + List getAll(TbBdRecord record); + +} diff --git a/bonus-modules/bonus-base/src/main/java/com/bonus/base/service/impl/TbBdDeviceRecordServiceImpl.java b/bonus-modules/bonus-base/src/main/java/com/bonus/base/service/impl/TbBdDeviceRecordServiceImpl.java new file mode 100644 index 0000000..e271f24 --- /dev/null +++ b/bonus-modules/bonus-base/src/main/java/com/bonus/base/service/impl/TbBdDeviceRecordServiceImpl.java @@ -0,0 +1,70 @@ +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.TbBdDeviceRecordMapper; +import com.bonus.base.domain.TbBdDeviceRecord; +import com.bonus.base.service.TbBdDeviceRecordService; +/** + * @PackagePath: com.bonus.base.service.impl + * @author : 阮世耀 + * @version : 1.0 +*/ +@Service +public class TbBdDeviceRecordServiceImpl implements TbBdDeviceRecordService{ + + @Autowired + private TbBdDeviceRecordMapper tbBdDeviceRecordMapper; + + @Override + public int deleteByPrimaryKey(Long id) { + return tbBdDeviceRecordMapper.deleteByPrimaryKey(id); + } + + @Override + public int deleteByPrimaryKeyIn(List list) { + return tbBdDeviceRecordMapper.deleteByPrimaryKeyIn(list); + } + + @Override + public int insert(TbBdDeviceRecord record) { + return tbBdDeviceRecordMapper.insert(record); + } + + @Override + public int insertSelective(TbBdDeviceRecord record) { + return tbBdDeviceRecordMapper.insertSelective(record); + } + + @Override + public TbBdDeviceRecord selectByPrimaryKey(Long id) { + return tbBdDeviceRecordMapper.selectByPrimaryKey(id); + } + + @Override + public int updateByPrimaryKeySelective(TbBdDeviceRecord record) { + return tbBdDeviceRecordMapper.updateByPrimaryKeySelective(record); + } + + @Override + public int updateByPrimaryKey(TbBdDeviceRecord record) { + return tbBdDeviceRecordMapper.updateByPrimaryKey(record); + } + + @Override + public int updateBatch(List list) { + return tbBdDeviceRecordMapper.updateBatch(list); + } + + @Override + public List getAll(TbBdDeviceRecord record){ + return tbBdDeviceRecordMapper.getAll(record); + } + + + + +} diff --git a/bonus-modules/bonus-base/src/main/java/com/bonus/base/service/impl/TbBdRecordServiceImpl.java b/bonus-modules/bonus-base/src/main/java/com/bonus/base/service/impl/TbBdRecordServiceImpl.java new file mode 100644 index 0000000..3908345 --- /dev/null +++ b/bonus-modules/bonus-base/src/main/java/com/bonus/base/service/impl/TbBdRecordServiceImpl.java @@ -0,0 +1,71 @@ +package com.bonus.base.service.impl; + +import org.springframework.stereotype.Service; + +import org.springframework.beans.factory.annotation.Autowired; + +import com.bonus.base.domain.TbBdRecord; +import java.util.List; +import com.bonus.base.mapper.TbBdRecordMapper; +import com.bonus.base.service.TbBdRecordService; +/** + *@PackagePath: com.bonus.base.service.impl + *@author : 阮世耀 + *@CreateTime: 2024-09-11 15:46 + *@Description: 描述 + *@version : 1.0 +*/ +@Service +public class TbBdRecordServiceImpl implements TbBdRecordService{ + + @Autowired + private TbBdRecordMapper tbBdRecordMapper; + + @Override + public int deleteByPrimaryKey(Long id) { + return tbBdRecordMapper.deleteByPrimaryKey(id); + } + + @Override + public int deleteByPrimaryKeyIn(List list) { + return tbBdRecordMapper.deleteByPrimaryKeyIn(list); + } + + @Override + public int insert(TbBdRecord record) { + return tbBdRecordMapper.insert(record); + } + + @Override + public int insertSelective(TbBdRecord record) { + return tbBdRecordMapper.insertSelective(record); + } + + @Override + public TbBdRecord selectByPrimaryKey(Long id) { + return tbBdRecordMapper.selectByPrimaryKey(id); + } + + @Override + public int updateByPrimaryKeySelective(TbBdRecord record) { + return tbBdRecordMapper.updateByPrimaryKeySelective(record); + } + + @Override + public int updateByPrimaryKey(TbBdRecord record) { + return tbBdRecordMapper.updateByPrimaryKey(record); + } + + @Override + public int updateBatch(List list) { + return tbBdRecordMapper.updateBatch(list); + } + + public List getAll(TbBdRecord record){ + return tbBdRecordMapper.getAll(record); + } + + + + +} diff --git a/bonus-modules/bonus-base/src/main/resources/mapper/TbBdDeviceRecordMapper.xml b/bonus-modules/bonus-base/src/main/resources/mapper/TbBdDeviceRecordMapper.xml new file mode 100644 index 0000000..4dad0f1 --- /dev/null +++ b/bonus-modules/bonus-base/src/main/resources/mapper/TbBdDeviceRecordMapper.xml @@ -0,0 +1,196 @@ + + + + + + + + + + + + + + + + + + id, record_id, dev_name, dev_code, unit_name, area_name, dev_user, dev_user_phone + + + + + delete from tb_bd_device_record + where id = #{id,jdbcType=BIGINT} + + + + insert into tb_bd_device_record (id, record_id, dev_name, + dev_code, unit_name, area_name, + dev_user, dev_user_phone) + values (#{id,jdbcType=BIGINT}, #{recordId,jdbcType=BIGINT}, #{devName,jdbcType=VARCHAR}, + #{devCode,jdbcType=VARCHAR}, #{unitName,jdbcType=VARCHAR}, #{areaName,jdbcType=VARCHAR}, + #{devUser,jdbcType=VARCHAR}, #{devUserPhone,jdbcType=VARCHAR}) + + + + insert into tb_bd_device_record + + + id, + + + record_id, + + + dev_name, + + + dev_code, + + + unit_name, + + + area_name, + + + dev_user, + + + dev_user_phone, + + + + + #{id,jdbcType=BIGINT}, + + + #{recordId,jdbcType=BIGINT}, + + + #{devName,jdbcType=VARCHAR}, + + + #{devCode,jdbcType=VARCHAR}, + + + #{unitName,jdbcType=VARCHAR}, + + + #{areaName,jdbcType=VARCHAR}, + + + #{devUser,jdbcType=VARCHAR}, + + + #{devUserPhone,jdbcType=VARCHAR}, + + + + + + update tb_bd_device_record + + + record_id = #{recordId,jdbcType=BIGINT}, + + + dev_name = #{devName,jdbcType=VARCHAR}, + + + dev_code = #{devCode,jdbcType=VARCHAR}, + + + unit_name = #{unitName,jdbcType=VARCHAR}, + + + area_name = #{areaName,jdbcType=VARCHAR}, + + + dev_user = #{devUser,jdbcType=VARCHAR}, + + + dev_user_phone = #{devUserPhone,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=BIGINT} + + + + update tb_bd_device_record + set record_id = #{recordId,jdbcType=BIGINT}, + dev_name = #{devName,jdbcType=VARCHAR}, + dev_code = #{devCode,jdbcType=VARCHAR}, + unit_name = #{unitName,jdbcType=VARCHAR}, + area_name = #{areaName,jdbcType=VARCHAR}, + dev_user = #{devUser,jdbcType=VARCHAR}, + dev_user_phone = #{devUserPhone,jdbcType=VARCHAR} + where id = #{id,jdbcType=BIGINT} + + + + update tb_bd_device_record + + + + when id = #{item.id,jdbcType=BIGINT} then #{item.recordId,jdbcType=BIGINT} + + + + + when id = #{item.id,jdbcType=BIGINT} then #{item.devName,jdbcType=VARCHAR} + + + + + when id = #{item.id,jdbcType=BIGINT} then #{item.devCode,jdbcType=VARCHAR} + + + + + when id = #{item.id,jdbcType=BIGINT} then #{item.unitName,jdbcType=VARCHAR} + + + + + when id = #{item.id,jdbcType=BIGINT} then #{item.areaName,jdbcType=VARCHAR} + + + + + when id = #{item.id,jdbcType=BIGINT} then #{item.devUser,jdbcType=VARCHAR} + + + + + when id = #{item.id,jdbcType=BIGINT} then #{item.devUserPhone,jdbcType=VARCHAR} + + + + where id in + + #{item.id,jdbcType=BIGINT} + + + + + delete from tb_bd_device_record where id in + + #{id,jdbcType=BIGINT} + + + + + + \ No newline at end of file diff --git a/bonus-modules/bonus-base/src/main/resources/mapper/TbBdRecordMapper.xml b/bonus-modules/bonus-base/src/main/resources/mapper/TbBdRecordMapper.xml new file mode 100644 index 0000000..b7bf0c8 --- /dev/null +++ b/bonus-modules/bonus-base/src/main/resources/mapper/TbBdRecordMapper.xml @@ -0,0 +1,331 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + id, depart_id, depart_name, pro_id, pro_name, rel_user, rel_phone, del_flag, audit_status, + remarks, create_time, create_user, update_time, update_user, audit_user, audit_time + + + + + delete from tb_bd_record + where id = #{id,jdbcType=BIGINT} + + + + insert into tb_bd_record (id, depart_id, depart_name, + pro_id, pro_name, rel_user, + rel_phone, del_flag, audit_status, + remarks, create_time, create_user, + update_time, update_user, audit_user, + audit_time) + values (#{id,jdbcType=BIGINT}, #{departId,jdbcType=BIGINT}, #{departName,jdbcType=VARCHAR}, + #{proId,jdbcType=BIGINT}, #{proName,jdbcType=VARCHAR}, #{relUser,jdbcType=VARCHAR}, + #{relPhone,jdbcType=VARCHAR}, #{delFlag,jdbcType=INTEGER}, #{auditStatus,jdbcType=INTEGER}, + #{remarks,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{createUser,jdbcType=BIGINT}, + #{updateTime,jdbcType=TIMESTAMP}, #{updateUser,jdbcType=BIGINT}, #{auditUser,jdbcType=BIGINT}, + #{auditTime,jdbcType=TIMESTAMP}) + + + + insert into tb_bd_record + + + id, + + + depart_id, + + + depart_name, + + + pro_id, + + + pro_name, + + + rel_user, + + + rel_phone, + + + del_flag, + + + audit_status, + + + remarks, + + + create_time, + + + create_user, + + + update_time, + + + update_user, + + + audit_user, + + + audit_time, + + + + + #{id,jdbcType=BIGINT}, + + + #{departId,jdbcType=BIGINT}, + + + #{departName,jdbcType=VARCHAR}, + + + #{proId,jdbcType=BIGINT}, + + + #{proName,jdbcType=VARCHAR}, + + + #{relUser,jdbcType=VARCHAR}, + + + #{relPhone,jdbcType=VARCHAR}, + + + #{delFlag,jdbcType=INTEGER}, + + + #{auditStatus,jdbcType=INTEGER}, + + + #{remarks,jdbcType=VARCHAR}, + + + #{createTime,jdbcType=TIMESTAMP}, + + + #{createUser,jdbcType=BIGINT}, + + + #{updateTime,jdbcType=TIMESTAMP}, + + + #{updateUser,jdbcType=BIGINT}, + + + #{auditUser,jdbcType=BIGINT}, + + + #{auditTime,jdbcType=TIMESTAMP}, + + + + + + update tb_bd_record + + + depart_id = #{departId,jdbcType=BIGINT}, + + + depart_name = #{departName,jdbcType=VARCHAR}, + + + pro_id = #{proId,jdbcType=BIGINT}, + + + pro_name = #{proName,jdbcType=VARCHAR}, + + + rel_user = #{relUser,jdbcType=VARCHAR}, + + + rel_phone = #{relPhone,jdbcType=VARCHAR}, + + + del_flag = #{delFlag,jdbcType=INTEGER}, + + + audit_status = #{auditStatus,jdbcType=INTEGER}, + + + remarks = #{remarks,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=TIMESTAMP}, + + + create_user = #{createUser,jdbcType=BIGINT}, + + + update_time = #{updateTime,jdbcType=TIMESTAMP}, + + + update_user = #{updateUser,jdbcType=BIGINT}, + + + audit_user = #{auditUser,jdbcType=BIGINT}, + + + audit_time = #{auditTime,jdbcType=TIMESTAMP}, + + + where id = #{id,jdbcType=BIGINT} + + + + update tb_bd_record + set depart_id = #{departId,jdbcType=BIGINT}, + depart_name = #{departName,jdbcType=VARCHAR}, + pro_id = #{proId,jdbcType=BIGINT}, + pro_name = #{proName,jdbcType=VARCHAR}, + rel_user = #{relUser,jdbcType=VARCHAR}, + rel_phone = #{relPhone,jdbcType=VARCHAR}, + del_flag = #{delFlag,jdbcType=INTEGER}, + audit_status = #{auditStatus,jdbcType=INTEGER}, + remarks = #{remarks,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=TIMESTAMP}, + create_user = #{createUser,jdbcType=BIGINT}, + update_time = #{updateTime,jdbcType=TIMESTAMP}, + update_user = #{updateUser,jdbcType=BIGINT}, + audit_user = #{auditUser,jdbcType=BIGINT}, + audit_time = #{auditTime,jdbcType=TIMESTAMP} + where id = #{id,jdbcType=BIGINT} + + + + update tb_bd_record + + + + when id = #{item.id,jdbcType=BIGINT} then #{item.departId,jdbcType=BIGINT} + + + + + when id = #{item.id,jdbcType=BIGINT} then #{item.departName,jdbcType=VARCHAR} + + + + + when id = #{item.id,jdbcType=BIGINT} then #{item.proId,jdbcType=BIGINT} + + + + + when id = #{item.id,jdbcType=BIGINT} then #{item.proName,jdbcType=VARCHAR} + + + + + when id = #{item.id,jdbcType=BIGINT} then #{item.relUser,jdbcType=VARCHAR} + + + + + when id = #{item.id,jdbcType=BIGINT} then #{item.relPhone,jdbcType=VARCHAR} + + + + + when id = #{item.id,jdbcType=BIGINT} then #{item.delFlag,jdbcType=INTEGER} + + + + + when id = #{item.id,jdbcType=BIGINT} then #{item.auditStatus,jdbcType=INTEGER} + + + + + when id = #{item.id,jdbcType=BIGINT} then #{item.remarks,jdbcType=VARCHAR} + + + + + when id = #{item.id,jdbcType=BIGINT} then #{item.createTime,jdbcType=TIMESTAMP} + + + + + when id = #{item.id,jdbcType=BIGINT} then #{item.createUser,jdbcType=BIGINT} + + + + + when id = #{item.id,jdbcType=BIGINT} then #{item.updateTime,jdbcType=TIMESTAMP} + + + + + when id = #{item.id,jdbcType=BIGINT} then #{item.updateUser,jdbcType=BIGINT} + + + + + when id = #{item.id,jdbcType=BIGINT} then #{item.auditUser,jdbcType=BIGINT} + + + + + when id = #{item.id,jdbcType=BIGINT} then #{item.auditTime,jdbcType=TIMESTAMP} + + + + where id in + + #{item.id,jdbcType=BIGINT} + + + + + delete from tb_bd_record where id in + + #{id,jdbcType=BIGINT} + + + + + + \ No newline at end of file