2021与蓝度共同重构项目,服务端
zhanzhiqin
2022-09-16 8567b31b38b222426468d1d677fea9cf915fb90e
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
<?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.sandu.ximon.dao.mapper.PlatformFileMapper">
 
    <resultMap id="BaseResultMap" type="com.sandu.ximon.dao.domain.PlatformFile">
        <id property="fileId" column="file_id" jdbcType="BIGINT"/>
        <result property="fileName" column="file_name" jdbcType="VARCHAR"/>
        <result property="fileUrl" column="file_url" jdbcType="VARCHAR"/>
        <result property="fileSize" column="file_size" jdbcType="BIGINT"/>
        <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
        <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
    </resultMap>
 
    <sql id="Base_Column_List">
        file_id
        ,file_name,file_size,
        create_time,update_time
    </sql>
 
    <select id="fileList" resultType="com.sandu.ximon.dao.bo.PlatformFileListBo">
        SELECT
        *
        FROM
        platform_file t1
        LEFT JOIN platform_file_user t2 ON t1.file_Id = t2.file_Id
        WHERE
        1 =1
        <if test="userId!=null">
            AND
            t2.user_id = #{userId}
        </if>
        <if test="keyword != null and keyword != ''">
            AND (
            t1.file_name LIKE CONCAT('%', #{keyword},'%')
            )
        </if>
    </select>
</mapper>