| | |
| | | blade_dept |
| | | where is_deleted = 0 |
| | | <if test="deptId!=null and deptId!=''"> |
| | | and (id = #{deptId} or ancestors like concat('%',#{deptId},'%')) |
| | | and (id = #{deptId}::bigint or ancestors like concat('%',#{deptId},'%')) |
| | | </if> |
| | | </select> |
| | | |
| | |
| | | left join sys_config sc on sc.dept_id::VARCHAR = bd.id::VARCHAR and sc.is_deleted = 0 |
| | | where bd.is_deleted = 0 |
| | | and ( |
| | | bd.id = #{deptId} |
| | | bd.id = #{deptId}::bigint |
| | | or bd.ancestors like concat('%',#{deptId},'%') |
| | | ) |
| | | </select> |
| | |
| | | and bd.area_code like concat(concat('%', #{param2.areaCode}),'%') |
| | | </if> |
| | | <if test="param2.deptCode!=null and param2.deptCode!=''"> |
| | | and bd.dept_code = #{param2.deptCode} |
| | | and bd.dept_code like concat(concat('%', #{param2.deptCode}),'%') |
| | | </if> |
| | | ORDER BY bd.create_time DESC |
| | | </select> |