fanli/src/main/java/com/yeshi/fanli/mapping/ThreeSaleMapper.xml
@@ -206,9 +206,7 @@ `yeshi_ec_threesale` ts LEFT JOIN yeshi_ec_threesale tf ON ts.`boss_id`=tf.`worker_id` WHERE ts.`state` = '1' AND tf.`boss_id`=#{bossId} AND (ts.expire = 0 OR ts.expire IS NULL) WHERE ts.`state` = '1' AND tf.`boss_id`=#{bossId} AND tf.`state` = 1 <if test="key != null and key !='' "> and ts.`worker_id` like '%${key}%' </if> @@ -224,9 +222,7 @@ `yeshi_ec_threesale` ts LEFT JOIN yeshi_ec_threesale tf ON ts.`boss_id`=tf.`worker_id` WHERE ts.`state` = '1' AND tf.`boss_id`=#{bossId} AND (ts.expire = 0 OR ts.expire IS NULL) WHERE ts.`state` = '1' AND tf.`boss_id`=#{bossId} AND tf.`state` = 1 <if test="key != null and key !='' "> and ts.`worker_id` like '%${key}%' </if> @@ -315,7 +311,7 @@ `yeshi_ec_threesale` ts LEFT JOIN yeshi_ec_threesale tf ON ts.`boss_id`=tf.`worker_id` WHERE 1=1 WHERE 1=1 AND tf.`state` = 1 <if test="uid != null"> AND tf.`boss_id` = #{uid} </if> @@ -348,7 +344,7 @@ `yeshi_ec_threesale` ts LEFT JOIN yeshi_ec_threesale tf ON ts.`boss_id`=tf.`worker_id` WHERE 1=1 WHERE 1=1 AND tf.`state` = 1 <if test="uid != null"> AND tf.`boss_id` = #{uid} </if> @@ -431,7 +427,7 @@ SELECT yet.* FROM ( SELECT DISTINCT(ts.`id`) AS id FROM `yeshi_ec_threesale` ts LEFT JOIN yeshi_ec_threesale tf ON ts.`boss_id`=tf.`worker_id` WHERE tf.`boss_id` = #{uid})A WHERE tf.`boss_id` = #{uid} AND tf.`state` = 1)A LEFT JOIN yeshi_ec_threesale yet ON yet.id = A.id WHERE 1=1 <if test="state != null"> @@ -447,7 +443,7 @@ SELECT COUNT(A.id) FROM ( SELECT DISTINCT(ts.`id`) AS id FROM `yeshi_ec_threesale` ts LEFT JOIN yeshi_ec_threesale tf ON ts.`boss_id`=tf.`worker_id` WHERE tf.`boss_id` = #{uid} WHERE tf.`boss_id` = #{uid} AND tf.`state` = 1 <if test="state != null"> AND ts.`state` = #{state} </if> fanli/src/main/java/com/yeshi/fanli/service/impl/order/CommonOrderServiceImpl.java
@@ -300,12 +300,13 @@ // 版本区分:2.1 奖励券倒计时 if (VersionUtil.greaterThan_2_1(acceptData.getPlatform(), acceptData.getVersion())) { Date thirdCreateTime = order.getThirdCreateTime(); if (thirdCreateTime != null) { Date accountTime = order.getAccountTime(); if (thirdCreateTime != null && accountTime != null) { long downOrderTime = thirdCreateTime.getTime(); long limitDate = TimeUtil.parse(Constant.COUPON_REWARD_TIME).getTime(); if (downOrderTime > limitDate) { newEdition = true; Date endDay = DateUtil.plusDayDate(4, thirdCreateTime); Date endDay = DateUtil.plusDayDate(Constant.COUPON_REWARD_LIMIT_DAY, accountTime); long currentTime = java.lang.System.currentTimeMillis(); if (endDay.getTime() > currentTime) { DateInfo dateInfo = DateUtil.dateDiff3(currentTime, endDay.getTime()); fanli/src/main/java/com/yeshi/fanli/service/impl/redpack/RedPackForbidServiceImpl.java
@@ -150,7 +150,8 @@ dto.setReason("封禁时间到期,自动解封"); dto.setTime("已可以重新使用红包功能"); dto.setHandle("已被清空"); userMoneyMsgNotificationService.redPackMsg(id, MsgTypeMoneyTypeEnum.redPackForbidRemove, new Gson().toJson(dto), "封禁无法申诉,请按照规则使用红包功能 "); userMoneyMsgNotificationService.redPackMsg(id, MsgTypeMoneyTypeEnum.redPackForbidRemove, new Gson().toJson(dto), null); } } fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserSystemCouponServiceImpl.java
@@ -739,7 +739,7 @@ return userSystemCouponMapper.countUsableByUid(uid, listCouponId); } @Transactional @Transactional(rollbackFor = Exception.class) @Override public void useGoodsCoupon(Long uid, Long id, Long goodId, Integer sourceType) throws UserSystemCouponException, Exception { @@ -816,7 +816,7 @@ } @Transactional @Transactional(rollbackFor = Exception.class) @Override public void useOrderCoupon(Long uid, Long id, String orderNo, Integer sourceType, AcceptData acceptData) throws UserSystemCouponException, Exception { @@ -869,23 +869,26 @@ throw new UserSystemCouponException(1, "亲,很遗憾,售后维权订单不能使用返利奖励券~"); } // 订单 CommonOrderVO orderVO = commonOrderService.getCommonOrderByOrderNo(uid, orderNo, CommonOrder.STATE_JS, sourceType); if (orderVO == null) throw new UserSystemCouponException(1, "订单信息获取失败"); List<CommonOrderVO> listVo = commonOrderService.listGroupOrderNoByUid(0, 1, uid, 2, 1,1, orderNo, null, null, null, sourceType); if (listVo == null || listVo.size() == 0) throw new UserSystemCouponException(1, "亲,很遗憾,该订单已不能使用返利奖励券~"); CommonOrderVO orderVO = listVo.get(0); // 版本区分:2.1 if (VersionUtil.greaterThan_2_1(acceptData.getPlatform(), acceptData.getVersion())) { boolean valid = false; Date thirdCreateTime = orderVO.getThirdCreateTime(); if (thirdCreateTime != null) { Date accountTime = orderVO.getAccountTime(); if (thirdCreateTime != null && accountTime != null) { long downOrderTime = thirdCreateTime.getTime(); long limitDate = TimeUtil.parse(Constant.COUPON_REWARD_TIME).getTime(); if (downOrderTime > limitDate) { Date endDay = DateUtil.plusDayDate(4, thirdCreateTime); Date endDay = DateUtil.plusDayDate(Constant.COUPON_REWARD_LIMIT_DAY, accountTime); long currentTime = java.lang.System.currentTimeMillis(); if (endDay.getTime() > currentTime) { boolean valid = false; DateInfo dateInfo = DateUtil.dateDiff3(currentTime, endDay.getTime()); if (dateInfo != null) { if (dateInfo.getDay() > 0) @@ -900,12 +903,12 @@ if (!valid && dateInfo.getSecond() > 0) valid = true; } if (!valid) throw new UserSystemCouponException(1, "该订单已超过有效使用奖励券时间"); } } } } if (!valid) throw new UserSystemCouponException(1, "该订单不能使用奖励券"); } BigDecimal hongBao = orderVO.getHongBao(); @@ -2017,7 +2020,7 @@ return listVO; } @Transactional @Transactional(rollbackFor = Exception.class) @Override public UserSystemCouponVO giveCoupon(Long uid, Long id) throws UserSystemCouponException { UserSystemCoupon userSystemCoupon = userSystemCouponMapper.selectByPrimaryKey(id); fanli/src/main/java/com/yeshi/fanli/util/Constant.java
@@ -171,9 +171,10 @@ // vip赠送金币 public static final int VIP_COLDCOIN_NUM = 1800; // 奖励券倒计时 - 待确定 public static final String COUPON_REWARD_TIME = "2019-12-20"; // TODO // 奖励券倒计时 - 执行时间待确定 public static final String COUPON_REWARD_TIME = "2019-12-01"; // TODO // 奖励券倒计时 - 天数 public static final int COUPON_REWARD_LIMIT_DAY = 5; public static WXGZConfig wxGZConfig;