Commit 804b2cf3 by qwmqiuwenmin

fix

parent d9db4fd4
......@@ -11,6 +11,7 @@ import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.gic.api.base.commons.JSONResponse;
import com.gic.api.base.commons.Page;
......@@ -90,13 +91,16 @@ public class DepartmentApiServiceImpl implements DepartmentApiService {
dto.setOrder(department.getSort());
TabHaobanDepartment parent = departmentService.selectById(department.getParentDepartmentId());
dto.setParentid(Integer.valueOf(parent.getWxDepartmentId()));
logger.info("【部门新增】corpid() = {},siteId={},dto={}",enterpriseDTO.getCorpid(),application.getSiteId(),JSON.toJSONString(dto));
JSONResponse jp = qywxDepartmentApiService.createDepartment(enterpriseDTO.getCorpid(), application.getSiteId(), dto);
logger.info("【部门新增】jp = {}",JSON.toJSONString(jp));
if(jp.getErrorCode() != 1) {
hr.setErrorCode(0);
hr.setMessage("微信新增部门失败");
return hr;
}
wxDepartmentId = jp.getResult().toString();
logger.info("【部门新增】wxDepartmentId = {}",wxDepartmentId);
department.setWxDepartmentId(wxDepartmentId);
String departmentId = departmentService.add(department);
department.setDepartmentId(departmentId);
......
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