|
@@ -22,6 +22,7 @@ import lombok.extern.slf4j.Slf4j;
|
|
import org.springframework.beans.BeanUtils;
|
|
import org.springframework.beans.BeanUtils;
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
import org.springframework.http.*;
|
|
import org.springframework.http.*;
|
|
|
|
+import org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.util.StringUtils;
|
|
import org.springframework.util.StringUtils;
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
@@ -655,9 +656,11 @@ public class FeishuInfoController {
|
|
allNeedTodo.addAll(departmentArray);
|
|
allNeedTodo.addAll(departmentArray);
|
|
for (int i = 0; i < departmentArray.size(); i++) {
|
|
for (int i = 0; i < departmentArray.size(); i++) {
|
|
JSONObject ob = departmentArray.getJSONObject(i);
|
|
JSONObject ob = departmentArray.getJSONObject(i);
|
|
- JSONArray jsonArray = getSubDepartmentList(feishuInfo, ob.getString("open_department_id"));
|
|
|
|
- if(jsonArray!=null&&jsonArray.size()>0){
|
|
|
|
- allNeedTodo.addAll(jsonArray);
|
|
|
|
|
|
+ if(ob.getString("open_department_id")!=null){
|
|
|
|
+ JSONArray jsonArray = getSubDepartmentList(feishuInfo, ob.getString("open_department_id"));
|
|
|
|
+ if(jsonArray!=null&&jsonArray.size()>0){
|
|
|
|
+ allNeedTodo.addAll(jsonArray);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
List<Department> departmentList=new ArrayList<>();
|
|
List<Department> departmentList=new ArrayList<>();
|
|
@@ -815,6 +818,7 @@ public class FeishuInfoController {
|
|
}
|
|
}
|
|
|
|
|
|
@RequestMapping("/getFeishuMembsFromPlatform")
|
|
@RequestMapping("/getFeishuMembsFromPlatform")
|
|
|
|
+ @Transactional(rollbackFor = Exception.class)
|
|
public HttpRespMsg getFeishuMembsFromPlatform(HttpServletRequest request){
|
|
public HttpRespMsg getFeishuMembsFromPlatform(HttpServletRequest request){
|
|
HttpRespMsg msg=new HttpRespMsg();
|
|
HttpRespMsg msg=new HttpRespMsg();
|
|
Integer companyId = userMapper.selectById(request.getHeader("token")).getCompanyId();
|
|
Integer companyId = userMapper.selectById(request.getHeader("token")).getCompanyId();
|
|
@@ -847,9 +851,11 @@ public class FeishuInfoController {
|
|
allNeedTodo.addAll(departmentArray);
|
|
allNeedTodo.addAll(departmentArray);
|
|
for (int i = 0; i < departmentArray.size(); i++) {
|
|
for (int i = 0; i < departmentArray.size(); i++) {
|
|
JSONObject ob = departmentArray.getJSONObject(i);
|
|
JSONObject ob = departmentArray.getJSONObject(i);
|
|
- JSONArray jsonArray = getSubDepartmentList(feishuInfo, ob.getString("open_department_id"));
|
|
|
|
- if(jsonArray!=null&&jsonArray.size()>0){
|
|
|
|
- allNeedTodo.addAll(jsonArray);
|
|
|
|
|
|
+ if(ob.getString("open_department_id")!=null){
|
|
|
|
+ JSONArray jsonArray = getSubDepartmentList(feishuInfo, ob.getString("open_department_id"));
|
|
|
|
+ if(jsonArray!=null&&jsonArray.size()>0){
|
|
|
|
+ allNeedTodo.addAll(jsonArray);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
List<Department> departmentList=new ArrayList<>();
|
|
List<Department> departmentList=new ArrayList<>();
|