zhaowenyu
2026-03-07 d7fef91a4cbb702988dc820bcde82c166253ceec
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
<?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.ard.inspection.mapper.ArdPointCloudMapper">
    
    <resultMap type="ArdPointCloud" id="ArdPointCloudResult">
        <result property="id"    column="id"    />
        <result property="cloudName"    column="cloud_name"    />
        <result property="fileName"    column="file_name"    />
        <result property="folderName"    column="folder_name"    />
        <result property="fileSize"    column="file_size"    />
        <result property="associatedState"    column="associated_state"    />
        <result property="routeId"    column="route_id"    />
        <result property="groupId"    column="group_id"    />
        <result property="createBy"    column="create_by"    />
        <result property="createTime"    column="create_time"    />
        <result property="updateBy"    column="update_by"    />
        <result property="updateTime"    column="update_time"    />
        <result property="filePath"    column="file_path"    />
    </resultMap>
 
    <sql id="selectArdPointCloudVo">
        select id,
               cloud_name,
               file_name,
               folder_name,
               file_size,
               associated_state,
               route_id,
               group_id,
               create_by,
               create_time,
               update_by,
               update_time,
               file_path
        from ard_point_cloud
    </sql>
 
    <select id="selectArdPointCloudList" parameterType="ArdPointCloud" resultMap="ArdPointCloudResult">
        <include refid="selectArdPointCloudVo"/>
        <where>
            <if test="cloudName != null  and cloudName != ''"> and cloud_name like concat('%', #{cloudName}, '%')</if>
            <if test="fileName != null  and fileName != ''"> and file_name like concat('%', #{fileName}, '%')</if>
            <if test="fileSize != null "> and file_size = #{fileSize}</if>
            <if test="associatedState != null  and associatedState != ''"> and associated_state = #{associatedState}</if>
            <if test="routeId != null  and routeId != ''"> and route_id = #{routeId}</if>
            <if test="groupId != null  and groupId != ''"> and group_id = #{groupId}</if>
            <if test="createBy != null  and createBy != ''"> and create_by = #{createBy}</if>
            <if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
                and date_format(create_time,'%Y%m%d') &gt;= date_format(#{params.beginTime},'%Y%m%d')
            </if>
            <if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
                and date_format(create_time,'%Y%m%d') &lt;= date_format(#{params.endTime},'%Y%m%d')
            </if>
        </where>
    </select>
    
    <select id="selectArdPointCloudById" parameterType="String" resultMap="ArdPointCloudResult">
        <include refid="selectArdPointCloudVo"/>
        where id = #{id}
    </select>
 
    <insert id="insertArdPointCloud" parameterType="ArdPointCloud">
        insert into ard_point_cloud
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="id != null">id,</if>
            <if test="cloudName != null">cloud_name,</if>
            <if test="fileName != null">file_name,</if>
            <if test="folderName != null">folder_name,</if>
            <if test="fileSize != null">file_size,</if>
            <if test="associatedState != null">associated_state,</if>
            <if test="routeId != null">route_id,</if>
            <if test="groupId != null">group_id,</if>
            <if test="createBy != null">create_by,</if>
            <if test="createTime != null">create_time,</if>
            <if test="updateBy != null">update_by,</if>
            <if test="updateTime != null">update_time,</if>
            <if test="filePath != null">file_path,</if>
         </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="id != null">#{id},</if>
            <if test="cloudName != null">#{cloudName},</if>
            <if test="fileName != null">#{fileName},</if>
            <if test="folderName != null">#{folderName},</if>
            <if test="fileSize != null">#{fileSize},</if>
            <if test="associatedState != null">#{associatedState},</if>
            <if test="routeId != null">#{routeId},</if>
            <if test="groupId != null">#{groupId},</if>
            <if test="createBy != null">#{createBy},</if>
            <if test="createTime != null">#{createTime},</if>
            <if test="updateBy != null">#{updateBy},</if>
            <if test="updateTime != null">#{updateTime},</if>
            <if test="filePath != null">#{filePath},</if>
         </trim>
    </insert>
 
    <update id="updateArdPointCloud" parameterType="ArdPointCloud">
        update ard_point_cloud
        <trim prefix="SET" suffixOverrides=",">
            <if test="cloudName != null">cloud_name = #{cloudName},</if>
            <if test="fileName != null">file_name = #{fileName},</if>
            <if test="folderName != null">folder_name = #{folderName},</if>
            <if test="fileSize != null">file_size = #{fileSize},</if>
            <if test="associatedState != null">associated_state = #{associatedState},</if>
            <if test="routeId != null">route_id = #{routeId},</if>
            <if test="groupId != null">group_id = #{groupId},</if>
            <if test="createBy != null">create_by = #{createBy},</if>
            <if test="createTime != null">create_time = #{createTime},</if>
            <if test="updateBy != null">update_by = #{updateBy},</if>
            <if test="updateTime != null">update_time = #{updateTime},</if>
            <if test="filePath != null">file_path = #{filePath},</if>
        </trim>
        where id = #{id}
    </update>
 
    <delete id="deleteArdPointCloudById" parameterType="String">
        delete from ard_point_cloud where id = #{id}
    </delete>
 
    <delete id="deleteArdPointCloudByIds" parameterType="String">
        delete from ard_point_cloud where id in 
        <foreach item="id" collection="array" open="(" separator="," close=")">
            #{id}
        </foreach>
    </delete>
 
    <select id="selectArdPointCloudByFileName" parameterType="String" resultMap="ArdPointCloudResult">
        <include refid="selectArdPointCloudVo"/>
        where file_name = #{fileName}
    </select>
 
</mapper>