Commit 1aef8515e2ce87e539518752a11e8a13e98b09dc
1 parent
a83ce3b6
【代码评审】IOT:产品的管理
Showing
8 changed files
with
10 additions
and
19 deletions
yudao-module-iot/yudao-module-iot-biz/src/main/java/cn/iocoder/yudao/module/iot/controller/admin/product/IotProductController.java
| 1 | 1 | package cn.iocoder.yudao.module.iot.controller.admin.product; |
| 2 | 2 | |
| 3 | -import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; | |
| 4 | 3 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
| 5 | -import cn.iocoder.yudao.framework.common.pojo.PageParam; | |
| 6 | 4 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 7 | 5 | import cn.iocoder.yudao.framework.common.util.object.BeanUtils; |
| 8 | -import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; | |
| 9 | 6 | import cn.iocoder.yudao.module.iot.controller.admin.product.vo.IotProductPageReqVO; |
| 10 | 7 | import cn.iocoder.yudao.module.iot.controller.admin.product.vo.IotProductRespVO; |
| 11 | 8 | import cn.iocoder.yudao.module.iot.controller.admin.product.vo.IotProductSaveReqVO; |
| ... | ... | @@ -15,19 +12,14 @@ import io.swagger.v3.oas.annotations.Operation; |
| 15 | 12 | import io.swagger.v3.oas.annotations.Parameter; |
| 16 | 13 | import io.swagger.v3.oas.annotations.tags.Tag; |
| 17 | 14 | import jakarta.annotation.Resource; |
| 18 | -import jakarta.servlet.http.HttpServletResponse; | |
| 19 | 15 | import jakarta.validation.Valid; |
| 20 | 16 | import org.springframework.security.access.prepost.PreAuthorize; |
| 21 | 17 | import org.springframework.validation.annotation.Validated; |
| 22 | 18 | import org.springframework.web.bind.annotation.*; |
| 23 | 19 | |
| 24 | -import java.io.IOException; | |
| 25 | -import java.util.List; | |
| 26 | - | |
| 27 | -import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; | |
| 28 | 20 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; |
| 29 | 21 | |
| 30 | -@Tag(name = "管理后台 - IOT 产品") | |
| 22 | +@Tag(name = "管理后台 - IoT 产品") | |
| 31 | 23 | @RestController |
| 32 | 24 | @RequestMapping("/iot/product") |
| 33 | 25 | @Validated | ... | ... |
yudao-module-iot/yudao-module-iot-biz/src/main/java/cn/iocoder/yudao/module/iot/controller/admin/product/vo/IotProductPageReqVO.java
| ... | ... | @@ -6,8 +6,7 @@ import lombok.Data; |
| 6 | 6 | import lombok.EqualsAndHashCode; |
| 7 | 7 | import lombok.ToString; |
| 8 | 8 | |
| 9 | -// TODO @haohao:涉及到 iot 的拼写,要不都用 IoT,貌似更规范 | |
| 10 | -@Schema(description = "管理后台 - iot 产品分页 Request VO") | |
| 9 | +@Schema(description = "管理后台 - IoT 产品分页 Request VO") | |
| 11 | 10 | @Data |
| 12 | 11 | @EqualsAndHashCode(callSuper = true) |
| 13 | 12 | @ToString(callSuper = true) | ... | ... |
yudao-module-iot/yudao-module-iot-biz/src/main/java/cn/iocoder/yudao/module/iot/controller/admin/product/vo/IotProductRespVO.java
| ... | ... | @@ -7,13 +7,13 @@ import lombok.Data; |
| 7 | 7 | |
| 8 | 8 | import java.time.LocalDateTime; |
| 9 | 9 | |
| 10 | -@Schema(description = "管理后台 - iot 产品 Response VO") | |
| 10 | +@Schema(description = "管理后台 - IoT 产品 Response VO") | |
| 11 | 11 | @Data |
| 12 | 12 | @ExcelIgnoreUnannotated |
| 13 | 13 | public class IotProductRespVO { |
| 14 | 14 | |
| 15 | - @Schema(description = "产品ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "26087") | |
| 16 | - @ExcelProperty("产品ID") | |
| 15 | + @Schema(description = "产品编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "26087") | |
| 16 | + @ExcelProperty("产品编号") | |
| 17 | 17 | private Long id; |
| 18 | 18 | |
| 19 | 19 | @Schema(description = "产品名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四") | ... | ... |
yudao-module-iot/yudao-module-iot-biz/src/main/java/cn/iocoder/yudao/module/iot/controller/admin/product/vo/IotProductSaveReqVO.java
| ... | ... | @@ -7,7 +7,7 @@ import jakarta.validation.constraints.NotEmpty; |
| 7 | 7 | import jakarta.validation.constraints.NotNull; |
| 8 | 8 | import lombok.Data; |
| 9 | 9 | |
| 10 | -@Schema(description = "管理后台 - iot 产品新增/修改 Request VO") | |
| 10 | +@Schema(description = "管理后台 - IoT 产品新增/修改 Request VO") | |
| 11 | 11 | @Data |
| 12 | 12 | public class IotProductSaveReqVO { |
| 13 | 13 | ... | ... |
yudao-module-iot/yudao-module-iot-biz/src/main/java/cn/iocoder/yudao/module/iot/dal/dataobject/product/IotProductDO.java
yudao-module-iot/yudao-module-iot-biz/src/main/java/cn/iocoder/yudao/module/iot/dal/mysql/product/IotProductMapper.java
yudao-module-iot/yudao-module-iot-biz/src/main/java/cn/iocoder/yudao/module/iot/service/product/IotProductService.java
yudao-module-iot/yudao-module-iot-biz/src/main/java/cn/iocoder/yudao/module/iot/service/product/IotProductServiceImpl.java
| ... | ... | @@ -20,7 +20,7 @@ import static cn.iocoder.yudao.module.iot.enums.ErrorCodeConstants.PRODUCT_NOT_E |
| 20 | 20 | import static cn.iocoder.yudao.module.iot.enums.ErrorCodeConstants.PRODUCT_STATUS_NOT_DELETE; |
| 21 | 21 | |
| 22 | 22 | /** |
| 23 | - * IOT 产品 Service 实现类 | |
| 23 | + * IoT 产品 Service 实现类 | |
| 24 | 24 | * |
| 25 | 25 | * @author ahh |
| 26 | 26 | */ | ... | ... |