feat:订单钱包类型查询

This commit is contained in:
dzc committed 2026-06-02 10:32:13 +08:00
1 parent cda3fff6f4
commit 78aeb77cd6
7 files changed
+47 -4

No files matched your search

@@ -90,4 +90,9 @@ public class HardOrderDto extends HardOrderEntity implements BaseIsIncludeTreeIn
*/
private String isDiscountsProduct;
/**
* 钱包类型id
*/
private Long walletTypeId;
}
@@ -69,4 +69,9 @@ public class HardOrderVo extends HardOrderEntity implements BaseUserDeptInterfac
*/
private String walletTypeUniqueCode;
/**
* 钱包类型id
*/
private Long walletTypeId;
}
@@ -240,7 +240,8 @@
m.type as hardType,
m.dept_id as hardTypeDeptId,
s.id as afterSaleId,
s.no as afterSaleNo
s.no as afterSaleNo,
w_m.wallet_type_id as walletTypeId
from (select a.id
from hard_order a
<where>
@@ -260,12 +261,18 @@
</where>
order by a.create_time desc, a.user_id desc) t
join hard_order a on a.id = t.id
left join hard_manager m on m.id = a.hard_id and m.tenant_id = 1
left join hard_manager m on m.id = a.hard_id
left join pjcloudx_wallet.wallet_manage w_m on w_m.id = a.wallet_id
left join (select order_id, max(id) as id
from hard_after_sale
where tenant_id = 1
group by order_id) sx on sx.order_id = a.id
left join hard_after_sale s on s.id = sx.id
<where>
<if test="dto.walletTypeId != null">
and w_m.wallet_type_id = #{dto.walletTypeId}
</if>
</where>
order by a.create_time desc, a.user_id desc
</sql>
@@ -434,9 +441,13 @@
sum(a.pay_price) as totalPayPrice,
count(0) as totalPayCount
from hard_order a
left join pjcloudx_wallet.wallet_manage w_m ON w_m.id = a.wallet_id
<where>
<include refid="whereA"/>
and a.merchant_id is not null
<if test="dto.walletTypeId != null">
and w_m.wallet_type_id = #{dto.walletTypeId}
</if>
<if test="dto.hardTypeCodes != null and dto.hardTypeCodes.size() != 0">
and m.type in
<foreach collection="dto.hardTypeCodes" item="v" open="(" close=")" separator=",">
@@ -462,9 +473,13 @@
count(0) as totalPayCount
from hard_after_sale r
inner join hard_order a on a.id = r.order_id and r.del_flag = '0'
left join pjcloudx_wallet.wallet_manage w_m ON w_m.id = a.wallet_id
<where>
<include refid="whereA"/>
and a.merchant_id is not null
<if test="dto.walletTypeId != null">
and w_m.wallet_type_id = #{dto.walletTypeId}
</if>
<if test="dto.refundTimeList != null and dto.refundTimeList.length == 2">
and r.audit_time between #{dto.refundTimeList[0]} and #{dto.refundTimeList[1]}
</if>
@@ -598,8 +613,12 @@
sum(a.pay_price) as sum,
count(0) as count
from hard_order a
left join pjcloudx_wallet.wallet_manage w_m ON w_m.id = a.wallet_id
<where>
a.del_flag = 0
<if test="dto.walletTypeId != null">
and w_m.wallet_type_id = #{dto.walletTypeId}
</if>
<if test="dto.isRefundSuccess != null and dto.isRefundSuccess == true ">
and (a.refund_status is null or a.refund_status not in ('20'))
</if>
@@ -642,8 +661,12 @@
select o.user_dept_id as deptId,sum(ifnull(a.refund_price, 0)) as sum, count(0) as count
from hard_after_sale a
inner join hard_order o on o.id = a.order_id and o.del_flag = '0'
left join pjcloudx_wallet.wallet_manage w_m ON w_m.id = o.wallet_id
<where>
a.del_flag = '0'
<if test="dto.walletTypeId != null">
and w_m.wallet_type_id = #{dto.walletTypeId}
</if>
<if test="dto.orderStatusCodes != null and dto.orderStatusCodes.size() != 0">
and o.order_status in
<foreach collection="dto.orderStatusCodes" item="v" open="(" close=")" separator=",">
@@ -1032,4 +1055,5 @@
limit #{dto.limit}
</if>
</select>
</mapper>
@@ -10,10 +10,15 @@ import java.util.List;
public class ActCouponRecordDto extends ActCouponRecordEntity {
/**
* 是否查询未过期的核销项
* 是否在活动中
*/
private Boolean isFindNoExpire = false;
/**
* 是否查询未过期的核销项
*/
private Boolean isFindNotInExpire = false;
private List<String> statusCodeList;
private LocalDateTime[] createTimeList;
@@ -106,7 +106,7 @@ public class ActCouponRecordController {
ActCouponRecordStatusEnum.USED.getCode(),
ActCouponRecordStatusEnum.EXPIRED.getCode()
));
// dto.setIsFindNoExpire(true);
dto.setIsFindNotInExpire(true);
return R.ok(actCouponRecordService.pageList(page, dto));
}
@@ -160,6 +160,7 @@
a.wallet_id = ${dto.walletId}
</if>
<if test="dto.walletTypeId != null">
and m.wallet_type_id = ${dto.walletTypeId}
</if>
<if test="dto.type != null">
<if test="dto.type == 1">
@@ -40,6 +40,9 @@
<if test="dto.isFindNoExpire != null and dto.isFindNoExpire == true ">
and a.end_time >= now() and a.start_time &lt;= now()
</if>
<if test="dto.isFindNotInExpire != null and dto.isFindNotInExpire == true ">
and a.end_time >= now()
</if>
<if test="dto.statusCodeList != null and dto.statusCodeList.size() != 0">
and a.status IN
<foreach collection="dto.statusCodeList" item="v" open="(" close=")" separator=",">