1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 
<mapper namespace="com.by4cloud.platformx.business.mapper.BankStatementMapper">
 
  <resultMap id="bankStatementMap" type="com.by4cloud.platformx.business.entity.BankStatement">
        <id property="id" column="id"/>
        <result property="compId" column="comp_id"/>
        <result property="bankSeqNo" column="bank_seq_no"/>
        <result property="dataId" column="data_id"/>
        <result property="dataJson" column="data_json"/>
        <result property="payBankAccName" column="pay_bank_acc_name"/>
        <result property="payBankNo" column="pay_bank_no"/>
        <result property="receiveBankAcc" column="receive_bank_acc"/>
        <result property="receiveBankAccAcc" column="receive_bank_acc_acc"/>
        <result property="receiveBankAccName" column="receive_bank_acc_name"/>
        <result property="tranAmount" column="tran_amount"/>
        <result property="tranDate" column="tran_date"/>
        <result property="createBy" column="create_by"/>
        <result property="createTime" column="create_time"/>
        <result property="updateBy" column="update_by"/>
        <result property="updateTime" column="update_time"/>
        <result property="delFlag" column="del_flag"/>
  </resultMap>
    <select id="pageBip" resultType="com.by4cloud.platformx.business.vo.BankStatementItemPageVo">
        SELECT
            bsi.id,
            bsi.confirm_amount,
            bsi.bip_id,
            bsi.bip_param,
            bsi.bip_push,
            bs.pay_bank_acc_name,
            bs.pay_bank_no,
            bs.receive_bank_acc_acc,
            bs.receive_bank_acc_name,
            bs.bank_seq_no ,
            bs.remark ,
            bsi.comp_id
        FROM
            bank_statement_item bsi
                LEFT JOIN bank_statement bs ON bs.id = bsi.statet_id
        where
            bsi.del_flag='0'
        and bs.del_flag='0'
        <if test="queryDTO.payBankAccName!=null and queryDTO.payBankAccName != ''">
            and pay_bank_acc_name like  CONCAT('%', #{queryDTO.payBankAccName}, '%')
        </if>
        <if test="queryDTO.receiveBankAccName!=null and queryDTO.receiveBankAccName != ''">
            and receive_bank_acc_name like  CONCAT('%', #{queryDTO.receiveBankAccName}, '%')
        </if>
        order by bsi.create_time desc
    </select>
</mapper>