| | |
| | | import com.ruoyi.common.core.web.page.PageInfo; |
| | | import com.ruoyi.common.redis.annotation.DistributedLock; |
| | | import com.ruoyi.other.api.domain.Goods; |
| | | import com.ruoyi.other.dto.AddGoodsDTO; |
| | | import com.ruoyi.other.service.GoodsService; |
| | | import com.ruoyi.other.vo.GoodsVO; |
| | | import io.swagger.annotations.*; |
| | |
| | | @Resource |
| | | private GoodsService goodsService; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 添加商品 |
| | | */ |
| | | @PostMapping("/addGoods") |
| | | @ApiOperation(value = "发布商品", tags = {"管理后台-商品管理"}) |
| | | public R<Void> addGoods(@RequestBody Goods goods) { |
| | | if(goods.getPurchaseLimit()==null){ |
| | | /* if(goods.getPurchaseLimit()==null){ |
| | | goods.setPurchaseLimit(-1); |
| | | } |
| | | goodsService.addGoods(goods); |
| | | goodsService.addGoods(goods);*/ |
| | | return R.ok(); |
| | | } |
| | | |