|
@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.fdkankan.manage.common.PageInfo;
|
|
|
import com.fdkankan.manage.common.ResultCode;
|
|
|
import com.fdkankan.manage.entity.JyPlatform;
|
|
|
+import com.fdkankan.manage.entity.JyUser;
|
|
|
import com.fdkankan.manage.entity.JyUserPlatform;
|
|
|
import com.fdkankan.manage.exception.BusinessException;
|
|
|
import com.fdkankan.manage.mapper.IJyUserPlatformMapper;
|
|
@@ -14,6 +15,7 @@ import com.fdkankan.manage.service.IExcelService;
|
|
|
import com.fdkankan.manage.service.IJyPlatformService;
|
|
|
import com.fdkankan.manage.service.IJyUserPlatformService;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
+import com.fdkankan.manage.service.IJyUserService;
|
|
|
import com.fdkankan.manage.vo.request.*;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
@@ -39,6 +41,8 @@ public class JyUserPlatformServiceImpl extends ServiceImpl<IJyUserPlatformMapper
|
|
|
|
|
|
@Autowired
|
|
|
IJyPlatformService platformService;
|
|
|
+ @Autowired
|
|
|
+ IJyUserService jyUserService;
|
|
|
@Override
|
|
|
public JyUserPlatform getByIdCard(String idCard) {
|
|
|
LambdaQueryWrapper<JyUserPlatform> wrapper = new LambdaQueryWrapper<>();
|
|
@@ -46,20 +50,10 @@ public class JyUserPlatformServiceImpl extends ServiceImpl<IJyUserPlatformMapper
|
|
|
return this.getOne(wrapper);
|
|
|
}
|
|
|
|
|
|
- @Override
|
|
|
- public void bindJyUserId(Integer id, Integer jyUserId) {
|
|
|
- LambdaUpdateWrapper<JyUserPlatform> wrapper = new LambdaUpdateWrapper<>();
|
|
|
- wrapper.eq(JyUserPlatform::getId,id);
|
|
|
- wrapper.set(JyUserPlatform::getJyUserId,jyUserId);
|
|
|
- this.update(wrapper);
|
|
|
- }
|
|
|
|
|
|
@Override
|
|
|
public void bindPlatform(Integer id, Integer platformId) {
|
|
|
- LambdaUpdateWrapper<JyUserPlatform> wrapper = new LambdaUpdateWrapper<>();
|
|
|
- wrapper.eq(JyUserPlatform::getId,id);
|
|
|
- wrapper.set(JyUserPlatform::getPlatformId,platformId);
|
|
|
- this.update(wrapper);
|
|
|
+ jyUserService.updatePlatformId(id,platformId);
|
|
|
}
|
|
|
|
|
|
|
|
@@ -111,21 +105,6 @@ public class JyUserPlatformServiceImpl extends ServiceImpl<IJyUserPlatformMapper
|
|
|
return this.getBaseMapper().queryByKey(param.getQueryKey(),platformAdminIdCards);
|
|
|
}
|
|
|
|
|
|
- @Override
|
|
|
- public JyUserPlatform getByJyUserId(Integer jyUserId) {
|
|
|
- LambdaQueryWrapper<JyUserPlatform> wrapper = new LambdaQueryWrapper<>();
|
|
|
- wrapper.eq(JyUserPlatform::getJyUserId,jyUserId);
|
|
|
- return this.getOne(wrapper);
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- @Override
|
|
|
- public void updatePlatformId(Integer id, Integer toPlatformId) {
|
|
|
- LambdaUpdateWrapper<JyUserPlatform> wrapper = new LambdaUpdateWrapper<>();
|
|
|
- wrapper.eq(JyUserPlatform::getPlatformId,id);
|
|
|
- wrapper.set(JyUserPlatform::getPlatformId,toPlatformId);
|
|
|
- this.update(wrapper);
|
|
|
- }
|
|
|
|
|
|
@Override
|
|
|
public Integer getLoginPlatformId(){
|
|
@@ -188,15 +167,4 @@ public class JyUserPlatformServiceImpl extends ServiceImpl<IJyUserPlatformMapper
|
|
|
return count;
|
|
|
}
|
|
|
|
|
|
- @Override
|
|
|
- public List<Integer> getUserIdsByFaltform(Integer loginPlatformId) {
|
|
|
- LambdaQueryWrapper<JyUserPlatform> wrapper = new LambdaQueryWrapper<>();
|
|
|
- wrapper.eq(JyUserPlatform::getPlatformId,loginPlatformId);
|
|
|
- List<JyUserPlatform> list = this.list(wrapper);
|
|
|
- if(list.isEmpty()){
|
|
|
- return new ArrayList<>();
|
|
|
- }
|
|
|
- return list.stream().map(JyUserPlatform::getJyUserId).collect(Collectors.toList());
|
|
|
-
|
|
|
- }
|
|
|
}
|