调整订单模块
This commit is contained in:
@@ -10,7 +10,7 @@ import com.tashow.cloud.productapi.enums.ApiConstants;
|
||||
import jakarta.annotation.security.PermitAll;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
@FeignClient(name = ApiConstants.NAME) // TODO 芋艿:fallbackFactory =
|
||||
@@ -52,15 +52,18 @@ public interface ProdApi {
|
||||
* @param skuId 单品ID
|
||||
* @param stocksNum 扣减数量
|
||||
*/
|
||||
@GetMapping(PREFIX + "/reduceStocks")
|
||||
CommonResult<Boolean> reduceStocks(Long skuId, Integer stocksNum) ;
|
||||
@PostMapping(PREFIX + "/reduceStocks")
|
||||
CommonResult<Boolean> reduceStocks(@RequestParam(value = "skuId", required = false)Long skuId
|
||||
,@RequestParam(value = "stocksNum", required = false) Integer stocksNum
|
||||
) ;
|
||||
/**
|
||||
* 增加库存
|
||||
* @param skuId 单品ID
|
||||
* @param stocksNum 增加数量
|
||||
*/
|
||||
@GetMapping(PREFIX + "/increaseStocks")
|
||||
CommonResult<Boolean> increaseStocks(Long skuId, Integer stocksNum);
|
||||
@PostMapping(PREFIX + "/increaseStocks")
|
||||
CommonResult<Boolean> increaseStocks(@RequestParam(value = "skuId", required = false)Long skuId
|
||||
,@RequestParam(value = "stocksNum", required = false) Integer stocksNum);
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user