diff --git a/cweb/src/main/java/com/cweb/controller/CouponController.java b/cweb/src/main/java/com/cweb/controller/CouponController.java new file mode 100644 index 0000000..7927155 --- /dev/null +++ b/cweb/src/main/java/com/cweb/controller/CouponController.java @@ -0,0 +1,40 @@ +package com.cweb.controller; + +import com.hfkj.common.utils.ResponseMsgUtil; +import com.hfkj.model.ResponseData; +import com.hfkj.service.goods.GoodsVpdService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.ResponseBody; + +import javax.annotation.Resource; + +@Controller +@RequestMapping(value="/coupon") +@Api(value="卡券业务") +public class CouponController { + + Logger log = LoggerFactory.getLogger(CouponController.class); + @Resource + private GoodsVpdService goodsVpdService; + + @RequestMapping(value="/queryGoodsVpdConfig",method = RequestMethod.GET) + @ResponseBody + @ApiOperation(value = "查询虚拟产品配置") + public ResponseData queryGoodsVpdConfig(@RequestParam(value = "specsId" , required = true) Long specsId) { + try { + return ResponseMsgUtil.success(goodsVpdService.queryDetailBySpecsId(specsId)); + + } catch (Exception e) { + log.error("error!",e); + return ResponseMsgUtil.exception(e); + } + } + +}