liujie
3 天以前 dd556df997e268153bf1a74616f49b25db11ed3f
cloud-server-communityWorldCup/src/main/resources/mapper/WorldCupCompetitorMapper.xml
@@ -110,11 +110,22 @@
        participantType,
        participantId,
        appUserId,
        count(*) as num
        count(*) as num,
        winIntegral,
        drawIntegral,
        loseIntegral
        from t_world_cup_competitor
        where matchResult is not null
        <if test="null != item.year">
            and DATE_FORMAT(startTime, '%Y') = #{item.year}
        </if>
        <if test="null != sTime and null != eTime">
            and startTime between #{sTime} and #{eTime}
        </if>
        <if test="null != item.worldCupId">
            and worldCupId =#{item.worldCupId}
        </if>
        <if test="null != appUserIds and appUserIds.size() > 0">
            and appUserId in
@@ -136,6 +147,12 @@
        where matchResult is not null and matchResult != -1
        <if test="null != item.year">
            and DATE_FORMAT(startTime, '%Y') = #{item.year}
        </if>
        <if test="null != sTime and null != eTime">
            and startTime between #{sTime} and #{eTime}
        </if>
        <if test="null != item.worldCupId">
            and worldCupId =#{item.worldCupId}
        </if>
        <if test="null != appUserIds and appUserIds.size() > 0">
            and appUserId in
@@ -162,6 +179,9 @@
                #{iten}
            </foreach>
        </if>
        <if test="sTime != null and eTime != null">
            and startTime between #{sTime} and #{eTime}
        </if>
        group by participantType, participantId, appUserId
    </select>
    
@@ -178,6 +198,9 @@
            <foreach collection="appUserIds" item="iten" index="index" open="(" separator="," close=")">
                #{iten}
            </foreach>
        </if>
        <if test="sTime != null and eTime != null">
            and startTime between #{sTime} and #{eTime}
        </if>
        group by participantType, participantId, appUserId
    </select>
@@ -311,4 +334,17 @@
    <select id="getMatchTime" resultType="int">
        select count(*) as matchTime from (select code from t_world_cup_competitor where worldCupId = #{worldCupId} group by code) as b
    </select>
    <select id="getWorldCupListFromRank" resultType="com.dsh.communityWorldCup.model.WorldCupListVo">
        select
            c.id,
            b.worldCupId,
            c.name
        from t_world_cup_payment_participant a
                 left join t_world_cup_payment b on (a.worldCupPaymentId = b.id)
                 left join t_world_cup c on (b.worldCupId = c.id)
        where a.appUserId = #{uid} and b.payStatus = 2 and b.refundTime is null and b.state = 1
    </select>
</mapper>