From 056dcab91efc64b5f9fc39825f9242e7fa0b9d05 Mon Sep 17 00:00:00 2001 From: luxin Date: Mon, 3 Jul 2017 10:19:19 +0800 Subject: Upload nfvo resmanagement code Change-Id: Ibe023d4b09e1105b84eb43153b4d4037cae691db Signed-off-by: luxin --- .../main/resources/mybatis/mysql/SitesMapper.xml | 286 +++++++++++++++++++++ 1 file changed, 286 insertions(+) create mode 100644 ResmanagementService/service/src/main/resources/mybatis/mysql/SitesMapper.xml (limited to 'ResmanagementService/service/src/main/resources/mybatis/mysql/SitesMapper.xml') diff --git a/ResmanagementService/service/src/main/resources/mybatis/mysql/SitesMapper.xml b/ResmanagementService/service/src/main/resources/mybatis/mysql/SitesMapper.xml new file mode 100644 index 0000000..14f7b52 --- /dev/null +++ b/ResmanagementService/service/src/main/resources/mybatis/mysql/SitesMapper.xml @@ -0,0 +1,286 @@ + + + + + + + + + + + + + + + + + + + + + + ID, NAME, LOCATION, COUNTRY, VIM_ID, VIM_NAME, STATUS, + TOTAL_CPU, + TOTAL_MEMORY, TOTAL_DISK, + USED_CPU, USED_MEMORY, USED_DISK + + + + + delete from site + where ID = + #{id,jdbcType=VARCHAR} + + + insert into site (ID, NAME, LOCATION, + COUNTRY, VIM_ID, + VIM_NAME, STATUS,TOTAL_CPU, TOTAL_MEMORY, TOTAL_DISK, + USED_CPU, + USED_MEMORY, USED_DISK) + values (#{id,jdbcType=VARCHAR}, + #{name,jdbcType=VARCHAR}, + #{location,jdbcType=VARCHAR}, + #{country,jdbcType=VARCHAR}, #{vimId,jdbcType=VARCHAR}, + #{vimName,jdbcType=VARCHAR}, + #{status,jdbcType=VARCHAR}, + #{totalCPU,jdbcType=VARCHAR}, #{totalMemory,jdbcType=VARCHAR}, + #{totalDisk,jdbcType=VARCHAR}, + #{usedCPU,jdbcType=VARCHAR}, + #{usedMemory,jdbcType=VARCHAR}, + #{usedDisk,jdbcType=VARCHAR}) + + + insert into site + + + ID, + + + NAME, + + + LOCATION, + + + COUNTRY, + + + VIM_ID, + + + VIM_NAME, + + + STATUS, + + + TOTAL_CPU, + + + TOTAL_MEMORY, + + + TOTAL_DISK, + + + USED_CPU, + + + USED_MEMORY, + + + USED_DISK, + + + + + #{id,jdbcType=VARCHAR}, + + + #{name,jdbcType=VARCHAR}, + + + #{location,jdbcType=VARCHAR}, + + + #{country,jdbcType=VARCHAR}, + + + #{vimId,jdbcType=VARCHAR}, + + + #{vimName,jdbcType=VARCHAR}, + + + #{status,jdbcType=VARCHAR}, + + + #{totalCPU,jdbcType=VARCHAR}, + + + #{totalMemory,jdbcType=VARCHAR}, + + + #{totalDisk,jdbcType=VARCHAR}, + + + #{usedCPU,jdbcType=VARCHAR}, + + + #{usedMemory,jdbcType=VARCHAR}, + + + #{usedDisk,jdbcType=VARCHAR}, + + + + + update site + + + NAME = #{name,jdbcType=VARCHAR}, + + + LOCATION = #{location,jdbcType=VARCHAR}, + + + COUNTRY = #{country,jdbcType=VARCHAR}, + + + VIM_ID = #{vimId,jdbcType=VARCHAR}, + + + VIM_NAME = #{vimName,jdbcType=VARCHAR}, + + + STATUS = #{status,jdbcType=VARCHAR}, + + + TOTAL_CPU = #{totalCPU,jdbcType=VARCHAR}, + + + TOTAL_MEMORY = #{totalMemory,jdbcType=VARCHAR}, + + + TOTAL_DISK = #{totalDisk,jdbcType=VARCHAR}, + + + USED_CPU = #{usedCPU,jdbcType=VARCHAR}, + + + USED_MEMORY = #{usedMemory,jdbcType=VARCHAR}, + + + USED_DISK = #{usedDisk,jdbcType=VARCHAR}, + + + where ID = #{id,jdbcType=VARCHAR} + + + update site + set NAME = #{name,jdbcType=VARCHAR}, + LOCATION + = #{location,jdbcType=VARCHAR}, + COUNTRY = #{country,jdbcType=VARCHAR}, + VIM_ID = #{vimId,jdbcType=VARCHAR}, + VIM_NAME = + #{vimName,jdbcType=VARCHAR}, + STATUS = #{status,jdbcType=VARCHAR}, + TOTAL_CPU = #{totalCPU,jdbcType=VARCHAR}, + TOTAL_MEMORY = + #{totalMemory,jdbcType=VARCHAR}, + TOTAL_DISK = + #{totalDisk,jdbcType=VARCHAR}, + USED_CPU = #{usedCPU,jdbcType=VARCHAR}, + USED_MEMORY = #{usedMemory,jdbcType=VARCHAR}, + USED_DISK = + #{usedDisk,jdbcType=VARCHAR} + where ID = #{id,jdbcType=VARCHAR} + + + update site + + + ID = #{id,jdbcType=VARCHAR}, + + + NAME = #{name,jdbcType=VARCHAR}, + + + LOCATION = #{location,jdbcType=VARCHAR}, + + + COUNTRY = #{country,jdbcType=VARCHAR}, + + + VIM_NAME = #{vimName,jdbcType=VARCHAR}, + + + STATUS = #{status,jdbcType=VARCHAR}, + + + TOTAL_CPU = #{totalCPU,jdbcType=VARCHAR}, + + + TOTAL_MEMORY = #{totalMemory,jdbcType=VARCHAR}, + + + TOTAL_DISK = #{totalDisk,jdbcType=VARCHAR}, + + + USED_CPU = #{usedCPU,jdbcType=VARCHAR}, + + + USED_MEMORY = #{usedMemory,jdbcType=VARCHAR}, + + + USED_DISK = #{usedDisk,jdbcType=VARCHAR}, + + + where VIM_ID = #{vimId,jdbcType=VARCHAR} + + + \ No newline at end of file -- cgit 1.2.3-korg