summaryrefslogtreecommitdiffstats
path: root/usecaseui-portal/src/app
diff options
context:
space:
mode:
authorcyuamber <xuranyjy@chinamobile.com>2019-08-23 17:55:34 +0800
committercyuamber <xuranyjy@chinamobile.com>2019-08-23 17:55:37 +0800
commitd5f18c422a770ff04b44e87deefec50516b0fef3 (patch)
treeb6d0b875514304161ca331fec5e4adedd8a27d06 /usecaseui-portal/src/app
parentc048639a46be107578e8ce0d8721bc7b5d4fe791 (diff)
feat:customer page api sort out add notes
Change-Id: I3b2e4b9744d3b7577cc38d63e666be004a0f0d17 Issue-ID: USECASEUI-307 Signed-off-by: cyuamber <xuranyjy@chinamobile.com>
Diffstat (limited to 'usecaseui-portal/src/app')
-rw-r--r--usecaseui-portal/src/app/core/services/managemencs.service.ts48
1 files changed, 24 insertions, 24 deletions
diff --git a/usecaseui-portal/src/app/core/services/managemencs.service.ts b/usecaseui-portal/src/app/core/services/managemencs.service.ts
index a28885d8..da43b8f5 100644
--- a/usecaseui-portal/src/app/core/services/managemencs.service.ts
+++ b/usecaseui-portal/src/app/core/services/managemencs.service.ts
@@ -10,32 +10,46 @@ export class ManagemencsService {
constructor(private http: HttpClient) { }
baseUrl = baseUrl.baseUrl;
-
-
-
/* line up */
url = {
+ // The following APIs are optimizable
customers: this.baseUrl + "/uui-lcm/customers", /* get */
- serviceType: this.baseUrl + "/uui-lcm/customers/" + "*_*" + "/service-subscriptions", /* get */
CustomersPir: this.baseUrl + "/uui-lcm/serviceNumByCustomer", /* get */
+ deleteCustomer: this.baseUrl + "/uui-lcm/customers?customerId=*_*&resourceVersion=*+*", /* delete */
+ // The following APIs are not optimizable
+ serviceType: this.baseUrl + "/uui-lcm/customers/" + "*_*" + "/service-subscriptions", /* get */
CustomersColumn: this.baseUrl + "/uui-lcm/serviceNumByServiceType/" + "*_*", /* get */
createCustomer: this.baseUrl + "/uui-lcm/customers/", /* put */
createServiceType: this.baseUrl + "/uui-lcm/customers/*_*/service-subscriptions/*+*", /* put */
getCustomerresourceVersion: this.baseUrl + "/uui-lcm/customers/*_*", /* put */
- deleteCustomer: this.baseUrl + "/uui-lcm/customers?customerId=*_*&resourceVersion=*+*",
getServiceTypeResourceVersion: this.baseUrl + "/uui-lcm/customers/*_*/service-subscriptions/*+*",
deleteServiceType: this.baseUrl + "/uui-lcm/customers/*_*/service-subscriptions/*+*?resourceVersion=*@* ",
};
+ //The following APIs are optimizable ----------------------------------
// Get all customers
getAllCustomers() {
return this.http.get<any>(this.url.customers);
}
+ // create New Customer
+ createCustomer(customer, createParams) {
+ let url = this.url.createCustomer + customer;
+ return this.http.put(url, createParams);
+ }
+ // delete SelectCustomer
+ deleteSelectCustomer(params) {
+ let customerId = params.customerId,
+ version = params.version;
+ let url = this.url.deleteCustomer.replace("*_*", customerId).replace("*+*", version);
+ return this.http.delete(url);
+ }
+
+ //The following APIs are not optimizable ---------------------------------
+
// get all servicetype
getServiceTypes(customer) {
let url = this.url.serviceType.replace("*_*", customer.id);
- console.log(url)
return this.http.get<any>(url);
}
// get Customer Pir
@@ -47,40 +61,26 @@ export class ManagemencsService {
let url = this.url.CustomersColumn.replace("*_*", customer.id);
return this.http.get<any>(url);
}
- // create New Customer
- createCustomer(customer, createParams) {
- let url = this.url.createCustomer + customer;
- // return this.http.get(url, createParams);//location
- return this.http.put(url, createParams);//online
- }
-
+ // create ServiceType
createServiceType(createParams) {
let customerId = createParams.customer.id,
ServiceType = createParams.ServiceType;
let url = this.url.createServiceType.replace("*_*", customerId).replace("*+*", ServiceType);
- // return this.http.get(url,createParams);//location
return this.http.put(url, createParams);//online
}
-
+ // Get delete Customer Version
getdeleteCustomerVersion(thisdeleteCustomer) {
let url = this.url.getCustomerresourceVersion.replace("*_*", thisdeleteCustomer.id);
return this.http.get(url);
}
-
- deleteSelectCustomer(params) {
- let customerId = params.customerId,
- version = params.version;
- let url = this.url.deleteCustomer.replace("*_*", customerId).replace("*+*", version);
- return this.http.delete(url);
- }
-
+ // Get delete ServiceType Version
getdeleteServiceTypeVersion(params) {
let customerId = params.customerId.id,
ServiceType = params.ServiceType;
let url = this.url.getServiceTypeResourceVersion.replace("*_*", customerId).replace("*+*", ServiceType);
return this.http.get(url);
}
-
+ // delete Select ServiceType
deleteSelectServiceType(params) {
let customerId = params.customerId.id,
ServiceType = params.ServiceType,