| | |
| | | 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 java.util.Collection; |
| | | import java.util.List; |
| | | import javax.annotation.Resource; |
| | | 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; |
| | | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | iGoodsSkuService.updGoodsStock1(goodsStockUpdDTOS); |
| | | return R.ok(); |
| | | } |
| | | @InnerAuth |
| | | @PutMapping("/updGoods") |
| | | R<Boolean> updGoods(@RequestBody GoodsSku goodsSku){ |
| | | GoodsSku goodsSkuOne=iGoodsSkuService.getById(goodsSku.getId()); |
| | | Integer h=goodsSkuOne.getSoldQuantity()+goodsSku.getSoldQuantity(); |
| | | goodsSkuOne.setSoldQuantity(h); |
| | | iGoodsSkuService.updateById(goodsSkuOne); |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 根据商品id集合查询商品 |