<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">

<mapper namespace="com.zcloud.primeport.persistence.mapper.MkmjApprovalUserMapper">

    <select id="listPage" resultType="com.zcloud.primeport.persistence.dataobject.MkmjApprovalUserDO">
        select * from mkmj_approval_user g
                 where g.delete_enum = 'FALSE'
                   and g.corp_id = #{params.corpId}
        <if test="params.deptId != null">
            AND g.dept_id = #{params.deptId}
        </if>
        <if test="params.userName != null and params.userName != ''">
            AND g.user_name LIKE CONCAT('%', #{params.userName}, '%')
        </if>
        order by g.dept_id, g.create_time desc
    </select>
</mapper>

