yangys
2025-06-16 22d0e9a68cd2f8a129742618e54d66cba7d7114f
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
<?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.machineback.mapper.MachineBackFileMapper">
 
    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="org.springblade.mdm.machineback.entity.MachineBackFile">
        <id column="id" property="id"/>
        <result column="filename" property="filename"/>
        <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.machineback.vo.MachineBackFileVO">
        select f.id,f.filename,f.create_time,m.code machineCode,m.name machineName
        from mdm_machine_back_file f join mdm_machine m on f.machine_code=m.code
        <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.filename like CONCAT('%', #{query.keyword,jdbcType=VARCHAR},'%')
                )
        </if>
    </select>
 
 
    <!--    <select id="parentTree" resultMap="treeNodeResultMap">-->
<!--        select id, parent_id, dict_value as title, id as "value", id as "key" from blade_dict where is_deleted = 0 and parent_id = 0-->
<!--    </select>-->
 
</mapper>