value
2024-05-23 05c569f74a1c94b84145abe34f2b2385d68fdec6
cnas-server/src/main/resources/mapper/DepartmentMapper.xml
@@ -6,17 +6,6 @@
        FROM department
    </select>
    <select id="showUserById" resultType="com.yuanchu.mom.dto.UserDto">
        select * from (select id, name, age, email, phone,depart_id
        from user where state=1 and SUBSTRING_INDEX(depart_id, ',', -1) in
        <foreach collection="ids" item="id" separator="," open="(" close=")">
            #{id}
        </foreach> ) a
        <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''">
            ${ew.customSqlSegment}
        </if>
    </select>
    <select id="selectSonById" resultType="java.lang.Integer">
        SELECT au.id
        FROM (SELECT * FROM department WHERE father_id IS NOT NULL) au,