提交 23251cb1 authored 作者: sunderui's avatar sunderui

review--->edit

上级 a8bc6754
...@@ -13,8 +13,7 @@ import org.springframework.stereotype.Repository; ...@@ -13,8 +13,7 @@ import org.springframework.stereotype.Repository;
@Repository @Repository
public interface ProductBrandMapper extends BaseMapper<ProductBrandDO> { public interface ProductBrandMapper extends BaseMapper<ProductBrandDO> {
// TODO FROM 芋艿 to q2118cs:selectPageByParams default IPage<ProductBrandDO> selectPageByParams(ProductBrandPageDTO productBrandPageDTO) {
default IPage<ProductBrandDO> selectListByParams(ProductBrandPageDTO productBrandPageDTO) {
Page<ProductBrandDO> page = new Page<>(productBrandPageDTO.getPageNo(), productBrandPageDTO.getPageSize()); Page<ProductBrandDO> page = new Page<>(productBrandPageDTO.getPageNo(), productBrandPageDTO.getPageSize());
LambdaQueryWrapper<ProductBrandDO> queryWrapper = Wrappers.<ProductBrandDO>query().lambda() LambdaQueryWrapper<ProductBrandDO> queryWrapper = Wrappers.<ProductBrandDO>query().lambda()
.like(StringUtils.isNotBlank(productBrandPageDTO.getName()), ProductBrandDO::getName, productBrandPageDTO.getName()) .like(StringUtils.isNotBlank(productBrandPageDTO.getName()), ProductBrandDO::getName, productBrandPageDTO.getName())
......
...@@ -32,7 +32,7 @@ public class ProductBrandServiceImpl implements ProductBrandService { ...@@ -32,7 +32,7 @@ public class ProductBrandServiceImpl implements ProductBrandService {
@Override @Override
public PageResult<ProductBrandBO> getProductBrandPage(ProductBrandPageDTO productBrandPageDTO) { public PageResult<ProductBrandBO> getProductBrandPage(ProductBrandPageDTO productBrandPageDTO) {
IPage<ProductBrandDO> brandPage = productBrandMapper.selectListByParams(productBrandPageDTO); IPage<ProductBrandDO> brandPage = productBrandMapper.selectPageByParams(productBrandPageDTO);
return ProductBrandConvert.INSTANCE.convertPage(brandPage); return ProductBrandConvert.INSTANCE.convertPage(brandPage);
} }
......
...@@ -17,6 +17,7 @@ import io.swagger.annotations.Api; ...@@ -17,6 +17,7 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
...@@ -24,11 +25,11 @@ import static cn.iocoder.common.framework.vo.CommonResult.success; ...@@ -24,11 +25,11 @@ import static cn.iocoder.common.framework.vo.CommonResult.success;
@RestController @RestController
@RequestMapping("admins/brand") @RequestMapping("admins/brand")
@Api("商品品牌") // TODO FROM 芋艿 to q2118cs:管理员 - 商品品牌 API。。哈哈哈,原来没规范 @Api("管理员 - 商品品牌 API")
@AllArgsConstructor
public class AdminsProductBrandController { public class AdminsProductBrandController {
// TODO FROM 芋艿 to q2118cs:貌似没注入哈 private final ProductBrandService productBrandService;
private ProductBrandService productBrandService;
@PostMapping("/add") @PostMapping("/add")
@ApiOperation("创建品牌") @ApiOperation("创建品牌")
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论