|
@@ -5,6 +5,7 @@
|
|
|
select u.userID as userId,
|
|
|
u.clubID as clubId,
|
|
|
u.shopID as shopId,
|
|
|
+ u.serviceProviderId as serviceProviderId,
|
|
|
u.userName as userName,
|
|
|
u.mobile as mobile,
|
|
|
u.bindMobile as bindMobile,
|
|
@@ -22,6 +23,7 @@
|
|
|
select u.userID as userId,
|
|
|
u.clubID as clubId,
|
|
|
u.shopID as shopId,
|
|
|
+ u.serviceProviderId as serviceProviderId,
|
|
|
u.userName as userName,
|
|
|
u.mobile as mobile,
|
|
|
u.bindMobile as bindMobile,
|
|
@@ -73,56 +75,78 @@
|
|
|
where s.userID = #{userId}
|
|
|
limit 1
|
|
|
</select>
|
|
|
- <select id="getOperationUserByUnionId" resultType="com.caimei365.user.model.vo.UserLoginVo">
|
|
|
- select o.userID as userId,
|
|
|
- o.mobile as mobile,
|
|
|
- o.clubID as clubId,
|
|
|
- o.shopID as shopId,
|
|
|
- o.unionId as unionId,
|
|
|
- <if test="source=='www'">
|
|
|
- o.pcOpenid as openId
|
|
|
- </if>
|
|
|
- <if test="source=='crm'">
|
|
|
- o.crmOpenid as openId
|
|
|
- </if>
|
|
|
- <if test="source=='mini'">
|
|
|
- o.openid as openId
|
|
|
- </if>
|
|
|
- from
|
|
|
- cm_mall_operation_user o
|
|
|
- where unionId = #{unionId} and delFlag = '0'
|
|
|
- and userOrganizeID=0
|
|
|
+ <select id="getLoginUserByUnionId" resultType="com.caimei365.user.model.vo.UserLoginVo">
|
|
|
+ select u.userID as userId,
|
|
|
+ u.clubID as clubId,
|
|
|
+ u.shopID as shopId,
|
|
|
+ u.serviceProviderId as serviceProviderId,
|
|
|
+ u.userName as userName,
|
|
|
+ u.mobile as mobile,
|
|
|
+ u.bindMobile as bindMobile,
|
|
|
+ u.email as email,
|
|
|
+ u.userPermission as userPermission,
|
|
|
+ u.userIdentity as userIdentity,
|
|
|
+ u.password as password,
|
|
|
+ u.clubStatus as clubStatus,
|
|
|
+ u.manufacturerStatus as shopStatus,
|
|
|
+ o.unionId as unionId,
|
|
|
+ o.status as operationStatus,
|
|
|
+ o.mobile as operationMobile,
|
|
|
+ <if test="source=='www'">
|
|
|
+ o.pcOpenid as openId
|
|
|
+ </if>
|
|
|
+ <if test="source=='crm'">
|
|
|
+ o.crmOpenid as openId
|
|
|
+ </if>
|
|
|
+ <if test="source=='mini'">
|
|
|
+ o.openid as openId
|
|
|
+ </if>
|
|
|
+ from user u
|
|
|
+ left join cm_mall_operation_user o on o.userID = u.userID
|
|
|
+ where (o.unionId = #{unionId} and o.delFlag = '0')
|
|
|
+ and (u.userIdentity in (1,2,3,4) and u.userOrganizeID = 0)
|
|
|
limit 1
|
|
|
</select>
|
|
|
- <select id="getOperationUserByOpenId" resultType="com.caimei365.user.model.vo.UserLoginVo">
|
|
|
- select o.userID as userId,
|
|
|
- o.mobile as mobile,
|
|
|
- o.clubID as clubId,
|
|
|
- o.shopID as shopId,
|
|
|
- <if test="source=='www'">
|
|
|
- o.pcOpenid as openId,
|
|
|
- </if>
|
|
|
- <if test="source=='crm'">
|
|
|
- o.crmOpenid as openId,
|
|
|
- </if>
|
|
|
- <if test="source=='mini'">
|
|
|
- o.openid as openId,
|
|
|
- </if>
|
|
|
- o.unionId as unionId
|
|
|
- from
|
|
|
- cm_mall_operation_user o
|
|
|
- where
|
|
|
- <if test="source=='www'">
|
|
|
- pcOpenid = #{openId}
|
|
|
- </if>
|
|
|
- <if test="source=='crm'">
|
|
|
- crmOpenid = #{openId}
|
|
|
- </if>
|
|
|
- <if test="source=='mini'">
|
|
|
- openid = #{openId}
|
|
|
- </if>
|
|
|
- and delFlag = '0'
|
|
|
- and userOrganizeID=0
|
|
|
+ <select id="getLoginUserByOpenId" resultType="com.caimei365.user.model.vo.UserLoginVo">
|
|
|
+ select u.userID as userId,
|
|
|
+ u.clubID as clubId,
|
|
|
+ u.shopID as shopId,
|
|
|
+ u.serviceProviderId as serviceProviderId,
|
|
|
+ u.userName as userName,
|
|
|
+ u.mobile as mobile,
|
|
|
+ u.bindMobile as bindMobile,
|
|
|
+ u.email as email,
|
|
|
+ u.userPermission as userPermission,
|
|
|
+ u.userIdentity as userIdentity,
|
|
|
+ u.password as password,
|
|
|
+ u.clubStatus as clubStatus,
|
|
|
+ u.manufacturerStatus as shopStatus,
|
|
|
+ o.unionId as unionId,
|
|
|
+ o.status as operationStatus,
|
|
|
+ o.mobile as operationMobile,
|
|
|
+ <if test="source=='www'">
|
|
|
+ o.pcOpenid as openId
|
|
|
+ </if>
|
|
|
+ <if test="source=='crm'">
|
|
|
+ o.crmOpenid as openId
|
|
|
+ </if>
|
|
|
+ <if test="source=='mini'">
|
|
|
+ o.openid as openId
|
|
|
+ </if>
|
|
|
+ from user u
|
|
|
+ left join cm_mall_operation_user o on o.userID = u.userID
|
|
|
+ where (
|
|
|
+ <if test="source=='www'">
|
|
|
+ o.pcOpenid = #{openId}
|
|
|
+ </if>
|
|
|
+ <if test="source=='crm'">
|
|
|
+ o.crmOpenid = #{openId}
|
|
|
+ </if>
|
|
|
+ <if test="source=='mini'">
|
|
|
+ o.openid = #{openId}
|
|
|
+ </if>
|
|
|
+ and o.delFlag = '0')
|
|
|
+ and (u.userIdentity in (1,2,3,4) and u.userOrganizeID = 0)
|
|
|
limit 1
|
|
|
</select>
|
|
|
<update id="updateServiceProviderUnionId">
|