This commit is contained in:
gaowdong 2025-03-27 10:30:58 +08:00
parent 0386340d4a
commit 4f9a342eb9
3 changed files with 4 additions and 9 deletions

View File

@ -430,14 +430,9 @@ public class OrderRefundBusinessImpl implements OrderRefundBusiness {
if (orderRefundDTO.getOrderId() == null && CharSequenceUtil.isEmpty(orderRefundDTO.getMacOrderId())) {
throw new ServiceException("订单id和mac订单id不能同时为空");
} else {
if (!biz.ifWholeRefund()) {
if (CollUtil.isEmpty(orderRefundDTO.getDetailRefundList())) {
throw new ServiceException(OrderTips.refundLackDetail());
}
if (!biz.ifWholeRefund() && CollUtil.isNotEmpty(orderRefundDTO.getDetailRefundList())) {
orderRefundDTO.getDetailRefundList().forEach(JavaxValidateUtils::validate);
}
}
}

View File

@ -518,7 +518,7 @@
<if test="param.sumType == 2">
a.statistic_date,
</if>
SUBSTRING_INDEX(SUBSTRING_INDEX(g.ancestors,',', #{param.orgLevel}), ',', -1) as a_org_id,
SUBSTRING_INDEX(SUBSTRING_INDEX(concat(g.ancestors, ','),',', #{param.orgLevel} + 1), ',', -1) as a_org_id,
SUM(IF(a.wallet_id = 1 ,consume_amount + repair_amount - refund_amount,0)) wallet_consume_amount,
SUM(IF(a.wallet_id = 2 ,consume_amount + repair_amount - refund_amount,0)) subsidy_consume_amount,
SUM(IF(a.wallet_id = 4 ,consume_amount + repair_amount - refund_amount,0)) luck_consume_amount,

View File

@ -18,7 +18,7 @@
sys_dept g
LEFT JOIN (
SELECT
CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(g.ancestors,',', #{param.orgLevel}), ',', -1) as SIGNED) as a_org_id,
CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(concat(g.ancestors, ','),',', #{param.orgLevel} + 1), ',', -1) as SIGNED) as a_org_id,
sum( consume_num ) AS consume_num,
sum( consume_amount ) AS consume_amount,
sum( consume_repair_num ) AS consume_repair_num,
@ -115,7 +115,7 @@
) d LEFT JOIN (
SELECT
statistic_date,
CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(g.ancestors,',', #{param.orgLevel}), ',', -1) as SIGNED) as a_org_id,
CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(concat(g.ancestors, ','),',', #{param.orgLevel} + 1), ',', -1) as SIGNED) as a_org_id,
sum( consume_num ) AS consume_num,
sum( consume_amount ) AS consume_amount,
sum( consume_repair_num ) AS consume_repair_num,