guoshilong
2023-09-25 03b2e2034f73abfe5f865a72361fee9fa5c1feec
skjcmanager/skjcmanager-service/skjcmanager-sm/src/main/java/cn/gistack/sm/sjztmd/mapper/AttResManagePersonMapper.xml
@@ -185,5 +185,32 @@
        and bd.ad_code = #{adCode}
        limit 3
    </select>
    <select id="getPatrolResponsiblePersonByResCdList"
            resultType="cn.gistack.sm.sjztmd.entity.PatrolResponsiblePerson">
        select DISTINCT a."res_guid", c."name", b.id as user_id
        from "SJZT_MD"."att_res_manage_person" a,
             "BLADE_USER" b,
             "SJZT_MD"."att_res_base" c
        WHERE a."user_phone" = b.PHONE
          and a."res_guid" = c."guid"
          and a."type" = 5
        <choose>
            <when test="ids!=null and ids.size()>0">
                and "res_guid" in
                <foreach collection="ids" item="id" open="(" close=")" separator=",">
                    #{id}
                </foreach>
            </when>
            <otherwise>
                and "res_guid" in ('')
            </otherwise>
        </choose>
    </select>
</mapper>