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.
75 lines
2.3 KiB
75 lines
2.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.CustomerUserDao">
|
|
|
|
<!-- 根据openId查询居民用户信息 -->
|
|
<select id="selectCustomerIdByOpenId" parameterType="java.lang.String" resultType="java.lang.String">
|
|
SELECT
|
|
cu.id
|
|
FROM
|
|
customer_user cu
|
|
WHERE
|
|
cu.DEL_FLAG = '0'
|
|
AND cu.WX_OPEN_ID = #{openId}
|
|
</select>
|
|
|
|
<!-- 根据openId查询政府工作人员信息-->
|
|
<select id="selectCustomerStaffId" parameterType="java.lang.String" resultType="java.lang.String">
|
|
SELECT
|
|
cs.id
|
|
FROM
|
|
customer_staff cs
|
|
WHERE
|
|
cs.DEL_FLAG = '0'
|
|
AND cs.WX_OPEN_ID = #{openId}
|
|
</select>
|
|
|
|
<!-- 根据openId查询运营人员信息-->
|
|
<select id="selectOperUserId" parameterType="java.lang.String" resultType="java.lang.String">
|
|
SELECT
|
|
ou.id
|
|
FROM
|
|
oper_user ou
|
|
WHERE
|
|
ou.DEL_FLAG = '0'
|
|
AND ou.WX_OPEN_ID = #{openId}
|
|
</select>
|
|
|
|
<!-- 根据手机号查询政府工作人员信息-->
|
|
<select id="selectCustomerStaffByPhone" resultType="com.epmet.dto.result.PasswordLoginUserInfoResultDTO">
|
|
SELECT
|
|
cs.id AS userId,
|
|
PASSWORD AS PASSWORD
|
|
FROM
|
|
customer_staff cs
|
|
WHERE
|
|
cs.DEL_FLAG = '0'
|
|
AND cs.PHONE = #{phone}
|
|
</select>
|
|
|
|
<!-- 根据手机号查询运营人员信息-->
|
|
<select id="selectOperUserByPhone" resultType="com.epmet.dto.result.PasswordLoginUserInfoResultDTO">
|
|
SELECT
|
|
ou.id AS userId,
|
|
PASSWORD AS PASSWORD
|
|
FROM
|
|
oper_user ou
|
|
WHERE
|
|
ou.DEL_FLAG = '0'
|
|
AND ou.STATUS = '1'
|
|
AND ou.PHONE = #{phone}
|
|
</select>
|
|
|
|
<!-- 根据手机号查询居民信息-->
|
|
<select id="selectCustomerUserByPhone" resultType="com.epmet.dto.result.PasswordLoginUserInfoResultDTO">
|
|
SELECT
|
|
cu.id as userId,
|
|
null as password
|
|
FROM
|
|
customer_user cu
|
|
WHERE
|
|
cu.DEL_FLAG = '0'
|
|
AND cu.MOBILE = #{phone}
|
|
</select>
|
|
</mapper>
|
|
|