lisy
2023-08-07 9fd9c3428134e78144de6e920516a558eaa36c6d
cloud-server-activity/src/main/java/com/dsh/activity/controller/CouponController.java
@@ -376,7 +376,24 @@
            Coupon coupon = new Coupon();
            coupon.setName(dataVo.getCouponName());
            coupon.setType(dataVo.getPrescription());
//            coupon.setContent(dataVo.getIllustrate());
            HashMap<String, Object> stringObjectHashMap = new HashMap<>();
            switch (dataVo.getPrescription()){
                case 1:
                    stringObjectHashMap.put("num1",dataVo.getCondition());
                    stringObjectHashMap.put("num2",dataVo.getSubtraction());
                    coupon.setContent(stringObjectHashMap.toString());
                    break;
                case 2:
                    stringObjectHashMap.put("num1",dataVo.getDiscount());
                    coupon.setContent(stringObjectHashMap.toString());
                    break;
                case 3:
                    stringObjectHashMap.put("num1",dataVo.getExperience());
                    coupon.setContent(stringObjectHashMap.toString());
                    break;
                default:
                    break;
            }
            coupon.setIllustrate(dataVo.getIllustrate());
            coupon.setDistributionMethod(dataVo.getDistributionMethod());
            coupon.setRedemptionMethod(dataVo.getExchangeMethod());