fix配置pad端菜品bug

This commit is contained in:
谭凯凯 2024-11-26 17:50:41 +08:00 committed by Tankaikai
parent 37372a1700
commit 81172f56f6
1 changed files with 4 additions and 3 deletions

View File

@ -65,9 +65,9 @@ public class TbCreditBuyerServiceImpl extends ServiceImpl<TbCreditBuyerMapper, T
if ("unpaid".equals(repaymentStatus)) {
wrapper.apply("0 < ifnull((select x.count from view_credit_buyer_order_count x where x.credit_buyer_id = tb_credit_buyer.id and x.status = 'unpaid'),0)");
wrapper.apply("0 = ifnull((select x.count from view_credit_buyer_order_count x where x.credit_buyer_id = tb_credit_buyer.id and x.status = 'partial'),0)");
}else if ("partial".equals(repaymentStatus)) {
} else if ("partial".equals(repaymentStatus)) {
wrapper.apply("0 < ifnull((select x.count from view_credit_buyer_order_count x where x.credit_buyer_id = tb_credit_buyer.id and x.status = 'partial'),0)");
}else if ("paid".equals(repaymentStatus)) {
} else if ("paid".equals(repaymentStatus)) {
wrapper.apply("0 = ifnull((select sum(x.count) from view_credit_buyer_order_count x where x.credit_buyer_id = tb_credit_buyer.id and x.status in ('unpaid','partial')),0)");
}
}
@ -206,6 +206,7 @@ public class TbCreditBuyerServiceImpl extends ServiceImpl<TbCreditBuyerMapper, T
result.put("repaymentMsg", StrUtil.format("账单无需还款,{}元已转储至余额。", repaymentAmount));
return result;
}
// 转存余额
BigDecimal rechargeAmount = BigDecimal.ZERO;
if (NumberUtil.isGreater(repaymentAmount, owedAmount)) {
rechargeAmount = NumberUtil.sub(repaymentAmount, owedAmount);
@ -279,7 +280,7 @@ public class TbCreditBuyerServiceImpl extends ServiceImpl<TbCreditBuyerMapper, T
result.put("repaymentAmount", initRepaymentAmount);
result.put("payAmount", payAmount);
result.put("rechargeAmount", rechargeAmount);
result.put("repaymentMsg", StrUtil.format("共计还款{}笔,还款金额:{}元,支付欠款:{}元,转存余额:{}元,当前余额:{}元。", repaymentCount, initRepaymentAmount, payAmount, entity.getAccountBalance()));
result.put("repaymentMsg", StrUtil.format("共计还款{}笔,还款金额:{}元,支付欠款:{}元,转存余额:{}元,当前余额:{}元。", repaymentCount, initRepaymentAmount, payAmount, rechargeAmount, entity.getAccountBalance()));
return result;
}