package com.mzl.flower.web.customer; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.mzl.flower.base.BaseController; import com.mzl.flower.base.R; import com.mzl.flower.base.ReturnDataDTO; 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.response.point.PointGoodsDTO; import com.mzl.flower.dto.response.point.PointGoodsListDTO; import com.mzl.flower.service.point.PointGoodsService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.ResponseEntity; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; @RestController @RequestMapping("/api/customer/point/goods") @Api(value = "积分商品-花店", tags = "积分商品-花店") @Validated @Slf4j public class PointGoodsCustomerController extends BaseController { @Autowired private PointGoodsService pointGoodsService; @GetMapping("/list") @ApiOperation(value = "商品列表") public ResponseEntity>> selectGoodsList(Page page, PointGoodsQueryDTO dto){ dto.setStatus(Constants.POINT_GOODS_STATUS.A.name()); return returnData(R.SUCCESS.getCode(), pointGoodsService.selectGoodsList(page, dto)); } @GetMapping("/list/view") @ApiOperation(value = "商品详情") @ApiImplicitParams({ @ApiImplicitParam(name = "id", value = "商品id", required = true, dataType = "Long", paramType = "query") }) public ResponseEntity> getGoodsInfo(Long id) { return returnData(R.SUCCESS.getCode(), pointGoodsService.getGoodsInfo(id)); } }