<?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.IdcUseStorageMapper">
|
|
<resultMap type="IdcUseStorage" id="IdcUseStorageResult">
|
<result property="id" column="id" />
|
<result property="baseId" column="base_id" />
|
<result property="dateNode" column="date_node" />
|
<result property="haveStoragePlatform" column="have_storage_platform" />
|
<result property="storageCapacityAll" column="storage_capacity_all" />
|
<result property="storageCapacitySsd" column="storage_capacity_ssd" />
|
<result property="storageCapacityRate" column="storage_capacity_rate" />
|
<result property="serverStorageNum" column="server_storage_num" />
|
<result property="serverStorageCapacity" column="server_storage_capacity" />
|
<result property="serverStorageSsd" column="server_storage_ssd" />
|
<result property="serverStorageSsdCapacity" column="server_storage_ssd_capacity" />
|
<result property="serverCalculationNum" column="server_calculation_num" />
|
<result property="serverCalculationCapacity" column="server_calculation_capacity" />
|
<result property="serverCalculationSsd" column="server_calculation_ssd" />
|
<result property="serverCalculationSsdCapacity" column="server_calculation_ssd_capacity" />
|
<result property="serverDiskNum" column="server_disk_num" />
|
<result property="serverDiskCapacity" column="server_disk_capacity" />
|
<result property="serverSsdNum" column="server_ssd_num" />
|
<result property="serverSsdCapacity" column="server_ssd_capacity" />
|
<result property="serverExternalNumber" column="server_external_number" />
|
<result property="serverExternalCapacity" column="server_external_capacity" />
|
<result property="serverExternalSsdNumber" column="server_external_ssd_number" />
|
<result property="serverExternalSsdCapacity" column="server_external_ssd_capacity" />
|
<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="selectIdcUseStorageVo">
|
select id, base_id, date_node, have_storage_platform, storage_capacity_all, storage_capacity_ssd, storage_capacity_rate, server_storage_num, server_storage_capacity, server_storage_ssd, server_storage_ssd_capacity, server_calculation_num, server_calculation_capacity, server_calculation_ssd, server_calculation_ssd_capacity, server_disk_num, server_disk_capacity, server_ssd_num, server_ssd_capacity, server_external_number, server_external_capacity, server_external_ssd_number, server_external_ssd_capacity, _sort, create_time, update_time, update_user, create_user, remark from idc_use_storage
|
</sql>
|
|
<select id="selectIdcUseStorageList" parameterType="IdcUseStorage" resultMap="IdcUseStorageResult">
|
<include refid="selectIdcUseStorageVo"/>
|
<where>
|
<if test="baseId != null "> and base_id = #{baseId}</if>
|
<if test="dateNode != null and dateNode != ''"> and date_node = #{dateNode}</if>
|
<if test="haveStoragePlatform != null "> and have_storage_platform = #{haveStoragePlatform}</if>
|
<if test="storageCapacityAll != null and storageCapacityAll != ''"> and storage_capacity_all = #{storageCapacityAll}</if>
|
<if test="storageCapacitySsd != null and storageCapacitySsd != ''"> and storage_capacity_ssd = #{storageCapacitySsd}</if>
|
<if test="storageCapacityRate != null and storageCapacityRate != ''"> and storage_capacity_rate = #{storageCapacityRate}</if>
|
<if test="serverStorageNum != null and serverStorageNum != ''"> and server_storage_num = #{serverStorageNum}</if>
|
<if test="serverStorageCapacity != null and serverStorageCapacity != ''"> and server_storage_capacity = #{serverStorageCapacity}</if>
|
<if test="serverStorageSsd != null and serverStorageSsd != ''"> and server_storage_ssd = #{serverStorageSsd}</if>
|
<if test="serverStorageSsdCapacity != null and serverStorageSsdCapacity != ''"> and server_storage_ssd_capacity = #{serverStorageSsdCapacity}</if>
|
<if test="serverCalculationNum != null and serverCalculationNum != ''"> and server_calculation_num = #{serverCalculationNum}</if>
|
<if test="serverCalculationCapacity != null and serverCalculationCapacity != ''"> and server_calculation_capacity = #{serverCalculationCapacity}</if>
|
<if test="serverCalculationSsd != null and serverCalculationSsd != ''"> and server_calculation_ssd = #{serverCalculationSsd}</if>
|
<if test="serverCalculationSsdCapacity != null and serverCalculationSsdCapacity != ''"> and server_calculation_ssd_capacity = #{serverCalculationSsdCapacity}</if>
|
<if test="serverDiskNum != null and serverDiskNum != ''"> and server_disk_num = #{serverDiskNum}</if>
|
<if test="serverDiskCapacity != null and serverDiskCapacity != ''"> and server_disk_capacity = #{serverDiskCapacity}</if>
|
<if test="serverSsdNum != null and serverSsdNum != ''"> and server_ssd_num = #{serverSsdNum}</if>
|
<if test="serverSsdCapacity != null and serverSsdCapacity != ''"> and server_ssd_capacity = #{serverSsdCapacity}</if>
|
<if test="serverExternalNumber != null and serverExternalNumber != ''"> and server_external_number = #{serverExternalNumber}</if>
|
<if test="serverExternalCapacity != null and serverExternalCapacity != ''"> and server_external_capacity = #{serverExternalCapacity}</if>
|
<if test="serverExternalSsdNumber != null and serverExternalSsdNumber != ''"> and server_external_ssd_number = #{serverExternalSsdNumber}</if>
|
<if test="serverExternalSsdCapacity != null and serverExternalSsdCapacity != ''"> and server_external_ssd_capacity = #{serverExternalSsdCapacity}</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="selectIdcUseStorageById" parameterType="Long" resultMap="IdcUseStorageResult">
|
<include refid="selectIdcUseStorageVo"/>
|
where id = #{id}
|
</select>
|
|
<insert id="insertIdcUseStorage" parameterType="IdcUseStorage" useGeneratedKeys="true" keyProperty="id">
|
insert into idc_use_storage
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="baseId != null">base_id,</if>
|
<if test="dateNode != null and dateNode != ''">date_node,</if>
|
<if test="haveStoragePlatform != null">have_storage_platform,</if>
|
<if test="storageCapacityAll != null">storage_capacity_all,</if>
|
<if test="storageCapacitySsd != null">storage_capacity_ssd,</if>
|
<if test="storageCapacityRate != null">storage_capacity_rate,</if>
|
<if test="serverStorageNum != null">server_storage_num,</if>
|
<if test="serverStorageCapacity != null">server_storage_capacity,</if>
|
<if test="serverStorageSsd != null">server_storage_ssd,</if>
|
<if test="serverStorageSsdCapacity != null">server_storage_ssd_capacity,</if>
|
<if test="serverCalculationNum != null">server_calculation_num,</if>
|
<if test="serverCalculationCapacity != null">server_calculation_capacity,</if>
|
<if test="serverCalculationSsd != null">server_calculation_ssd,</if>
|
<if test="serverCalculationSsdCapacity != null">server_calculation_ssd_capacity,</if>
|
<if test="serverDiskNum != null">server_disk_num,</if>
|
<if test="serverDiskCapacity != null">server_disk_capacity,</if>
|
<if test="serverSsdNum != null">server_ssd_num,</if>
|
<if test="serverSsdCapacity != null">server_ssd_capacity,</if>
|
<if test="serverExternalNumber != null">server_external_number,</if>
|
<if test="serverExternalCapacity != null">server_external_capacity,</if>
|
<if test="serverExternalSsdNumber != null">server_external_ssd_number,</if>
|
<if test="serverExternalSsdCapacity != null">server_external_ssd_capacity,</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="haveStoragePlatform != null">#{haveStoragePlatform},</if>
|
<if test="storageCapacityAll != null">#{storageCapacityAll},</if>
|
<if test="storageCapacitySsd != null">#{storageCapacitySsd},</if>
|
<if test="storageCapacityRate != null">#{storageCapacityRate},</if>
|
<if test="serverStorageNum != null">#{serverStorageNum},</if>
|
<if test="serverStorageCapacity != null">#{serverStorageCapacity},</if>
|
<if test="serverStorageSsd != null">#{serverStorageSsd},</if>
|
<if test="serverStorageSsdCapacity != null">#{serverStorageSsdCapacity},</if>
|
<if test="serverCalculationNum != null">#{serverCalculationNum},</if>
|
<if test="serverCalculationCapacity != null">#{serverCalculationCapacity},</if>
|
<if test="serverCalculationSsd != null">#{serverCalculationSsd},</if>
|
<if test="serverCalculationSsdCapacity != null">#{serverCalculationSsdCapacity},</if>
|
<if test="serverDiskNum != null">#{serverDiskNum},</if>
|
<if test="serverDiskCapacity != null">#{serverDiskCapacity},</if>
|
<if test="serverSsdNum != null">#{serverSsdNum},</if>
|
<if test="serverSsdCapacity != null">#{serverSsdCapacity},</if>
|
<if test="serverExternalNumber != null">#{serverExternalNumber},</if>
|
<if test="serverExternalCapacity != null">#{serverExternalCapacity},</if>
|
<if test="serverExternalSsdNumber != null">#{serverExternalSsdNumber},</if>
|
<if test="serverExternalSsdCapacity != null">#{serverExternalSsdCapacity},</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="updateIdcUseStorage" parameterType="IdcUseStorage">
|
update idc_use_storage
|
<trim prefix="SET" suffixOverrides=",">
|
<if test="baseId != null">base_id = #{baseId},</if>
|
<if test="dateNode != null and dateNode != ''">date_node = #{dateNode},</if>
|
<if test="haveStoragePlatform != null">have_storage_platform = #{haveStoragePlatform},</if>
|
<if test="storageCapacityAll != null">storage_capacity_all = #{storageCapacityAll},</if>
|
<if test="storageCapacitySsd != null">storage_capacity_ssd = #{storageCapacitySsd},</if>
|
<if test="storageCapacityRate != null">storage_capacity_rate = #{storageCapacityRate},</if>
|
<if test="serverStorageNum != null">server_storage_num = #{serverStorageNum},</if>
|
<if test="serverStorageCapacity != null">server_storage_capacity = #{serverStorageCapacity},</if>
|
<if test="serverStorageSsd != null">server_storage_ssd = #{serverStorageSsd},</if>
|
<if test="serverStorageSsdCapacity != null">server_storage_ssd_capacity = #{serverStorageSsdCapacity},</if>
|
<if test="serverCalculationNum != null">server_calculation_num = #{serverCalculationNum},</if>
|
<if test="serverCalculationCapacity != null">server_calculation_capacity = #{serverCalculationCapacity},</if>
|
<if test="serverCalculationSsd != null">server_calculation_ssd = #{serverCalculationSsd},</if>
|
<if test="serverCalculationSsdCapacity != null">server_calculation_ssd_capacity = #{serverCalculationSsdCapacity},</if>
|
<if test="serverDiskNum != null">server_disk_num = #{serverDiskNum},</if>
|
<if test="serverDiskCapacity != null">server_disk_capacity = #{serverDiskCapacity},</if>
|
<if test="serverSsdNum != null">server_ssd_num = #{serverSsdNum},</if>
|
<if test="serverSsdCapacity != null">server_ssd_capacity = #{serverSsdCapacity},</if>
|
<if test="serverExternalNumber != null">server_external_number = #{serverExternalNumber},</if>
|
<if test="serverExternalCapacity != null">server_external_capacity = #{serverExternalCapacity},</if>
|
<if test="serverExternalSsdNumber != null">server_external_ssd_number = #{serverExternalSsdNumber},</if>
|
<if test="serverExternalSsdCapacity != null">server_external_ssd_capacity = #{serverExternalSsdCapacity},</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="deleteIdcUseStorageById" parameterType="Long">
|
delete from idc_use_storage where id = #{id}
|
</delete>
|
|
<delete id="deleteIdcUseStorageByIds" parameterType="String">
|
delete from idc_use_storage where id in
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
#{id}
|
</foreach>
|
</delete>
|
</mapper>
|