| | |
| | | import com.ruoyi.common.core.constant.ServiceNameConstants; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.system.api.domain.*; |
| | | import com.ruoyi.system.api.domain.dto.GoodsStockUpdDTO; |
| | | import com.ruoyi.system.api.factory.GoodsSkuFactory; |
| | | import java.util.Collection; |
| | | import java.util.List; |
| | | 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.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestHeader; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | |
| | | ; |
| | | |
| | |
| | | @PostMapping("/goods-flavor-type/getFlavorTypeOne") |
| | | R<GoodsFlavorType> getFlavorTypeOne(@RequestBody Long flavorTypeId, |
| | | @RequestHeader(SecurityConstants.FROM_SOURCE) String source); |
| | | |
| | | @PostMapping("/goods-group-purchase/getGoodsSeckiGoodsGroupPurchaseOne") |
| | | R<GoodsGroupPurchase> getGoodsSeckiGoodsGroupPurchaseOne(@RequestBody Long goodsSkuId, |
| | | @RequestHeader(SecurityConstants.FROM_SOURCE) String source); |
| | | |
| | | @PostMapping("/goods-seckill/getGoodsSeckillOne") |
| | | R<GoodsSeckill> getGoodsSeckillOne(@RequestBody Long goodsSkuId, |
| | |
| | | R<List<GoodsSku>> getGoodsByName(@PathVariable("goodsSkuName") String goodsSkuName, |
| | | @RequestHeader(SecurityConstants.FROM_SOURCE) String source); |
| | | |
| | | @PutMapping("/goods-sku/deduct-stock") |
| | | R<?> deductStock(@RequestParam("goodsSkuId") Long goodsSkuId, |
| | | @RequestParam("auctionStock") Integer auctionStock, |
| | | /** |
| | | * 批量更新商品库存 auctionStock 负数则为减库存,正数为加库存 |
| | | * |
| | | * @param goodsStockUpdDTOS 商品库存修改数据传输对象 |
| | | * @param source 请求来源 |
| | | */ |
| | | @PutMapping("/goods-sku/upd-stock") |
| | | R<?> updGoodsStock(@RequestBody List<GoodsStockUpdDTO> goodsStockUpdDTOS, |
| | | @RequestHeader(SecurityConstants.FROM_SOURCE) String source); |
| | | |
| | | @PutMapping("/goods-sku/returning-stock") |
| | | R<?> returningStock(@RequestParam("goodsSkuId") Long goodsSkuId, |
| | | @RequestParam("auctionStock") Integer auctionStock, |
| | | /** |
| | | * 根据商品id集合查询商品 |
| | | * |
| | | * @param goodsIdList 商品id集合 |
| | | * @param source 请求来源 |
| | | * @return 商品集合 |
| | | */ |
| | | @PostMapping("/goods-sku/list") |
| | | R<List<GoodsSku>> getGoodsListByIds(@RequestBody Collection<Long> goodsIdList, |
| | | @RequestHeader(SecurityConstants.FROM_SOURCE) String source); |
| | | } |