|
|
@@ -101,13 +101,20 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
|
|
|
}
|
|
|
Long dsPopularizeId = null;
|
|
|
if (StrUtil.isNotBlank(dsCode)) {
|
|
|
- UserDistributePopularize distributePopularize = distributePopularizeMapper.selectOne(Wrappers.lambdaQuery(UserDistributePopularize.class)
|
|
|
- .eq(UserDistributePopularize::getCode, dsCode)
|
|
|
- .select(UserDistributePopularize::getUserId, UserDistributePopularize::getId).last("limit 1"));
|
|
|
- if (distributePopularize != null) {
|
|
|
- log.info("渠道sharedId:{}设置固定推广链接用户分销", distributePopularize.getUserId());
|
|
|
- sharedId = distributePopularize.getUserId();
|
|
|
- dsPopularizeId = distributePopularize.getId();
|
|
|
+ dsCode = dsCode.trim();
|
|
|
+ User sharedUser = getOne(Wrappers.lambdaQuery(User.class)
|
|
|
+ .eq(User::getShowId, dsCode).last("limit 1"));
|
|
|
+ if (sharedUser != null) {
|
|
|
+ sharedId = sharedUser.getId();
|
|
|
+ } else {
|
|
|
+ UserDistributePopularize distributePopularize = distributePopularizeMapper.selectOne(Wrappers.lambdaQuery(UserDistributePopularize.class)
|
|
|
+ .eq(UserDistributePopularize::getCode, dsCode)
|
|
|
+ .select(UserDistributePopularize::getUserId, UserDistributePopularize::getId).last("limit 1"));
|
|
|
+ if (distributePopularize != null) {
|
|
|
+ log.info("渠道sharedId:{}设置固定推广链接用户分销", distributePopularize.getUserId());
|
|
|
+ sharedId = distributePopularize.getUserId();
|
|
|
+ dsPopularizeId = distributePopularize.getId();
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
if (sharedId != null && isNewUser) {
|