| | |
| | | package com.ruoyi.goods.controller.inner; |
| | | |
| | | |
| | | import com.ruoyi.common.core.constant.SecurityConstants; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.security.annotation.InnerAuth; |
| | | import com.ruoyi.goods.service.IGoodsSkuService; |
| | | import com.ruoyi.system.api.domain.GoodsSku; |
| | | import com.ruoyi.system.api.domain.Order; |
| | | import com.ruoyi.system.api.domain.dto.GoodsStockUpdDTO; |
| | | import java.util.Collection; |
| | | import java.util.List; |
| | | import javax.annotation.Resource; |
| | | |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.PutMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * 根据商品id集合查询商品 |
| | | * |
| | | * @param goodsIdList 商品id集合 |
| | | * @param source 请求来源 |
| | | * @return 商品集合 |
| | | */ |
| | | @InnerAuth |
| | | @PostMapping("/list") |
| | | R<List<GoodsSku>> getGoodsListByIds(@RequestBody Collection<Long> goodsIdList) { |
| | | return R.ok(iGoodsSkuService.listByIds(goodsIdList)); |
| | | } |
| | | |
| | | /** |
| | | * 退款退货订单退库存 |
| | | * |
| | | * @param order |
| | | */ |
| | | @InnerAuth |
| | | @PostMapping("/returnStockByOrder") |
| | | R<?> returnStockByOrder(@RequestBody Order order) { |
| | | iGoodsSkuService.returnStockByOrder(order); |
| | | return R.ok(); |
| | | } |
| | | } |