2024-12-18 08:55:48 +08:00
|
|
|
<?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.electromagnetic.industry.software.manage.mapper.EdFileInfoMapper">
|
|
|
|
|
|
2025-02-20 15:22:35 +08:00
|
|
|
<resultMap id="FileInfoResultMap" type="com.electromagnetic.industry.software.manage.pojo.other.FileInfoVO">
|
|
|
|
|
<id column="id" property="id"/>
|
|
|
|
|
<result column="file_id" property="fileId"/>
|
|
|
|
|
<result column="file_type" property="fileType"/>
|
|
|
|
|
<result column="file_name" property="fileName"/>
|
|
|
|
|
<result column="file_note" property="fileNote"/>
|
|
|
|
|
<result column="file_version" property="fileVersion"/>
|
|
|
|
|
<result column="parent_id" property="parentId"/>
|
2025-02-24 17:17:14 +08:00
|
|
|
<result column="category_id" property="categoryId"/>
|
2025-02-20 15:22:35 +08:00
|
|
|
<result column="data_type" property="dataType"/>
|
|
|
|
|
<result column="data_status" property="dataStatus"/>
|
|
|
|
|
<result column="save_status" property="saveStatus"/>
|
|
|
|
|
<result column="file_size" property="fileSize"/>
|
|
|
|
|
<result column="file_size_show" property="fileSizeShow"/>
|
|
|
|
|
<result column="updated_time" property="updatedTime" jdbcType="TIMESTAMP"/>
|
|
|
|
|
<result column="created_time" property="createdTime" jdbcType="TIMESTAMP"/>
|
|
|
|
|
<result column="file_code" property="fileCode"/>
|
|
|
|
|
<result column="created_by" property="createdBy"/>
|
|
|
|
|
</resultMap>
|
|
|
|
|
|
2024-12-18 08:55:48 +08:00
|
|
|
<select id="maxPrjId" resultType="java.lang.String">
|
2024-12-18 17:53:43 +08:00
|
|
|
select max(id)
|
|
|
|
|
from ed_file_info
|
2025-01-07 16:18:30 +08:00
|
|
|
where prj_dir = true
|
2024-12-18 08:55:48 +08:00
|
|
|
</select>
|
2025-02-20 15:22:35 +08:00
|
|
|
|
|
|
|
|
<select id="queryFileList" resultMap="FileInfoResultMap" >
|
2025-02-24 17:17:14 +08:00
|
|
|
SELECT *, LEFT(file_code, 6 ) as category_id
|
2025-02-20 15:22:35 +08:00
|
|
|
FROM ed_file_info
|
|
|
|
|
<where>
|
|
|
|
|
|
|
|
|
|
<if test="ids != null and ids.size() > 0">
|
|
|
|
|
AND id IN
|
|
|
|
|
<foreach collection="ids" item="id" open="(" separator="," close=")">
|
|
|
|
|
#{id}
|
|
|
|
|
</foreach>
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
|
|
<if test="pars.dataStatus != null">
|
|
|
|
|
AND data_status = #{pars.dataStatus}
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
|
|
<if test="pars.fileType != null and pars.fileType != ''">
|
|
|
|
|
AND file_type = #{pars.fileType}
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
|
|
AND save_status = #{saveStatus}
|
|
|
|
|
AND effect_flag = #{effectFlag}
|
|
|
|
|
</where>
|
|
|
|
|
|
|
|
|
|
<choose>
|
|
|
|
|
<when test="pars.fileNameSort == 0">
|
|
|
|
|
ORDER BY file_name ASC
|
|
|
|
|
</when>
|
|
|
|
|
|
|
|
|
|
<when test="pars.fileNameSort == 1">
|
|
|
|
|
ORDER BY file_name DESC
|
|
|
|
|
</when>
|
|
|
|
|
|
|
|
|
|
<when test="pars.fileTypeSort == 0">
|
|
|
|
|
ORDER BY file_type ASC
|
|
|
|
|
</when>
|
|
|
|
|
<when test="pars.fileTypeSort == 1">
|
|
|
|
|
ORDER BY file_type DESC
|
|
|
|
|
</when>
|
|
|
|
|
<when test="pars.createdTime == 0">
|
|
|
|
|
ORDER BY created_time ASC
|
|
|
|
|
</when>
|
|
|
|
|
<when test="pars.createdTime == 1">
|
|
|
|
|
ORDER BY created_time DESC
|
|
|
|
|
</when>
|
|
|
|
|
<when test="pars.versionSort == 0">
|
|
|
|
|
ORDER BY file_version ASC
|
|
|
|
|
</when>
|
|
|
|
|
<when test="pars.versionSort == 1">
|
|
|
|
|
ORDER BY file_version DESC
|
|
|
|
|
</when>
|
2025-02-20 17:01:42 +08:00
|
|
|
<when test="pars.fileSizeSort == 0">
|
2025-02-20 15:22:35 +08:00
|
|
|
ORDER BY file_size ASC
|
|
|
|
|
</when>
|
2025-02-20 17:01:42 +08:00
|
|
|
<when test="pars.fileSizeSort == 1">
|
2025-02-20 15:22:35 +08:00
|
|
|
ORDER BY file_size DESC
|
|
|
|
|
</when>
|
|
|
|
|
<otherwise>
|
|
|
|
|
ORDER BY created_time DESC
|
|
|
|
|
</otherwise>
|
|
|
|
|
</choose>
|
|
|
|
|
</select>
|
|
|
|
|
|
2024-12-18 08:55:48 +08:00
|
|
|
</mapper>
|