feat(system): 优化部门查询功能
- 修改 DeptMapper 接口,将 selectCompany 方法的 type 参数
This commit is contained in:
parent
d6af73ec88
commit
7399b45a3a
@ -63,5 +63,5 @@ public interface DeptMapper extends BaseMapperX<DeptDO> {
|
||||
}
|
||||
|
||||
List<DeptDO> selectCompany(@Param("flag") String flag,
|
||||
@Param("type") String type);
|
||||
@Param("type") List<String> type);
|
||||
}
|
||||
|
@ -373,7 +373,7 @@ public class DeptServiceImpl implements DeptService {
|
||||
}
|
||||
|
||||
// 根据所在部门信息获取 所在公司信息
|
||||
List<DeptDO> companyDeptList = deptMapper.selectCompany(deptDo.getFlag(), DeptTypeEnum.COMPANY.getValue());
|
||||
List<DeptDO> companyDeptList = deptMapper.selectCompany(deptDo.getFlag(), Arrays.asList(DeptTypeEnum.HEAD_COMPANY.getValue(), DeptTypeEnum.COMPANY.getValue()));
|
||||
|
||||
if (CollectionUtil.isEmpty(companyDeptList)) {
|
||||
return new DeptDO();
|
||||
|
@ -16,7 +16,10 @@
|
||||
system_dept
|
||||
WHERE
|
||||
#{flag} LIKE CONCAT('%', flag, '%')
|
||||
AND type = #{type}
|
||||
AND type IN
|
||||
<foreach collection="type" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
AND deleted = 0
|
||||
</select>
|
||||
</mapper>
|
Loading…
Reference in New Issue
Block a user