|
@@ -9,6 +9,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="userId" column="user_id" />
|
|
|
<result property="pid" column="pid" />
|
|
|
<result property="topId" column="top_id" />
|
|
|
+ <result property="subset" column="subset" />
|
|
|
<result property="liveRate" column="live_rate" />
|
|
|
<result property="dividendGuaranteeRate" column="dividend_guarantee_rate" />
|
|
|
<result property="auditStatus" column="audit_status" />
|
|
@@ -17,7 +18,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectAppUserAgentVo">
|
|
|
- select id, user_id, pid, top_id, live_rate, dividend_guarantee_rate, audit_status, create_time, update_time from app_user_agent
|
|
|
+ select id, user_id, pid, top_id,subset, live_rate, dividend_guarantee_rate, audit_status, create_time, update_time from app_user_agent
|
|
|
</sql>
|
|
|
|
|
|
<select id="selectAppUserAgentList" parameterType="com.game.business.domain.AppUserAgent" resultMap="AppUserAgentResult">
|
|
@@ -26,6 +27,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="userId != null "> and user_id = #{userId}</if>
|
|
|
<if test="pid != null "> and pid = #{pid}</if>
|
|
|
<if test="topId != null "> and top_id = #{topId}</if>
|
|
|
+ <if test="subset != null "> and subset = #{subset}</if>
|
|
|
<if test="liveRate != null "> and live_rate = #{liveRate}</if>
|
|
|
<if test="dividendGuaranteeRate != null "> and dividend_guarantee_rate = #{dividendGuaranteeRate}</if>
|
|
|
<if test="auditStatus != null and auditStatus != ''"> and audit_status = #{auditStatus}</if>
|
|
@@ -44,6 +46,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="userId != null">user_id,</if>
|
|
|
<if test="pid != null">pid,</if>
|
|
|
<if test="topId != null">top_id,</if>
|
|
|
+ <if test="subset != null and subset != ''">subset,</if>
|
|
|
<if test="liveRate != null">live_rate,</if>
|
|
|
<if test="dividendGuaranteeRate != null">dividend_guarantee_rate,</if>
|
|
|
<if test="auditStatus != null">audit_status,</if>
|
|
@@ -55,6 +58,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="userId != null">#{userId},</if>
|
|
|
<if test="pid != null">#{pid},</if>
|
|
|
<if test="topId != null">#{topId},</if>
|
|
|
+ <if test="subset != null and subset != ''">#{subset},</if>
|
|
|
<if test="liveRate != null">#{liveRate},</if>
|
|
|
<if test="dividendGuaranteeRate != null">#{dividendGuaranteeRate},</if>
|
|
|
<if test="auditStatus != null">#{auditStatus},</if>
|
|
@@ -69,6 +73,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="userId != null">user_id = #{userId},</if>
|
|
|
<if test="pid != null">pid = #{pid},</if>
|
|
|
<if test="topId != null">top_id = #{topId},</if>
|
|
|
+ <if test="subset != null and subset != ''">subset = #{subset},</if>
|
|
|
<if test="liveRate != null">live_rate = #{liveRate},</if>
|
|
|
<if test="dividendGuaranteeRate != null">dividend_guarantee_rate = #{dividendGuaranteeRate},</if>
|
|
|
<if test="auditStatus != null">audit_status = #{auditStatus},</if>
|
|
@@ -183,6 +188,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
c.coin as coin,
|
|
|
c.diamond_coin as diamondCoin,
|
|
|
a.pid as pid,
|
|
|
+ IFNULL((LENGTH(a.subset) - LENGTH(REPLACE(a.subset, ',', ''))) + 1,0) as teamNum,
|
|
|
IFNULL(sum(b.game_betting),0) as bettingAmount,
|
|
|
IFNULL(sum(b.game_commission),0) as gameCommission,
|
|
|
IFNULL(sum(b.live_commission),0) as liveCommission,
|
|
@@ -192,7 +198,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
IFNULL(sum(b.recharge_give),0) as rechargeGive,
|
|
|
a.live_rate as liveRate,
|
|
|
a.dividend_guarantee_rate as dividendGuaranteeRate
|
|
|
- from app_user_agent as a inner join app_user_count as b on a.user_id = b.user_id left join mugozbg_live.app_user as c on a.user_id = c.userid where (a.pid = #{teamDto.pid} or a.user_id = #{teamDto.pid})
|
|
|
+ from app_user_agent as a inner join app_user_count as b on a.user_id = b.user_id left join mugozbg_live.app_user as c on a.user_id = c.userid
|
|
|
+ where (a.pid = #{teamDto.pid} or a.user_id = #{teamDto.pid})
|
|
|
<if test="teamDto.userId != null ">
|
|
|
and a.user_id = #{teamDto.userId}
|
|
|
</if>
|