燕山石化溯源三维电子沙盘-【后端】-服务
1
13693261870
2023-08-10 e11b25743f224fe44d7747cdd54992f2961c98ab
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
<?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.yssh.mapper.QxshMapper">
    <select id="selectByPage" resultType="com.yssh.entity.xls.XlsReport">
        select *
        from xls_report
        <where>
            1 = 1
            <if test="type != null">
                and type = #{type}
            </if>
            <if test="start != null">
                and create_time >= #{start}
            </if>
            <if test="end != null">
                and end &lt;= #{end}
            </if>
        </where>
        order by id desc
        limit #{limit} offset #{offset}
    </select>
 
    <select id="xlsExists" resultType="java.lang.Integer">
        select count(*)
        from xls_report
        where type = #{type} and name = #{name}
    </select>
 
    <insert id="insert" parameterType="com.yssh.entity.xls.XlsReport">
       insert into xls_report
       (name, type, path, create_time)
       values
       (#{name}, #{type}, #{path}, #{createTime})
    </insert>
</mapper>