fix 参数校验不生效
parent
97f61d05d0
commit
40af1e6f51
|
@ -85,10 +85,6 @@
|
|||
<artifactId>spring-data-commons</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>javax.validation</groupId>
|
||||
<artifactId>validation-api</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.github.biyanwen</groupId>
|
||||
|
|
|
@ -28,7 +28,7 @@ import cc.iotkit.model.product.Icon;
|
|||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import javax.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
import org.hibernate.annotations.Filter;
|
||||
import org.hibernate.annotations.FilterDef;
|
||||
|
@ -53,7 +53,7 @@ public class TbIcon extends BaseEntity implements TenantAware {
|
|||
@ApiModelProperty(value = "iconId")
|
||||
private Long id;
|
||||
|
||||
@Size(max = 30)
|
||||
|
||||
@Column(name = "tenant_id")
|
||||
private String tenantId;
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ import cc.iotkit.model.product.IconType;
|
|||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import javax.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
import org.hibernate.annotations.Filter;
|
||||
import org.hibernate.annotations.FilterDef;
|
||||
|
@ -53,7 +53,7 @@ public class TbIconType extends BaseEntity implements TenantAware {
|
|||
@ApiModelProperty(value = "主键id")
|
||||
private Long id;
|
||||
|
||||
@Size(max = 30)
|
||||
|
||||
@Column(name = "tenant_id")
|
||||
private String tenantId;
|
||||
|
||||
|
|
|
@ -28,7 +28,6 @@ import cc.iotkit.model.product.Product;
|
|||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
import org.hibernate.annotations.Filter;
|
||||
import org.hibernate.annotations.FilterDef;
|
||||
|
@ -53,7 +52,7 @@ public class TbProduct implements TenantAware {
|
|||
@ApiModelProperty(value = "产品id")
|
||||
private Long id;
|
||||
|
||||
@Size(max = 30)
|
||||
|
||||
@Column(name = "tenant_id")
|
||||
private String tenantId;
|
||||
|
||||
|
|
|
@ -7,8 +7,8 @@ import com.baomidou.mybatisplus.annotation.FieldStrategy;
|
|||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import jakarta.validation.Valid;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import javax.validation.Valid;
|
||||
import org.hibernate.validator.constraints.NotBlank;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ import com.baomidou.mybatisplus.annotation.FieldStrategy;
|
|||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import org.hibernate.validator.constraints.NotBlank;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.apache.ibatis.type.JdbcType;
|
||||
|
|
|
@ -2,7 +2,7 @@ package cc.iotkit.generator.dto.bo;
|
|||
|
||||
import cc.iotkit.common.api.BaseDto;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
|
|
@ -8,7 +8,7 @@ import io.github.linpeilie.annotations.AutoMapper;
|
|||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
import javax.validation.constraints.*;
|
||||
#foreach ($import in $importList)
|
||||
import ${import};
|
||||
#end
|
||||
|
|
|
@ -41,7 +41,7 @@ import cn.dev33.satoken.annotation.SaCheckPermission;
|
|||
import cn.hutool.core.util.ObjectUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import jakarta.validation.Valid;
|
||||
import javax.validation.Valid;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
|
|
@ -26,8 +26,8 @@ package cc.iotkit.manager.dto.bo;
|
|||
import cc.iotkit.common.api.BaseDto;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import org.hibernate.validator.constraints.NotBlank;
|
||||
import javax.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ import cc.iotkit.model.product.Category;
|
|||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import javax.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ package cc.iotkit.manager.dto.bo.device;
|
|||
import cc.iotkit.common.api.BaseDto;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import org.hibernate.validator.constraints.NotBlank;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
|
|
|
@ -30,7 +30,8 @@ import io.github.linpeilie.annotations.AutoMapping;
|
|||
import io.github.linpeilie.annotations.ReverseAutoMapping;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import org.hibernate.validator.constraints.NotBlank;
|
||||
import javax.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
|
@ -72,6 +73,7 @@ public class DeviceInfoBo extends BaseDto {
|
|||
|
||||
@ApiModelProperty(value = "产品key")
|
||||
@Size(max = 255, message = "产品key长度不正确")
|
||||
@NotBlank(message = "产品Key不能为空")
|
||||
private String productKey;
|
||||
|
||||
@ApiModelProperty(value = "设备描述")
|
||||
|
|
|
@ -29,7 +29,7 @@ import io.github.linpeilie.annotations.AutoMapping;
|
|||
import io.github.linpeilie.annotations.ReverseAutoMapping;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import javax.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ package cc.iotkit.manager.dto.bo.device;
|
|||
import cc.iotkit.common.api.BaseDto;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import org.hibernate.validator.constraints.NotBlank;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ package cc.iotkit.manager.dto.bo.device;
|
|||
import cc.iotkit.common.api.BaseDto;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import org.hibernate.validator.constraints.NotBlank;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ package cc.iotkit.manager.dto.bo.device;
|
|||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import org.hibernate.validator.constraints.NotBlank;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
|
|
@ -25,7 +25,7 @@ package cc.iotkit.manager.dto.bo.device;
|
|||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import org.hibernate.validator.constraints.NotBlank;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Map;
|
||||
|
|
|
@ -25,7 +25,7 @@ package cc.iotkit.manager.dto.bo.device;
|
|||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import org.hibernate.validator.constraints.NotBlank;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Map;
|
||||
|
|
|
@ -28,7 +28,7 @@ import cc.iotkit.model.device.DeviceConfig;
|
|||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import javax.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ import cc.iotkit.model.device.DeviceConfig;
|
|||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import javax.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
|
|
|
@ -28,8 +28,8 @@ import cc.iotkit.model.device.DeviceGroup;
|
|||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ import cc.iotkit.common.validate.AddGroup;
|
|||
import cc.iotkit.common.validate.EditGroup;
|
||||
import cc.iotkit.model.plugin.PluginInfo;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ import cc.iotkit.model.product.Icon;
|
|||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import javax.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
|
|
|
@ -28,9 +28,9 @@ import cc.iotkit.model.product.Product;
|
|||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import jakarta.validation.constraints.Min;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import javax.validation.constraints.Min;
|
||||
import org.hibernate.validator.constraints.NotBlank;
|
||||
import javax.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ import cc.iotkit.model.product.ProductModel;
|
|||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import javax.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ import cc.iotkit.model.rule.RuleInfo;
|
|||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import javax.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
package cc.iotkit.manager.dto.bo.screen;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import org.hibernate.validator.constraints.NotBlank;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
|
|
|
@ -26,8 +26,8 @@ package cc.iotkit.manager.dto.bo.screen;
|
|||
import cc.iotkit.common.api.BaseDto;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import org.hibernate.validator.constraints.NotBlank;
|
||||
import javax.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ import cc.iotkit.model.rule.TaskInfo;
|
|||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import javax.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ import io.github.linpeilie.annotations.AutoMapping;
|
|||
import io.github.linpeilie.annotations.ReverseAutoMapping;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import javax.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ package cc.iotkit.manager.dto.bo.thingmodel;
|
|||
import cc.iotkit.common.api.BaseDto;
|
||||
import cc.iotkit.common.thing.ThingModelMessage;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
|
|
@ -26,7 +26,7 @@ package cc.iotkit.manager.dto.bo.virtualdevice;
|
|||
import cc.iotkit.common.api.BaseDto;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import org.hibernate.validator.constraints.NotBlank;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
|
|
|
@ -7,8 +7,8 @@ import io.github.linpeilie.annotations.AutoMapping;
|
|||
import io.github.linpeilie.annotations.ReverseAutoMapping;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import org.hibernate.validator.constraints.NotBlank;
|
||||
import javax.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
|
|
|
@ -1,16 +1,19 @@
|
|||
package cc.iotkit.modbus.model;
|
||||
|
||||
import cc.iotkit.common.tenant.dao.TenantAware;
|
||||
import cc.iotkit.common.tenant.listener.TenantListener;
|
||||
import cc.iotkit.model.modbus.ModbusInfo;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import javax.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
import org.hibernate.annotations.Filter;
|
||||
import org.hibernate.annotations.FilterDef;
|
||||
import org.hibernate.annotations.GenericGenerator;
|
||||
import org.hibernate.annotations.ParamDef;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.Table;
|
||||
import javax.persistence.*;
|
||||
|
||||
/**
|
||||
* @Description: modbus点表信息
|
||||
|
@ -22,7 +25,10 @@ import javax.persistence.Table;
|
|||
@Table(name = "modbus_info")
|
||||
@ApiModel(value = "modbus点表信息")
|
||||
@AutoMapper(target = ModbusInfo.class)
|
||||
public class TbModbusInfo {
|
||||
@EntityListeners(TenantListener.class)
|
||||
@FilterDef(name = "tenantFilter", parameters = {@ParamDef(name = "tenantId", type = "long")})
|
||||
@Filter(name = "tenantFilter", condition = "tenant_id = :tenantId")
|
||||
public class TbModbusInfo implements TenantAware {
|
||||
@Id
|
||||
@GeneratedValue(generator = "SnowflakeIdGenerator")
|
||||
@GenericGenerator(name = "SnowflakeIdGenerator", strategy = "cc.iotkit.data.config.id.SnowflakeIdGenerator")
|
||||
|
@ -58,4 +64,8 @@ public class TbModbusInfo {
|
|||
*/
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private Long updateAt;
|
||||
|
||||
|
||||
@Column(name = "tenant_id")
|
||||
private Long tenantId;
|
||||
}
|
||||
|
|
|
@ -9,14 +9,20 @@
|
|||
*/
|
||||
package cc.iotkit.modbus.model;
|
||||
|
||||
import cc.iotkit.common.tenant.dao.TenantAware;
|
||||
import cc.iotkit.common.tenant.listener.TenantListener;
|
||||
import cc.iotkit.model.modbus.ModbusThingModel;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import io.github.linpeilie.annotations.AutoMapping;
|
||||
import io.github.linpeilie.annotations.ReverseAutoMapping;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import javax.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
import org.hibernate.annotations.Filter;
|
||||
import org.hibernate.annotations.FilterDef;
|
||||
import org.hibernate.annotations.GenericGenerator;
|
||||
import org.hibernate.annotations.ParamDef;
|
||||
|
||||
import javax.persistence.*;
|
||||
|
||||
|
@ -30,7 +36,10 @@ import javax.persistence.*;
|
|||
@Table(name = "modbus_thing_model")
|
||||
@ApiModel(value = "modbus物模型")
|
||||
@AutoMapper(target = ModbusThingModel.class)
|
||||
public class TbModbusThingModel {
|
||||
@EntityListeners(TenantListener.class)
|
||||
@FilterDef(name = "tenantFilter", parameters = {@ParamDef(name = "tenantId", type = "long")})
|
||||
@Filter(name = "tenantFilter", condition = "tenant_id = :tenantId")
|
||||
public class TbModbusThingModel implements TenantAware {
|
||||
@Id
|
||||
@GeneratedValue(generator = "SnowflakeIdGenerator")
|
||||
@GenericGenerator(name = "SnowflakeIdGenerator", strategy = "cc.iotkit.data.config.id.SnowflakeIdGenerator")
|
||||
|
@ -49,4 +58,6 @@ public class TbModbusThingModel {
|
|||
@ApiModelProperty(value = "更新时间")
|
||||
private Long updateAt;
|
||||
|
||||
@Column(name = "tenant_id")
|
||||
private Long tenantId;
|
||||
}
|
||||
|
|
|
@ -25,9 +25,11 @@ package cc.iotkit.openapi.dto.bo;
|
|||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import org.hibernate.validator.constraints.NotBlank;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
@ApiModel(value = "TokenVerifyBo")
|
||||
@Data
|
||||
public class TokenVerifyBo {
|
||||
|
@ -45,7 +47,7 @@ public class TokenVerifyBo {
|
|||
@ApiModelProperty(value = "标识符")
|
||||
private String identifier;
|
||||
|
||||
@NotBlank(message = "{tenant.number.not.blank}")
|
||||
@NotNull(message = "{tenant.number.not.blank}")
|
||||
@ApiModelProperty(value = "租户ID")
|
||||
private String tenantId;
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ package cc.iotkit.openapi.dto.bo.device;
|
|||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import org.hibernate.validator.constraints.NotBlank;
|
||||
import lombok.Data;
|
||||
|
||||
@ApiModel(value = "OpenapiDeviceBo")
|
||||
|
|
|
@ -25,7 +25,7 @@ package cc.iotkit.openapi.dto.bo.device;
|
|||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import org.hibernate.validator.constraints.NotBlank;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Map;
|
||||
|
|
|
@ -41,7 +41,7 @@ import cn.dev33.satoken.annotation.SaCheckPermission;
|
|||
import cn.dev33.satoken.annotation.SaCheckRole;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import org.hibernate.validator.constraints.NotBlank;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
|
|
|
@ -39,8 +39,8 @@ import cc.iotkit.system.service.ISysTenantPackageService;
|
|||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.dev33.satoken.annotation.SaCheckRole;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
|
|
@ -23,9 +23,11 @@
|
|||
|
||||
package cc.iotkit.system.dto;
|
||||
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import org.hibernate.validator.constraints.NotBlank;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* 用户登录对象
|
||||
*
|
||||
|
@ -38,8 +40,8 @@ public class LoginBody {
|
|||
/**
|
||||
* 租户ID
|
||||
*/
|
||||
@NotBlank(message = "{tenant.number.not.blank}")
|
||||
private String tenantId;
|
||||
@NotNull(message = "{tenant.number.not.blank}")
|
||||
private Long tenantId;
|
||||
|
||||
/**
|
||||
* 用户名
|
||||
|
|
|
@ -29,7 +29,7 @@ import cc.iotkit.common.validate.EditGroup;
|
|||
import cc.iotkit.model.system.SysApp;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import org.hibernate.validator.constraints.NotBlank;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
|
|
|
@ -28,9 +28,9 @@ import cc.iotkit.common.validate.AddGroup;
|
|||
import cc.iotkit.common.validate.EditGroup;
|
||||
import cc.iotkit.model.system.SysConfig;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import org.hibernate.validator.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
|
|
|
@ -28,10 +28,10 @@ import cc.iotkit.common.validate.AddGroup;
|
|||
import cc.iotkit.common.validate.EditGroup;
|
||||
import cc.iotkit.model.system.SysDept;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import jakarta.validation.constraints.Email;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import javax.validation.constraints.Email;
|
||||
import org.hibernate.validator.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
|
|
|
@ -28,9 +28,9 @@ import cc.iotkit.common.validate.AddGroup;
|
|||
import cc.iotkit.common.validate.EditGroup;
|
||||
import cc.iotkit.model.system.SysDictData;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import org.hibernate.validator.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
|
|
|
@ -28,10 +28,10 @@ import cc.iotkit.common.validate.AddGroup;
|
|||
import cc.iotkit.common.validate.EditGroup;
|
||||
import cc.iotkit.model.system.SysDictType;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Pattern;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import org.hibernate.validator.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Pattern;
|
||||
import javax.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
|
|
|
@ -29,9 +29,9 @@ import cc.iotkit.common.validate.EditGroup;
|
|||
import cc.iotkit.model.system.SysMenu;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import org.hibernate.validator.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
|
|
|
@ -28,9 +28,9 @@ import cc.iotkit.common.validate.AddGroup;
|
|||
import cc.iotkit.common.validate.EditGroup;
|
||||
import cc.iotkit.model.system.SysNotice;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import org.hibernate.validator.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
|
|
|
@ -28,9 +28,9 @@ import cc.iotkit.common.validate.AddGroup;
|
|||
import cc.iotkit.common.validate.EditGroup;
|
||||
import cc.iotkit.model.system.SysOssConfig;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import org.hibernate.validator.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
|
|
|
@ -28,9 +28,9 @@ import cc.iotkit.common.validate.AddGroup;
|
|||
import cc.iotkit.common.validate.EditGroup;
|
||||
import cc.iotkit.model.system.SysPost;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import org.hibernate.validator.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ package cc.iotkit.system.dto.bo;
|
|||
|
||||
import cc.iotkit.common.api.BaseDto;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
|
|
@ -29,9 +29,9 @@ import cc.iotkit.common.validate.AddGroup;
|
|||
import cc.iotkit.common.validate.EditGroup;
|
||||
import cc.iotkit.model.system.SysRole;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import org.hibernate.validator.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
|
|
@ -28,8 +28,8 @@ import cc.iotkit.common.validate.AddGroup;
|
|||
import cc.iotkit.common.validate.EditGroup;
|
||||
import cc.iotkit.model.system.SysTenant;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import org.hibernate.validator.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
|
|
|
@ -29,8 +29,8 @@ import cc.iotkit.common.validate.EditGroup;
|
|||
import cc.iotkit.model.system.SysTenantPackage;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import io.github.linpeilie.annotations.AutoMapping;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import org.hibernate.validator.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
|
|
|
@ -28,10 +28,10 @@ import cc.iotkit.common.constant.UserConstants;
|
|||
import cc.iotkit.common.validate.EditGroup;
|
||||
import cc.iotkit.model.system.SysUser;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import jakarta.validation.constraints.Email;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import javax.validation.constraints.Email;
|
||||
import org.hibernate.validator.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
|
|
@ -24,8 +24,8 @@
|
|||
package cc.iotkit.system.dto.bo;
|
||||
|
||||
import cc.iotkit.common.api.BaseDto;
|
||||
import jakarta.validation.constraints.Email;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import javax.validation.constraints.Email;
|
||||
import javax.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
|
|
@ -24,8 +24,8 @@
|
|||
package cc.iotkit.system.dto.bo;
|
||||
|
||||
import cc.iotkit.common.api.BaseDto;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
|
|
@ -23,7 +23,8 @@
|
|||
|
||||
package cc.iotkit.system.dto.bo;
|
||||
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.hibernate.validator.constraints.NotBlank;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
|
@ -38,12 +39,14 @@ public class XcxLoginBo {
|
|||
/**
|
||||
* appId
|
||||
*/
|
||||
@ApiModelProperty("appId")
|
||||
@NotBlank(message = "appId不能为空")
|
||||
private String appId;
|
||||
|
||||
/**
|
||||
* 授权码
|
||||
*/
|
||||
@ApiModelProperty("授权码")
|
||||
@NotBlank(message = "code不能为空")
|
||||
private String code;
|
||||
|
||||
|
|
Loading…
Reference in New Issue