<?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="cn.gistack.sm.sjztmd.mapper.AttResManagePersonMapper">
|
|
<!-- 通用查询映射结果 -->
|
<resultMap id="baseResultMap" type="cn.gistack.sm.sjztmd.entity.AttResManagePerson">
|
<id column="guid" property="guid"/>
|
<result column="user_name" property="userName"/>
|
<result column="type" property="type"/>
|
<result column="user_phone" property="userPhone"/>
|
<result column="user_unit" property="userUnit"/>
|
<result column="postion" property="position"/>
|
<result column="res_guid" property="resGuid"/>
|
</resultMap>
|
|
<!-- <select id="attResManagePersonListByResId" resultMap="baseResultMap">-->
|
<select id="attResManagePersonListByResId" resultMap="baseResultMap">
|
select DISTINCT
|
"guid","user_name","type","user_phone","user_unit","position","res_guid","user_guid"
|
from "att_res_manage_person" where "type" = 5 AND "res_guid" IN
|
<foreach collection="list" index="index" item="item" open="(" separator="," close=")">
|
#{item}
|
</foreach>
|
</select>
|
|
<select id="getPatrolResponsiblePersonAll" 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
|
</select>
|
|
</mapper>
|