From 6405e269215854be154cfcdcc3e57b18eaef0e37 Mon Sep 17 00:00:00 2001 From: tianyongbao Date: Mon, 19 Aug 2024 13:07:13 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=A1=E7=94=A8=E5=8D=A1=E8=B4=A6?= =?UTF-8?q?=E5=8D=95=EF=BC=8C=E6=96=B0=E5=A2=9E=E5=88=B7=E5=8D=A1=E6=AC=A1?= =?UTF-8?q?=E6=95=B0=EF=BC=8C=E6=97=A5=E5=B8=B8=E6=94=AF=E5=87=BA=E6=AC=A1?= =?UTF-8?q?=E6=95=B0=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../invest/domain/vo/CreditCardBillVo.java | 7 ++++ .../mapper/invest/CreditCardBillMapper.xml | 42 ++++++++++++++++++- 2 files changed, 48 insertions(+), 1 deletion(-) diff --git a/ruoyi-modules/intc-invest/src/main/java/com/ruoyi/invest/domain/vo/CreditCardBillVo.java b/ruoyi-modules/intc-invest/src/main/java/com/ruoyi/invest/domain/vo/CreditCardBillVo.java index 370c40d..36e7e8c 100644 --- a/ruoyi-modules/intc-invest/src/main/java/com/ruoyi/invest/domain/vo/CreditCardBillVo.java +++ b/ruoyi-modules/intc-invest/src/main/java/com/ruoyi/invest/domain/vo/CreditCardBillVo.java @@ -26,4 +26,11 @@ public class CreditCardBillVo extends CreditCardBill @Excel(name = "信用卡") private String bankNameCode; + @ApiModelProperty(value="Pos刷卡次数)") + + private String posCount; + + @ApiModelProperty(value="日常支出次数)") + private String dailyExpensesCount; + } diff --git a/ruoyi-modules/intc-invest/src/main/resources/mapper/invest/CreditCardBillMapper.xml b/ruoyi-modules/intc-invest/src/main/resources/mapper/invest/CreditCardBillMapper.xml index 21ac5c3..4f89053 100644 --- a/ruoyi-modules/intc-invest/src/main/resources/mapper/invest/CreditCardBillMapper.xml +++ b/ruoyi-modules/intc-invest/src/main/resources/mapper/invest/CreditCardBillMapper.xml @@ -20,6 +20,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + @@ -38,7 +40,45 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" a.bill_state, a.remark, bc."name" as bank_name, - bc.code as bank_code + bc.code as bank_code, + ( + select + count(*) + from + accounts_deal_record adr + where + adr.account_id = a.credit_card_id + and adr.deal_type = '2' + and to_char(adr.create_time, + 'yyyy-MM-dd')>=split_part(a.bill_date_period, + '~', + 1) + and split_part(a.bill_date_period, + '~', + 2)>= to_char(adr.create_time, + 'yyyy-MM-dd') + and adr.deal_category = '5' + + ) as pos_count, + ( + select + count(*) + from + accounts_deal_record adr + where + adr.account_id = a.credit_card_id + and adr.deal_type = '2' + and to_char(adr.create_time, + 'yyyy-MM-dd')>=split_part(a.bill_date_period, + '~', + 1) + and split_part(a.bill_date_period, + '~', + 2)>= to_char(adr.create_time, + 'yyyy-MM-dd') + and adr.deal_category = '1' + + ) as daily_expenses_count from credit_card_bill a left join bank_card_lend bc on