<?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="fileLiet" 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>
|