liujie
2023-07-26 b68aa42d243a61ab31d3bb08e5ca7e588a5188de
cloud-server-activity/src/main/java/com/dsh/activity/service/impl/CouponServiceImpl.java
@@ -61,7 +61,7 @@
            }
            List<Coupon> list = this.list(new QueryWrapper<Coupon>().eq("distributionMethod", distributionMethod).in("userPopulation", userPopulation)
                    .eq("auditStatus", 2).eq("status", 2).eq("state", 1)
                    .last(" and now() between startTime and endTime").orderByDesc("insertTime"));
                    .last(" and now() between startTime and endTime order by insertTime desc"));
            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
            for (Coupon coupon : list) {
                CouponListVo couponListVo = new CouponListVo();
@@ -73,12 +73,12 @@
                if (coupon.getType() == 1) {//满减{"num1":1,"num2":1}
                    JSONObject jsonObject = JSON.parseObject(content);
                    couponListVo.setUseCondition("满" + jsonObject.getDouble("num1") + "元可用");
                    couponListVo.setFavorable(jsonObject.getDouble("num2") + "元");
                    couponListVo.setFavorable(jsonObject.getString("num2"));
                }
                if (coupon.getType() == 2) {//代金券{"num1":1}
                    JSONObject jsonObject = JSON.parseObject(content);
                    couponListVo.setUseCondition("");
                    couponListVo.setFavorable(jsonObject.getDouble("num1") + "元");
                    couponListVo.setFavorable(jsonObject.getString("num1"));
                }
                if (coupon.getType() == 3) {//体验券{"num1":1}
                    JSONObject jsonObject = JSON.parseObject(content);