| | |
| | | |
| | | |
| | | import com.fasterxml.jackson.core.JsonProcessingException; |
| | | 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.IGoodsSeckillService; |
| | | import com.ruoyi.system.api.domain.GoodsSeckill; |
| | | import com.ruoyi.system.api.domain.GoodsSku; |
| | | import com.ruoyi.system.api.domain.dto.GoodsStockUpdDTO; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | @InnerAuth |
| | | @PutMapping("/updGoodsSeckill") |
| | | R<?> updGoodsSeckill(@RequestBody GoodsStockUpdDTO goodsStockUpdDTOS) { |
| | | GoodsSeckill GoodsSeckillOne = goodsSeckillService.getById(goodsStockUpdDTOS); |
| | | GoodsSeckill GoodsSeckillOne = goodsSeckillService.getById(goodsStockUpdDTOS.getGoodsSkuId()); |
| | | GoodsSeckillOne.setSeckillStock(goodsStockUpdDTOS.getAuctionStock()); |
| | | goodsSeckillService.updateById(GoodsSeckillOne); |
| | | return R.ok(); |
| | | } |
| | | @InnerAuth |
| | | @PutMapping("/updGoodsSeckill1") |
| | | R<Boolean> updGoodsSeckill1(@RequestBody GoodsSku goodsSku){ |
| | | GoodsSeckill GoodsSeckillOne = goodsSeckillService.getById(goodsSku.getId()); |
| | | Integer m= GoodsSeckillOne.getSoldQuantity()+goodsSku.getSoldQuantity(); |
| | | GoodsSeckillOne.setSoldQuantity(m); |
| | | goodsSeckillService.updateById(GoodsSeckillOne); |
| | | return R.ok(); |
| | | } |
| | | |
| | | |
| | | /** |