From d28868744005d1bcb864350dfc31017002807b19 Mon Sep 17 00:00:00 2001 From: qiankanghui Date: Tue, 28 Apr 2026 10:25:23 +0800 Subject: [PATCH] =?UTF-8?q?feat(port):=20=E6=B7=BB=E5=8A=A0=E7=AB=AF?= =?UTF-8?q?=E5=8F=A3=E4=BF=A1=E6=81=AF=E7=8A=B6=E6=80=81=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在PortInfo实体类中新增active状态属性 - 为active字段添加Swagger文档注解 - 更新MyBatis映射文件中的结果映射和查询字段 - 在插入新记录时默认设置状态为启用(Y) - 添加根据状态查询的功能支持 --- src/main/java/com/xujie/modules/port/entity/PortInfo.java | 5 ++++- .../xujie/modules/port/service/Impl/PortInfoServiceImpl.java | 1 + src/main/resources/mapper/port/PortInfoMapper.xml | 4 +++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/xujie/modules/port/entity/PortInfo.java b/src/main/java/com/xujie/modules/port/entity/PortInfo.java index 42acc8f..30b6fd3 100644 --- a/src/main/java/com/xujie/modules/port/entity/PortInfo.java +++ b/src/main/java/com/xujie/modules/port/entity/PortInfo.java @@ -13,7 +13,7 @@ import java.util.Date; /** *

- * + * *

* * @author jyy @@ -50,6 +50,9 @@ public class PortInfo extends QueryPage { private Integer id; + @ApiModelProperty(value = "状态") + private String active; + public Object getKey() { return this.id; } diff --git a/src/main/java/com/xujie/modules/port/service/Impl/PortInfoServiceImpl.java b/src/main/java/com/xujie/modules/port/service/Impl/PortInfoServiceImpl.java index b34bea1..e9b72c9 100644 --- a/src/main/java/com/xujie/modules/port/service/Impl/PortInfoServiceImpl.java +++ b/src/main/java/com/xujie/modules/port/service/Impl/PortInfoServiceImpl.java @@ -36,6 +36,7 @@ public class PortInfoServiceImpl extends ServiceImpl i baseMapper.updateByportCode(model); } else { model.setCreateDate(new Date()); + model.setActive("Y"); baseMapper.insert(model); } } diff --git a/src/main/resources/mapper/port/PortInfoMapper.xml b/src/main/resources/mapper/port/PortInfoMapper.xml index 17e415c..e456453 100644 --- a/src/main/resources/mapper/port/PortInfoMapper.xml +++ b/src/main/resources/mapper/port/PortInfoMapper.xml @@ -12,11 +12,12 @@ + - port_code, port_name, remark, create_by, create_date, update_by, update_date, id + port_code, port_name, remark, create_by, create_date, update_by, update_date, id,active