mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-07-25 08:25:07 +08:00
修改:新增产品枚举
This commit is contained in:
@ -1,5 +1,7 @@
|
||||
package cn.iocoder.yudao.module.iot.controller.admin.product.vo;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.validation.InEnum;
|
||||
import cn.iocoder.yudao.module.iot.enums.product.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
@ -20,22 +22,25 @@ public class ProductSaveReqVO {
|
||||
private String name;
|
||||
|
||||
@Schema(description = "设备类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "0")
|
||||
@InEnum(value = IotProductDeviceTypeEnum.class, message = "设备类型必须是 {value}")
|
||||
@NotNull(message = "设备类型不能为空")
|
||||
private Integer deviceType;
|
||||
|
||||
@Schema(description = "联网方式", requiredMode = Schema.RequiredMode.REQUIRED,example = "0")
|
||||
@NotNull(message = "联网方式不能为空")
|
||||
@InEnum(value = IotNetTypeEnum.class, message = "联网方式必须是 {value}")
|
||||
private Integer netType;
|
||||
|
||||
@Schema(description = "接入网关协议", requiredMode = Schema.RequiredMode.REQUIRED,example = "0")
|
||||
@NotNull(message = "接入网关协议不能为空")
|
||||
@InEnum(value = IotProtocolTypeEnum.class, message = "接入网关协议必须是 {value}")
|
||||
private Integer protocolType;
|
||||
|
||||
@Schema(description = "数据格式",requiredMode = Schema.RequiredMode.REQUIRED, example = "0")
|
||||
@InEnum(value = IotDataFormatEnum.class, message = "数据格式必须是 {value}")
|
||||
@NotNull(message = "数据格式不能为空")
|
||||
private Integer dataFormat;
|
||||
|
||||
@Schema(description = "数据校验级别", requiredMode = Schema.RequiredMode.REQUIRED, example = "0")
|
||||
@InEnum(value = IotValidateTypeEnum.class, message = "数据校验级别必须是 {value}")
|
||||
@NotNull(message = "数据校验级别不能为空")
|
||||
private Integer validateType;
|
||||
|
||||
|
@ -1,13 +1,11 @@
|
||||
package cn.iocoder.yudao.module.iot.dal.mysql.product;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.module.iot.controller.admin.product.vo.ProductPageReqVO;
|
||||
import cn.iocoder.yudao.module.iot.dal.dataobject.product.ProductDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import cn.iocoder.yudao.module.iot.controller.admin.product.vo.*;
|
||||
|
||||
/**
|
||||
* iot 产品 Mapper
|
||||
@ -21,7 +19,7 @@ public interface ProductMapper extends BaseMapperX<ProductDO> {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<ProductDO>()
|
||||
.likeIfPresent(ProductDO::getName, reqVO.getName())
|
||||
.betweenIfPresent(ProductDO::getCreateTime, reqVO.getCreateTime())
|
||||
.eqIfPresent(ProductDO::getProductKey, reqVO.getProductKey())
|
||||
.likeIfPresent(ProductDO::getProductKey, reqVO.getProductKey())
|
||||
.eqIfPresent(ProductDO::getProtocolId, reqVO.getProtocolId())
|
||||
.eqIfPresent(ProductDO::getCategoryId, reqVO.getCategoryId())
|
||||
.eqIfPresent(ProductDO::getDescription, reqVO.getDescription())
|
||||
|
Reference in New Issue
Block a user