From 6ceda40d18a749e09c1c676a1c9d22fe40fe7c13 Mon Sep 17 00:00:00 2001 From: wangna0328 <3402195679@qq.com> Date: Mon, 4 Aug 2025 19:32:38 +0800 Subject: [PATCH] =?UTF-8?q?=E6=81=A2=E5=A4=8D=E5=A6=82=E5=88=9D=EF=BC=8C?= =?UTF-8?q?=E4=BD=86=E5=8F=91=E7=8E=B0=E5=85=B6=E4=BB=96bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../znpt/domain/entity/RegulationEntity.java | 6 +++- .../domain/entity/RegulationTypeEntity.java | 10 +++--- .../znpt/service/RegulationTypeService.java | 2 +- .../service/impl/RegulationServiceImpl.java | 5 +++ .../impl/RegulationTypeServiceImpl.java | 2 +- .../resources/mapper/RegulationMapper.xml | 32 +++++++++++++++++++ .../resources/mapper/RegulationTypeMapper.xml | 10 +++--- 7 files changed, 54 insertions(+), 13 deletions(-) create mode 100644 core/src/main/resources/mapper/RegulationMapper.xml diff --git a/core/src/main/java/com/dite/znpt/domain/entity/RegulationEntity.java b/core/src/main/java/com/dite/znpt/domain/entity/RegulationEntity.java index 25f144f..6dd36f1 100644 --- a/core/src/main/java/com/dite/znpt/domain/entity/RegulationEntity.java +++ b/core/src/main/java/com/dite/znpt/domain/entity/RegulationEntity.java @@ -42,7 +42,7 @@ public class RegulationEntity extends AuditableEntity implements Serializable { @ExcelProperty("制度类型") @ApiModelProperty("制度类型") @TableField("regulation_type") - private String regulationType; + private String type; @ExcelProperty("制度状态") @ApiModelProperty("制度状态:DRAFT-草案,APPROVED-已公示,PUBLISHED-已发布,ARCHIVED-已归档") @@ -96,4 +96,8 @@ public class RegulationEntity extends AuditableEntity implements Serializable { @TableField(exist = false) @ApiModelProperty("创建人姓名") private String createByName; + + @TableField(exist = false) + @ApiModelProperty("制度类型") + private String regulationType; } \ No newline at end of file diff --git a/core/src/main/java/com/dite/znpt/domain/entity/RegulationTypeEntity.java b/core/src/main/java/com/dite/znpt/domain/entity/RegulationTypeEntity.java index 1057ff8..eb8154c 100644 --- a/core/src/main/java/com/dite/znpt/domain/entity/RegulationTypeEntity.java +++ b/core/src/main/java/com/dite/znpt/domain/entity/RegulationTypeEntity.java @@ -33,10 +33,10 @@ public class RegulationTypeEntity extends AuditableEntity implements Serializabl @TableField("type_name") private String typeName; - @ExcelProperty("状态") - @ApiModelProperty("状态:ENABLED-启用,DISABLED-禁用") - @TableField("status") - private String status; + @ExcelProperty("是否启用") + @ApiModelProperty("是否启用(1-启用,0-禁用)") + @TableField("is_enabled") + private String isEnabled; @ExcelProperty("排序顺序") @ApiModelProperty("排序顺序") @@ -55,5 +55,5 @@ public class RegulationTypeEntity extends AuditableEntity implements Serializabl @TableField(exist = false) @ApiModelProperty("创建人姓名") - private String createByName; + private String createrName; } \ No newline at end of file diff --git a/core/src/main/java/com/dite/znpt/service/RegulationTypeService.java b/core/src/main/java/com/dite/znpt/service/RegulationTypeService.java index c5b8715..e221f60 100644 --- a/core/src/main/java/com/dite/znpt/service/RegulationTypeService.java +++ b/core/src/main/java/com/dite/znpt/service/RegulationTypeService.java @@ -16,7 +16,7 @@ public interface RegulationTypeService extends IService { * @param page 页码 * @param size 页大小 * @param typeName 类型名称 - * @param status 状态 + * @param status 是否启用(1-启用,0-禁用) * @param remark 备注 * @return 结果 */ diff --git a/core/src/main/java/com/dite/znpt/service/impl/RegulationServiceImpl.java b/core/src/main/java/com/dite/znpt/service/impl/RegulationServiceImpl.java index cf52e5f..f0cb608 100644 --- a/core/src/main/java/com/dite/znpt/service/impl/RegulationServiceImpl.java +++ b/core/src/main/java/com/dite/znpt/service/impl/RegulationServiceImpl.java @@ -203,6 +203,11 @@ public class RegulationServiceImpl extends ServiceImpl() - .eq(RegulationEntity::getRegulationType, typeName) + .eq(RegulationEntity::getType, typeName) .eq(RegulationEntity::getDelFlag, "0") ); // 如果有制度使用此类型,则不允许删除 diff --git a/core/src/main/resources/mapper/RegulationMapper.xml b/core/src/main/resources/mapper/RegulationMapper.xml new file mode 100644 index 0000000..d3b6177 --- /dev/null +++ b/core/src/main/resources/mapper/RegulationMapper.xml @@ -0,0 +1,32 @@ + + + + + + + + \ No newline at end of file diff --git a/core/src/main/resources/mapper/RegulationTypeMapper.xml b/core/src/main/resources/mapper/RegulationTypeMapper.xml index 7ce5f6b..53211ec 100644 --- a/core/src/main/resources/mapper/RegulationTypeMapper.xml +++ b/core/src/main/resources/mapper/RegulationTypeMapper.xml @@ -3,24 +3,24 @@ - rt.type_id, rt.type_name, rt.status, rt.sort_order, rt.remark, rt.del_flag, + rt.type_id, rt.type_name, rt.is_enabled, rt.sort_order, rt.remark, rt.del_flag, rt.create_by, rt.create_time, rt.update_by, rt.update_time