From 6a7577b646be15c3e31d8dbae0605ff77d08825e Mon Sep 17 00:00:00 2001 From: liuguijing <123456> Date: Wed, 12 Apr 2023 10:40:29 +0800 Subject: [PATCH] =?UTF-8?q?=E6=AC=A3=E5=BD=B1=E7=AE=A1=E7=90=86=E5=B9=B3?= =?UTF-8?q?=E5=8F=B0=E7=BA=BF=E8=B7=AF=E5=92=8C=E8=A3=85=E7=BD=AE=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../shxy/xymanager_common/entity/Lines.java | 21 ++++ .../com/shxy/xymanager_dao/dao/LinesDao.java | 25 +++++ .../src/main/resources/mappers/LinesDao.xml | 104 ++++++++++++++++++ 3 files changed, 150 insertions(+) create mode 100644 xymanager_common/src/main/java/com/shxy/xymanager_common/entity/Lines.java create mode 100644 xymanager_dao/src/main/java/com/shxy/xymanager_dao/dao/LinesDao.java create mode 100644 xymanager_dao/src/main/resources/mappers/LinesDao.xml diff --git a/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/Lines.java b/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/Lines.java new file mode 100644 index 0000000..cc5b4f5 --- /dev/null +++ b/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/Lines.java @@ -0,0 +1,21 @@ +package com.shxy.xymanager_common.entity; + +import lombok.Data; + +import java.io.Serializable; + +@Data +public class Lines implements Serializable { + private Integer id; + + private String name; + + private String bsManufacturer; + + private Byte dyLevel; + + private Integer status; + + private static final long serialVersionUID = 1L; + +} \ No newline at end of file diff --git a/xymanager_dao/src/main/java/com/shxy/xymanager_dao/dao/LinesDao.java b/xymanager_dao/src/main/java/com/shxy/xymanager_dao/dao/LinesDao.java new file mode 100644 index 0000000..b23b6e4 --- /dev/null +++ b/xymanager_dao/src/main/java/com/shxy/xymanager_dao/dao/LinesDao.java @@ -0,0 +1,25 @@ +package com.shxy.xymanager_dao.dao; + +import com.shxy.xymanager_common.dto.LineAndTerminalDto; +import com.shxy.xymanager_common.entity.Lines; +import org.apache.ibatis.annotations.Param; + +import java.util.Date; +import java.util.List; + +public interface LinesDao { + + List selectAll(@Param("status") Integer status); + + List selectLineAndTerminalList(@Param("status") Integer status); + + int insertList(@Param("list") List record,@Param("status") Integer status,@Param("createat") Date create,@Param("updateat") Date update); + + int deleteById(@Param("list") List record, @Param("status") Integer status,@Param("updateat") Date update); + + Lines selectByPrimaryKey(Integer id); + + int updateByPrimaryKeySelective(@Param("data") Lines record, @Param("updateat") Date update); + + int updateByPrimaryKey(Lines record); +} \ No newline at end of file diff --git a/xymanager_dao/src/main/resources/mappers/LinesDao.xml b/xymanager_dao/src/main/resources/mappers/LinesDao.xml new file mode 100644 index 0000000..2c1d6db --- /dev/null +++ b/xymanager_dao/src/main/resources/mappers/LinesDao.xml @@ -0,0 +1,104 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + id, name, bs_manufacturer, dy_level + + + + + + + + + + insert into `lines` + (name,bs_manufacturer,dy_level,status,create_time,update_time) + VALUES + + (#{item.name},#{item.bsManufacturer},#{item.dyLevel},#{status},#{createat},#{updateat}) + + + + update `lines` + set status = #{status}, + update_time = #{updateat} + where id in + + #{item.id} + + + + update `lines` + + + name = #{data.name,jdbcType=VARCHAR}, + + + bs_manufacturer = #{data.bsManufacturer,jdbcType=VARCHAR}, + + + dy_level = #{data.dyLevel,jdbcType=TINYINT}, + + + update_time = #{updateat,jdbcType=TIMESTAMP}, + + + where id = #{id,jdbcType=INTEGER} + + + + update `lines` + set name = #{name,jdbcType=VARCHAR}, + bs_manufacturer = #{bsManufacturer,jdbcType=VARCHAR}, + dy_level = #{dyLevel,jdbcType=TINYINT} + where id = #{id,jdbcType=INTEGER} + + \ No newline at end of file