refactor(framework): 优化代码中的空值判断和字符串处理- 使用 CollUtil.isNotEmpty() 替代空集合判断
- 使用 CharSequenceUtil.isNotEmpty() 替代空字符串判断 - 使用 Objects.nonNull() 替代对象非空判断- 优化部分代码结构以提高可读性
This commit is contained in:
@@ -15,6 +15,7 @@ import cn.lili.modules.goods.entity.dto.GoodsOperationDTO;
|
||||
import cn.lili.modules.goods.entity.dto.GoodsSearchParams;
|
||||
import cn.lili.modules.goods.entity.dto.GoodsSkuStockDTO;
|
||||
import cn.lili.modules.goods.entity.enums.GoodsStatusEnum;
|
||||
import cn.lili.modules.goods.entity.vos.GoodsNumVO;
|
||||
import cn.lili.modules.goods.entity.vos.GoodsSkuVO;
|
||||
import cn.lili.modules.goods.entity.vos.GoodsVO;
|
||||
import cn.lili.modules.goods.entity.vos.StockWarningVO;
|
||||
@@ -81,6 +82,12 @@ public class GoodsStoreController {
|
||||
return ResultUtil.data(goodsService.queryByParams(goodsSearchParams));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "获取商品数量")
|
||||
@GetMapping(value = "/goodsNumber")
|
||||
public ResultMessage<GoodsNumVO> getGoodsNumVO(GoodsSearchParams goodsSearchParams) {
|
||||
return ResultUtil.data(goodsService.getGoodsNumVO(goodsSearchParams));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "分页获取商品Sku列表")
|
||||
@GetMapping(value = "/sku/list")
|
||||
public ResultMessage<IPage<GoodsSku>> getSkuByPage(GoodsSearchParams goodsSearchParams) {
|
||||
|
||||
Reference in New Issue
Block a user