yangys
2025-08-24 c9433fab340a766a99b2c01ca018609cac407cee
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
<?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.gkw.programnode.mapper.MachineFileMapper">
    <resultMap id="BaseResultMap" type="org.springblade.mdm.gkw.programnode.entity.MachineFile">
        <id column="id" property="id"/>
        <result column="name" property="name"/>
        <result column="node_type" property="dirType"/>
        <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="machineBackFilePageQuery" resultType="org.springblade.mdm.machineback.vo.MachineBackFileVO">
        select f.id,f.name,f.machine_code,f.file_create_time arrived_time,f.md5,f.file_size
        from mdm_machine_file f join mdm_machine m on f.machine_code=m.code and m.is_deleted=0
        <where>
            f.dir_type='TEMP' and f.status=1 and f.is_deleted=0
 
            <if test="query.machineSpec!=null and query.machineSpec!=''">
                and m.machine_spec=#{query.machineSpec,jdbcType=VARCHAR}
            </if>
            <if test="query.keyword!=null and query.keyword!=''">
                and (
                    m.code like CONCAT('%', #{query.keyword,jdbcType=VARCHAR},'%') or m.name like CONCAT('%', #{query.keyword,jdbcType=VARCHAR},'%')
                or f.name like CONCAT('%', #{query.keyword,jdbcType=VARCHAR},'%')
                )
            </if>
        </where>
    </select>
    <select id="handlePageQuery" resultType="org.springblade.mdm.machineback.vo.MachineBackFileVO">
        select f.id,f.name,f.machine_code,f.file_create_time arrived_time,f.md5,f.file_size,f.determine_time
        from mdm_machine_file f join mdm_machine m on f.machine_code=m.code and m.is_deleted=0
        <where>
            f.dir_type='TEMP' and f.status=2 and f.is_deleted=0
 
            <if test="query.confirmTimeBegin!=null">
                and f.determine_time&gt;=#{query.confirmTimeBegin}
            </if>
            <if test="query.confirmTimeEnd!=null">
                and f.determine_time&lt;=#{query.confirmTimeEnd}
            </if>
        </where>
    </select>
 
 
</mapper>