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