|
@@ -30,6 +30,8 @@ import com.fs.qw.domain.QwExternalContact;
|
|
|
import com.fs.qw.domain.QwUser;
|
|
import com.fs.qw.domain.QwUser;
|
|
|
import com.fs.qw.mapper.QwCompanyMapper;
|
|
import com.fs.qw.mapper.QwCompanyMapper;
|
|
|
import com.fs.qw.mapper.QwExternalContactMapper;
|
|
import com.fs.qw.mapper.QwExternalContactMapper;
|
|
|
|
|
+import com.fs.qw.mapper.QwIpadServerMapper;
|
|
|
|
|
+import com.fs.qw.mapper.QwUserMapper;
|
|
|
import com.fs.qw.param.*;
|
|
import com.fs.qw.param.*;
|
|
|
import com.fs.qw.service.IQwDeptService;
|
|
import com.fs.qw.service.IQwDeptService;
|
|
|
import com.fs.qw.service.IQwExternalContactService;
|
|
import com.fs.qw.service.IQwExternalContactService;
|
|
@@ -98,6 +100,12 @@ public class QwUserController extends BaseController
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private CompanyUserMapper companyUserMapper;
|
|
private CompanyUserMapper companyUserMapper;
|
|
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private QwIpadServerMapper qwIpadServerMapper;
|
|
|
|
|
+
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private QwUserMapper qwUserMapper;
|
|
|
|
|
+
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private QwApiService qwApiService;
|
|
private QwApiService qwApiService;
|
|
|
|
|
|
|
@@ -661,6 +669,7 @@ public class QwUserController extends BaseController
|
|
|
|
|
|
|
|
//选择的企业微信账号为“”
|
|
//选择的企业微信账号为“”
|
|
|
if (StringUtil.strIsNullOrEmpty(qwUserParam.getId())&&qwUserParam.getCompanyUserId()!=null){
|
|
if (StringUtil.strIsNullOrEmpty(qwUserParam.getId())&&qwUserParam.getCompanyUserId()!=null){
|
|
|
|
|
+ handleServerInfo(qwUserIdCompanySet);
|
|
|
//制空企业微信的绑定
|
|
//制空企业微信的绑定
|
|
|
qwUserService.updateUserByUserId(qwUserParam.getCompanyUserId());
|
|
qwUserService.updateUserByUserId(qwUserParam.getCompanyUserId());
|
|
|
|
|
|
|
@@ -680,10 +689,10 @@ public class QwUserController extends BaseController
|
|
|
|
|
|
|
|
//制空绑定
|
|
//制空绑定
|
|
|
if (!difference.isEmpty()){
|
|
if (!difference.isEmpty()){
|
|
|
- difference.forEach(id->{
|
|
|
|
|
|
|
+ handleServerInfo(difference);
|
|
|
|
|
+ for (String id : difference){
|
|
|
qwUserService.updateUnBindUserById(id);
|
|
qwUserService.updateUnBindUserById(id);
|
|
|
- });
|
|
|
|
|
-
|
|
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@@ -893,4 +902,16 @@ public class QwUserController extends BaseController
|
|
|
List<QwUserVO> list = qwUserService.selectQwUserListByCompanyIdAndCorpIdAndNickName(companyId, corpId, nickName);
|
|
List<QwUserVO> list = qwUserService.selectQwUserListByCompanyIdAndCorpIdAndNickName(companyId, corpId, nickName);
|
|
|
return getDataTable(list);
|
|
return getDataTable(list);
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ //处理ipad服务信息
|
|
|
|
|
+ public void handleServerInfo(Set<String> qwUserids) {
|
|
|
|
|
+ //批量获取对应信息
|
|
|
|
|
+ List<QwUser> qwUsers = qwUserService.selectQwUserByIds(qwUserids);
|
|
|
|
|
+ for (QwUser qwUser : qwUsers){
|
|
|
|
|
+ if (qwUser.getServerId() != null) {
|
|
|
|
|
+ qwIpadServerMapper.addServer(qwUser.getServerId());
|
|
|
|
|
+ qwUserMapper.clearServerInfo(qwUser.getId());
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|