91 lines
2.9 KiB
XML
91 lines
2.9 KiB
XML
|
|
<?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.xhpc.user.mapper.XhpcCommonMapper">
|
||
|
|
|
||
|
|
|
||
|
|
<select id="getAppUser" resultType="map">
|
||
|
|
select
|
||
|
|
app_user_id as appUserId,
|
||
|
|
phone as phone,
|
||
|
|
is_refund_application as isRefundApplication,
|
||
|
|
is_refund as isRefund,
|
||
|
|
soc as soc,
|
||
|
|
balance as balance,
|
||
|
|
avatar as avatar,
|
||
|
|
status,
|
||
|
|
weixin_open_id as weixinlogin,
|
||
|
|
alipay_open_id as alipayLogin,
|
||
|
|
weixin_login as weixinOpenId,
|
||
|
|
alipay_login as alipayLogin,
|
||
|
|
del_flag delFlag,
|
||
|
|
concat(0) as userType,
|
||
|
|
create_time as createTime
|
||
|
|
from xhpc_app_user
|
||
|
|
where del_flag=0
|
||
|
|
<if test="phone !=null and phone !=''">
|
||
|
|
and phone =#{phone}
|
||
|
|
</if>
|
||
|
|
<if test="userId !=null">
|
||
|
|
and app_user_id =#{userId}
|
||
|
|
</if>
|
||
|
|
</select>
|
||
|
|
|
||
|
|
<select id="getCommunityUser" resultType="map">
|
||
|
|
select
|
||
|
|
community_personnel_id as appUserId,
|
||
|
|
account as account,
|
||
|
|
phone as phone,
|
||
|
|
is_refund_application as isRefundApplication,
|
||
|
|
is_refund as isRefund,
|
||
|
|
soc as soc,
|
||
|
|
surplus_money as balance,
|
||
|
|
avatar as avatar,
|
||
|
|
status,
|
||
|
|
weixin_open_id as weixinlogin,
|
||
|
|
alipay_open_id as alipayLogin,
|
||
|
|
weixin_login as weixinOpenId,
|
||
|
|
alipay_login as alipayLogin,
|
||
|
|
del_flag delFlag,
|
||
|
|
concat(2) as userType,
|
||
|
|
create_time as createTime
|
||
|
|
from xhpc_community_personnel
|
||
|
|
where del_flag=0
|
||
|
|
<if test="phone !=null and phone !=''">
|
||
|
|
and account =#{phone}
|
||
|
|
</if>
|
||
|
|
<if test="userId !=null">
|
||
|
|
and community_personnel_id =#{userId}
|
||
|
|
</if>
|
||
|
|
</select>
|
||
|
|
|
||
|
|
<select id="getCustomersUser" resultType="map">
|
||
|
|
select
|
||
|
|
customers_personnel_id as appUserId,
|
||
|
|
account as account,
|
||
|
|
phone as phone,
|
||
|
|
is_refund_application as isRefundApplication,
|
||
|
|
is_refund as isRefund,
|
||
|
|
soc as soc,
|
||
|
|
surplus_money as balance,
|
||
|
|
avatar as avatar,
|
||
|
|
status,
|
||
|
|
weixin_open_id as weixinlogin,
|
||
|
|
alipay_open_id as alipayLogin,
|
||
|
|
weixin_login as weixinOpenId,
|
||
|
|
alipay_login as alipayLogin,
|
||
|
|
del_flag delFlag,
|
||
|
|
concat(3) as userType,
|
||
|
|
create_time as createTime
|
||
|
|
from xhpc_customers_personnel
|
||
|
|
where del_flag=0
|
||
|
|
<if test="phone !=null and phone !=''">
|
||
|
|
and account =#{phone}
|
||
|
|
</if>
|
||
|
|
<if test="userId !=null">
|
||
|
|
and customers_personnel_id =#{userId}
|
||
|
|
</if>
|
||
|
|
</select>
|
||
|
|
</mapper>
|