From 1ebf83b7b8ae636f00d49406e4c9bbff2d73c34d Mon Sep 17 00:00:00 2001 From: puzhibing <393733352@qq.com> Date: 星期二, 20 八月 2024 18:46:37 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TCouponController.java | 26 ++++++++++++++++++++++++-- 1 files changed, 24 insertions(+), 2 deletions(-) diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TCouponController.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TCouponController.java index e47ce7e..149b813 100644 --- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TCouponController.java +++ b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TCouponController.java @@ -16,6 +16,7 @@ import com.ruoyi.other.service.TActivityService; import com.ruoyi.other.service.TCouponService; import com.ruoyi.other.service.TGoodsService; +import com.ruoyi.system.api.domain.SysUser; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiOperation; @@ -24,6 +25,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; +import javax.annotation.Resource; import java.math.BigDecimal; import java.time.LocalDateTime; import java.util.List; @@ -45,24 +47,35 @@ @Autowired private AppCouponClient appCouponClient; + + @PostMapping("/saveGoods") @ApiOperation(tags = {"管理后台-优惠券管理"},value = "优惠券添加") public AjaxResult saveActivity(@RequestBody TCoupon dto) { tCouponService.save(dto); return AjaxResult.success(); } + + + @GetMapping("/delete") @ApiOperation(tags = {"管理后台-优惠券管理"},value = "优惠券删除") public AjaxResult delete(Integer id) { tCouponService.removeById(id); return AjaxResult.success(); } + + + @PostMapping("/updateVip") @ApiOperation(tags = {"管理后台-优惠券管理"},value = "优惠券修改") public AjaxResult updateActivity(@RequestBody TCoupon dto) { tCouponService.updateById(dto); return AjaxResult.success(); } + + + @GetMapping("/getInfo") @ApiOperation(tags = {"管理后台-优惠券管理"},value = "优惠券查看详情") public AjaxResult<TCoupon> getInfo(Integer id) { @@ -73,6 +86,9 @@ byId.setUseCount(appCouponClient.getUseCountByCouponId(id).getData()); return AjaxResult.ok(byId); } + + + @PostMapping("/exchangeRecord") @ApiOperation(tags = {"管理后台-优惠券管理"},value = "优惠券查看详情-兑换记录") public AjaxResult<PageInfo<ExchangeRecordVO>> exchangeRecord(@RequestBody ExchangeRecordGoodsQuery dto) { @@ -93,6 +109,9 @@ } return AjaxResult.ok(data); } + + + @ApiOperation(tags = {"管理后台-优惠券管理"},value = "发放优惠券") @GetMapping(value = "/grantCoupon") public AjaxResult grantCoupon(@RequestBody GrantCouponDto dto) { @@ -110,6 +129,8 @@ appCouponClient.grantCoupon(dto); return AjaxResult.success(); } + + @ApiOperation(tags = {"管理后台-优惠券管理"},value = "优惠券列表分页查询") @PostMapping(value = "/pageList") @@ -130,6 +151,7 @@ } return R.ok(list); } + /** @@ -137,8 +159,8 @@ * @param id * @return */ - @PostMapping(value = "/getCouponById/{id}") - public R<TCoupon> getCouponById(@PathVariable Integer id){ + @PostMapping(value = "/getCouponById1/{id}") + public R<TCoupon> getCouponById1(@PathVariable(value = "id") Integer id){ TCoupon coupon = tCouponService.getById(id); return R.ok(coupon); } -- Gitblit v1.7.1