Commit 01c972d8 by qwmqiuwenmin

Merge branch 'developer' of http://115.159.76.241/haoban3.0/haoban-manage3.0.git into developer

parents c58fc31b 2ea64963
......@@ -25,7 +25,7 @@ public interface DepartmentMapper {
int selectMaxSort(@Param("parentDepartmentId")String parentDepartmentId);
TabHaobanDepartment selectByRelatedId(@Param("relatedId")String relatedId);
List<TabHaobanDepartment> selectByRelatedId(@Param("relatedId")String relatedId);
List<TabHaobanDepartment> getByWxId(@Param("wxDepartmentId")String wxDepartmentId, @Param("wxEnterpriseId") String wxEnterpriseId);
......
......@@ -79,7 +79,11 @@ public class DepartmentServiceImpl implements DepartmentService {
@Override
public TabHaobanDepartment selectByRelatedId(String relatedId) {
return mapper.selectByRelatedId(relatedId);
List<TabHaobanDepartment> list = mapper.selectByRelatedId(relatedId);
if(CollectionUtils.isNotEmpty(list)){
return list.get(0);
}
return null;
}
@Override
......
......@@ -81,10 +81,10 @@ public class MessageApiServiceImpl implements MessageApiService {
departmentDTO.setChainName(parentDepartment.getChainName() + Constant.NAME_SEPARATOR + parentDepartment.getChainName());
departmentDTO.setLevel(parentDepartment.getLevel() + 1);
departmentDTO.setWxEnterpriseId(enterprise.getWxEnterpriseId());
if(dto.getType() == GicEditType.ADD.getCode()){
if(dto.getChangeType() == GicEditType.ADD.getCode()){
HaobanResponse response = this.departmentApiService.add(departmentDTO);
log.info("添加结果:{}", JSON.toJSONString(response));
}else if(dto.getType() == GicEditType.UPDATE.getCode()){
}else if(dto.getChangeType() == GicEditType.UPDATE.getCode()){
TabHaobanDepartment department = this.departmentService.selectByRelatedId(dto.getId());
if(department == null){
HaobanResponse response = this.departmentApiService.add(departmentDTO);
......
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