From 4f0dd4e3ebabcfc1ea71550c27b19b7dea1b2a95 Mon Sep 17 00:00:00 2001 From: Cui Zhi Feng <7426394+wuxixiaocui@user.noreply.gitee.com> Date: 星期二, 29 十月 2024 11:35:27 +0800 Subject: [PATCH] 统计 花店用户统计 --- src/main/resources/mapper/wallet/WalletBillRecordMapper.xml | 62 +++++++++++++++++++++++++++++++ 1 files changed, 62 insertions(+), 0 deletions(-) diff --git a/src/main/resources/mapper/wallet/WalletBillRecordMapper.xml b/src/main/resources/mapper/wallet/WalletBillRecordMapper.xml index 0d1a1ed..ea5b876 100644 --- a/src/main/resources/mapper/wallet/WalletBillRecordMapper.xml +++ b/src/main/resources/mapper/wallet/WalletBillRecordMapper.xml @@ -37,5 +37,67 @@ </if> </select> + <select id="queryPage" resultType="com.mzl.flower.dto.response.wallet.WalletBillRecordVO"> + select t.* ,s.name supplierName ,w.approve_time as approveTime from t_wallet_bill_record t + left join t_supplier_info s on t.supplier_id = s.id + left join t_wallet_withdraw_record w on t.withdraw_record_id = w.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.type != null and dto.type != ''"> + and t.type = #{dto.type} + </if> + <if test="dto.orderNo != null and dto.orderNo != ''"> + and t.order_no like concat('%', #{dto.orderNo}, '%') + </if> + <if test="dto.createStartDate!=null "> + AND DATE_FORMAT(w.create_time, '%Y-%m-%d') >= #{dto.createStartDate} + </if> + <if test="dto.endEndDate!=null "> + AND DATE_FORMAT(w.create_time, '%Y-%m-%d') <= #{dto.endEndDate} + </if> + <if test="dto.approveStartDate!=null "> + AND DATE_FORMAT(w.approve_time, '%Y-%m-%d') >= #{dto.approveStartDate} + </if> + <if test="dto.approveEndDate!=null "> + AND DATE_FORMAT(w.approve_time, '%Y-%m-%d') <= #{dto.approveEndDate} + </if> + order by t.create_time + </select> + <select id="queryWalletBillRecordList" resultType="com.mzl.flower.dto.response.wallet.WalletBillRecordVO"> + select t.* , s.name supplierName, w.approve_time as approveTime from t_wallet_bill_record t + left join t_supplier_info s on t.supplier_id = s.id + left join t_wallet_withdraw_record w on t.withdraw_record_id = w.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.type != null and dto.type != ''"> + and t.type = #{dto.type} + </if> + <if test="dto.orderNo != null and dto.orderNo != ''"> + and t.order_no like concat('%', #{dto.orderNo}, '%') + </if> + <if test="dto.createStartDate!=null "> + AND DATE_FORMAT(w.create_time, '%Y-%m-%d') >= #{dto.createStartDate} + </if> + <if test="dto.endEndDate!=null "> + AND DATE_FORMAT(w.create_time, '%Y-%m-%d') <= #{dto.endEndDate} + </if> + <if test="dto.approveStartDate!=null "> + AND DATE_FORMAT(w.approve_time, '%Y-%m-%d') >= #{dto.approveStartDate} + </if> + <if test="dto.approveEndDate!=null "> + AND DATE_FORMAT(w.approve_time, '%Y-%m-%d') <= #{dto.approveEndDate} + </if> + order by t.create_time + </select> </mapper> -- Gitblit v1.9.3