zhaowenyu
2025-10-15 a9780c49f8cf587af26cc83d439320ad02b8668f
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
<?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.system.data.mapper.ArdMapManagementMapper">
    
    <resultMap type="ArdMapManagement" id="ArdMapManagementResult">
        <result property="id"    column="id"    />
        <result property="mapName"    column="map_name"    />
        <result property="mapType"    column="map_type"    />
        <result property="fileName"    column="file_name"    />
        <result property="releaseStatus"    column="release_status"    />
        <result property="defaultLoading"    column="default_loading"    />
        <result property="mapPath"    column="map_path"    />
    </resultMap>
 
    <sql id="selectArdMapManagementVo">
        select id,
               map_name,
               map_type,
               file_name,
               release_status,
               default_loading,
               map_path
        from ard_map_management
    </sql>
 
    <select id="selectArdMapManagementList" parameterType="ArdMapManagement" resultMap="ArdMapManagementResult">
        <include refid="selectArdMapManagementVo"/>
        <where>  
            <if test="mapName != null  and mapName != ''"> and map_name like concat('%', #{mapName}, '%')</if>
            <if test="mapType != null  and mapType != ''"> and map_type = #{mapType}</if>
            <if test="fileName != null  and fileName != ''"> and file_name like concat('%', #{fileName}, '%')</if>
            <if test="releaseStatus != null  and releaseStatus != ''"> and release_status = #{releaseStatus}</if>
        </where>
    </select>
    
    <select id="selectArdMapManagementById" parameterType="String" resultMap="ArdMapManagementResult">
        <include refid="selectArdMapManagementVo"/>
        where id = #{id}
    </select>
 
    <insert id="insertArdMapManagement" parameterType="ArdMapManagement">
        insert into ard_map_management
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="id != null">id,</if>
            <if test="mapName != null">map_name,</if>
            <if test="mapType != null">map_type,</if>
            <if test="fileName != null">file_name,</if>
            <if test="releaseStatus != null">release_status,</if>
            <if test="defaultLoading != null">default_loading,</if>
            <if test="mapPath != null">map_path,</if>
         </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="id != null">#{id},</if>
            <if test="mapName != null">#{mapName},</if>
            <if test="mapType != null">#{mapType},</if>
            <if test="fileName != null">#{fileName},</if>
            <if test="releaseStatus != null">#{releaseStatus},</if>
            <if test="defaultLoading != null">#{defaultLoading},</if>
            <if test="mapPath != null">#{mapPath},</if>
         </trim>
    </insert>
 
    <update id="updateArdMapManagement" parameterType="ArdMapManagement">
        update ard_map_management
        <trim prefix="SET" suffixOverrides=",">
            <if test="mapName != null">map_name = #{mapName},</if>
            <if test="mapType != null">map_type = #{mapType},</if>
            <if test="fileName != null">file_name = #{fileName},</if>
            <if test="releaseStatus != null">release_status = #{releaseStatus},</if>
            <if test="defaultLoading != null">default_loading = #{defaultLoading},</if>
            <if test="mapPath != null">map_path = #{mapPath},</if>
        </trim>
        where id = #{id}
    </update>
 
    <delete id="deleteArdMapManagementById" parameterType="String">
        delete from ard_map_management where id = #{id}
    </delete>
 
    <delete id="deleteArdMapManagementByIds" parameterType="String">
        delete from ard_map_management where id in 
        <foreach item="id" collection="array" open="(" separator="," close=")">
            #{id}
        </foreach>
    </delete>
</mapper>