Commit 0090da94 by qwmqiuwenmin

fix

parent 503d804c
......@@ -5,6 +5,7 @@ import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.apache.xpath.operations.Bool;
import com.gic.haoban.manage.api.dto.DepartmentDTO;
import com.gic.haoban.manage.service.entity.TabHaobanDepartment;
import com.github.pagehelper.Page;
......@@ -53,4 +54,6 @@ public interface DepartmentMapper {
int countSyncDepartmentByEnterpriseId(@Param("enterpriseId")String enterpriseId);
int countByDepartment(@Param("departmentId")String departmentId);
TabHaobanDepartment getByRelatedIdNotInRecycle(@Param("departmentId")String relatedId);
}
\ No newline at end of file
......@@ -42,4 +42,6 @@ public interface DepartmentService {
int countByDepartment(String departmentId);
DepartmentDTO getByRelatedIdNotInRecycle(String relatedId);
}
......@@ -159,4 +159,9 @@ public class DepartmentServiceImpl implements DepartmentService {
return mapper.countByDepartment(departmentId);
}
@Override
public DepartmentDTO getByRelatedIdNotInRecycle(String relatedId) {
return EntityUtil.changeEntityByJSON(DepartmentDTO.class,mapper.getByRelatedIdNotInRecycle(relatedId));
}
}
......@@ -351,7 +351,7 @@ public class MessageApiServiceImpl implements MessageApiService {
startIndex = len - 1;
}
for(int i = startIndex ; i>=0 && i< len; i--){
DepartmentDTO department = this.departmentService.getByRelatedId(arr[i]);
DepartmentDTO department = this.departmentService.getByRelatedIdNotInRecycle(arr[i]);
log.info("当前节点id:{}, {}", arr[i], JSON.toJSONString(department));
if(department != null){
return department;
......
......@@ -377,6 +377,15 @@
and status_flag = 1
</select>
<select id="getByRelatedIdNotInRecycle" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
from tab_haoban_department
where related_id = #{relatedId}
and status_flag = 1
and recycle_flag != 1
</select>
<select id="pageByParentId" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
......
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