刘帅
2026-09-08 572df690f72ed4a077d934823f261dec39b3cc7d
cloud-server-competition/src/main/resources/mapper/PaymentCompetitionMapper.xml
@@ -32,11 +32,13 @@
        <if test="null != type and 4 == type">
            and a.payStatus = 3
        </if>
        order by a.insertTime desc limit #{pageNo}, #{pageSize}
        order by a.insertTime desc, a.id desc limit #{pageNo}, #{pageSize}
    </select>
    <select id="queryDatas" resultType="com.dsh.competition.feignclient.model.BillingRequest">
        SELECT DATE_FORMAT(insertTime, '%m-%d %H:%i')as `time`,
        amount
        SELECT
        DATE_FORMAT(insertTime, '%m-%d %H:%i')as `time`,
        amount,
        UNIX_TIMESTAMP(payTime) * 1000 as dateTime
        from t_payment_competition
        where payStatus in (2,3) and payType in (1,2)
        <if test="null != monthStart and '' != monthStart and null != monthEnd and '' != monthEnd">
@@ -47,8 +49,10 @@
        </if>
    </select>
    <select id="queryCancelDatas" resultType="com.dsh.competition.feignclient.model.BillingRequest">
        SELECT DATE_FORMAT(refundTime, '%m-%d %H:%i')as `time`,
        amount
        SELECT
        DATE_FORMAT(refundTime, '%m-%d %H:%i')as `time`,
        amount,
        UNIX_TIMESTAMP(refundTime) * 1000 as dateTime
        from t_payment_competition
        where payStatus = 3 and payType in (1,2)
        <if test="null != monthStart and '' != monthStart and null != monthEnd and '' != monthEnd">
@@ -62,7 +66,7 @@
        select * from t_payment_competition t1
        <where>
            <if test="query.amount!=null and query.amount!= ''">
                and t1.amount &lt;= #{query.amount}
                and t1.amount = #{query.amount}
            </if>
            <if test="query.userIds != null and query.userIds.size()>0">
                AND t1.competitionId IN
@@ -70,10 +74,22 @@
                    #{id}
                </foreach>
            </if>
            <if test="query.storeId != null">
                AND FIND_IN_SET(#{query.storeId}, t1.competitionStoreIds)
            </if>
            <if test="sTime !=null and sTime!= '' and eTime !=null and eTime!= ''">
                and t1.insertTime between #{sTime} and #{eTime}
            </if>
        <choose>
            <when test="query.includeRefund != null and query.includeRefund">
                and t1.payStatus IN (2, 3)
            </when>
            <otherwise>
                and t1.payStatus = 2
            </otherwise>
        </choose>
        </where>
        order by t1.insertTime desc, t1.id desc
    </select>
    <select id="queryBycode" resultType="java.lang.Integer">
        SELECT cp.storeId
@@ -85,4 +101,4 @@
        select  count(1)
        from t_user_competition where competitionId = #{id}
    </select>
</mapper>
</mapper>