From d347fa6f9db1f83eb2d274d0eddc0b87cd934a11 Mon Sep 17 00:00:00 2001 From: liwen Date: Tue, 23 Apr 2024 16:23:32 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=89=B9=E7=A7=8D=E8=AE=BE=E5=A4=87?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E6=B7=BB=E5=8A=A0=E6=95=B0=E6=8D=AE=E6=9D=83?= =?UTF-8?q?=E9=99=90=EF=BC=9B=E9=A1=B5=E9=9D=A2=E6=B7=BB=E5=8A=A0=E5=8D=95?= =?UTF-8?q?=E4=BD=8D=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/hnac/hzims/safeproduct/entity/SpecialDeviceEntity.java | 6 ++++++ .../hzims/safeproduct/mapper/SpecialDeviceInspectionMapper.java | 6 ++++-- .../java/com/hnac/hzims/safeproduct/mapper/SpecialDeviceMapper.java | 4 ++-- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/entity/SpecialDeviceEntity.java b/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/entity/SpecialDeviceEntity.java index 5c12f90..8b3722b 100644 --- a/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/entity/SpecialDeviceEntity.java +++ b/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/entity/SpecialDeviceEntity.java @@ -7,6 +7,7 @@ import lombok.Data; import lombok.EqualsAndHashCode; import org.springblade.core.mp.base.BaseEntity; +import javax.validation.constraints.NotNull; import javax.validation.constraints.Size; import java.util.Date; @@ -20,6 +21,11 @@ import java.util.Date; @ApiModel(value = "特种设备实体类") public class SpecialDeviceEntity extends BaseEntity { + @NotNull + @Size(max = 50, message = "设备所属机构字段长度不能超过50") + @ApiModelProperty("设备所属机构") + private String unit; + @Size(max = 50, message = "设备名称长度不能超过50") @ApiModelProperty("设备名称") private String name; diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/SpecialDeviceInspectionMapper.java b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/SpecialDeviceInspectionMapper.java index 4bbe2e9..39132ff 100644 --- a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/SpecialDeviceInspectionMapper.java +++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/SpecialDeviceInspectionMapper.java @@ -1,9 +1,10 @@ package com.hnac.hzims.safeproduct.mapper; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.hnac.hzims.safeproduct.entity.SpecialDeviceInspectionEntity; import org.apache.ibatis.annotations.Mapper; +import org.springblade.core.datascope.annotation.UserDataAuth; +import org.springblade.core.datascope.mapper.UserDataScopeBaseMapper; import java.util.List; import java.util.Map; @@ -15,7 +16,7 @@ import java.util.Map; * @date 2024-01-22 */ @Mapper -public interface SpecialDeviceInspectionMapper extends BaseMapper { +public interface SpecialDeviceInspectionMapper extends UserDataScopeBaseMapper { /** * 设备检验记录分页 @@ -23,6 +24,7 @@ public interface SpecialDeviceInspectionMapper extends BaseMapper getInspectionPage(IPage page, Map param); /** diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/SpecialDeviceMapper.java b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/SpecialDeviceMapper.java index 1c2ace4..5fa5b96 100644 --- a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/SpecialDeviceMapper.java +++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/SpecialDeviceMapper.java @@ -1,8 +1,8 @@ package com.hnac.hzims.safeproduct.mapper; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.hnac.hzims.safeproduct.entity.SpecialDeviceEntity; import org.apache.ibatis.annotations.Mapper; +import org.springblade.core.datascope.mapper.UserDataScopeBaseMapper; /** * 特种设备Mapper类 @@ -11,6 +11,6 @@ import org.apache.ibatis.annotations.Mapper; * @date 2024-01-12 */ @Mapper -public interface SpecialDeviceMapper extends BaseMapper { +public interface SpecialDeviceMapper extends UserDataScopeBaseMapper { }