中国算力平台算力登记系统2.0
yanzhaofeige
3 days ago 9a224d216652ef2d6ff2e0bd01fba69c86a3f277
commit | author | age
5cc82f 1 <?xml version="1.0" encoding="UTF-8" ?>
Y 2 <!DOCTYPE mapper
3 PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
4 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
5 <mapper namespace="com.odcc.cpzidc.bis.mapper.IdcUseTransportMapper">
6     
7     <resultMap type="IdcUseTransport" id="IdcUseTransportResult">
8         <result property="id"    column="id"    />
9         <result property="baseId"    column="base_id"    />
10         <result property="dateNode"    column="date_node"    />
11         <result property="idcBandwidthExport"    column="idc_bandwidth_export"    />
12         <result property="idcIbRate"    column="idc_ib_rate"    />
13         <result property="idcRoceRate"    column="idc_roce_rate"    />
14         <result property="idcOpticalRate"    column="idc_optical_rate"    />
15         <result property="Sort"    column="_sort"    />
16         <result property="createTime"    column="create_time"    />
17         <result property="updateTime"    column="update_time"    />
18         <result property="updateUser"    column="update_user"    />
19         <result property="createUser"    column="create_user"    />
20         <result property="remark"    column="remark"    />
21     </resultMap>
22
23     <sql id="selectIdcUseTransportVo">
24         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
25     </sql>
26
27     <select id="selectIdcUseTransportList" parameterType="IdcUseTransport" resultMap="IdcUseTransportResult">
28         <include refid="selectIdcUseTransportVo"/>
29         <where>  
30             <if test="baseId != null "> and base_id = #{baseId}</if>
31             <if test="dateNode != null  and dateNode != ''"> and date_node = #{dateNode}</if>
32             <if test="idcBandwidthExport != null  and idcBandwidthExport != ''"> and idc_bandwidth_export = #{idcBandwidthExport}</if>
33             <if test="idcIbRate != null  and idcIbRate != ''"> and idc_ib_rate = #{idcIbRate}</if>
34             <if test="idcRoceRate != null  and idcRoceRate != ''"> and idc_roce_rate = #{idcRoceRate}</if>
35             <if test="idcOpticalRate != null  and idcOpticalRate != ''"> and idc_optical_rate = #{idcOpticalRate}</if>
36             <if test="Sort != null "> and _sort = #{Sort}</if>
37             <if test="updateUser != null "> and update_user = #{updateUser}</if>
38             <if test="createUser != null "> and create_user = #{createUser}</if>
39         </where>
40     </select>
41     
42     <select id="selectIdcUseTransportById" parameterType="Long" resultMap="IdcUseTransportResult">
43         <include refid="selectIdcUseTransportVo"/>
44         where id = #{id}
45     </select>
46
47     <insert id="insertIdcUseTransport" parameterType="IdcUseTransport" useGeneratedKeys="true" keyProperty="id">
48         insert into idc_use_transport
49         <trim prefix="(" suffix=")" suffixOverrides=",">
50             <if test="baseId != null">base_id,</if>
51             <if test="dateNode != null and dateNode != ''">date_node,</if>
52             <if test="idcBandwidthExport != null">idc_bandwidth_export,</if>
53             <if test="idcIbRate != null">idc_ib_rate,</if>
54             <if test="idcRoceRate != null">idc_roce_rate,</if>
55             <if test="idcOpticalRate != null">idc_optical_rate,</if>
56             <if test="Sort != null">_sort,</if>
57             <if test="createTime != null">create_time,</if>
58             <if test="updateTime != null">update_time,</if>
59             <if test="updateUser != null">update_user,</if>
60             <if test="createUser != null">create_user,</if>
61             <if test="remark != null">remark,</if>
62          </trim>
63         <trim prefix="values (" suffix=")" suffixOverrides=",">
64             <if test="baseId != null">#{baseId},</if>
65             <if test="dateNode != null and dateNode != ''">#{dateNode},</if>
66             <if test="idcBandwidthExport != null">#{idcBandwidthExport},</if>
67             <if test="idcIbRate != null">#{idcIbRate},</if>
68             <if test="idcRoceRate != null">#{idcRoceRate},</if>
69             <if test="idcOpticalRate != null">#{idcOpticalRate},</if>
70             <if test="Sort != null">#{Sort},</if>
71             <if test="createTime != null">#{createTime},</if>
72             <if test="updateTime != null">#{updateTime},</if>
73             <if test="updateUser != null">#{updateUser},</if>
74             <if test="createUser != null">#{createUser},</if>
75             <if test="remark != null">#{remark},</if>
76          </trim>
77     </insert>
78
79     <update id="updateIdcUseTransport" parameterType="IdcUseTransport">
80         update idc_use_transport
81         <trim prefix="SET" suffixOverrides=",">
82             <if test="baseId != null">base_id = #{baseId},</if>
83             <if test="dateNode != null and dateNode != ''">date_node = #{dateNode},</if>
84             <if test="idcBandwidthExport != null">idc_bandwidth_export = #{idcBandwidthExport},</if>
85             <if test="idcIbRate != null">idc_ib_rate = #{idcIbRate},</if>
86             <if test="idcRoceRate != null">idc_roce_rate = #{idcRoceRate},</if>
87             <if test="idcOpticalRate != null">idc_optical_rate = #{idcOpticalRate},</if>
88             <if test="Sort != null">_sort = #{Sort},</if>
89             <if test="createTime != null">create_time = #{createTime},</if>
90             <if test="updateTime != null">update_time = #{updateTime},</if>
91             <if test="updateUser != null">update_user = #{updateUser},</if>
92             <if test="createUser != null">create_user = #{createUser},</if>
93             <if test="remark != null">remark = #{remark},</if>
94         </trim>
95         where id = #{id}
96     </update>
97
98     <delete id="deleteIdcUseTransportById" parameterType="Long">
99         delete from idc_use_transport where id = #{id}
100     </delete>
101
102     <delete id="deleteIdcUseTransportByIds" parameterType="String">
103         delete from idc_use_transport where id in 
104         <foreach item="id" collection="array" open="(" separator="," close=")">
105             #{id}
106         </foreach>
107     </delete>
108 </mapper>