| | |
| | | import com.ruoyi.common.core.exception.ServiceException; |
| | | import com.ruoyi.common.core.utils.StringUtils; |
| | | import com.ruoyi.common.security.service.TokenService; |
| | | import com.ruoyi.order.event.PayEvent; |
| | | import com.ruoyi.order.mapper.ShoppingCartMapper; |
| | | import com.ruoyi.order.model.Order; |
| | | import com.ruoyi.order.model.OrderBalancePayment; |
| | |
| | | import com.ruoyi.other.api.vo.GetGoodsShopByGoodsIds; |
| | | import com.ruoyi.other.api.vo.GetSeckillActivityInfo; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.context.ApplicationEventPublisher; |
| | | import org.springframework.data.redis.core.RedisTemplate; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | |
| | | private CommissionService commissionService; |
| | | |
| | | @Resource |
| | | private VipSettingClient vipSettingClient; |
| | | |
| | | @Resource |
| | | private UserChangeLogClient userChangeLogClient; |
| | | |
| | | @Resource |
| | | private PointSettingClient pointSettingClient; |
| | | |
| | | @Resource |
| | |
| | | |
| | | @Resource |
| | | private RedisTemplate redisTemplate; |
| | | |
| | | @Resource |
| | | private ApplicationEventPublisher applicationEventPublisher; |
| | | |
| | | |
| | | |
| | |
| | | appUser.setLastShopTime(LocalDateTime.now()); |
| | | appUserClient.editAppUserById(appUser); |
| | | //变更等级 |
| | | appUserClient.vipUpgrade(appUser.getId()); |
| | | applicationEventPublisher.publishEvent(new PayEvent(JSON.toJSONString(appUser))); |
| | | //修改订支付状态 |
| | | order.setPayStatus(2); |
| | | //自提 |
| | |
| | | appUser.setLastShopTime(LocalDateTime.now()); |
| | | appUserClient.editAppUserById(appUser); |
| | | //变更等级 |
| | | appUserClient.vipUpgrade(appUser.getId()); |
| | | applicationEventPublisher.publishEvent(new PayEvent(JSON.toJSONString(appUser))); |
| | | //构建余额明细变动记录 |
| | | BalanceChangeRecord balanceChangeRecord = new BalanceChangeRecord(); |
| | | balanceChangeRecord.setAppUserId(appUser.getId()); |
| | |
| | | appUser.setLastShopTime(LocalDateTime.now()); |
| | | appUserClient.editAppUserById(appUser); |
| | | //变更等级 |
| | | appUserClient.vipUpgrade(appUser.getId()); |
| | | applicationEventPublisher.publishEvent(new PayEvent(JSON.toJSONString(appUser))); |
| | | |
| | | //积分支付不返佣 |
| | | |
| | |
| | | appUser.setLastShopTime(LocalDateTime.now()); |
| | | appUserClient.editAppUserById(appUser); |
| | | //变更等级 |
| | | appUserClient.vipUpgrade(appUser.getId()); |
| | | applicationEventPublisher.publishEvent(new PayEvent(JSON.toJSONString(appUser))); |
| | | //修改订支付状态 |
| | | order.setPayStatus(2); |
| | | //自提 |
| | |
| | | appUser.setLastShopTime(LocalDateTime.now()); |
| | | appUserClient.editAppUserById(appUser); |
| | | //变更等级 |
| | | appUserClient.vipUpgrade(appUser.getId()); |
| | | applicationEventPublisher.publishEvent(new PayEvent(JSON.toJSONString(appUser))); |
| | | |
| | | //修改订支付状态 |
| | | order.setPayStatus(2); |