‘linchangsheng’ 3 veckor sedan
förälder
incheckning
231dd42a29

+ 2 - 0
src/main/java/com/gree/mall/manager/bean/coupon/CouponVO.java

@@ -56,6 +56,8 @@ public class CouponVO  {
     @ApiModelProperty(value = "显示时间")
     private Date displayTime;
 
+    @ApiModelProperty(value = "标志 WAIT=待发布 START=进行中 END=结束 CANCEL=取消")
+    private String flag;
 
     @ApiModelProperty(value = "优惠券领取开始时间")
     private Date obtainStartTime;

+ 2 - 1
src/main/java/com/gree/mall/manager/bean/goods/GoodsApplyItemDetail.java

@@ -1,6 +1,7 @@
 package com.gree.mall.manager.bean.goods;
 
 import com.gree.mall.manager.plus.entity.GoodsApply;
+import com.gree.mall.manager.plus.entity.GoodsApplyItem;
 import com.gree.mall.manager.plus.entity.GoodsSpec;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
@@ -8,7 +9,7 @@ import lombok.Data;
 
 @Data
 @ApiModel
-public class GoodsApplyItemDetail extends GoodsApply {
+public class GoodsApplyItemDetail extends GoodsApplyItem {
 
     @ApiModelProperty(value = "规格信息")
     private GoodsSpec goodsSpec;

+ 1 - 1
src/main/java/com/gree/mall/manager/controller/coupon/CouponController.java

@@ -109,7 +109,7 @@ public class CouponController {
             HttpServletRequest request,
             @ApiParam(value = "id",required = true) @RequestParam String couponId)
             throws RemoteServiceException {
-        couponLogic.cancel(couponId);
+        couponLogic.updateFlag(couponId, null, null, "CANCEL");
         return ResponseHelper.success();
     }
 

+ 29 - 0
src/main/java/com/gree/mall/manager/enums/CouponStatusEnum.java

@@ -0,0 +1,29 @@
+package com.gree.mall.manager.enums;
+
+
+import com.baomidou.mybatisplus.annotation.EnumValue;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+import com.gree.mall.manager.enums.base.BaseEnum;
+import lombok.AccessLevel;
+import lombok.Getter;
+import lombok.RequiredArgsConstructor;
+
+@Getter
+@RequiredArgsConstructor(access = AccessLevel.PRIVATE)
+public enum CouponStatusEnum implements BaseEnum {
+    WAIT("WAIT","待审核"),
+    FAIL("FAIL","驳回"),
+    OK("OK","通过");
+
+    @EnumValue
+    @JsonValue
+    private final String key;
+
+    private final String remark;
+
+    @JsonCreator(mode = JsonCreator.Mode.DELEGATING)
+    public static CouponStatusEnum create(String key) {
+        return BaseEnum.keyToEnum(CouponStatusEnum.class, key);
+    }
+}