liujie
2 天以前 67d06a785d5fc4524639ace27651c01ff05a4b58
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
<?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.ruoyi.other.mapper.TInvoiceTypeMapper">
 
    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.ruoyi.other.api.domain.TInvoiceType">
        <id column="id" property="id" />
        <result column="name" property="name" />
        <result column="invoicing_company" property="invoicingCompany" />
        <result column="invoicing_method" property="invoicingMethod" />
        <result column="electricity_tariff" property="electricityTariff" />
        <result column="service_tariff" property="serviceTariff" />
        <result column="added_service_tariff" property="addedServiceTariff" />
        <result column="del_flag" property="delFlag" />
        <result column="create_time" property="createTime" />
    </resultMap>
 
    <!-- 通用查询结果列 -->
    <sql id="Base_Column_List">
        id, name, invoicing_company, invoicing_method, electricity_tariff, service_tariff, added_service_tariff, del_flag, create_time
    </sql>
 
    
    <select id="pageList" resultMap="BaseResultMap">
        select * from t_invoice_type where del_flag = 0
        <if test="null != req.name and '' != req.name">
            and name like CONCAT('%', #{req.name}, '%')
        </if>
        <if test="null != req.company and '' != req.company">
            and invoicing_company like CONCAT('%', #{req.company}, '%')
        </if>
        <if test="null != req.method">
            and invoicing_method = #{req.method}
        </if>
        order by create_time desc
    </select>
</mapper>