|
@@ -2,125 +2,133 @@
|
|
<!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.userPermission as userPermission,
|
|
|
|
- u.userIdentity as userIdentity,
|
|
|
|
- u.password as password,
|
|
|
|
- u.guideFlag as guideFlag,
|
|
|
|
- u.clubStatus as clubStatus,
|
|
|
|
|
|
+ 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.userPermission as userPermission,
|
|
|
|
+ u.userIdentity as userIdentity,
|
|
|
|
+ u.password as password,
|
|
|
|
+ u.guideFlag as guideFlag,
|
|
|
|
+ u.clubStatus as clubStatus,
|
|
u.manufacturerStatus as shopStatus
|
|
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.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.userPermission as userPermission,
|
|
|
|
- u.userIdentity as userIdentity,
|
|
|
|
- u.password as password,
|
|
|
|
- u.guideFlag as guideFlag,
|
|
|
|
- u.clubStatus as clubStatus,
|
|
|
|
- u.manufacturerStatus as shopStatus,
|
|
|
|
- cu.id as operationId,
|
|
|
|
- cu.status as operationStatus,
|
|
|
|
- cu.mobile as operationMobile
|
|
|
|
|
|
+ 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.userPermission as userPermission,
|
|
|
|
+ u.userIdentity as userIdentity,
|
|
|
|
+ u.password as password,
|
|
|
|
+ u.guideFlag as guideFlag,
|
|
|
|
+ u.clubStatus as clubStatus,
|
|
|
|
+ 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
|
|
|
|
|
|
+ left join cm_mall_operation_user cu on cu.userID = u.userID
|
|
where (u.bindMobile = #{mobileOrEmail}
|
|
where (u.bindMobile = #{mobileOrEmail}
|
|
- or u.email = #{mobileOrEmail}
|
|
|
|
- or (cu.mobile = #{mobileOrEmail} and cu.delFlag != 1)
|
|
|
|
- ) and u.userIdentity in (1,2,3,4) and u.userOrganizeID = 0
|
|
|
|
|
|
+ or u.email = #{mobileOrEmail}
|
|
|
|
+ or (cu.mobile = #{mobileOrEmail} and cu.delFlag != 1)
|
|
|
|
+ )
|
|
|
|
+ and u.userIdentity in (1, 2, 3, 4)
|
|
|
|
+ and u.userOrganizeID = 0
|
|
limit 1
|
|
limit 1
|
|
</select>
|
|
</select>
|
|
<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.userPermission as userPermission,
|
|
|
|
- u.userIdentity as userIdentity,
|
|
|
|
- u.password as password,
|
|
|
|
- u.guideFlag as guideFlag,
|
|
|
|
- u.clubStatus as clubStatus,
|
|
|
|
- u.manufacturerStatus as shopStatus,
|
|
|
|
- cu.id as operationId,
|
|
|
|
- cu.status as operationStatus,
|
|
|
|
- cu.mobile as operationMobile
|
|
|
|
|
|
+ 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.userPermission as userPermission,
|
|
|
|
+ u.userIdentity as userIdentity,
|
|
|
|
+ u.password as password,
|
|
|
|
+ u.guideFlag as guideFlag,
|
|
|
|
+ u.clubStatus as clubStatus,
|
|
|
|
+ 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
|
|
|
|
|
|
+ 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))
|
|
- and u.userOrganizeID = 0 and u.userIdentity in (1,2,3,4)
|
|
|
|
|
|
+ and u.userOrganizeID = 0
|
|
|
|
+ and u.userIdentity in (1, 2, 3, 4)
|
|
limit 1
|
|
limit 1
|
|
</select>
|
|
</select>
|
|
<select id="getServiceProviderUserByOpenId" resultType="com.caimei365.user.model.vo.UserLoginVo">
|
|
<select id="getServiceProviderUserByOpenId" resultType="com.caimei365.user.model.vo.UserLoginVo">
|
|
select s.serviceProviderId as serviceProviderId,
|
|
select s.serviceProviderId as serviceProviderId,
|
|
- s.userID as userId,
|
|
|
|
- u.userName as userName,u.name as name,
|
|
|
|
- u.mobile as mobile,
|
|
|
|
- u.bindMobile as bindMobile,
|
|
|
|
- u.email as email,
|
|
|
|
- u.userPermission as userPermission,
|
|
|
|
- u.userIdentity as userIdentity,
|
|
|
|
- u.guideFlag as guideFlag,
|
|
|
|
- u.password as password
|
|
|
|
|
|
+ s.userID as userId,
|
|
|
|
+ u.userName as userName,
|
|
|
|
+ u.name as name,
|
|
|
|
+ u.mobile as mobile,
|
|
|
|
+ u.bindMobile as bindMobile,
|
|
|
|
+ u.email as email,
|
|
|
|
+ u.userPermission as userPermission,
|
|
|
|
+ u.userIdentity as userIdentity,
|
|
|
|
+ u.guideFlag as guideFlag,
|
|
|
|
+ u.password as password
|
|
from serviceprovider s
|
|
from serviceprovider s
|
|
- left join user u on s.userID = u.userID
|
|
|
|
- where s.openid = #{openId} and u.validFlag = 1
|
|
|
|
|
|
+ left join user u on s.userID = u.userID
|
|
|
|
+ where s.openid = #{openId}
|
|
|
|
+ and u.validFlag = 1
|
|
limit 1
|
|
limit 1
|
|
</select>
|
|
</select>
|
|
<select id="getServiceProviderByUserId" resultType="com.caimei365.user.model.vo.ServiceProviderVo">
|
|
<select id="getServiceProviderByUserId" resultType="com.caimei365.user.model.vo.ServiceProviderVo">
|
|
select s.serviceProviderId as serviceProviderId,
|
|
select s.serviceProviderId as serviceProviderId,
|
|
- s.status as status,
|
|
|
|
- s.userID as userId
|
|
|
|
|
|
+ s.status as status,
|
|
|
|
+ s.userID as userId
|
|
from serviceprovider s
|
|
from serviceprovider s
|
|
where s.userID = #{userId}
|
|
where s.userID = #{userId}
|
|
limit 1
|
|
limit 1
|
|
</select>
|
|
</select>
|
|
<select id="getLoginUserByUnionId" resultType="com.caimei365.user.model.vo.UserLoginVo">
|
|
<select id="getLoginUserByUnionId" resultType="com.caimei365.user.model.vo.UserLoginVo">
|
|
select u.userID as userId,
|
|
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.userPermission as userPermission,
|
|
|
|
- u.userIdentity as userIdentity,
|
|
|
|
- u.password as password,
|
|
|
|
- u.guideFlag as guideFlag,
|
|
|
|
- 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>
|
|
|
|
|
|
+ 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.userPermission as userPermission,
|
|
|
|
+ u.userIdentity as userIdentity,
|
|
|
|
+ u.password as password,
|
|
|
|
+ u.guideFlag as guideFlag,
|
|
|
|
+ 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
|
|
from user u
|
|
left join cm_mall_operation_user o on o.userID = u.userID
|
|
left join cm_mall_operation_user o on o.userID = u.userID
|
|
where (o.unionId = #{unionId} and o.delFlag = '0')
|
|
where (o.unionId = #{unionId} and o.delFlag = '0')
|
|
@@ -129,44 +137,44 @@
|
|
</select>
|
|
</select>
|
|
<select id="getLoginUserByOpenId" resultType="com.caimei365.user.model.vo.UserLoginVo">
|
|
<select id="getLoginUserByOpenId" resultType="com.caimei365.user.model.vo.UserLoginVo">
|
|
select u.userID as userId,
|
|
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.userPermission as userPermission,
|
|
|
|
- u.userIdentity as userIdentity,
|
|
|
|
- u.password as password,
|
|
|
|
- u.guideFlag as guideFlag,
|
|
|
|
- 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>
|
|
|
|
|
|
+ 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.userPermission as userPermission,
|
|
|
|
+ u.userIdentity as userIdentity,
|
|
|
|
+ u.password as password,
|
|
|
|
+ u.guideFlag as guideFlag,
|
|
|
|
+ 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
|
|
from user u
|
|
left join cm_mall_operation_user o on o.userID = u.userID
|
|
left join cm_mall_operation_user o on o.userID = u.userID
|
|
where (
|
|
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')
|
|
|
|
|
|
+ <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)
|
|
and (u.userIdentity in (1,2,3,4) and u.userOrganizeID = 0)
|
|
limit 1
|
|
limit 1
|
|
</select>
|
|
</select>
|
|
@@ -175,10 +183,15 @@
|
|
set unionId = #{unionId}
|
|
set unionId = #{unionId}
|
|
where userID = #{userId}
|
|
where userID = #{userId}
|
|
</update>
|
|
</update>
|
|
|
|
+ <update id="updateLogin">
|
|
|
|
+ update user
|
|
|
|
+ set loginTime = now()
|
|
|
|
+ where userID = #{userId}
|
|
|
|
+ </update>
|
|
<select id="getUserIdByOpenId" resultType="java.lang.Integer">
|
|
<select id="getUserIdByOpenId" resultType="java.lang.Integer">
|
|
select o.userID as userId
|
|
select o.userID as userId
|
|
from
|
|
from
|
|
- cm_mall_operation_user o
|
|
|
|
|
|
+ cm_mall_operation_user o
|
|
where
|
|
where
|
|
<if test="source=='www'">
|
|
<if test="source=='www'">
|
|
pcOpenid = #{openId}
|
|
pcOpenid = #{openId}
|
|
@@ -194,68 +207,59 @@
|
|
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,
|
|
|
|
- u.userIdentity,
|
|
|
|
- u.guideFlag as guideFlag,
|
|
|
|
- u.clubStatus as clubStatus,
|
|
|
|
- u.manufacturerStatus as shopStatus,
|
|
|
|
- cou.invitationCodeTime,
|
|
|
|
- cou.mobile as operationMobile,
|
|
|
|
- cou.status as operationStatus,
|
|
|
|
- cou.delFlag
|
|
|
|
- FROM
|
|
|
|
- cm_mall_operation_user cou
|
|
|
|
- LEFT JOIN user u ON u.userID = cou.userID
|
|
|
|
- WHERE
|
|
|
|
- cou.invitationCode = #{invitationCode}
|
|
|
|
- AND cou.userOrganizeID = 0
|
|
|
|
- AND u.userIdentity in (2,3,4)
|
|
|
|
|
|
+ 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.guideFlag as guideFlag,
|
|
|
|
+ u.clubStatus as clubStatus,
|
|
|
|
+ u.manufacturerStatus as shopStatus,
|
|
|
|
+ cou.invitationCodeTime,
|
|
|
|
+ cou.mobile as operationMobile,
|
|
|
|
+ cou.status as operationStatus,
|
|
|
|
+ cou.delFlag
|
|
|
|
+ FROM cm_mall_operation_user cou
|
|
|
|
+ LEFT JOIN user u ON u.userID = cou.userID
|
|
|
|
+ WHERE cou.invitationCode = #{invitationCode}
|
|
|
|
+ AND cou.userOrganizeID = 0
|
|
|
|
+ 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,
|
|
|
|
- u.userIdentity,
|
|
|
|
- u.guideFlag as guideFlag,
|
|
|
|
- u.clubStatus as clubStatus,
|
|
|
|
- u.manufacturerStatus as shopStatus,
|
|
|
|
- cou.invitationCodeTime,
|
|
|
|
- cou.mobile as operationMobile,
|
|
|
|
- cou.status as operationStatus,
|
|
|
|
- cou.delFlag
|
|
|
|
- FROM
|
|
|
|
- cm_mall_operation_user cou
|
|
|
|
- LEFT JOIN user u ON u.userID = cou.userID
|
|
|
|
- WHERE
|
|
|
|
- cou.id = #{operationId}
|
|
|
|
- AND cou.userOrganizeID = 0
|
|
|
|
- AND u.userIdentity in (2,3,4)
|
|
|
|
|
|
+ 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.guideFlag as guideFlag,
|
|
|
|
+ u.clubStatus as clubStatus,
|
|
|
|
+ u.manufacturerStatus as shopStatus,
|
|
|
|
+ cou.invitationCodeTime,
|
|
|
|
+ cou.mobile as operationMobile,
|
|
|
|
+ cou.status as operationStatus,
|
|
|
|
+ cou.delFlag
|
|
|
|
+ FROM cm_mall_operation_user cou
|
|
|
|
+ LEFT JOIN user u ON u.userID = cou.userID
|
|
|
|
+ WHERE cou.id = #{operationId}
|
|
|
|
+ AND cou.userOrganizeID = 0
|
|
|
|
+ AND u.userIdentity in (2, 3, 4)
|
|
</select>
|
|
</select>
|
|
<select id="getClubCountByClubName" resultType="java.lang.Integer">
|
|
<select id="getClubCountByClubName" resultType="java.lang.Integer">
|
|
- SELECT
|
|
|
|
- count(*)
|
|
|
|
- FROM
|
|
|
|
- club
|
|
|
|
- WHERE
|
|
|
|
- name = #{name}
|
|
|
|
|
|
+ SELECT count(*)
|
|
|
|
+ FROM club
|
|
|
|
+ WHERE name = #{name}
|
|
AND status NOT IN (2, 20, 21, 3, 30)
|
|
AND status NOT IN (2, 20, 21, 3, 30)
|
|
</select>
|
|
</select>
|
|
<select id="getMaxClubId" resultType="java.lang.Integer">
|
|
<select id="getMaxClubId" resultType="java.lang.Integer">
|
|
- SELECT
|
|
|
|
- MAX(clubID)
|
|
|
|
|
|
+ SELECT MAX(clubID)
|
|
FROM club
|
|
FROM club
|
|
</select>
|
|
</select>
|
|
<select id="getMaxUserId" resultType="java.lang.Integer">
|
|
<select id="getMaxUserId" resultType="java.lang.Integer">
|
|
- SELECT
|
|
|
|
- MAX(userID)
|
|
|
|
|
|
+ SELECT MAX(userID)
|
|
FROM user
|
|
FROM user
|
|
</select>
|
|
</select>
|
|
|
|
|