中国算力平台算力登记系统2.0
yanzhaofeige
3 days ago 9a224d216652ef2d6ff2e0bd01fba69c86a3f277
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
<?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.odcc.cpzidc.bis.mapper.IdcUseTransportMapper">
    
    <resultMap type="IdcUseTransport" id="IdcUseTransportResult">
        <result property="id"    column="id"    />
        <result property="baseId"    column="base_id"    />
        <result property="dateNode"    column="date_node"    />
        <result property="idcBandwidthExport"    column="idc_bandwidth_export"    />
        <result property="idcIbRate"    column="idc_ib_rate"    />
        <result property="idcRoceRate"    column="idc_roce_rate"    />
        <result property="idcOpticalRate"    column="idc_optical_rate"    />
        <result property="Sort"    column="_sort"    />
        <result property="createTime"    column="create_time"    />
        <result property="updateTime"    column="update_time"    />
        <result property="updateUser"    column="update_user"    />
        <result property="createUser"    column="create_user"    />
        <result property="remark"    column="remark"    />
    </resultMap>
 
    <sql id="selectIdcUseTransportVo">
        select id, base_id, date_node, idc_bandwidth_export, idc_ib_rate, idc_roce_rate, idc_optical_rate, _sort, create_time, update_time, update_user, create_user, remark from idc_use_transport
    </sql>
 
    <select id="selectIdcUseTransportList" parameterType="IdcUseTransport" resultMap="IdcUseTransportResult">
        <include refid="selectIdcUseTransportVo"/>
        <where>  
            <if test="baseId != null "> and base_id = #{baseId}</if>
            <if test="dateNode != null  and dateNode != ''"> and date_node = #{dateNode}</if>
            <if test="idcBandwidthExport != null  and idcBandwidthExport != ''"> and idc_bandwidth_export = #{idcBandwidthExport}</if>
            <if test="idcIbRate != null  and idcIbRate != ''"> and idc_ib_rate = #{idcIbRate}</if>
            <if test="idcRoceRate != null  and idcRoceRate != ''"> and idc_roce_rate = #{idcRoceRate}</if>
            <if test="idcOpticalRate != null  and idcOpticalRate != ''"> and idc_optical_rate = #{idcOpticalRate}</if>
            <if test="Sort != null "> and _sort = #{Sort}</if>
            <if test="updateUser != null "> and update_user = #{updateUser}</if>
            <if test="createUser != null "> and create_user = #{createUser}</if>
        </where>
    </select>
    
    <select id="selectIdcUseTransportById" parameterType="Long" resultMap="IdcUseTransportResult">
        <include refid="selectIdcUseTransportVo"/>
        where id = #{id}
    </select>
 
    <insert id="insertIdcUseTransport" parameterType="IdcUseTransport" useGeneratedKeys="true" keyProperty="id">
        insert into idc_use_transport
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="baseId != null">base_id,</if>
            <if test="dateNode != null and dateNode != ''">date_node,</if>
            <if test="idcBandwidthExport != null">idc_bandwidth_export,</if>
            <if test="idcIbRate != null">idc_ib_rate,</if>
            <if test="idcRoceRate != null">idc_roce_rate,</if>
            <if test="idcOpticalRate != null">idc_optical_rate,</if>
            <if test="Sort != null">_sort,</if>
            <if test="createTime != null">create_time,</if>
            <if test="updateTime != null">update_time,</if>
            <if test="updateUser != null">update_user,</if>
            <if test="createUser != null">create_user,</if>
            <if test="remark != null">remark,</if>
         </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="baseId != null">#{baseId},</if>
            <if test="dateNode != null and dateNode != ''">#{dateNode},</if>
            <if test="idcBandwidthExport != null">#{idcBandwidthExport},</if>
            <if test="idcIbRate != null">#{idcIbRate},</if>
            <if test="idcRoceRate != null">#{idcRoceRate},</if>
            <if test="idcOpticalRate != null">#{idcOpticalRate},</if>
            <if test="Sort != null">#{Sort},</if>
            <if test="createTime != null">#{createTime},</if>
            <if test="updateTime != null">#{updateTime},</if>
            <if test="updateUser != null">#{updateUser},</if>
            <if test="createUser != null">#{createUser},</if>
            <if test="remark != null">#{remark},</if>
         </trim>
    </insert>
 
    <update id="updateIdcUseTransport" parameterType="IdcUseTransport">
        update idc_use_transport
        <trim prefix="SET" suffixOverrides=",">
            <if test="baseId != null">base_id = #{baseId},</if>
            <if test="dateNode != null and dateNode != ''">date_node = #{dateNode},</if>
            <if test="idcBandwidthExport != null">idc_bandwidth_export = #{idcBandwidthExport},</if>
            <if test="idcIbRate != null">idc_ib_rate = #{idcIbRate},</if>
            <if test="idcRoceRate != null">idc_roce_rate = #{idcRoceRate},</if>
            <if test="idcOpticalRate != null">idc_optical_rate = #{idcOpticalRate},</if>
            <if test="Sort != null">_sort = #{Sort},</if>
            <if test="createTime != null">create_time = #{createTime},</if>
            <if test="updateTime != null">update_time = #{updateTime},</if>
            <if test="updateUser != null">update_user = #{updateUser},</if>
            <if test="createUser != null">create_user = #{createUser},</if>
            <if test="remark != null">remark = #{remark},</if>
        </trim>
        where id = #{id}
    </update>
 
    <delete id="deleteIdcUseTransportById" parameterType="Long">
        delete from idc_use_transport where id = #{id}
    </delete>
 
    <delete id="deleteIdcUseTransportByIds" parameterType="String">
        delete from idc_use_transport where id in 
        <foreach item="id" collection="array" open="(" separator="," close=")">
            #{id}
        </foreach>
    </delete>
</mapper>