无关风月
1 天以前 8a5b6dedd18a0956ffa8da7ec9ace30b1d8238fc
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>
@@ -257,7 +280,8 @@
        ourScore,
        opponentScore,
        matchResult,
        b.`name`
        b.`name`,
        CONCAT(a.id, '') as id
        from t_world_cup_competitor a
        left join t_world_cup b on (a.worldCupId = b.id)
        where matchResult is not null
@@ -311,4 +335,22 @@
    <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
        a.id,
        b.worldCupId,
        c.name,
        c.lon,
        c.lat,
        c.basePeople as heat,
        c.status
        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.participantId = #{item.id} and b.payStatus = 2 and b.refundTime is null and b.state = 1
        order by a.createTime desc
    </select>
</mapper>