yangys
2025-09-22 edecbd9cb1b31ded46b8592634780d999db6b6f0
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
<?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="org.springblade.mdm.machinefile.mapper.FileSendRecordMapper">
    <resultMap id="BaseResultMap" type="org.springblade.mdm.machinefile.entity.FileSendRecord">
        <id column="id" property="id"/>
        <result column="name" property="name"/>
        <result column="status" property="status"/>
        <result column="create_time" property="createTime"/>
        <result column="update_time" property="updateTime"/>
        <result column="is_deleted" property="isDeleted"/>
    </resultMap>
 
    <!--文件记录查询-->
 
    <select id="pageQuery" resultType="org.springblade.mdm.machinefile.vo.FileSendRecordVO">
        select f.id,f.name,f.machine_code,f.file_size,f.oss_name,f.create_time,f.update_time,u.name create_user_name
        from mdm_file_send_record f left join blade_user u on f.create_user=u.id
        <where>
            f.is_deleted=0
 
            <if test="query.name!=null and query.name!=''">
                and f.name like CONCAT('%', #{query.name,jdbcType=VARCHAR},'%')
            </if>
 
            <if test="query.machineCode!=null and query.machineCode!=''">
                and   f.machine_code= #{query.machineCode,jdbcType=VARCHAR}
            </if>
            <if test="query.createTimeBegin!=null">
                and f.create_time &gt;=#{query.createTimeBegin}
            </if>
            <if test="query.createTimeEnd!=null">
                and f.create_time &lt;=#{query.createTimeEnd}
            </if>
            <!--
            <if test="query.deptIds!=null and query.deptIds.size()&gt;0">
                and  m.owner_dept in
                <foreach item="item" collection="query.deptIds" open="(" separator="," close=")">
                    #{item}
                </foreach>
            </if>
            -->
        </where>
        order by f.create_time desc
    </select>
</mapper>