|  |  |  | 
|---|
|  |  |  | 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; | 
|---|
|  |  |  | 
|---|
|  |  |  | 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)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|