nickchange
2023-11-09 c036557db88c6297b9a626a892dce35c14ab8ee5
cloud-server-competition/src/main/resources/mapper/CompetitionMapper.xml
@@ -13,8 +13,8 @@
        aa.introduction,
        aa.registerEndTime,
        aa.age,
        (aa.baseNumber+aa.userCompetitionCount) as heat,
        aa.status
        aa.status,
        aa.heat
        from (
        SELECT
        a.id,
@@ -23,10 +23,10 @@
        a.city AS cityName,
        a.registerCondition,
        a.introduction,
        a.baseNumber as heat,
        DATE_FORMAT(a.registerEndTime, '%Y-%m-%d %H:%i') AS registerEndTime,
        CONCAT(a.startAge, '-', a.endAge) AS age,
        a.baseNumber,
        COUNT(uc.competitionId) AS userCompetitionCount,
        CASE
        WHEN NOW() < a.startTime THEN 1  -- 未开始
        WHEN now() between a.startTime and a.endTime THEN 2  -- 进行中
@@ -34,11 +34,8 @@
        END AS status
        FROM
        t_competition a
        LEFT JOIN
        t_user_competition5 uc ON a.id = uc.competitionId
        WHERE
        a.auditStatus = 2
        AND a.`status` IN (1, 2)
        AND a.state = 1
            <if test="null != cityCode and '' != cityCode">
                and a.cityCode = #{cityCode}
@@ -56,6 +53,10 @@
            order by aa.heat ${heat}
        </if>
    </select>
    <select id="counts" resultType="java.lang.Integer">
            select  count(1)
            from t_user_competition where competitionId = #{id}
    </select>
    <update id="taskSetStatusStart">