| | |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.goods.service.goods.GoodsFileService; |
| | | import com.ruoyi.goods.service.goods.GoodsService; |
| | | import com.ruoyi.goods.service.goods.GoodsTotalService; |
| | | import com.ruoyi.goods.service.goods.ShopGoodsService; |
| | | import com.ruoyi.system.api.domain.dto.AppShopGoodsGetDto; |
| | | import com.ruoyi.system.api.domain.dto.GoodsTotalChangeDto; |
| | | import com.ruoyi.system.api.domain.dto.MerGoodsPriceListDto; |
| | | import com.ruoyi.system.api.domain.poji.goods.Goods; |
| | | import com.ruoyi.system.api.domain.poji.goods.GoodsFile; |
| | | import com.ruoyi.system.api.domain.poji.goods.ShopGoods; |
| | | import com.ruoyi.system.api.domain.vo.MerGoodsPriceListVo; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | |
| | | |
| | | @Resource |
| | | private ShopGoodsService shopGoodsService; |
| | | |
| | | @Resource |
| | | private GoodsTotalService goodsTotalService; |
| | | |
| | | @PostMapping("/getGoods") |
| | | public R<Goods> getGoods(@RequestBody String goodsId) |
| | |
| | | List<Goods> goodsList = goodsService.listGoodsByGoodsId(goodsIds); |
| | | return R.ok(goodsList); |
| | | } |
| | | |
| | | /** |
| | | * @description 通过id获取商品价格列表 |
| | | * @author jqs |
| | | * @date 2023/7/3 10:01 |
| | | * @param merGoodsPriceListDto |
| | | * @return R<List<MerGoodsPriceListVo>> |
| | | */ |
| | | @PostMapping("/listGoodsPriceByGoodsId") |
| | | public R<List<MerGoodsPriceListVo>> listGoodsPriceByGoodsId(@RequestBody MerGoodsPriceListDto merGoodsPriceListDto) |
| | | { |
| | | List<MerGoodsPriceListVo> goodsPriceListVoList = goodsService.listGoodsPriceByGoodsId(merGoodsPriceListDto); |
| | | return R.ok(goodsPriceListVoList); |
| | | } |
| | | |
| | | /** |
| | | * @description 改变商品统计 |
| | | * @author jqs |
| | | * @date 2023/9/5 15:01 |
| | | * @param goodsTotalChangeDtoList |
| | | * @return R |
| | | */ |
| | | @PostMapping("/changeGoodsTotal") |
| | | public R changeGoodsTotal(@RequestBody List<GoodsTotalChangeDto> goodsTotalChangeDtoList) |
| | | { |
| | | goodsTotalService.changeGoodsTotal(goodsTotalChangeDtoList); |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * @description 获取分类商品名 |
| | | * @author jqs |
| | | * @date 2023/8/12 18:39 |
| | | * @param classId |
| | | * @return R<List<String>> |
| | | */ |
| | | @PostMapping("/listGoodsNameByGoodsClass") |
| | | public R<List<String>> listGoodsNameByGoodsClass(@RequestBody Long classId) |
| | | { |
| | | List<String> goodsNameList = goodsService.listGoodsNameByGoodsClass(classId); |
| | | return R.ok(goodsNameList); |
| | | } |
| | | } |