|
|
@@ -18,7 +18,6 @@ import shop.alien.entity.store.dto.LifeDiscountCouponStoreFriendDto;
|
|
|
import shop.alien.entity.store.vo.LifeCouponStatusVo;
|
|
|
import shop.alien.mapper.*;
|
|
|
import shop.alien.store.config.BaseRedisService;
|
|
|
-import shop.alien.store.service.ActivityInviteConfigService;
|
|
|
import shop.alien.store.service.LifeCouponService;
|
|
|
import shop.alien.store.service.LifeDiscountCouponStoreFriendService;
|
|
|
import shop.alien.util.common.UniqueRandomNumGenerator;
|
|
|
@@ -66,8 +65,6 @@ public class LifeCouponServiceImpl extends ServiceImpl<LifeCouponMapper, LifeCou
|
|
|
private final BaseRedisService baseRedisService;
|
|
|
private final LifeDiscountCouponMapper lifeDiscountCouponMapper;
|
|
|
|
|
|
- private final ActivityInviteConfigService activityInviteConfigService;
|
|
|
-
|
|
|
@Override
|
|
|
public LifeCoupon addOrUpdateCoupon(LifeCoupon lifeCoupon) {
|
|
|
|
|
|
@@ -353,21 +350,6 @@ public class LifeCouponServiceImpl extends ServiceImpl<LifeCouponMapper, LifeCou
|
|
|
|
|
|
resultMap.put("code", "true");
|
|
|
resultMap.put("message", "核销成功");
|
|
|
-
|
|
|
- // 如果用户首次支付并核销,则发放邀请奖励
|
|
|
- try{
|
|
|
- String userId = lifeUserOrder.getUserId();
|
|
|
- LambdaQueryWrapper<LifeUserOrder> lifeUserOrderLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
|
|
- lifeUserOrderLambdaQueryWrapper.eq(LifeUserOrder::getUserId, userId);
|
|
|
- lifeUserOrderLambdaQueryWrapper.eq(LifeUserOrder::getStatus, 7);
|
|
|
- int completeOrderCount = lifeUserOrderMapper.selectCount(lifeUserOrderLambdaQueryWrapper);
|
|
|
- if(completeOrderCount == 1){
|
|
|
- activityInviteConfigService.distributionInviteReward(userId, 3);
|
|
|
- }
|
|
|
- } catch(Exception e1){
|
|
|
- log.error("发放奖励邀请失败");
|
|
|
- }
|
|
|
-
|
|
|
} else {
|
|
|
resultMap.put("code", "false");
|
|
|
resultMap.put("message", "核销失败");
|