|
|
@@ -100,14 +100,8 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
|
|
|
user.setOpenId(info.getOpenid());
|
|
|
Boolean isNewUser = false;
|
|
|
if (user.getId() == null) {
|
|
|
- Long userId = user.getId();
|
|
|
isNewUser = true;
|
|
|
user.setPopularizeId(pid);
|
|
|
- if (pid != null) {
|
|
|
- TASK_POOL.execute(() -> {
|
|
|
- sendFixedCustomerCoupon(pid, userId, unionid);
|
|
|
- });
|
|
|
- }
|
|
|
}
|
|
|
this.saveOrUpdate(user);
|
|
|
if (sharedId != null && isNewUser) {
|
|
|
@@ -115,6 +109,12 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
|
|
|
distributeService.saveDistributionInvitation(sharedId, user.getId());
|
|
|
}
|
|
|
}
|
|
|
+ Long userId = user.getId();
|
|
|
+ if (isNewUser && pid != null) {
|
|
|
+ TASK_POOL.execute(() -> {
|
|
|
+ sendFixedCustomerCoupon(pid, userId, unionid);
|
|
|
+ });
|
|
|
+ }
|
|
|
//新旧用户都可实物分销
|
|
|
if (sharedId != null && dsType != null && dsType == 2) {
|
|
|
equipDistributeService.saveDistributionInvitation(sharedId, isNewUser, user.getId());
|