邱宇豪
2023-10-26 a12423474cd5384898fb91dba49dea23931f7b9a
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
<?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.thhy.engineering.modules.biz.moldquality.mapper.MoldQualityFileMapper">
 
 
    <!--查询列表-->
    <select id="findFileList" resultType="com.thhy.engineering.modules.biz.moldquality.entity.MoldQualityFileEntity">
        SELECT
            t.id,
            t.moldQualityId,
            t.fileName,
            t.fileUrl,
            t.createTime
        from t_mold_quality_file t
        where 1=1
        <if test="moldQualityId != null and moldQualityId !=''">
            and t.moldQualityId = #{moldQualityId}
        </if>
    </select>
 
    <!--插入操作-->
    <insert id="insertList" parameterType="java.util.List">
        INSERT INTO t_mold_quality_file ( moldQualityId,fileName, fileUrl )
        VALUES
        <foreach collection = "list" item = "item" separator=",">
            ( #{item.moldQualityId},#{item.fileName},#{item.fileUrl} )
        </foreach>
    </insert>
 
 
 
    <!--根据ID删除-->
    <delete id="delete">
        delete from t_mold_quality_file
        where moldQualityId=#{moldQualityId}
    </delete>
 
</mapper>