From cb517279ac03173f5b8d459de0a336f010aec599 Mon Sep 17 00:00:00 2001 From: gongzuming <gongzuming> Date: 星期四, 29 八月 2024 16:01:47 +0800 Subject: [PATCH] 积分相关 --- src/main/java/com/mzl/flower/web/customer/PointGoodsCustomerController.java | 26 +++++++++++++++++++++++--- 1 files changed, 23 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/mzl/flower/web/customer/PointGoodsCustomerController.java b/src/main/java/com/mzl/flower/web/customer/PointGoodsCustomerController.java index 532a098..2782aa7 100644 --- a/src/main/java/com/mzl/flower/web/customer/PointGoodsCustomerController.java +++ b/src/main/java/com/mzl/flower/web/customer/PointGoodsCustomerController.java @@ -4,12 +4,14 @@ import com.mzl.flower.base.BaseController; import com.mzl.flower.base.R; import com.mzl.flower.base.ReturnDataDTO; +import com.mzl.flower.config.security.SecurityUtils; import com.mzl.flower.constant.Constants; -import com.mzl.flower.dto.request.point.PointGoodsCreateDTO; -import com.mzl.flower.dto.request.point.PointGoodsQueryDTO; -import com.mzl.flower.dto.request.point.PointGoodsUpdateDTO; +import com.mzl.flower.dto.request.point.*; +import com.mzl.flower.dto.response.point.CustomerPointDetailDTO; import com.mzl.flower.dto.response.point.PointGoodsDTO; import com.mzl.flower.dto.response.point.PointGoodsListDTO; +import com.mzl.flower.dto.response.point.PointGoodsRecordDTO; +import com.mzl.flower.entity.point.PointGoodsRecord; import com.mzl.flower.service.point.PointGoodsService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; @@ -47,4 +49,22 @@ return returnData(R.SUCCESS.getCode(), pointGoodsService.getGoodsInfo(id)); } + + @PostMapping("/exchange") + @ApiOperation(value = "积分商品兑换", notes = "积分商品兑换") + public ResponseEntity<ReturnDataDTO> exchangeGoods(@Validated @RequestBody ExchangeGoodsDTO dto) { + pointGoodsService.exchangeGoods(dto); + return returnData(R.SUCCESS.getCode(),null); + } + + + @GetMapping("/exchange/list") + @ApiOperation(value = "积分商品兑换券列表", notes = "积分商品兑换券列表") + public ResponseEntity<ReturnDataDTO<Page<PointGoodsRecordDTO>>> myExchangeGoods(QueryExchangeGoodsDTO dto, Page page) { + return returnData(R.SUCCESS.getCode(), pointGoodsService.myExchangeGoods(dto,page)); + } + + + + } -- Gitblit v1.9.3