mirror of
				https://gitee.com/hhyykk/ipms-sjy.git
				synced 2025-11-04 20:28:44 +08:00 
			
		
		
		
	【代码评审】IOT:产品的管理
This commit is contained in:
		@@ -1,11 +1,8 @@
 | 
			
		||||
package cn.iocoder.yudao.module.iot.controller.admin.product;
 | 
			
		||||
 | 
			
		||||
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
 | 
			
		||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
 | 
			
		||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
 | 
			
		||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
 | 
			
		||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
 | 
			
		||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
 | 
			
		||||
import cn.iocoder.yudao.module.iot.controller.admin.product.vo.IotProductPageReqVO;
 | 
			
		||||
import cn.iocoder.yudao.module.iot.controller.admin.product.vo.IotProductRespVO;
 | 
			
		||||
import cn.iocoder.yudao.module.iot.controller.admin.product.vo.IotProductSaveReqVO;
 | 
			
		||||
@@ -15,19 +12,14 @@ import io.swagger.v3.oas.annotations.Operation;
 | 
			
		||||
import io.swagger.v3.oas.annotations.Parameter;
 | 
			
		||||
import io.swagger.v3.oas.annotations.tags.Tag;
 | 
			
		||||
import jakarta.annotation.Resource;
 | 
			
		||||
import jakarta.servlet.http.HttpServletResponse;
 | 
			
		||||
import jakarta.validation.Valid;
 | 
			
		||||
import org.springframework.security.access.prepost.PreAuthorize;
 | 
			
		||||
import org.springframework.validation.annotation.Validated;
 | 
			
		||||
import org.springframework.web.bind.annotation.*;
 | 
			
		||||
 | 
			
		||||
import java.io.IOException;
 | 
			
		||||
import java.util.List;
 | 
			
		||||
 | 
			
		||||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT;
 | 
			
		||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
 | 
			
		||||
 | 
			
		||||
@Tag(name = "管理后台 - IOT 产品")
 | 
			
		||||
@Tag(name = "管理后台 - IoT 产品")
 | 
			
		||||
@RestController
 | 
			
		||||
@RequestMapping("/iot/product")
 | 
			
		||||
@Validated
 | 
			
		||||
 
 | 
			
		||||
@@ -6,8 +6,7 @@ import lombok.Data;
 | 
			
		||||
import lombok.EqualsAndHashCode;
 | 
			
		||||
import lombok.ToString;
 | 
			
		||||
 | 
			
		||||
// TODO @haohao:涉及到 iot 的拼写,要不都用 IoT,貌似更规范
 | 
			
		||||
@Schema(description = "管理后台 - iot 产品分页 Request VO")
 | 
			
		||||
@Schema(description = "管理后台 - IoT 产品分页 Request VO")
 | 
			
		||||
@Data
 | 
			
		||||
@EqualsAndHashCode(callSuper = true)
 | 
			
		||||
@ToString(callSuper = true)
 | 
			
		||||
 
 | 
			
		||||
@@ -7,13 +7,13 @@ import lombok.Data;
 | 
			
		||||
 | 
			
		||||
import java.time.LocalDateTime;
 | 
			
		||||
 | 
			
		||||
@Schema(description = "管理后台 - iot 产品 Response VO")
 | 
			
		||||
@Schema(description = "管理后台 - IoT 产品 Response VO")
 | 
			
		||||
@Data
 | 
			
		||||
@ExcelIgnoreUnannotated
 | 
			
		||||
public class IotProductRespVO {
 | 
			
		||||
 | 
			
		||||
    @Schema(description = "产品ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "26087")
 | 
			
		||||
    @ExcelProperty("产品ID")
 | 
			
		||||
    @Schema(description = "产品编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "26087")
 | 
			
		||||
    @ExcelProperty("产品编号")
 | 
			
		||||
    private Long id;
 | 
			
		||||
 | 
			
		||||
    @Schema(description = "产品名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四")
 | 
			
		||||
 
 | 
			
		||||
@@ -7,7 +7,7 @@ import jakarta.validation.constraints.NotEmpty;
 | 
			
		||||
import jakarta.validation.constraints.NotNull;
 | 
			
		||||
import lombok.Data;
 | 
			
		||||
 | 
			
		||||
@Schema(description = "管理后台 - iot 产品新增/修改 Request VO")
 | 
			
		||||
@Schema(description = "管理后台 - IoT 产品新增/修改 Request VO")
 | 
			
		||||
@Data
 | 
			
		||||
public class IotProductSaveReqVO {
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -7,7 +7,7 @@ import com.baomidou.mybatisplus.annotation.TableName;
 | 
			
		||||
import lombok.*;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * iot 产品 DO
 | 
			
		||||
 * IoT 产品 DO
 | 
			
		||||
 *
 | 
			
		||||
 * @author ahh
 | 
			
		||||
 */
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@ import cn.iocoder.yudao.module.iot.dal.dataobject.product.IotProductDO;
 | 
			
		||||
import org.apache.ibatis.annotations.Mapper;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * iot 产品 Mapper
 | 
			
		||||
 * IoT 产品 Mapper
 | 
			
		||||
 *
 | 
			
		||||
 * @author ahh
 | 
			
		||||
 */
 | 
			
		||||
 
 | 
			
		||||
@@ -7,7 +7,7 @@ import cn.iocoder.yudao.module.iot.dal.dataobject.product.IotProductDO;
 | 
			
		||||
import jakarta.validation.Valid;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * IOT 产品 Service 接口
 | 
			
		||||
 * IoT 产品 Service 接口
 | 
			
		||||
 *
 | 
			
		||||
 * @author ahh
 | 
			
		||||
 */
 | 
			
		||||
 
 | 
			
		||||
@@ -20,7 +20,7 @@ import static cn.iocoder.yudao.module.iot.enums.ErrorCodeConstants.PRODUCT_NOT_E
 | 
			
		||||
import static cn.iocoder.yudao.module.iot.enums.ErrorCodeConstants.PRODUCT_STATUS_NOT_DELETE;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * IOT 产品 Service 实现类
 | 
			
		||||
 * IoT 产品 Service 实现类
 | 
			
		||||
 *
 | 
			
		||||
 * @author ahh
 | 
			
		||||
 */
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user