| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | @InnerAuth |
| | | @GetMapping("/num/{groupPurchaseId}") |
| | | R<?> GroupPurchaseNum(@PathVariable("groupPurchaseId") Long groupPurchaseId) { |
| | | try { |
| | | GoodsGroupPurchase byId = goodsGroupPurchaseService.getById(groupPurchaseId); |
| | | Integer m= byId.getCurrentNumber()+1; |
| | | byId.setCurrentNumber(m); |
| | | goodsGroupPurchaseService.updateById(byId); |
| | | } catch (Exception e) { |
| | | log.error("团购商品开始团购失败", e); |
| | | return R.fail("团购商品开始团购失败"); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | @InnerAuth |
| | | @GetMapping("/num1/{groupPurchaseId}") |
| | | R<?> GroupPurchaseNum1(@PathVariable("groupPurchaseId") Long groupPurchaseId) { |
| | | try { |
| | | GoodsGroupPurchase byId = goodsGroupPurchaseService.getById(groupPurchaseId); |
| | | Integer m= byId.getCurrentNumber()-1; |
| | | byId.setCurrentNumber(m); |
| | | goodsGroupPurchaseService.updateById(byId); |
| | | } catch (Exception e) { |
| | | log.error("团购商品开始团购失败", e); |
| | | return R.fail("团购商品开始团购失败"); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 团购商品结束团购 |
| | | * |