商品品牛排和规格,代码 REVIEW
This commit is contained in:
parent
b45739d151
commit
a8bc6754c2
@ -13,6 +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> selectListByParams(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()
|
||||||
|
@ -24,9 +24,10 @@ import static cn.iocoder.common.framework.vo.CommonResult.success;
|
|||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("admins/brand")
|
@RequestMapping("admins/brand")
|
||||||
@Api("商品品牌")
|
@Api("商品品牌") // TODO FROM 芋艿 to q2118cs:管理员 - 商品品牌 API。。哈哈哈,原来没规范
|
||||||
public class AdminsProductBrandController {
|
public class AdminsProductBrandController {
|
||||||
|
|
||||||
|
// TODO FROM 芋艿 to q2118cs:貌似没注入哈
|
||||||
private ProductBrandService productBrandService;
|
private ProductBrandService productBrandService;
|
||||||
|
|
||||||
@PostMapping("/add")
|
@PostMapping("/add")
|
||||||
@ -49,6 +50,7 @@ public class AdminsProductBrandController {
|
|||||||
@ApiImplicitParam(name = "picUrl", value = "品牌图片", required = true, example = "http://www.iocoder.cn"),
|
@ApiImplicitParam(name = "picUrl", value = "品牌图片", required = true, example = "http://www.iocoder.cn"),
|
||||||
@ApiImplicitParam(name = "status", value = "状态 1开启 2禁用", required = true, example = "1")
|
@ApiImplicitParam(name = "status", value = "状态 1开启 2禁用", required = true, example = "1")
|
||||||
})
|
})
|
||||||
|
// TODO FROM 芋艿 to q2118cs:只要改成了 bean 接收,就不用在写 @ApiImplicitParam 注解啦,直接在 bean 里写就 ok 啦
|
||||||
public CommonResult<Boolean> update(@Validated ProductBrandUpdateRequest updateRequest) {
|
public CommonResult<Boolean> update(@Validated ProductBrandUpdateRequest updateRequest) {
|
||||||
// 创建 productBrandUpdateDTO 对象
|
// 创建 productBrandUpdateDTO 对象
|
||||||
ProductBrandUpdateDTO productBrandUpdateDTO = ProductBrandConvert.INSTANCE.convertUpdate(updateRequest);
|
ProductBrandUpdateDTO productBrandUpdateDTO = ProductBrandConvert.INSTANCE.convertUpdate(updateRequest);
|
||||||
|
@ -13,6 +13,7 @@ import org.springframework.web.bind.annotation.RestController;
|
|||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("users/favorite")
|
@RequestMapping("users/favorite")
|
||||||
@Api("用户收藏")
|
@Api("用户收藏")
|
||||||
|
// TODO FROM 芋艿 to ilnhj:controller 分包的话,还是按照模块。然后通过 Admins 和 Users 前缀,区分不同的 Controlller
|
||||||
public class UserFavoriteController {
|
public class UserFavoriteController {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -15,6 +15,7 @@ public enum UserErrorCodeEnum implements ServiceExceptionUtil.Enumerable {
|
|||||||
USER_GET_ADDRESS_NOT_EXISTS(1001004002, "获取的地址不存在!"),
|
USER_GET_ADDRESS_NOT_EXISTS(1001004002, "获取的地址不存在!"),
|
||||||
|
|
||||||
// ========== 用户 ==========
|
// ========== 用户 ==========
|
||||||
|
// TODO FROM 芋艿 to linhj:是不是提示不对呀
|
||||||
USER_NOT_EXISTS(1001004003, "获取的地址不存在!"),
|
USER_NOT_EXISTS(1001004003, "获取的地址不存在!"),
|
||||||
;
|
;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user