You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
53 lines
1.3 KiB
53 lines
1.3 KiB
<?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.epmet.dao.PaUserDao">
|
|
|
|
<select id="selectUserByPhone" resultType="com.epmet.dto.PaUserDTO">
|
|
SELECT
|
|
id,
|
|
phone,
|
|
real_name,
|
|
gender,
|
|
source
|
|
FROM
|
|
pa_user
|
|
WHERE
|
|
del_flag = '0'
|
|
AND phone = #{phone}
|
|
AND source = #{source}
|
|
</select>
|
|
|
|
<select id="selectPaUser" resultType="com.epmet.dto.PaUserDTO">
|
|
SELECT
|
|
pu.id,
|
|
pu.phone,
|
|
pu.real_name,
|
|
pu.gender
|
|
FROM
|
|
pa_user pu
|
|
INNER JOIN pa_customer_user_agency pcua ON pu.id = pcua.user_id
|
|
WHERE
|
|
pu.del_flag = '0'
|
|
AND pcua.del_flag = '0'
|
|
AND pcua.customer_id = #{customerId}
|
|
ORDER BY pcua.created_time DESC
|
|
LIMIT 1
|
|
</select>
|
|
|
|
<select id="selectUser" resultType="com.epmet.dto.PaUserDTO">
|
|
SELECT
|
|
id,
|
|
phone,
|
|
real_name,
|
|
gender,
|
|
source
|
|
FROM
|
|
pa_user
|
|
WHERE
|
|
del_flag = '0'
|
|
AND id = #{id}
|
|
AND source = #{source}
|
|
</select>
|
|
|
|
</mapper>
|