zmc
2023-08-15 d95f78488e734c1defcad4af8b7e79c712937111
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"
        "https://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.job.zsc.mapper.SqlMapper">
 
    <select id="list" resultType="com.job.zsc.pojo.OriginalData">
        select * from ed_data
        <where>
            <if test="shopname != null and shopname != '' ">
                shopname like concat('%',#{shopname},'%')
            </if>
 
            <if test="begin != null and end != null">
                and reportingTime between #{begin} and #{end}
            </if>
        </where>
        <!--    order by update_time desc-->
    </select>
 
 
 
    <select id="findByForm" resultType="com.job.zsc.pojo.OriginalData">
        select * from ed_data
        <where>
            <if test="name != null and name != '' ">
                shop_name like concat('%',#{name},'%')
            </if>
            <if test="number != null">
                and equipment_number = #{number}
            </if>
            <if test="dname != null">
                and equipment_name = #{dname}
            </if>
            <if test="begin != null and end != null">
                and reporting_time between #{begin} and #{end}
            </if>
        </where>
    </select>
 
</mapper>