|
@@ -23,6 +23,7 @@ import com.cyksj.mapper.corp.*;
|
|
|
import com.cyksj.mapper.manage.cps.UserDistributePopularizeMapper;
|
|
import com.cyksj.mapper.manage.cps.UserDistributePopularizeMapper;
|
|
|
import com.cyksj.mapper.manage.distribute.UserDistributeSharedMapper;
|
|
import com.cyksj.mapper.manage.distribute.UserDistributeSharedMapper;
|
|
|
import com.cyksj.mapper.market.task.UserBindDetailMapper;
|
|
import com.cyksj.mapper.market.task.UserBindDetailMapper;
|
|
|
|
|
+import com.cyksj.mapper.mirrorshop.UserMirrorShopMapper;
|
|
|
import com.cyksj.mapper.station.CollegeStudentStationUserRelateMapper;
|
|
import com.cyksj.mapper.station.CollegeStudentStationUserRelateMapper;
|
|
|
import com.cyksj.model.dto.*;
|
|
import com.cyksj.model.dto.*;
|
|
|
import com.cyksj.model.entity.*;
|
|
import com.cyksj.model.entity.*;
|
|
@@ -127,6 +128,8 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
|
|
|
|
|
|
|
|
private final GroupRelationFrontService groupRelationFrontService;
|
|
private final GroupRelationFrontService groupRelationFrontService;
|
|
|
|
|
|
|
|
|
|
+ private final UserMirrorShopMapper userMirrorShopMapper;
|
|
|
|
|
+
|
|
|
private static final GlobalThreadPoolTaskExecutor TASK_POOL = GlobalThreadPoolTaskExecutor.getInstance();
|
|
private static final GlobalThreadPoolTaskExecutor TASK_POOL = GlobalThreadPoolTaskExecutor.getInstance();
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
@@ -387,6 +390,23 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
|
|
|
return showId;
|
|
return showId;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public String getUserMirrorShopId(Long userId) {
|
|
|
|
|
+ Integer update = 0;
|
|
|
|
|
+ String showId = null;
|
|
|
|
|
+ while (update != 1) {
|
|
|
|
|
+ showId = StringUtil.randomString(5);
|
|
|
|
|
+ try {
|
|
|
|
|
+ update = userMirrorShopMapper.update(null, Wrappers.lambdaUpdate(UserMirrorShop.class)
|
|
|
|
|
+ .set(UserMirrorShop::getCustomId, showId)
|
|
|
|
|
+ .eq(UserMirrorShop::getUserId, userId));
|
|
|
|
|
+ } catch (DuplicateKeyException e) {
|
|
|
|
|
+ update = 0;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ return showId;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
@Override
|
|
@Override
|
|
|
public Long getUserIdByShowId(String showId) {
|
|
public Long getUserIdByShowId(String showId) {
|
|
|
return userMapper.getUserIdByShowId(showId);
|
|
return userMapper.getUserIdByShowId(showId);
|