Commit c63bbfed by 陶光胜

加日志

parent 3010be0c
......@@ -321,7 +321,7 @@ public class DepartmentApiServiceImpl implements DepartmentApiService {
List<com.gic.wechat.api.dto.qywx.DepartmentDTO> list = this.qywxDepartmentApiService.listDepartment(corpid, suiteid, null);
logger.info("企业所有部门数据:{}", JSON.toJSONString(list));
if(CollectionUtils.isNotEmpty(list)){
this.addAllDepartment(list, 1, wxEnterpriseId);
this.addAllDepartment(list, 0, wxEnterpriseId);
}
}
......@@ -330,7 +330,7 @@ public class DepartmentApiServiceImpl implements DepartmentApiService {
int level = 1;
String chainId = "0";
String chainName = "0";
if(parentId != 1){
if(parentId != 0){
TabHaobanDepartment parent = this.departmentService.getByWxId(parentId + "", wxEnterpriseId);
if(parent != null){
level = parent.getLevel() + 1;
......@@ -340,15 +340,18 @@ public class DepartmentApiServiceImpl implements DepartmentApiService {
}
for(com.gic.wechat.api.dto.qywx.DepartmentDTO departmentDTO : list){
if(parentId == departmentDTO.getParentid()){
com.gic.haoban.manage.api.dto.DepartmentDTO dto = new com.gic.haoban.manage.api.dto.DepartmentDTO();
dto.setDepartmentName(departmentDTO.getName());
dto.setLevel(level);
dto.setWxEnterpriseId(wxEnterpriseId);
dto.setWxDepartmentId(departmentDTO.getId()+"");
dto.setParentDepartmentId(parentId+"");
dto.setChainId(chainId);
dto.setChainName(chainName);
this.departmentService.add(dto);
TabHaobanDepartment exist = this.departmentService.getByWxId(departmentDTO.getId() + "", wxEnterpriseId);
if(exist == null){
com.gic.haoban.manage.api.dto.DepartmentDTO dto = new com.gic.haoban.manage.api.dto.DepartmentDTO();
dto.setDepartmentName(departmentDTO.getName());
dto.setLevel(level);
dto.setWxEnterpriseId(wxEnterpriseId);
dto.setWxDepartmentId(departmentDTO.getId()+"");
dto.setParentDepartmentId(parentId+"");
dto.setChainId(chainId);
dto.setChainName(chainName);
this.departmentService.add(dto);
}
this.addAllDepartment(list, departmentDTO.getId(), wxEnterpriseId);
}
}
......
......@@ -212,6 +212,7 @@ public class MessageApiServiceImpl implements MessageApiService {
continue;
}
StaffDepartmentRelatedDTO related = new StaffDepartmentRelatedDTO();
related.setWxEnterpriseId(wxEnterpriseId);
related.setWxUserId(qywxCallBackDTO.getUserid());
related.setClerkCode(qywxCallBackDTO.getUserid());
related.setDepartmentId(department.getDepartmentId());
......
......@@ -49,7 +49,6 @@ public class ApplicationController extends WebBaseController{
@RequestMapping("get-auth-url")
@IgnoreLogin
public HaobanResponse getAuthUrl(){
//String suiteId = GlobalVar.ctxPropertiesMap.get("suiteId");
String suiteId = config.getSuiteId();
log.info("应用ID:{}", suiteId);
String redictUrl = config.getHost() + "callback";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment