zhibing.pu
2024-06-25 8447646f79cd860c50ec69b0876f597474a8cf97
优化
2个文件已修改
34 ■■■■■ 已修改文件
cloud-server-competition/src/main/resources/logback-spring.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
cloud-server-competition/src/main/resources/mapper/ParticipantMapper.xml 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cloud-server-competition/src/main/resources/logback-spring.xml
@@ -215,7 +215,7 @@
    </springProfile>
    <springProfile name="prod">
        <root level="warn">
        <root level="info">
            <!-- 生产环境最好不配置console写文件 -->
            <appender-ref ref="DEBUG_FILE"/>
            <appender-ref ref="INFO_FILE"/>
cloud-server-competition/src/main/resources/mapper/ParticipantMapper.xml
@@ -15,39 +15,27 @@
    </select>
    <select id="getPeopleFromId1" resultType="com.dsh.competition.entity.UserCompetition">
        select * from (
        select
        a.*
        from t_user_competition a
        left join t_payment_competition b on (a.paymentCompetitionId = b.id)
        where b.state = 1 and b.payStatus != 1 and a.competitionId = #{id}
        select * from t_user_competition where competitionId = #{id} and paymentCompetitionId in (
        select id from t_payment_competition where state = 1 and payStatus != 1
        <if test="null != state and state == 1">
            and b.payStatus = 2
            and payStatus = 2
        </if>
        <if test="null != state and state == 3">
            and b.payStatus = 3
            and payStatus = 3
        </if>
        group by a.id
        ) as aa where aa.id is not null order by aa.insertTime desc limit #{offset}, #{limit}
        ) order by insertTime desc limit #{offset}, #{limit}
    </select>
    <select id="getPeopleFromIdCount" resultType="java.lang.Integer">
        select
        count(*)
        from (
        select
        a.id
        from t_user_competition a
        left join t_payment_competition b on (a.paymentCompetitionId = b.id)
        where b.state = 1 and b.payStatus != 1 and a.competitionId = #{id}
        select count(1) from t_user_competition where competitionId = #{id} and paymentCompetitionId in (
        select id from t_payment_competition where state = 1 and payStatus != 1
        <if test="null != state and state == 1">
            and b.payStatus = 2
            and payStatus = 2
        </if>
        <if test="null != state and state == 3">
            and b.payStatus = 3
            and payStatus = 3
        </if>
        group by a.id
        ) as aa where aa.id is not null
        )
    </select>