liusheng
2023-06-14 d6f2f458d9c8156981880c987d861423ce9af146
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
54
<?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.project.mapper.ServiceDocumentfilesMapper">
    
    <resultMap type="ServiceDocumentfiles" id="ServiceDocumentfilesResult">
        <result property="id"    column="id"    />
        <result property="doctype"    column="doctype"    />
        <result property="filename"    column="filename"    />
        <result property="filetype"    column="filetype"    />
        <result property="fileurl"    column="fileurl"    />
        <result property="status"    column="status"    />
        <result property="remark"    column="remark"    />
        <result property="del_flag"    column="del_flag"    />
        <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="provinceno"    column="provinceno"    />
        <result property="provincename"    column="provincename"    />
        <result property="cityno"    column="cityno"    />
        <result property="cityname"    column="cityname"    />
        <result property="townno"    column="townno"    />
        <result property="townname"    column="townname"    />
        <result property="source"    column="source"    />
        <result property="uploadtime"    column="uploadtime"    />
    </resultMap>
 
    <sql id="selectServiceDocumentfilesVo">
        select id, doctype, filename, filetype, fileurl, status, provinceno, provincename, cityno, cityname, townno, townname, source, uploadtime, remark, del_flag, create_by, create_time, update_by, update_time from service_documentfiles
    </sql>
 
    <select id="selectServiceDocumentfilesList" parameterType="ServiceDocumentfiles" resultMap="ServiceDocumentfilesResult">
        <include refid="selectServiceDocumentfilesVo"/>
        <where>
            del_flag = 0
            <if test="doctype != null  and doctype != ''"> and doctype = #{doctype}</if>
            <if test="filename != null  and filename != ''"> and filename like concat('%', #{filename}, '%')</if>
            <if test="filetype != null  and filetype != ''"> and filetype = #{filetype}</if>
            <if test="fileurl != null  and fileurl != ''"> and fileurl = #{fileurl}</if>
            <if test="provinceno != null  and provinceno != ''"> and provinceno = #{provinceno}</if>
            <if test="provincename != null  and provincename != ''"> and provincename = #{provincename}</if>
            <if test="cityno != null  and cityno != ''"> and cityno = #{cityno}</if>
            <if test="cityname != null  and cityname != ''"> and cityname = #{cityname}</if>
            <if test="townno != null  and townno != ''"> and townno = #{townno}</if>
            <if test="townname != null  and townname != ''"> and townname = #{townname}</if>
            <if test="source != null  and source != ''"> and source = #{source}</if>
 
        </where>
        order by doctype, create_time desc
    </select>
 
</mapper>