1.新增商品规格获取接口

2.多规格上下架实现
This commit is contained in:
2024-08-06 14:49:07 +08:00
parent 3e32ea31d3
commit fbabdc5763
5 changed files with 141 additions and 7 deletions

View File

@@ -3,6 +3,7 @@ package com.chaozhanggui.system.cashierservice.controller;
import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSONObject;
import com.chaozhanggui.system.cashierservice.entity.dto.QuerySpecDTO;
import com.chaozhanggui.system.cashierservice.service.CartService;
import com.chaozhanggui.system.cashierservice.service.ProductService;
import com.chaozhanggui.system.cashierservice.sign.CodeEnum;
@@ -59,6 +60,21 @@ public class ProductController {
(map.containsKey("productGroupId") && ObjectUtil.isNotEmpty(map.get("productGroupId"))) ? map.get("productGroupId").toString() : "");
}
/**
* 查询规格
*
* @return
*/
@PostMapping("querySpec")
public Result querySpec(
@RequestBody QuerySpecDTO querySpecDTO
) {
if (querySpecDTO.getProductId() == null) {
return Result.fail("id不为空");
}
return Result.successWithData(productService.querySpec(querySpecDTO));
}
@GetMapping("queryProductSku")
public Result queryProductSku(