接口上加上 @ApiResponses
@ApiOperation("消费者-优惠劵列表")
@GetMapping("coupons")
@ApiResponses(
@ApiResponse(code = 0,message = "成功",response = CouponsVo.class)
)
public R coupons() {
return R.success(userCouponService.coupons());
}
bean类加上 @ApiModelProperty
@Data
public class CouponsVo {
@ApiModelProperty("用户优惠卷id")
private Integer userCouponId;
@ApiModelProperty("优惠劵名称")
private String couponName;
@ApiModelProperty("数量")
private Integer count;
@ApiModelProperty("优惠金额")
private BigDecimal couponAmount;
@ApiModelProperty("优惠劵图片")
private String couponPic;
@ApiModelProperty("抵扣规格(1、抵扣金额。2、抵扣桌台费 3、抵扣商品费)")
private Integer specifications;
}
版权声明:本文为zh1685188342原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。