Commit a1f13c79 by 陶光胜

企业微信取消授权回调处理

parent 2252bfc7
......@@ -330,12 +330,14 @@ public class DepartmentApiServiceImpl implements DepartmentApiService {
int level = 1;
String chainId = "0";
String chainName = "0";
String pId = "0";
if(parentId != 0){
TabHaobanDepartment parent = this.departmentService.getByWxId(parentId + "", wxEnterpriseId);
if(parent != null){
level = parent.getLevel() + 1;
chainId = parent.getChainId() + Constant.ID_SEPARATOR + parent.getDepartmentId();
chainName = parent.getChainName() + Constant.NAME_SEPARATOR + parent.getChainName();
pId = parent.getDepartmentId();
}
}
for(com.gic.wechat.api.dto.qywx.DepartmentDTO departmentDTO : list){
......@@ -348,7 +350,7 @@ public class DepartmentApiServiceImpl implements DepartmentApiService {
dto.setLevel(level);
dto.setWxEnterpriseId(wxEnterpriseId);
dto.setWxDepartmentId(departmentDTO.getId()+"");
dto.setParentDepartmentId(parentId+"");
dto.setParentDepartmentId(pId);
dto.setChainId(chainId);
dto.setChainName(chainName);
this.departmentService.add(dto);
......
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