中国算力平台算力登记系统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
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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
<?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.IdcBuildExtendMapper">
    
    <resultMap type="IdcBuildExtend" id="IdcBuildExtendResult">
        <result property="id"    column="id"    />
        <result property="baseId"    column="base_id"    />
        <result property="dateNode"    column="date_node"    />
        <result property="deliveryScale"    column="delivery_scale"    />
        <result property="deliveryNext"    column="delivery_next"    />
        <result property="deliverySecond"    column="delivery_second"    />
        <result property="electricityPrice"    column="electricity_price"    />
        <result property="netBandwidth"    column="net_bandwidth"    />
        <result property="computationalScale"    column="computational_scale"    />
        <result property="cleanEnergy"    column="clean_energy"    />
        <result property="cleanEnergyType"    column="clean_energy_type"    />
        <result property="formName"    column="form_name"    />
        <result property="formTel"    column="form_tel"    />
        <result property="waterYearDesign"    column="water_year_design"    />
        <result property="sumU"    column="sum_u"    />
        <result property="sort"    column="sort_"    />
        <result property="state"    column="state"    />
        <result property="createTime"    column="create_time"    />
        <result property="createUser"    column="create_user"    />
        <result property="updateTime"    column="update_time"    />
        <result property="updateUser"    column="update_user"    />
        <result property="remark"    column="remark"    />
    </resultMap>
 
    <sql id="selectIdcBuildExtendVo">
        select id, base_id, date_node, delivery_scale, delivery_next, delivery_second, electricity_price, net_bandwidth, computational_scale, clean_energy, clean_energy_type, form_name, form_tel, water_year_design, sum_u, sort_, state, create_time, create_user, update_time, update_user, remark from idc_build_extend
    </sql>
 
    <select id="selectIdcBuildExtendList" parameterType="IdcBuildExtend" resultMap="IdcBuildExtendResult">
        <include refid="selectIdcBuildExtendVo"/>
        <where>  
            <if test="baseId != null "> and base_id = #{baseId}</if>
            <if test="dateNode != null  and dateNode != ''"> and date_node = #{dateNode}</if>
            <if test="deliveryScale != null "> and delivery_scale = #{deliveryScale}</if>
            <if test="deliveryNext != null "> and delivery_next = #{deliveryNext}</if>
            <if test="deliverySecond != null "> and delivery_second = #{deliverySecond}</if>
            <if test="electricityPrice != null "> and electricity_price = #{electricityPrice}</if>
            <if test="netBandwidth != null "> and net_bandwidth = #{netBandwidth}</if>
            <if test="computationalScale != null "> and computational_scale = #{computationalScale}</if>
            <if test="cleanEnergy != null  and cleanEnergy != ''"> and clean_energy = #{cleanEnergy}</if>
            <if test="cleanEnergyType != null  and cleanEnergyType != ''"> and clean_energy_type = #{cleanEnergyType}</if>
            <if test="formName != null  and formName != ''"> and form_name like concat('%', #{formName}, '%')</if>
            <if test="formTel != null  and formTel != ''"> and form_tel = #{formTel}</if>
            <if test="waterYearDesign != null "> and water_year_design = #{waterYearDesign}</if>
            <if test="sumU != null "> and sum_u = #{sumU}</if>
            <if test="sort != null "> and sort_ = #{sort}</if>
            <if test="state != null "> and state = #{state}</if>
            <if test="createUser != null "> and create_user = #{createUser}</if>
            <if test="updateUser != null "> and update_user = #{updateUser}</if>
        </where>
    </select>
    
    <select id="selectIdcBuildExtendById" parameterType="Long" resultMap="IdcBuildExtendResult">
        <include refid="selectIdcBuildExtendVo"/>
        where id = #{id}
    </select>
 
    <insert id="insertIdcBuildExtend" parameterType="IdcBuildExtend" useGeneratedKeys="true" keyProperty="id">
        insert into idc_build_extend
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="baseId != null">base_id,</if>
            <if test="dateNode != null">date_node,</if>
            <if test="deliveryScale != null">delivery_scale,</if>
            <if test="deliveryNext != null">delivery_next,</if>
            <if test="deliverySecond != null">delivery_second,</if>
            <if test="electricityPrice != null">electricity_price,</if>
            <if test="netBandwidth != null">net_bandwidth,</if>
            <if test="computationalScale != null">computational_scale,</if>
            <if test="cleanEnergy != null">clean_energy,</if>
            <if test="cleanEnergyType != null">clean_energy_type,</if>
            <if test="formName != null">form_name,</if>
            <if test="formTel != null">form_tel,</if>
            <if test="waterYearDesign != null">water_year_design,</if>
            <if test="sumU != null">sum_u,</if>
            <if test="sort != null">sort_,</if>
            <if test="state != null">state,</if>
            <if test="createTime != null">create_time,</if>
            <if test="createUser != null">create_user,</if>
            <if test="updateTime != null">update_time,</if>
            <if test="updateUser != null">update_user,</if>
            <if test="remark != null">remark,</if>
         </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="baseId != null">#{baseId},</if>
            <if test="dateNode != null">#{dateNode},</if>
            <if test="deliveryScale != null">#{deliveryScale},</if>
            <if test="deliveryNext != null">#{deliveryNext},</if>
            <if test="deliverySecond != null">#{deliverySecond},</if>
            <if test="electricityPrice != null">#{electricityPrice},</if>
            <if test="netBandwidth != null">#{netBandwidth},</if>
            <if test="computationalScale != null">#{computationalScale},</if>
            <if test="cleanEnergy != null">#{cleanEnergy},</if>
            <if test="cleanEnergyType != null">#{cleanEnergyType},</if>
            <if test="formName != null">#{formName},</if>
            <if test="formTel != null">#{formTel},</if>
            <if test="waterYearDesign != null">#{waterYearDesign},</if>
            <if test="sumU != null">#{sumU},</if>
            <if test="sort != null">#{sort},</if>
            <if test="state != null">#{state},</if>
            <if test="createTime != null">#{createTime},</if>
            <if test="createUser != null">#{createUser},</if>
            <if test="updateTime != null">#{updateTime},</if>
            <if test="updateUser != null">#{updateUser},</if>
            <if test="remark != null">#{remark},</if>
         </trim>
    </insert>
 
    <update id="updateIdcBuildExtend" parameterType="IdcBuildExtend">
        update idc_build_extend
        <trim prefix="SET" suffixOverrides=",">
            <if test="baseId != null">base_id = #{baseId},</if>
            <if test="dateNode != null">date_node = #{dateNode},</if>
            <if test="deliveryScale != null">delivery_scale = #{deliveryScale},</if>
            <if test="deliveryNext != null">delivery_next = #{deliveryNext},</if>
            <if test="deliverySecond != null">delivery_second = #{deliverySecond},</if>
            <if test="electricityPrice != null">electricity_price = #{electricityPrice},</if>
            <if test="netBandwidth != null">net_bandwidth = #{netBandwidth},</if>
            <if test="computationalScale != null">computational_scale = #{computationalScale},</if>
            <if test="cleanEnergy != null">clean_energy = #{cleanEnergy},</if>
            <if test="cleanEnergyType != null">clean_energy_type = #{cleanEnergyType},</if>
            <if test="formName != null">form_name = #{formName},</if>
            <if test="formTel != null">form_tel = #{formTel},</if>
            <if test="waterYearDesign != null">water_year_design = #{waterYearDesign},</if>
            <if test="sumU != null">sum_u = #{sumU},</if>
            <if test="sort != null">sort_ = #{sort},</if>
            <if test="state != null">state = #{state},</if>
            <if test="createTime != null">create_time = #{createTime},</if>
            <if test="createUser != null">create_user = #{createUser},</if>
            <if test="updateTime != null">update_time = #{updateTime},</if>
            <if test="updateUser != null">update_user = #{updateUser},</if>
            <if test="remark != null">remark = #{remark},</if>
        </trim>
        where id = #{id}
    </update>
 
    <delete id="deleteIdcBuildExtendById" parameterType="Long">
        delete from idc_build_extend where id = #{id}
    </delete>
 
    <delete id="deleteIdcBuildExtendByIds" parameterType="String">
        delete from idc_build_extend where id in 
        <foreach item="id" collection="array" open="(" separator="," close=")">
            #{id}
        </foreach>
    </delete>
</mapper>