puzhibing
2023-08-14 26e2592813b9263124d518d238262910e817d323
cloud-server-competition/src/main/resources/mapper/PaymentCompetitionMapper.xml
@@ -33,4 +33,28 @@
        </if>
        order by a.insertTime 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
        from t_payment_competition
        where  payStatus = 2 and payType = 1 and payType = 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>
        <if test="null != appUserId and '' != appUserId ">
            and appUserId = #{appUserId}
        </if>
    </select>
    <select id="queryCancelDatas" resultType="com.dsh.competition.feignclient.model.BillingRequest">
        SELECT DATE_FORMAT(insertTime, '%m-%d %H:%i')as `time`,
        amount
        from t_payment_competition
        where  payStatus = 3 and payType = 1 and payType = 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>
        <if test="null != appUserId and '' != appUserId ">
            and appUserId = #{appUserId}
        </if>
    </select>
</mapper>