puzhibing
2024-03-06 ab20715db09a5e4888c19702f5f73ecdc4e55f15
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.dsh.communityWorldCup.mapper.WorldCupPaymentParticipantMapper">
 
 
 
    <select id="getWorldCupPaymentParticipant" resultType="com.dsh.communityWorldCup.entity.WorldCupPaymentParticipant">
        select *
        from t_world_cup_payment_participant
        where alreadyEntered = 0 and worldCupId = #{worldCupId} and participantType = #{participantType} and participantId = #{participantId} and worldCupPaymentId in (
            select id from t_world_cup_payment where worldCupId = #{worldCupId} and payStatus = 2 and state = 1
            ) order by createTime desc limit 0, 1
    </select>
 
 
 
    <select id="getMyWorldCupList" resultType="com.dsh.communityWorldCup.model.WorldCupListVo">
        select
        a.id,
        b.worldCupId,
        c.name,
        DATE_FORMAT(c.registrationClosingTime, '%Y-%m-%d %H:%i') as registrationClosingTime,
        CONCAT(c.startAge, '-', c.endAge) as age,
        c.coverImg,
        c.intro as content,
        c.lon,
        c.lat,
        c.basePeople as heat
        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.participantType = #{item.isStudent} and a.participantId = #{item.id} and b.payStatus = 2 and b.refundTime is null and b.state = 1
        <if test="null != item.state">
            and c.status = #{item.state}
        </if>
        order by b.createTime desc limit #{item.pageNo}, #{item.pageSize}
    </select>
</mapper>