|
@@ -2,160 +2,165 @@
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
<mapper namespace="com.caimei365.user.mapper.LoginMapper">
|
|
<mapper namespace="com.caimei365.user.mapper.LoginMapper">
|
|
<select id="getLoginUserByUserId" resultType="com.caimei365.user.model.vo.UserLoginVo">
|
|
<select id="getLoginUserByUserId" 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.name as name,
|
|
|
|
- u.mobile as mobile,
|
|
|
|
- u.bindMobile as bindMobile,
|
|
|
|
- u.email as email,
|
|
|
|
- u.userIdentity as userIdentity,
|
|
|
|
- u.password as password,
|
|
|
|
- u.guideFlag as guideFlag,
|
|
|
|
- (select status from club where userId = u.userId limit 1) as clubStatus,
|
|
|
|
- u.manufacturerStatus as shopStatus
|
|
|
|
|
|
+ select u.userID as userId,
|
|
|
|
+ u.clubID as clubId,
|
|
|
|
+ u.shopID as shopId,
|
|
|
|
+ u.serviceProviderId as serviceProviderId,
|
|
|
|
+ u.userName as userName,
|
|
|
|
+ u.name as name,
|
|
|
|
+ u.mobile as mobile,
|
|
|
|
+ u.bindMobile as bindMobile,
|
|
|
|
+ u.email as email,
|
|
|
|
+ u.userIdentity as userIdentity,
|
|
|
|
+ u.password as password,
|
|
|
|
+ u.guideFlag as guideFlag,
|
|
|
|
+ (select status from club where userId = u.userId limit 1) as clubStatus,
|
|
|
|
+ u.manufacturerStatus as shopStatus
|
|
from user u
|
|
from user u
|
|
where u.userID = #{userId}
|
|
where u.userID = #{userId}
|
|
limit 1
|
|
limit 1
|
|
</select>
|
|
</select>
|
|
<select id="getLoginUserByMobileOrEmail" resultType="com.caimei365.user.model.vo.UserLoginVo">
|
|
<select id="getLoginUserByMobileOrEmail" resultType="com.caimei365.user.model.vo.UserLoginVo">
|
|
- select u.userID as userId,
|
|
|
|
- u.userOrganizeID as organizeId,
|
|
|
|
- u.clubID as clubId,
|
|
|
|
- u.shopID as shopId,
|
|
|
|
- u.serviceProviderId as serviceProviderId,
|
|
|
|
- u.userName as userName,
|
|
|
|
- u.name as name,
|
|
|
|
- u.mobile as mobile,
|
|
|
|
- u.bindMobile as bindMobile,
|
|
|
|
- u.email as email,
|
|
|
|
- u.userIdentity as userIdentity,
|
|
|
|
- u.password as password,
|
|
|
|
- u.guideFlag as guideFlag,
|
|
|
|
- (select status from club where userId = u.userId limit 1) as clubStatus,
|
|
|
|
- u.manufacturerStatus as shopStatus,
|
|
|
|
- u.partnerId as partnerId,
|
|
|
|
- cu.id as operationId,
|
|
|
|
- cu.status as operationStatus,
|
|
|
|
- cu.mobile as operationMobile
|
|
|
|
|
|
+ select u.userID as userId,
|
|
|
|
+ u.userOrganizeID as organizeId,
|
|
|
|
+ u.clubID as clubId,
|
|
|
|
+ u.shopID as shopId,
|
|
|
|
+ u.serviceProviderId as serviceProviderId,
|
|
|
|
+ u.userName as userName,
|
|
|
|
+ u.name as name,
|
|
|
|
+ u.mobile as mobile,
|
|
|
|
+ u.bindMobile as bindMobile,
|
|
|
|
+ u.email as email,
|
|
|
|
+ u.userIdentity as userIdentity,
|
|
|
|
+ u.password as password,
|
|
|
|
+ u.guideFlag as guideFlag,
|
|
|
|
+ (select status from club where userId = u.userId limit 1) as clubStatus,
|
|
|
|
+ u.manufacturerStatus as shopStatus,
|
|
|
|
+ u.partnerId as partnerId,
|
|
|
|
+ cu.id as operationId,
|
|
|
|
+ cu.status as operationStatus,
|
|
|
|
+ cu.mobile as operationMobile
|
|
from user u
|
|
from user u
|
|
- left join cm_mall_operation_user cu on cu.userID = u.userID
|
|
|
|
|
|
+ left join cm_mall_operation_user cu on cu.userID = u.userID
|
|
where (u.bindMobile = #{mobileOrEmail} or u.email = #{mobileOrEmail})
|
|
where (u.bindMobile = #{mobileOrEmail} or u.email = #{mobileOrEmail})
|
|
- and IF (u.userIdentity = 3, u.manufacturerStatus = 90, 1=1)
|
|
|
|
- and u.userIdentity in (1, 2, 3, 4)
|
|
|
|
- and u.userOrganizeID = 0
|
|
|
|
|
|
+ and IF(u.userIdentity = 3, u.manufacturerStatus = 90, 1 = 1)
|
|
|
|
+ and u.userIdentity in (1, 2, 3, 4)
|
|
|
|
+ and u.userOrganizeID = 0
|
|
union
|
|
union
|
|
- SELECT u.userID AS userId,
|
|
|
|
- u.userOrganizeID as organizeId,
|
|
|
|
- u.clubID AS clubId,
|
|
|
|
- u.shopID AS shopId,
|
|
|
|
- u.serviceProviderId AS serviceProviderId,
|
|
|
|
- u.userName AS userName,
|
|
|
|
- u.name AS NAME,
|
|
|
|
- u.mobile AS mobile,
|
|
|
|
- u.bindMobile AS bindMobile,
|
|
|
|
- u.email AS email,
|
|
|
|
- u.userIdentity AS userIdentity,
|
|
|
|
- u.password AS PASSWORD,
|
|
|
|
- u.guideFlag AS guideFlag,
|
|
|
|
- u.partnerId as partnerId,
|
|
|
|
|
|
+ SELECT u.userID AS userId,
|
|
|
|
+ u.userOrganizeID as organizeId,
|
|
|
|
+ u.clubID AS clubId,
|
|
|
|
+ u.shopID AS shopId,
|
|
|
|
+ u.serviceProviderId AS serviceProviderId,
|
|
|
|
+ u.userName AS userName,
|
|
|
|
+ u.name AS NAME,
|
|
|
|
+ u.mobile AS mobile,
|
|
|
|
+ u.bindMobile AS bindMobile,
|
|
|
|
+ u.email AS email,
|
|
|
|
+ u.userIdentity AS userIdentity,
|
|
|
|
+ u.password AS PASSWORD,
|
|
|
|
+ u.guideFlag AS guideFlag,
|
|
|
|
+ u.partnerId as partnerId,
|
|
(select status from club where userId = u.userId limit 1) AS clubStatus,
|
|
(select status from club where userId = u.userId limit 1) AS clubStatus,
|
|
- u.manufacturerStatus AS shopStatus,
|
|
|
|
- cu.id AS operationId,
|
|
|
|
- cu.status AS operationStatus,
|
|
|
|
- cu.mobile AS operationMobile
|
|
|
|
|
|
+ u.manufacturerStatus AS shopStatus,
|
|
|
|
+ cu.id AS operationId,
|
|
|
|
+ cu.status AS operationStatus,
|
|
|
|
+ cu.mobile AS operationMobile
|
|
FROM USER u
|
|
FROM USER u
|
|
- LEFT JOIN cm_mall_operation_user cu ON cu.userID = u.userID
|
|
|
|
- WHERE
|
|
|
|
- cu.mobile = #{mobileOrEmail}
|
|
|
|
- and IF (u.userIdentity = 3, u.manufacturerStatus = 90, 1=1)
|
|
|
|
|
|
+ LEFT JOIN cm_mall_operation_user cu ON cu.userID = u.userID
|
|
|
|
+ WHERE cu.mobile = #{mobileOrEmail}
|
|
|
|
+ and IF(u.userIdentity = 3, u.manufacturerStatus = 90, 1 = 1)
|
|
and cu.delFlag != 1
|
|
and cu.delFlag != 1
|
|
AND u.userIdentity IN (1, 2, 3, 4)
|
|
AND u.userIdentity IN (1, 2, 3, 4)
|
|
AND u.userOrganizeID = 0
|
|
AND u.userOrganizeID = 0
|
|
limit 1
|
|
limit 1
|
|
</select>
|
|
</select>
|
|
<select id="getLoginOrganizeUserByMobileOrEmail" resultType="com.caimei365.user.model.vo.UserLoginVo">
|
|
<select id="getLoginOrganizeUserByMobileOrEmail" resultType="com.caimei365.user.model.vo.UserLoginVo">
|
|
- select u.userID as userId,
|
|
|
|
- u.userOrganizeID as organizeId,
|
|
|
|
- u.clubID as clubId,
|
|
|
|
- u.shopID as shopId,
|
|
|
|
- u.serviceProviderId as serviceProviderId,
|
|
|
|
- u.userName as userName,
|
|
|
|
- u.name as name,
|
|
|
|
- (SELECT linkMan FROM club WHERE userId = u.userID) as clubLinkMan,
|
|
|
|
- u.mobile as mobile,
|
|
|
|
- u.bindMobile as bindMobile,
|
|
|
|
- u.email as email,
|
|
|
|
- u.userIdentity as userIdentity,
|
|
|
|
- u.password as password,
|
|
|
|
- u.guideFlag as guideFlag,
|
|
|
|
|
|
+ select u.userID as userId,
|
|
|
|
+ u.userOrganizeID as organizeId,
|
|
|
|
+ u.clubID as clubId,
|
|
|
|
+ u.shopID as shopId,
|
|
|
|
+ u.serviceProviderId as serviceProviderId,
|
|
|
|
+ u.userName as userName,
|
|
|
|
+ u.name as name,
|
|
|
|
+ (SELECT linkMan FROM club WHERE userId = u.userID) as clubLinkMan,
|
|
|
|
+ u.mobile as mobile,
|
|
|
|
+ u.bindMobile as bindMobile,
|
|
|
|
+ u.email as email,
|
|
|
|
+ u.userIdentity as userIdentity,
|
|
|
|
+ u.password as password,
|
|
|
|
+ u.guideFlag as guideFlag,
|
|
(select status from club where userId = u.userId limit 1) as clubStatus,
|
|
(select status from club where userId = u.userId limit 1) as clubStatus,
|
|
- u.manufacturerStatus as shopStatus,
|
|
|
|
- u.serviceProviderStatus as serviceStatus,
|
|
|
|
- cu.id as operationId,
|
|
|
|
- cu.status as operationStatus,
|
|
|
|
- cu.mobile as operationMobile
|
|
|
|
|
|
+ u.manufacturerStatus as shopStatus,
|
|
|
|
+ u.serviceProviderStatus as serviceStatus,
|
|
|
|
+ cu.id as operationId,
|
|
|
|
+ cu.status as operationStatus,
|
|
|
|
+ cu.mobile as operationMobile
|
|
from user u
|
|
from user u
|
|
left join cm_mall_operation_user cu on cu.userID = u.userID
|
|
left join cm_mall_operation_user cu on cu.userID = u.userID
|
|
where (u.bindMobile = #{mobileOrEmail} or u.email = #{mobileOrEmail})
|
|
where (u.bindMobile = #{mobileOrEmail} or u.email = #{mobileOrEmail})
|
|
and u.userIdentity in (1, 2, 3, 4)
|
|
and u.userIdentity in (1, 2, 3, 4)
|
|
and u.userOrganizeID = 4
|
|
and u.userOrganizeID = 4
|
|
union
|
|
union
|
|
- SELECT u.userID AS userId,
|
|
|
|
- u.userOrganizeID as organizeId,
|
|
|
|
- u.clubID AS clubId,
|
|
|
|
- u.shopID AS shopId,
|
|
|
|
- u.serviceProviderId AS serviceProviderId,
|
|
|
|
- u.userName AS userName,
|
|
|
|
- u.name AS NAME,
|
|
|
|
- ( SELECT linkMan FROM club WHERE userId = u.userID) as clubLinkMan,
|
|
|
|
- u.mobile AS mobile,
|
|
|
|
- u.bindMobile AS bindMobile,
|
|
|
|
- u.email AS email,
|
|
|
|
- u.userIdentity AS userIdentity,
|
|
|
|
- u.password AS PASSWORD,
|
|
|
|
- u.guideFlag AS guideFlag,
|
|
|
|
|
|
+ SELECT u.userID AS userId,
|
|
|
|
+ u.userOrganizeID as organizeId,
|
|
|
|
+ u.clubID AS clubId,
|
|
|
|
+ u.shopID AS shopId,
|
|
|
|
+ u.serviceProviderId AS serviceProviderId,
|
|
|
|
+ u.userName AS userName,
|
|
|
|
+ u.name AS NAME,
|
|
|
|
+ (SELECT linkMan FROM club WHERE userId = u.userID) as clubLinkMan,
|
|
|
|
+ u.mobile AS mobile,
|
|
|
|
+ u.bindMobile AS bindMobile,
|
|
|
|
+ u.email AS email,
|
|
|
|
+ u.userIdentity AS userIdentity,
|
|
|
|
+ u.password AS PASSWORD,
|
|
|
|
+ u.guideFlag AS guideFlag,
|
|
(select status from club where userId = u.userId limit 1) AS clubStatus,
|
|
(select status from club where userId = u.userId limit 1) AS clubStatus,
|
|
- u.manufacturerStatus AS shopStatus,
|
|
|
|
- u.serviceProviderStatus as serviceStatus,
|
|
|
|
- cu.id AS operationId,
|
|
|
|
- cu.status AS operationStatus,
|
|
|
|
- cu.mobile AS operationMobile
|
|
|
|
|
|
+ u.manufacturerStatus AS shopStatus,
|
|
|
|
+ u.serviceProviderStatus as serviceStatus,
|
|
|
|
+ cu.id AS operationId,
|
|
|
|
+ cu.status AS operationStatus,
|
|
|
|
+ cu.mobile AS operationMobile
|
|
FROM USER u
|
|
FROM USER u
|
|
LEFT JOIN cm_mall_operation_user cu ON cu.userID = u.userID
|
|
LEFT JOIN cm_mall_operation_user cu ON cu.userID = u.userID
|
|
- WHERE
|
|
|
|
- cu.mobile = #{mobileOrEmail}
|
|
|
|
|
|
+ WHERE cu.mobile = #{mobileOrEmail}
|
|
and cu.delFlag != 1
|
|
and cu.delFlag != 1
|
|
AND u.userIdentity IN (1, 2, 3, 4)
|
|
AND u.userIdentity IN (1, 2, 3, 4)
|
|
AND u.userOrganizeID = 4
|
|
AND u.userOrganizeID = 4
|
|
limit 1
|
|
limit 1
|
|
</select>
|
|
</select>
|
|
<select id="getOperationUser" resultType="java.lang.Integer">
|
|
<select id="getOperationUser" resultType="java.lang.Integer">
|
|
- select id from cm_mall_operation_user where mobile = #{mobileOrEmail} and delFlag = 0 and userOrganizeID = 4 limit 1
|
|
|
|
|
|
+ select id
|
|
|
|
+ from cm_mall_operation_user
|
|
|
|
+ where mobile = #{mobileOrEmail}
|
|
|
|
+ and delFlag = 0
|
|
|
|
+ and userOrganizeID = 4
|
|
|
|
+ limit 1
|
|
</select>
|
|
</select>
|
|
<insert id="insertOperation">
|
|
<insert id="insertOperation">
|
|
- INSERT INTO cm_mall_operation_user (userOrganizeID, userType, userID, clubID, mobile, linkName, STATUS, unionId, bindTime, addTime, delFlag)
|
|
|
|
- values(#{organizeId}, #{userType}, #{userId}, #{clubId}, #{mobile}, #{linkName}, #{status}, #{unionId}, #{bindTime}, #{addTime}, #{delFlag})
|
|
|
|
|
|
+ INSERT INTO cm_mall_operation_user (userOrganizeID, userType, userID, clubID, mobile, linkName, STATUS, unionId,
|
|
|
|
+ bindTime, addTime, delFlag)
|
|
|
|
+ values (#{organizeId}, #{userType}, #{userId}, #{clubId}, #{mobile}, #{linkName}, #{status}, #{unionId},
|
|
|
|
+ #{bindTime}, #{addTime}, #{delFlag})
|
|
</insert>
|
|
</insert>
|
|
<select id="getLoginUserByMobile" resultType="com.caimei365.user.model.vo.UserLoginVo">
|
|
<select id="getLoginUserByMobile" 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.name as name,
|
|
|
|
- u.mobile as mobile,
|
|
|
|
- u.bindMobile as bindMobile,
|
|
|
|
- u.email as email,
|
|
|
|
- u.userIdentity as userIdentity,
|
|
|
|
- u.password as password,
|
|
|
|
- u.guideFlag as guideFlag,
|
|
|
|
- u.manufacturerStatus as shopStatus,
|
|
|
|
- cu.id as operationId,
|
|
|
|
|
|
+ select u.userID as userId,
|
|
|
|
+ u.clubID as clubId,
|
|
|
|
+ u.shopID as shopId,
|
|
|
|
+ u.serviceProviderId as serviceProviderId,
|
|
|
|
+ u.userName as userName,
|
|
|
|
+ u.name as name,
|
|
|
|
+ u.mobile as mobile,
|
|
|
|
+ u.bindMobile as bindMobile,
|
|
|
|
+ u.email as email,
|
|
|
|
+ u.userIdentity as userIdentity,
|
|
|
|
+ u.password as password,
|
|
|
|
+ u.guideFlag as guideFlag,
|
|
|
|
+ u.manufacturerStatus as shopStatus,
|
|
|
|
+ cu.id as operationId,
|
|
(select status from club where userId = u.userId limit 1) as clubStatus,
|
|
(select status from club where userId = u.userId limit 1) as clubStatus,
|
|
- cu.mobile as operationMobile
|
|
|
|
|
|
+ cu.mobile as operationMobile
|
|
from user u
|
|
from user u
|
|
left join cm_mall_operation_user cu on cu.userID = u.userID
|
|
left join cm_mall_operation_user cu on cu.userID = u.userID
|
|
where (u.bindMobile = #{mobile} or (cu.mobile = #{mobile} and cu.delFlag != 1))
|
|
where (u.bindMobile = #{mobile} or (cu.mobile = #{mobile} and cu.delFlag != 1))
|
|
@@ -184,7 +189,7 @@
|
|
</select>
|
|
</select>
|
|
<update id="updateUserInfo">
|
|
<update id="updateUserInfo">
|
|
update user
|
|
update user
|
|
- set openId = #{openId},
|
|
|
|
|
|
+ set openId = #{openId},
|
|
unionId = #{unionId}
|
|
unionId = #{unionId}
|
|
where userId = #{userId}
|
|
where userId = #{userId}
|
|
</update>
|
|
</update>
|
|
@@ -336,7 +341,7 @@
|
|
o.openid = #{openId}
|
|
o.openid = #{openId}
|
|
</if>
|
|
</if>
|
|
and o.delFlag = '0')
|
|
and o.delFlag = '0')
|
|
- and (u.userIdentity in (1,2,3,4) and u.userOrganizeID != 0)
|
|
|
|
|
|
+ and (u.userIdentity in (1,2,3,4) and u.userOrganizeID != 0)
|
|
limit 1
|
|
limit 1
|
|
</select>
|
|
</select>
|
|
<update id="updateServiceProviderUnionId">
|
|
<update id="updateServiceProviderUnionId">
|
|
@@ -354,7 +359,8 @@
|
|
select p.groundMall AS groundMall
|
|
select p.groundMall AS groundMall
|
|
from product p
|
|
from product p
|
|
left join cm_organize_product_info copi on copi.productId = p.productID
|
|
left join cm_organize_product_info copi on copi.productId = p.productID
|
|
- where p.shopId = #{shopId} and copi.validFlag = 2
|
|
|
|
|
|
+ where p.shopId = #{shopId}
|
|
|
|
+ and copi.validFlag = 2
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<select id="getUserIdByOpenId" resultType="java.lang.Integer">
|
|
<select id="getUserIdByOpenId" resultType="java.lang.Integer">
|
|
@@ -373,20 +379,20 @@
|
|
limit 1
|
|
limit 1
|
|
</select>
|
|
</select>
|
|
<select id="getOperationUserByInvitationCode" resultType="com.caimei365.user.model.vo.UserLoginVo">
|
|
<select id="getOperationUserByInvitationCode" resultType="com.caimei365.user.model.vo.UserLoginVo">
|
|
- SELECT cou.id as operationId,
|
|
|
|
- u.userID as userId,
|
|
|
|
- u.clubID as clubId,
|
|
|
|
- u.shopID as shopId,
|
|
|
|
- u.userName as userName,
|
|
|
|
- u.name as name,
|
|
|
|
- ifnull(cou.userOrganizeID, 0) as organizeId,
|
|
|
|
|
|
+ SELECT cou.id as operationId,
|
|
|
|
+ u.userID as userId,
|
|
|
|
+ u.clubID as clubId,
|
|
|
|
+ u.shopID as shopId,
|
|
|
|
+ u.userName as userName,
|
|
|
|
+ u.name as name,
|
|
|
|
+ ifnull(cou.userOrganizeID, 0) as organizeId,
|
|
u.userIdentity,
|
|
u.userIdentity,
|
|
- u.guideFlag as guideFlag,
|
|
|
|
|
|
+ u.guideFlag as guideFlag,
|
|
(select status from club where userId = u.userId limit 1) as clubStatus,
|
|
(select status from club where userId = u.userId limit 1) as clubStatus,
|
|
- u.manufacturerStatus as shopStatus,
|
|
|
|
|
|
+ u.manufacturerStatus as shopStatus,
|
|
cou.invitationCodeTime,
|
|
cou.invitationCodeTime,
|
|
- cou.mobile as operationMobile,
|
|
|
|
- cou.status as operationStatus,
|
|
|
|
|
|
+ cou.mobile as operationMobile,
|
|
|
|
+ cou.status as operationStatus,
|
|
cou.delFlag
|
|
cou.delFlag
|
|
FROM cm_mall_operation_user cou
|
|
FROM cm_mall_operation_user cou
|
|
LEFT JOIN user u ON u.userID = cou.userID
|
|
LEFT JOIN user u ON u.userID = cou.userID
|
|
@@ -395,20 +401,20 @@
|
|
AND u.userIdentity in (2, 3, 4)
|
|
AND u.userIdentity in (2, 3, 4)
|
|
</select>
|
|
</select>
|
|
<select id="getOperationOrganizeUserByInvitationCode" resultType="com.caimei365.user.model.vo.UserLoginVo">
|
|
<select id="getOperationOrganizeUserByInvitationCode" resultType="com.caimei365.user.model.vo.UserLoginVo">
|
|
- SELECT cou.id as operationId,
|
|
|
|
- u.userID as userId,
|
|
|
|
- u.clubID as clubId,
|
|
|
|
- u.shopID as shopId,
|
|
|
|
- u.userName as userName,
|
|
|
|
- u.name as name,
|
|
|
|
- ifnull(cou.userOrganizeID, 0) as organizeId,
|
|
|
|
|
|
+ SELECT cou.id as operationId,
|
|
|
|
+ u.userID as userId,
|
|
|
|
+ u.clubID as clubId,
|
|
|
|
+ u.shopID as shopId,
|
|
|
|
+ u.userName as userName,
|
|
|
|
+ u.name as name,
|
|
|
|
+ ifnull(cou.userOrganizeID, 0) as organizeId,
|
|
u.userIdentity,
|
|
u.userIdentity,
|
|
- u.guideFlag as guideFlag,
|
|
|
|
|
|
+ u.guideFlag as guideFlag,
|
|
(select status from club where userId = u.userId limit 1) as clubStatus,
|
|
(select status from club where userId = u.userId limit 1) as clubStatus,
|
|
- u.manufacturerStatus as shopStatus,
|
|
|
|
|
|
+ u.manufacturerStatus as shopStatus,
|
|
cou.invitationCodeTime,
|
|
cou.invitationCodeTime,
|
|
- cou.mobile as operationMobile,
|
|
|
|
- cou.status as operationStatus,
|
|
|
|
|
|
+ cou.mobile as operationMobile,
|
|
|
|
+ cou.status as operationStatus,
|
|
cou.delFlag
|
|
cou.delFlag
|
|
FROM cm_mall_operation_user cou
|
|
FROM cm_mall_operation_user cou
|
|
LEFT JOIN user u ON u.userID = cou.userID
|
|
LEFT JOIN user u ON u.userID = cou.userID
|
|
@@ -417,19 +423,19 @@
|
|
AND u.userIdentity in (2, 3, 4)
|
|
AND u.userIdentity in (2, 3, 4)
|
|
</select>
|
|
</select>
|
|
<select id="getOperationUserByOperationId" resultType="com.caimei365.user.model.vo.UserLoginVo">
|
|
<select id="getOperationUserByOperationId" resultType="com.caimei365.user.model.vo.UserLoginVo">
|
|
- SELECT cou.id as operationId,
|
|
|
|
- u.userID as userId,
|
|
|
|
- u.clubID as clubId,
|
|
|
|
- u.shopID as shopId,
|
|
|
|
- u.userName as userName,
|
|
|
|
- u.name as name,
|
|
|
|
|
|
+ SELECT cou.id as operationId,
|
|
|
|
+ u.userID as userId,
|
|
|
|
+ u.clubID as clubId,
|
|
|
|
+ u.shopID as shopId,
|
|
|
|
+ u.userName as userName,
|
|
|
|
+ u.name as name,
|
|
u.userIdentity,
|
|
u.userIdentity,
|
|
- u.guideFlag as guideFlag,
|
|
|
|
|
|
+ u.guideFlag as guideFlag,
|
|
(select status from club where userId = u.userId limit 1) as clubStatus,
|
|
(select status from club where userId = u.userId limit 1) as clubStatus,
|
|
- u.manufacturerStatus as shopStatus,
|
|
|
|
|
|
+ u.manufacturerStatus as shopStatus,
|
|
cou.invitationCodeTime,
|
|
cou.invitationCodeTime,
|
|
- cou.mobile as operationMobile,
|
|
|
|
- cou.status as operationStatus,
|
|
|
|
|
|
+ cou.mobile as operationMobile,
|
|
|
|
+ cou.status as operationStatus,
|
|
cou.delFlag
|
|
cou.delFlag
|
|
FROM cm_mall_operation_user cou
|
|
FROM cm_mall_operation_user cou
|
|
LEFT JOIN user u ON u.userID = cou.userID
|
|
LEFT JOIN user u ON u.userID = cou.userID
|
|
@@ -479,9 +485,10 @@
|
|
limit 1
|
|
limit 1
|
|
</select>
|
|
</select>
|
|
<select id="getClubSpUserId" resultType="java.lang.Integer">
|
|
<select id="getClubSpUserId" resultType="java.lang.Integer">
|
|
- SELECT s.userID from serviceprovider s
|
|
|
|
- left join club c on c.spId=s.serviceProviderID
|
|
|
|
- WHERE c.clubId = #{clubId}
|
|
|
|
|
|
+ SELECT s.userID
|
|
|
|
+ from serviceprovider s
|
|
|
|
+ left join club c on c.spId = s.serviceProviderID
|
|
|
|
+ WHERE c.clubId = #{clubId}
|
|
limit 1
|
|
limit 1
|
|
</select>
|
|
</select>
|
|
|
|
|
|
@@ -491,10 +498,56 @@
|
|
where touristId = #{touristId}
|
|
where touristId = #{touristId}
|
|
</update>
|
|
</update>
|
|
|
|
|
|
- <select id = "findTemPass" resultType="java.lang.String">
|
|
|
|
|
|
+ <select id="findTemPass" resultType="java.lang.String">
|
|
select password
|
|
select password
|
|
from cm_temporary_user
|
|
from cm_temporary_user
|
|
where addtime >= NOW() - INTERVAL 10 MINUTE
|
|
where addtime >= NOW() - INTERVAL 10 MINUTE
|
|
and userId = #{userId}
|
|
and userId = #{userId}
|
|
</select>
|
|
</select>
|
|
|
|
+
|
|
|
|
+ <select id="findTicket" resultType="com.caimei365.user.model.po.TicketPo">
|
|
|
|
+ select userId, ticketId, idCard
|
|
|
|
+ from cm_zyl_ticket
|
|
|
|
+ where ticketId = #{ticket}
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+ <update id="updateTicket">
|
|
|
|
+ update cm_zyl_ticket
|
|
|
|
+ set userId = #{userId},
|
|
|
|
+ idCard = #{idCard},
|
|
|
|
+ name = #{name},
|
|
|
|
+ mobile = #{mobile},
|
|
|
|
+ work = #{work},
|
|
|
|
+ bindTime = now()
|
|
|
|
+ where ticketId = #{ticket}
|
|
|
|
+ </update>
|
|
|
|
+
|
|
|
|
+ <select id="findTicketUser" resultType="com.caimei365.user.model.po.TicketPo">
|
|
|
|
+ select userId, ticketId, idCard
|
|
|
|
+ from cm_zyl_ticket
|
|
|
|
+ where userId = #{userId}
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+ <select id="findShopSign" resultType="java.lang.String">
|
|
|
|
+ select shopIds
|
|
|
|
+ from cm_zyl_ticket
|
|
|
|
+ where userId = #{userId}
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+ <update id="updateShopSign">
|
|
|
|
+ update cm_zyl_ticket
|
|
|
|
+ set shopIds = #{shopSign}
|
|
|
|
+ where userId = #{userId}
|
|
|
|
+ </update>
|
|
|
|
+
|
|
|
|
+ <select id="findShopSignPos" resultType="com.caimei365.user.model.po.ShopSignPo">
|
|
|
|
+ SELECT id,shopName,shopLogo,(SELECT shopIds FROM cm_zyl_ticket where userId = #{userId}) as shopIds
|
|
|
|
+ FROM cm_zyl_shop
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+ <select id="findShopDetail" resultType="com.caimei365.user.model.po.ShopSignPo">
|
|
|
|
+ SELECT id,shopName,shopLogo,(SELECT shopIds FROM cm_zyl_ticket where userId = #{userId}) as shopIds
|
|
|
|
+ FROM cm_zyl_shop
|
|
|
|
+ where id = #{shopId}
|
|
|
|
+ </select>
|
|
</mapper>
|
|
</mapper>
|