<?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.changhu.module.miniProgram.mapper.SecurityUserMapper">
    <select id="securityUserPager"
            resultType="com.changhu.module.miniProgram.pojo.vo.ServiceProjectSecurityUserPagerVo">
        select su.*,
               sun.name as 'securityUnitName'
        from security_unit sun
                 join security_user su on su.security_unit_id = sun.snow_flake_id and su.delete_flag = 0
        where sun.delete_flag = 0
          and su.service_project_id = #{params.serviceProjectId}
        order by su.create_time desc
    </select>
</mapper>
