From 9ee95b7ddf9de01e6a7540934263584964216ca7 Mon Sep 17 00:00:00 2001 From: hurui <177768073@qq.com> Date: Thu, 23 May 2024 11:45:06 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/cweb/controller/CouponController.java | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 cweb/src/main/java/com/cweb/controller/CouponController.java 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); + } + } + +}