完成挂账管理相关需求
This commit is contained in:
parent
f451425a5c
commit
c6454d45ed
|
|
@ -19,9 +19,13 @@ import java.util.Map;
|
|||
public interface TbCreditBuyerOrderMapper extends BaseMapper<TbCreditBuyerOrder> {
|
||||
|
||||
List<CreditBuyerOrderDTO> getList(Map<String, Object> params);
|
||||
|
||||
long getCount(Map<String, Object> params);
|
||||
|
||||
BigDecimal getSumPayAmount(Map<String, Object> params);
|
||||
|
||||
BigDecimal getSumPaidAmount(Map<String, Object> params);
|
||||
|
||||
BigDecimal getSumUnpaidAmount(Map<String, Object> params);
|
||||
|
||||
CreditBuyerOrderDTO getOne(Map<String, Object> params);
|
||||
|
|
|
|||
|
|
@ -81,6 +81,11 @@ public class TbCreditBuyerOrderServiceImpl extends ServiceImpl<TbCreditBuyerOrde
|
|||
Map<String, Object> data = new HashMap<>(4);
|
||||
// 总交易笔数
|
||||
data.put("count", count);
|
||||
|
||||
// 总交易金额
|
||||
BigDecimal payAmount = baseMapper.getSumPayAmount(params);
|
||||
data.put("payAmountTotal", payAmount);
|
||||
|
||||
// 未支付
|
||||
params.put("status", "unpaid");
|
||||
long unpaidCount = baseMapper.getCount(params);
|
||||
|
|
|
|||
|
|
@ -51,6 +51,12 @@
|
|||
order by t1.order_id desc
|
||||
</select>
|
||||
|
||||
<select id="getSumPayAmount" resultType="decimal">
|
||||
select ifnull(sum(t1.pay_amount),0) from view_credit_buyer_order t1
|
||||
<include refid="commonWhere" />
|
||||
order by t1.order_id desc
|
||||
</select>
|
||||
|
||||
<select id="getSumPaidAmount" resultType="decimal">
|
||||
select ifnull(sum(t1.paid_amount),0) from view_credit_buyer_order t1
|
||||
<include refid="commonWhere" />
|
||||
|
|
|
|||
Loading…
Reference in New Issue