读写分离-sharding-userMapper和chargeRecordMapper强制读主库

This commit is contained in:
khalil
2025-07-25 12:48:21 +08:00
parent ae6372d346
commit 04a8d4357a
6 changed files with 76 additions and 0 deletions

View File

@@ -6,6 +6,7 @@
</resultMap>
<select id="page" resultMap="BaseResultMap">
/* SHARDINGSPHERE_HINT: WRITE_ROUTE_ONLY=true */
select * from (
select a.charge_record_id chargeRecordId, a.pingxx_charge_id pingxxChargeId, b.erban_no,b.nick,b.region_id,b.phone,b.channel
app_channel,a.uid,a.channel,p.`desc` `partitionName`,
@@ -43,6 +44,7 @@
</select>
<select id="pageTotal" resultMap="BaseResultMap">
/* SHARDINGSPHERE_HINT: WRITE_ROUTE_ONLY=true */
select
sum(a.amount) amount,
ifnull(a.localCurrencyCode, 'USD') localCurrencyCode,
@@ -90,6 +92,7 @@
</select>
<select id="listFisrChargeRecordByUids" resultType="com.accompany.payment.model.ChargeRecord">
/* SHARDINGSPHERE_HINT: WRITE_ROUTE_ONLY=true */
select charge_record_id, cr.uid, cr.create_time from charge_record cr
inner join (select uid, min(create_time) create_time from charge_record
where uid in <foreach collection="uids" item="uid" separator="," open="(" close=")">#{uid}</foreach> and
@@ -98,6 +101,7 @@
</select>
<select id="getCountryGoldDetail" resultType="com.accompany.admin.vo.ChargeRecordCountryVo">
/* SHARDINGSPHERE_HINT: WRITE_ROUTE_ONLY=true */
select country, sum(case when channel = 'google_play_billing' then total_gold else 0 end) googleGold,
sum(case when channel = 'payermax' then total_gold else 0 end) payermaxGold,
sum(case when channel = 'ios_pay' then total_gold else 0 end) iosGold,
@@ -113,6 +117,7 @@
</select>
<select id="getPartitionGoldDetail" resultType="com.accompany.admin.vo.ChargeRecordPartitionVo">
/* SHARDINGSPHERE_HINT: WRITE_ROUTE_ONLY=true */
select date(cr.create_time) `date`,
ifnull(sum(case when cr.channel = 'google_play_billing' then amount else 0 end)/100,0) `googleUsd`,
ifnull(sum(case when cr.channel = 'payermax' then amount else 0 end)/100,0) `payermaxUsd`,
@@ -138,6 +143,7 @@
</select>
<select id="getChargeCount" resultType="com.accompany.payment.model.ChargeRecord">
/* SHARDINGSPHERE_HINT: WRITE_ROUTE_ONLY=true */
select
cr.uid,
count(1) as amount
@@ -151,6 +157,7 @@
</select>
<select id="getChargeAmount" resultType="com.accompany.payment.model.ChargeRecord">
/* SHARDINGSPHERE_HINT: WRITE_ROUTE_ONLY=true */
select
cr.uid,
(ifnull(sum(cr.amount), 0)) as amount
@@ -170,6 +177,7 @@
</select>
<select id="getRefundRecord" resultType="com.accompany.payment.vo.ChargeRecordRefundVo">
/* SHARDINGSPHERE_HINT: WRITE_ROUTE_ONLY=true */
SELECT
cr.charge_status chargeStatus,
cr.charge_record_id chargeRecordId,
@@ -248,6 +256,7 @@
</where>
</select>
<select id="getRefundRecordTotal" resultType="com.accompany.payment.vo.ChargeRecordRefundVo">
/* SHARDINGSPHERE_HINT: WRITE_ROUTE_ONLY=true */
SELECT
round(sum(cr.amount)/100,2) amount,
ifnull(cr.local_currency_code, 'USD') localCurrencyCode,

View File

@@ -44,6 +44,7 @@
</resultMap>
<select id="selectUserWithGold" parameterType="java.util.Map" resultMap="BaseResultMap">
/* SHARDINGSPHERE_HINT: WRITE_ROUTE_ONLY=true */
select b.erban_no,b.nick,b.avatar,golds as gold_num, diamonds as diamonds_num, crystals as radish_num from
user_purse as a
join users as b on a.uid=b.uid
@@ -55,10 +56,12 @@
</select>
<select id="selectChannelList" resultType="java.lang.String">
/* SHARDINGSPHERE_HINT: WRITE_ROUTE_ONLY=true */
select distinct channel from users
</select>
<select id="getUserWithGoldCount" parameterType="java.util.List" resultType="java.lang.Integer">
/* SHARDINGSPHERE_HINT: WRITE_ROUTE_ONLY=true */
select count(1) from users where erban_no in
<foreach item="item" index="index" collection="list" open="(" separator="," close=")">
#{item}
@@ -67,6 +70,7 @@
<!-- 用户明细全部分页查询 -->
<select id="userDetailList" resultType="com.accompany.admin.vo.stats.UserDetailVo">
/* SHARDINGSPHERE_HINT: WRITE_ROUTE_ONLY=true */
select
u.uid,
u.erban_no as erbanNo,
@@ -145,6 +149,7 @@
<!--直播导流分页查询-->
<select id="userLiveDetailList" resultType="com.accompany.admin.vo.stats.UserDetailVo">
/* SHARDINGSPHERE_HINT: WRITE_ROUTE_ONLY=true */
select
u.uid,u.erban_no,u.nick,u.create_time,u.channel,u.model,u.new_device,u.invite_code,u.invite_uid,u.device_id,
ac.register_ip
@@ -189,6 +194,7 @@
<!--流量团队分页查询-->
<select id="userDetailFlowTeamList" resultType="com.accompany.admin.vo.stats.UserDetailVo">
/* SHARDINGSPHERE_HINT: WRITE_ROUTE_ONLY=true */
select
u.uid,u.erban_no,u.nick,u.create_time,u.channel,u.model,u.new_device,u.invite_code,u.device_id,
ac.register_ip
@@ -226,6 +232,7 @@
<!--直播导流分页查询-->
<select id="userLiveDetailListV2" resultType="com.accompany.admin.vo.stats.UserDetailVo">
/* SHARDINGSPHERE_HINT: WRITE_ROUTE_ONLY=true */
select
u.uid,
u.erban_no as erbanNo,
@@ -267,6 +274,7 @@
<!--流量团队分页查询-->
<select id="userDetailFlowTeamListV2" resultType="com.accompany.admin.vo.stats.UserDetailVo">
/* SHARDINGSPHERE_HINT: WRITE_ROUTE_ONLY=true */
select
u.uid,
u.erban_no as erbanNo,
@@ -309,10 +317,12 @@
</select>
<select id="getRegion" resultType="java.lang.String">
/* SHARDINGSPHERE_HINT: WRITE_ROUTE_ONLY=true */
select distinct region from users where region is not null;
</select>
<select id="getTwoRemainCount" resultType="java.lang.Integer">
/* SHARDINGSPHERE_HINT: WRITE_ROUTE_ONLY=true */
select
sum(u.is_remain)
from (
@@ -334,6 +344,7 @@
</select>
<select id="getSevenRemainCount" resultType="java.lang.Integer">
/* SHARDINGSPHERE_HINT: WRITE_ROUTE_ONLY=true */
select
sum(u.is_remain)
from (
@@ -355,6 +366,7 @@
</select>
<select id="getThirtyRemainCount" resultType="java.lang.Integer">
/* SHARDINGSPHERE_HINT: WRITE_ROUTE_ONLY=true */
select
sum(u.is_remain)
from (

View File

@@ -128,6 +128,7 @@
certify_modify_times, invite_code, invite_uid, phone_area_code
</sql>
<select id="selectByExample" parameterType="com.accompany.core.model.UsersExample" resultMap="BaseResultMap">
/* SHARDINGSPHERE_HINT: WRITE_ROUTE_ONLY=true */
select
<if test="distinct">
distinct
@@ -150,6 +151,7 @@
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
/* SHARDINGSPHERE_HINT: WRITE_ROUTE_ONLY=true */
select
<include refid="Base_Column_List"/>
from users
@@ -1036,14 +1038,17 @@
</select>
<select id="getUidByPartial" resultType="java.lang.Long">
/* SHARDINGSPHERE_HINT: WRITE_ROUTE_ONLY=true */
select uid from users where def_user IN (1,2) order by uid asc limit #{start},#{len}
</select>
<select id="getErbanNoListByCreateTime" resultType="java.lang.Long">
/* SHARDINGSPHERE_HINT: WRITE_ROUTE_ONLY=true */
select erban_no from users u where create_time >= #{startDate} and create_time &lt;= #{endDate}
</select>
<select id="getUidByErBanNo" resultType="java.lang.Long">
/* SHARDINGSPHERE_HINT: WRITE_ROUTE_ONLY=true */
select uid from users where erban_no like concat('%', #{erBanNo}, '%')
</select>
@@ -1074,6 +1079,7 @@
</select>
<select id="listUid" resultType="com.accompany.core.model.Users">
/* SHARDINGSPHERE_HINT: WRITE_ROUTE_ONLY=true */
select uid, partition_id partitionId from users order by uid asc limit #{start},#{len}
</select>
</mapper>

View File

@@ -111,6 +111,7 @@
</sql>
<select id="selectByExample" resultMap="BaseResultMap"
parameterType="com.accompany.payment.model.ChargeRecordExample">
/* SHARDINGSPHERE_HINT: WRITE_ROUTE_ONLY=true */
select
<if test="distinct">
distinct
@@ -126,6 +127,7 @@
</if>
</select>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String">
/* SHARDINGSPHERE_HINT: WRITE_ROUTE_ONLY=true */
select
<include refid="Base_Column_List"/>
from charge_record
@@ -362,6 +364,7 @@
</insert>
<select id="countByExample" parameterType="com.accompany.payment.model.ChargeRecordExample"
resultType="java.lang.Integer">
/* SHARDINGSPHERE_HINT: WRITE_ROUTE_ONLY=true */
select count(*) from charge_record
<if test="_parameter != null">
<include refid="Example_Where_Clause"/>
@@ -595,6 +598,7 @@
</update>
<select id="personalStatistic" resultMap="PersonalStatisticMap">
/* SHARDINGSPHERE_HINT: WRITE_ROUTE_ONLY=true */
select users.erban_no, users.nick, sum(charge_record.amount) / 100 as amountSum from charge_record inner join
users
on charge_record.uid = users.uid
@@ -616,6 +620,7 @@
</select>
<select id="getUserChargeAllAmount" resultType="java.lang.Integer">
/* SHARDINGSPHERE_HINT: WRITE_ROUTE_ONLY=true */
select sum(amount) from charge_record
where uid = #{uid}
<if test="chargeRecordStatus != null and chargeRecordStatus != ''">
@@ -630,6 +635,7 @@
</select>
<select id="getChargeRecordByPingxxChargeId" resultMap="BaseResultMap" parameterType="java.lang.String">
/* SHARDINGSPHERE_HINT: WRITE_ROUTE_ONLY=true */
select
<include refid="Base_Column_List"/>
from charge_record
@@ -637,6 +643,7 @@
</select>
<select id="getIapTotalAmount" resultType="java.lang.Long">
/* SHARDINGSPHERE_HINT: WRITE_ROUTE_ONLY=true */
select sum(amount) from charge_record
where uid = #{uid}
and channel = 'ios_pay'
@@ -644,6 +651,7 @@
</select>
<select id="getIapRefundAmount" resultType="java.lang.Long">
/* SHARDINGSPHERE_HINT: WRITE_ROUTE_ONLY=true */
select sum(amount) from charge_record
where uid = #{uid}
and channel = 'ios_pay'

View File

@@ -80,14 +80,17 @@
</resultMap>
<select id="getHistoryRechargeAmount" resultType="java.lang.Long">
/* SHARDINGSPHERE_HINT: WRITE_ROUTE_ONLY=true */
select sum(amount) from charge_record WHERE buss_type in (0,4) AND charge_status in (2,6) and uid = #{userId} and channel &lt;&gt; 'exchange';
</select>
<select id="getHistoryRechargeCount" resultType="java.lang.Integer">
/* SHARDINGSPHERE_HINT: WRITE_ROUTE_ONLY=true */
select count(1) from charge_record WHERE buss_type in (0,4) AND charge_status in (2,6) and uid = #{userId} and channel &lt;&gt; 'exchange';
</select>
<select id="getUserChargeRecordFromSpecialChannel" resultMap="BaseResultMap">
/* SHARDINGSPHERE_HINT: WRITE_ROUTE_ONLY=true */
select u.erban_no,u.nick,cr.* from
users u,charge_record cr
where cr.uid = u.uid
@@ -106,6 +109,7 @@
</select>
<select id="countChargeRecordFromSpecialChannel" resultMap="CountResultMap">
/* SHARDINGSPHERE_HINT: WRITE_ROUTE_ONLY=true */
select count(*) as counts,sum(amount) as amount from
users u,charge_record cr
where cr.uid = u.uid
@@ -122,6 +126,7 @@
</select>
<select id="sumChargeRecordFromSpecialChannel" resultType="java.lang.Long">
/* SHARDINGSPHERE_HINT: WRITE_ROUTE_ONLY=true */
select sum(amount) from
users u,charge_record cr
where cr.uid = u.uid
@@ -137,6 +142,7 @@
</select>
<select id="queryChannelStatistic" resultMap="StatResultMap">
/* SHARDINGSPHERE_HINT: WRITE_ROUTE_ONLY=true */
SELECT count(distinct uid) as pay_user_num,count(1) as charge_count_time, sum(amount) as total
FROM charge_record WHERE
uid IN
@@ -158,6 +164,7 @@
</sql>
<sql id="getRecordSql">
/* SHARDINGSPHERE_HINT: WRITE_ROUTE_ONLY=true */
SELECT a.time as time,a.timeStr as timeStr,
max(CASE a.channel WHEN 'alipay' THEN a.amount ELSE 0 END ) alipay,
max(CASE a.channel WHEN 'alipay_v2' THEN a.amount ELSE 0 END ) alipay_v2,
@@ -202,6 +209,7 @@
</sql>
<select id="getChannelDailyStatistic" resultMap="StatRecordResultMap">
/* SHARDINGSPHERE_HINT: WRITE_ROUTE_ONLY=true */
<include refid="getRecordSql"/>
FROM(
SELECT HOUR(create_time) as time,HOUR(create_time) as timeStr, count(1) as count, IFNULL(channel,'companyAccount') as
@@ -214,6 +222,7 @@
</select>
<select id="getChannelDailyDetail" resultType="com.accompany.payment.vo.ChargeRecordDetailVo">
/* SHARDINGSPHERE_HINT: WRITE_ROUTE_ONLY=true */
SELECT
IFNULL(channel,'companyAccount') as channel,
convert(sum(amount)/100,decimal(10,2)) as amount,count(1) as count
@@ -222,6 +231,7 @@
GROUP BY channel;
</select>
<select id="getDailyTotal" resultType="com.accompany.payment.vo.ChargeRecordDetailVo">
/* SHARDINGSPHERE_HINT: WRITE_ROUTE_ONLY=true */
SELECT count(1) as count,convert(sum(amount)/100,decimal(10,2)) as amount
<include refid="statisticsRecordSql"/>
and HOUR(create_time) &lt; #{time}
@@ -229,6 +239,7 @@
<sql id="statisticsTotalSql">
/* SHARDINGSPHERE_HINT: WRITE_ROUTE_ONLY=true */
<include refid="getRecordSql"/>
FROM(
SELECT 0 as time, DATE_FORMAT(create_time, '%Y-%m-%d') as timeStr ,count(1) as count,IFNULL(channel,'companyAccount') as
@@ -242,12 +253,14 @@
GROUP BY a.timeStr ORDER BY a.timeStr DESC
</sql>
<select id="getChannelTotalStatistic" resultMap="StatRecordResultMap">
/* SHARDINGSPHERE_HINT: WRITE_ROUTE_ONLY=true */
<include refid="statisticsTotalSql"/>
limit #{start},#{pageSize};
</select>
<select id="getChannelTotalDetail" resultType="com.accompany.payment.vo.ChargeRecordDetailVo">
/* SHARDINGSPHERE_HINT: WRITE_ROUTE_ONLY=true */
SELECT
IFNULL(channel,'companyAccount') as channel,
convert(sum(amount)/100,decimal(10,2)) as amount,count(1) as count
@@ -259,6 +272,7 @@
</select>
<select id="getRecordCount" resultType="java.lang.Integer">
/* SHARDINGSPHERE_HINT: WRITE_ROUTE_ONLY=true */
select count(1)
from
(
@@ -267,6 +281,7 @@
</select>
<select id="getChargeUserCount" resultType="java.lang.Integer">
/* SHARDINGSPHERE_HINT: WRITE_ROUTE_ONLY=true */
select count(distinct uid) from charge_record
where charge_status in (2,6) and channel not in ('exchange')
and uid in
@@ -282,6 +297,7 @@
</select>
<select id="getChargeUserAmount" resultType="java.lang.Long">
/* SHARDINGSPHERE_HINT: WRITE_ROUTE_ONLY=true */
select sum(amount) from charge_record
where charge_status in (2,6) and channel not in ('exchange')
and uid in
@@ -297,10 +313,12 @@
</select>
<select id="getHistoryRechargeAmountByChannel" resultType="java.lang.Long">
/* SHARDINGSPHERE_HINT: WRITE_ROUTE_ONLY=true */
select IFNULL(sum(amount)/100,0) from charge_record WHERE buss_type in (0,4) AND charge_status in (2,6) and uid = #{userId} and channel &lt;&gt; 'exchange' and channel = #{channel};
</select>
<select id="getTotalRechargeMoneyByChannel" resultType="java.lang.Double">
/* SHARDINGSPHERE_HINT: WRITE_ROUTE_ONLY=true */
select sum(amount) / 100 from charge_record
where 1=1
<if test="startTime != null">
@@ -323,12 +341,14 @@
</select>
<select id="getRechargeTimesByChannel" resultType="java.lang.Long">
/* SHARDINGSPHERE_HINT: WRITE_ROUTE_ONLY=true */
select count(*) from charge_record
where create_time &gt; #{startTime} and create_time &lt; #{endTime}
and uid = #{uid} and channel = #{channel} AND charge_status in (2,6)
</select>
<select id="getRechargeMoneyByUidBetweenTime" resultType="java.lang.Long">
/* SHARDINGSPHERE_HINT: WRITE_ROUTE_ONLY=true */
select sum(amount) from charge_record
where 1=1
<if test="startTime != null">
@@ -351,18 +371,21 @@
</select>
<select id="getUserChargeGold" resultType="java.math.BigDecimal">
/* SHARDINGSPHERE_HINT: WRITE_ROUTE_ONLY=true */
select sum(total_gold) from charge_record
where charge_status in (2)
and uid = #{uid}
</select>
<select id="getUserLast60ChargeGold" resultType="java.math.BigDecimal">
/* SHARDINGSPHERE_HINT: WRITE_ROUTE_ONLY=true */
select sum(total_gold) from charge_record
where charge_status in (2)
and uid = #{uid} and create_time &gt;= DATE_FORMAT(adddate(now(), -60), '%Y-%m-%d 00:00:00')
</select>
<select id="getAllChargeUserAmount" resultType="com.accompany.payment.model.ChargeRecord">
/* SHARDINGSPHERE_HINT: WRITE_ROUTE_ONLY=true */
select uid,
sum(amount) amount,
sum(total_gold) totalGold

View File

@@ -56,6 +56,7 @@
</sql>
<select id="selectByPage" resultMap="BaseResultMap" parameterType="java.util.HashMap" >
/* SHARDINGSPHERE_HINT: WRITE_ROUTE_ONLY=true */
select
*
from users
@@ -69,6 +70,7 @@
</select>
<select id="selectCount" resultType="java.lang.Long" parameterType="java.util.HashMap" >
/* SHARDINGSPHERE_HINT: WRITE_ROUTE_ONLY=true */
select
COUNT(1)
from users
@@ -81,10 +83,12 @@
</select>
<select id="findNormalUidsByPage" resultType="java.lang.Long" parameterType="map">
/* SHARDINGSPHERE_HINT: WRITE_ROUTE_ONLY=true */
select uid from users where def_user in (1,2) limit #{start}, #{count}
</select>
<select id="getUsersWithBalances" resultMap="BaseResultMap">
/* SHARDINGSPHERE_HINT: WRITE_ROUTE_ONLY=true */
SELECT
u.uid,u.erban_no,u.nick
FROM
@@ -108,6 +112,7 @@
</update>
<select id="getRobotUser" resultType="com.accompany.core.model.Users">
/* SHARDINGSPHERE_HINT: WRITE_ROUTE_ONLY=true */
SELECT <include refid="Base_Column_List"/> FROM users
<include refid="robot_user_condition"></include>
and uid >= (
@@ -120,6 +125,7 @@
</select>
<select id="getUidByPage" resultType="java.lang.Long">
/* SHARDINGSPHERE_HINT: WRITE_ROUTE_ONLY=true */
select
uid
from users
@@ -145,6 +151,7 @@
</sql>
<select id="getInviteCodeUsers" resultMap="BaseResultMap">
/* SHARDINGSPHERE_HINT: WRITE_ROUTE_ONLY=true */
select * from users
where invite_code is not null
<if test="inviteCodeList != null">
@@ -170,6 +177,7 @@
</select>
<select id="countInviteCodeUsers" resultType="java.lang.Integer">
/* SHARDINGSPHERE_HINT: WRITE_ROUTE_ONLY=true */
select count(1) from users
where invite_code is not null
<if test="inviteCodeList != null">
@@ -193,6 +201,7 @@
</select>
<select id="listUserByUidAndPhoneAndErbanNo" resultMap="BaseResultMap">
/* SHARDINGSPHERE_HINT: WRITE_ROUTE_ONLY=true */
select uid, erban_no, nick, phone from users
where 1 = 1
<if test="uidList != null and uidList.size > 0">
@@ -218,6 +227,7 @@
</select>
<select id="countUserByUidAndPhoneAndErbanNo" resultType="java.lang.Integer">
/* SHARDINGSPHERE_HINT: WRITE_ROUTE_ONLY=true */
select count(1) from users
where 1 = 1
<if test="uidList != null">
@@ -242,6 +252,7 @@
</select>
<select id="listInvitedUserByInviteCode" resultType="java.lang.Long">
/* SHARDINGSPHERE_HINT: WRITE_ROUTE_ONLY=true */
select u.uid from users u, account a
where u.invite_code is not null and u.invite_code = #{inviteCode}
<if test="startTime != null">
@@ -260,6 +271,7 @@
</select>
<select id="countNewDeviceByInviteCode" resultType="java.lang.Integer">
/* SHARDINGSPHERE_HINT: WRITE_ROUTE_ONLY=true */
select count(1) from users u, account a
where u.invite_code is not null and u.invite_code = #{inviteCode}
and u.device_id is not null
@@ -280,6 +292,7 @@
</select>
<select id="listChargeRecordByUidList" resultMap="com.accompany.payment.mapper.ChargeRecordMapper.BaseResultMap">
/* SHARDINGSPHERE_HINT: WRITE_ROUTE_ONLY=true */
SELECT * FROM charge_record WHERE 1 = 1
<if test="uidList != null">
and uid in
@@ -299,6 +312,7 @@
</select>
<select id="listInvitedUsersByInviteUid" resultMap="BaseResultMap">
/* SHARDINGSPHERE_HINT: WRITE_ROUTE_ONLY=true */
select * from users
where invite_code is not null
<if test="inviteUids != null and inviteUids.size > 0">
@@ -323,6 +337,7 @@
limit ${limit}
</select>
<select id="countInvitedUsersByInviteUid" resultType="java.lang.Integer">
/* SHARDINGSPHERE_HINT: WRITE_ROUTE_ONLY=true */
select count(1) from users
where invite_code is not null
<if test="inviteUids != null and inviteUids.size > 0">
@@ -346,6 +361,7 @@
</select>
<select id="countRegionDailyNewUserByTime" resultType="com.accompany.business.dto.DailyNewUserStatDto">
/* SHARDINGSPHERE_HINT: WRITE_ROUTE_ONLY=true */
select u.partition_id, u.region_id, count(uid) `count`
from users u
where u.create_time between #{startTime} and #{endTime}
@@ -353,12 +369,14 @@
</select>
<select id="listGameMatchRobotUser" resultMap="BaseResultMap">
/* SHARDINGSPHERE_HINT: WRITE_ROUTE_ONLY=true */
select * from users u
where u.def_user = 6
and u.partition_id = #{partitionId}
</select>
<select id="getUserByInviteCode" resultMap="BaseResultMap">
/* SHARDINGSPHERE_HINT: WRITE_ROUTE_ONLY=true */
select u.* from users u
inner join user_invite_code c on u.uid = c.uid
where c.invite_code = #{inviteCode} and c.invite_code_type = 1