陶杰
2024-10-28 021496babb52a859294a8475ffef330009b0167c
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
<?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.mzl.flower.mapper.wallet.WalletBillRecordMapper">
 
    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.mzl.flower.entity.wallet.WalletBillRecordDO">
        <id column="id" property="id" />
        <result column="create_by" property="createBy" />
        <result column="create_time" property="createTime" />
        <result column="update_by" property="updateBy" />
        <result column="update_time" property="updateTime" />
        <result column="deleted" property="deleted" />
        <result column="supplier_id" property="supplierId" />
        <result column="wallet_id" property="walletId" />
        <result column="type" property="type" />
        <result column="type_detail" property="typeDetail" />
        <result column="transfer_id" property="transferId" />
        <result column="method" property="method" />
        <result column="original_amount" property="originalAmount" />
        <result column="change_amount" property="changeAmount" />
        <result column="balance" property="balance" />
        <result column="transfer_detail_id" property="transferDetailId" />
        <result column="open_id" property="openId" />
    </resultMap>
    <select id="getPage" resultType="com.mzl.flower.dto.response.wallet.WalletBillRecordVO">
        select *
        from t_wallet_bill_record wbr
        where wbr.DELETED=0
        <if test="dto.supplierId != null and dto.supplierId != ''">
            and wbr.supplier_id= #{dto.supplierId}
        </if>
        <if test="dto.startDate != null">
            and DATE_FORMAT(wbr.create_time, '%Y-%m-%d') &gt;= #{dto.startDate}
        </if>
        <if test="dto.endDate != null">
            and DATE_FORMAT(wbr.create_time, '%Y-%m-%d') &lt;= #{dto.endDate}
        </if>
 
    </select>
 
</mapper>