From 23251cb18765709aac84bba9b727a1ade7eccfde Mon Sep 17 00:00:00 2001 From: sunderui Date: Mon, 11 May 2020 22:06:36 +0800 Subject: [PATCH] review--->edit --- .../mall/product/biz/dao/product/ProductBrandMapper.java | 3 +-- .../biz/service/product/impl/ProductBrandServiceImpl.java | 2 +- .../controller/admins/AdminsProductBrandController.java | 7 ++++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/product/product-biz/src/main/java/cn/iocoder/mall/product/biz/dao/product/ProductBrandMapper.java b/product/product-biz/src/main/java/cn/iocoder/mall/product/biz/dao/product/ProductBrandMapper.java index 775503d7e..09c402ed3 100644 --- a/product/product-biz/src/main/java/cn/iocoder/mall/product/biz/dao/product/ProductBrandMapper.java +++ b/product/product-biz/src/main/java/cn/iocoder/mall/product/biz/dao/product/ProductBrandMapper.java @@ -13,8 +13,7 @@ import org.springframework.stereotype.Repository; @Repository public interface ProductBrandMapper extends BaseMapper { - // TODO FROM 芋艿 to q2118cs:selectPageByParams - default IPage selectListByParams(ProductBrandPageDTO productBrandPageDTO) { + default IPage selectPageByParams(ProductBrandPageDTO productBrandPageDTO) { Page page = new Page<>(productBrandPageDTO.getPageNo(), productBrandPageDTO.getPageSize()); LambdaQueryWrapper queryWrapper = Wrappers.query().lambda() .like(StringUtils.isNotBlank(productBrandPageDTO.getName()), ProductBrandDO::getName, productBrandPageDTO.getName()) diff --git a/product/product-biz/src/main/java/cn/iocoder/mall/product/biz/service/product/impl/ProductBrandServiceImpl.java b/product/product-biz/src/main/java/cn/iocoder/mall/product/biz/service/product/impl/ProductBrandServiceImpl.java index 404fd843c..fd97831e7 100644 --- a/product/product-biz/src/main/java/cn/iocoder/mall/product/biz/service/product/impl/ProductBrandServiceImpl.java +++ b/product/product-biz/src/main/java/cn/iocoder/mall/product/biz/service/product/impl/ProductBrandServiceImpl.java @@ -32,7 +32,7 @@ public class ProductBrandServiceImpl implements ProductBrandService { @Override public PageResult getProductBrandPage(ProductBrandPageDTO productBrandPageDTO) { - IPage brandPage = productBrandMapper.selectListByParams(productBrandPageDTO); + IPage brandPage = productBrandMapper.selectPageByParams(productBrandPageDTO); return ProductBrandConvert.INSTANCE.convertPage(brandPage); } diff --git a/product/product-rest/src/main/java/cn/iocoder/mall/product/rest/controller/admins/AdminsProductBrandController.java b/product/product-rest/src/main/java/cn/iocoder/mall/product/rest/controller/admins/AdminsProductBrandController.java index a430483d8..413034f90 100644 --- a/product/product-rest/src/main/java/cn/iocoder/mall/product/rest/controller/admins/AdminsProductBrandController.java +++ b/product/product-rest/src/main/java/cn/iocoder/mall/product/rest/controller/admins/AdminsProductBrandController.java @@ -17,6 +17,7 @@ import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiOperation; +import lombok.AllArgsConstructor; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; @@ -24,11 +25,11 @@ import static cn.iocoder.common.framework.vo.CommonResult.success; @RestController @RequestMapping("admins/brand") -@Api("商品品牌") // TODO FROM 芋艿 to q2118cs:管理员 - 商品品牌 API。。哈哈哈,原来没规范 +@Api("管理员 - 商品品牌 API") +@AllArgsConstructor public class AdminsProductBrandController { - // TODO FROM 芋艿 to q2118cs:貌似没注入哈 - private ProductBrandService productBrandService; + private final ProductBrandService productBrandService; @PostMapping("/add") @ApiOperation("创建品牌")