From 4d7b0ce7d8a10b6587f44a5000f13a40cb201012 Mon Sep 17 00:00:00 2001 From: luxin Date: Mon, 4 Sep 2017 14:21:02 +0800 Subject: Modify field name Modify vfc resmanagement field name and add ns url Change-Id: I6510ea8fc80dc8cbfe29400ea0d5b12d4043f723 Issue-Id:VFC-216 Signed-off-by: luxin --- .../resmanagement/common/constant/UrlConstant.java | 5 +++++ .../adapter/impl/ResmgrAdapterMgrService.java | 2 -- .../resmanagement/service/entity/NsEntity.java | 14 ++++++------- .../service/mapper/NsEntityMapper.java | 8 ++++++++ .../resources/mybatis/mysql/NsEntityMapper.xml | 24 +++++++++++----------- 5 files changed, 32 insertions(+), 21 deletions(-) (limited to 'ResmanagementService/service/src') diff --git a/ResmanagementService/service/src/main/java/org/onap/vfc/nfvo/resmanagement/common/constant/UrlConstant.java b/ResmanagementService/service/src/main/java/org/onap/vfc/nfvo/resmanagement/common/constant/UrlConstant.java index 1aa50c1..3abb3c4 100644 --- a/ResmanagementService/service/src/main/java/org/onap/vfc/nfvo/resmanagement/common/constant/UrlConstant.java +++ b/ResmanagementService/service/src/main/java/org/onap/vfc/nfvo/resmanagement/common/constant/UrlConstant.java @@ -71,6 +71,11 @@ public class UrlConstant { */ public static final String VNF_URL = "/v1/vnf"; + /** + * ns url + */ + public static final String NS_URL = "/v1/ns"; + /** * vnfinfo url. */ diff --git a/ResmanagementService/service/src/main/java/org/onap/vfc/nfvo/resmanagement/service/adapter/impl/ResmgrAdapterMgrService.java b/ResmanagementService/service/src/main/java/org/onap/vfc/nfvo/resmanagement/service/adapter/impl/ResmgrAdapterMgrService.java index f403aa0..a8256f1 100644 --- a/ResmanagementService/service/src/main/java/org/onap/vfc/nfvo/resmanagement/service/adapter/impl/ResmgrAdapterMgrService.java +++ b/ResmanagementService/service/src/main/java/org/onap/vfc/nfvo/resmanagement/service/adapter/impl/ResmgrAdapterMgrService.java @@ -34,7 +34,6 @@ import org.onap.vfc.nfvo.resmanagement.service.adapter.inf.IResmgrAdapterMgrServ import org.openo.baseservice.util.impl.SystemEnvVariablesFactory; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.springframework.stereotype.Service; import net.sf.json.JSONObject; @@ -46,7 +45,6 @@ import net.sf.json.JSONObject; * @author * @version NFVO 0.5 Sep 22, 2016 */ -@Service public class ResmgrAdapterMgrService implements IResmgrAdapterMgrService { private static final Logger LOG = LoggerFactory.getLogger(ResmgrAdapterMgrService.class); diff --git a/ResmanagementService/service/src/main/java/org/onap/vfc/nfvo/resmanagement/service/entity/NsEntity.java b/ResmanagementService/service/src/main/java/org/onap/vfc/nfvo/resmanagement/service/entity/NsEntity.java index a413134..adc61c7 100644 --- a/ResmanagementService/service/src/main/java/org/onap/vfc/nfvo/resmanagement/service/entity/NsEntity.java +++ b/ResmanagementService/service/src/main/java/org/onap/vfc/nfvo/resmanagement/service/entity/NsEntity.java @@ -49,7 +49,7 @@ public class NsEntity implements Serializable { private String status; /** */ - private String cteateTime; + private String createTime; /** */ private String lastUpdate; @@ -96,12 +96,12 @@ public class NsEntity implements Serializable { this.status = status; } - public String getCteateTime() { - return cteateTime; + public String getCreateTime() { + return createTime; } - public void setCteateTime(String cteateTime) { - this.cteateTime = cteateTime; + public void setCreateTime(String createTime) { + this.createTime = createTime; } public String getLastUpdate() { @@ -119,7 +119,7 @@ public class NsEntity implements Serializable { nsEntity.setNsdId(JsonUtil.getJsonFieldStr(jsonObject, "nsdId")); nsEntity.setDescription(JsonUtil.getJsonFieldStr(jsonObject, "description")); nsEntity.setStatus(JsonUtil.getJsonFieldStr(jsonObject, "status")); - nsEntity.setCteateTime(JsonUtil.getJsonFieldStr(jsonObject, "cteateTime")); + nsEntity.setCreateTime(JsonUtil.getJsonFieldStr(jsonObject, "createTime")); nsEntity.setLastUpdate(JsonUtil.getJsonFieldStr(jsonObject, "lastUpdate")); return nsEntity; } @@ -132,7 +132,7 @@ public class NsEntity implements Serializable { nsResJson.put("nsdId", StringUtils.trimToEmpty(this.getNsdId())); nsResJson.put("description", StringUtils.trimToEmpty(this.getDescription())); nsResJson.put("status", StringUtils.trimToEmpty(this.getStatus())); - nsResJson.put("cteateTime", StringUtils.trimToEmpty(this.getCteateTime())); + nsResJson.put("createTime", StringUtils.trimToEmpty(this.getCreateTime())); nsResJson.put("lastUpdate", StringUtils.trimToEmpty(this.getLastUpdate())); return nsResJson.toString(); } diff --git a/ResmanagementService/service/src/main/java/org/onap/vfc/nfvo/resmanagement/service/mapper/NsEntityMapper.java b/ResmanagementService/service/src/main/java/org/onap/vfc/nfvo/resmanagement/service/mapper/NsEntityMapper.java index 69db361..d90c586 100644 --- a/ResmanagementService/service/src/main/java/org/onap/vfc/nfvo/resmanagement/service/mapper/NsEntityMapper.java +++ b/ResmanagementService/service/src/main/java/org/onap/vfc/nfvo/resmanagement/service/mapper/NsEntityMapper.java @@ -21,6 +21,14 @@ import java.util.Map; import org.onap.vfc.nfvo.resmanagement.service.entity.NsEntity; +/** + *
+ *

+ *

+ * + * @author + * @version VFC 1.0 Sep 4, 2017 + */ public interface NsEntityMapper { int deleteByPrimaryKey(String id); diff --git a/ResmanagementService/service/src/main/resources/mybatis/mysql/NsEntityMapper.xml b/ResmanagementService/service/src/main/resources/mybatis/mysql/NsEntityMapper.xml index a792694..9d7fb40 100644 --- a/ResmanagementService/service/src/main/resources/mybatis/mysql/NsEntityMapper.xml +++ b/ResmanagementService/service/src/main/resources/mybatis/mysql/NsEntityMapper.xml @@ -22,12 +22,12 @@ - + - ID, NAME, NSD_ID, DESCRIPTION, STATUS, CTEATE_TIME, LAST_UPDATE + ID, NAME, NSD_ID, DESCRIPTION, STATUS, CREATE_TIME, LAST_UPDATE select - from vnf + from ns AND ID = #{id,jdbcType=VARCHAR} @@ -51,10 +51,10 @@ insert into ns (ID, NAME, NSD_ID, - DESCRIPTION, STATUS, CTEATE_TIME, + DESCRIPTION, STATUS, CREATE_TIME, LAST_UPDATE) values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{nsdId,jdbcType=VARCHAR}, - #{description,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, #{cteateTime,jdbcType=VARCHAR}, + #{description,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, #{createTime,jdbcType=VARCHAR}, #{lastUpdate,jdbcType=VARCHAR}) @@ -75,8 +75,8 @@ STATUS, - - CTEATE_TIME, + + CREATE_TIME, LAST_UPDATE, @@ -98,8 +98,8 @@ #{status,jdbcType=VARCHAR}, - - #{cteateTime,jdbcType=VARCHAR}, + + #{createTime,jdbcType=VARCHAR}, #{lastUpdate,jdbcType=VARCHAR}, @@ -121,8 +121,8 @@ STATUS = #{status,jdbcType=VARCHAR}, - - CTEATE_TIME = #{cteateTime,jdbcType=VARCHAR}, + + CREATE_TIME = #{createTime,jdbcType=VARCHAR}, LAST_UPDATE = #{lastUpdate,jdbcType=VARCHAR}, @@ -136,7 +136,7 @@ NSD_ID = #{nsdId,jdbcType=VARCHAR}, DESCRIPTION = #{description,jdbcType=VARCHAR}, STATUS = #{status,jdbcType=VARCHAR}, - CTEATE_TIME = #{cteateTime,jdbcType=VARCHAR}, + CREATE_TIME = #{createTime,jdbcType=VARCHAR}, LAST_UPDATE = #{lastUpdate,jdbcType=VARCHAR} where ID = #{id,jdbcType=VARCHAR} -- cgit 1.2.3-korg