From eac446b46edeafafdb9f2c246b974d5fe832fe9c Mon Sep 17 00:00:00 2001 From: macro Date: Wed, 9 Feb 2022 10:49:47 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A5=E5=8F=A3Swagger=E8=B0=83=E7=94=A8?= =?UTF-8?q?=E5=8F=82=E6=95=B0=E9=97=AE=E9=A2=98=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/UmsMemberCouponController.java | 2 +- .../mall/portal/domain/CartPromotionItem.java | 54 ++++--------------- 2 files changed, 11 insertions(+), 45 deletions(-) diff --git a/mall-portal/src/main/java/com/macro/mall/portal/controller/UmsMemberCouponController.java b/mall-portal/src/main/java/com/macro/mall/portal/controller/UmsMemberCouponController.java index d475ba8..ab705a0 100644 --- a/mall-portal/src/main/java/com/macro/mall/portal/controller/UmsMemberCouponController.java +++ b/mall-portal/src/main/java/com/macro/mall/portal/controller/UmsMemberCouponController.java @@ -62,7 +62,7 @@ public class UmsMemberCouponController { @ApiOperation("获取登录会员购物车的相关优惠券") @ApiImplicitParam(name = "type", value = "使用可用:0->不可用;1->可用", - defaultValue = "1", allowableValues = "0,1", paramType = "query", dataType = "integer") + defaultValue = "1", allowableValues = "0,1", paramType = "path", dataType = "integer") @RequestMapping(value = "/list/cart/{type}", method = RequestMethod.GET) @ResponseBody public CommonResult> listCart(@PathVariable Integer type) { diff --git a/mall-portal/src/main/java/com/macro/mall/portal/domain/CartPromotionItem.java b/mall-portal/src/main/java/com/macro/mall/portal/domain/CartPromotionItem.java index a94a00c..9b3ff61 100644 --- a/mall-portal/src/main/java/com/macro/mall/portal/domain/CartPromotionItem.java +++ b/mall-portal/src/main/java/com/macro/mall/portal/domain/CartPromotionItem.java @@ -1,6 +1,9 @@ package com.macro.mall.portal.domain; import com.macro.mall.model.OmsCartItem; +import io.swagger.annotations.ApiModelProperty; +import lombok.Getter; +import lombok.Setter; import java.math.BigDecimal; @@ -8,54 +11,17 @@ import java.math.BigDecimal; * 购物车中促销信息的封装 * Created by macro on 2018/8/27. */ +@Getter +@Setter public class CartPromotionItem extends OmsCartItem{ - //促销活动信息 + @ApiModelProperty("促销活动信息") private String promotionMessage; - //促销活动减去的金额,针对每个商品 + @ApiModelProperty("促销活动减去的金额,针对每个商品") private BigDecimal reduceAmount; - //商品的真实库存(剩余库存-锁定库存) + @ApiModelProperty("剩余库存-锁定库存") private Integer realStock; - //购买商品赠送积分 + @ApiModelProperty("购买商品赠送积分") private Integer integration; - //购买商品赠送成长值 + @ApiModelProperty("购买商品赠送成长值") private Integer growth; - public String getPromotionMessage() { - return promotionMessage; - } - - public void setPromotionMessage(String promotionMessage) { - this.promotionMessage = promotionMessage; - } - - public BigDecimal getReduceAmount() { - return reduceAmount; - } - - public void setReduceAmount(BigDecimal reduceAmount) { - this.reduceAmount = reduceAmount; - } - - public Integer getRealStock() { - return realStock; - } - - public void setRealStock(Integer realStock) { - this.realStock = realStock; - } - - public Integer getIntegration() { - return integration; - } - - public void setIntegration(Integer integration) { - this.integration = integration; - } - - public Integer getGrowth() { - return growth; - } - - public void setGrowth(Integer growth) { - this.growth = growth; - } }