puzhibing
2023-11-25 7fe6d026bcc8f993ce76437d01607e591cc671fe
cloud-server-competition/src/main/resources/mapper/PaymentCompetitionMapper.xml
@@ -38,7 +38,7 @@
        SELECT DATE_FORMAT(insertTime, '%m-%d %H:%i')as `time`,
        amount
        from t_payment_competition
        where  payStatus in (2,3) and payType in (1,2)
        where payStatus in (2,3) and payType in (1,2)
        <if test="null != monthStart and '' != monthStart and null != monthEnd and '' != monthEnd">
            and DATE_FORMAT(payTime, '%Y-%m-%d %H:%i:%s') between #{monthStart} and #{monthEnd}
        </if>
@@ -50,7 +50,7 @@
        SELECT DATE_FORMAT(refundTime, '%m-%d %H:%i')as `time`,
        amount
        from t_payment_competition
        where  payStatus = 3 and payType in (1,2)
        where payStatus = 3 and payType in (1,2)
        <if test="null != monthStart and '' != monthStart and null != monthEnd and '' != monthEnd">
            and DATE_FORMAT(refundTime, '%Y-%m-%d %H:%i:%s') between #{monthStart} and #{monthEnd}
        </if>
@@ -61,18 +61,18 @@
    <select id="listAll" resultType="com.dsh.competition.entity.PaymentCompetition">
        select * from t_payment_competition t1
        <where>
        <if test="query.amount!=null and query.amount!= ''">
            and t1.amount &lt;= #{query.amount}
        </if>
        <if test="query.userIds != null and query.userIds.size()>0">
            AND t1.competitionId IN
            <foreach collection="query.userIds" separator="," item="id" open="(" close=")">
                #{id}
            </foreach>
        </if>
        <if test="sTime !=null and sTime!= '' and eTime !=null and eTime!= ''">
            and t1.insertTime between #{sTime} and #{eTime}
        </if>
            <if test="query.amount!=null and query.amount!= ''">
                and t1.amount &lt;= #{query.amount}
            </if>
            <if test="query.userIds != null and query.userIds.size()>0">
                AND t1.competitionId IN
                <foreach collection="query.userIds" separator="," item="id" open="(" close=")">
                    #{id}
                </foreach>
            </if>
            <if test="sTime !=null and sTime!= '' and eTime !=null and eTime!= ''">
                and t1.insertTime between #{sTime} and #{eTime}
            </if>
        </where>
    </select>
    <select id="queryBycode" resultType="java.lang.Integer">