陶杰
2024-10-28 021496babb52a859294a8475ffef330009b0167c
src/main/resources/mapper/wallet/WalletWithdrawRecordMapper.xml
@@ -20,5 +20,41 @@
        <result column="approve_state" property="approveState" />
        <result column="reject_reason" property="rejectReason" />
    </resultMap>
    <select id="queryPage" resultType="com.mzl.flower.dto.response.wallet.WalletWithdrawRecordVO">
        select t.* ,s.name supplierName from t_wallet_withdraw_record t
        left join t_supplier_info s on t.supplier_id = s.id
        where t.deleted= 0
        <if test="dto.supplierName != null and dto.supplierName != ''">
            and s.name like concat('%', #{dto.supplierName}, '%')
        </if>
        <if test="dto.supplierId != null and dto.supplierId != ''">
            and t.supplier_id = #{dto.supplierId}
        </if>
        <if test="dto.withdrawState != null and dto.withdrawState != ''">
            and t.withdraw_state = #{dto.withdrawState}
        </if>
        <if test="dto.createStartDate!=null ">
            <![CDATA[
               AND DATE_FORMAT(t.create_time, '%Y-%m-%d') &gt;= #{dto.createStartDate}
            ]]>
        </if>
        <if test="dto.endEndDate!=null ">
            <![CDATA[
               AND DATE_FORMAT(t.create_time, '%Y-%m-%d') &lt;= #{dto.endEndDate}
            ]]>
        </if>
        <if test="dto.approveStartDate!=null ">
            <![CDATA[
               AND t.approve_time &gt;= #{dto.approveStartDate}
            ]]>
        </if>
        <if test="dto.approveEndDate!=null ">
            <![CDATA[
               AND t.approve_time &lt;= #{dto.approveStartDate}
            ]]>
        </if>
        order by t.create_time
    </select>
</mapper>