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 { }