|
|
@ -1,7 +1,7 @@ |
|
|
|
import { Injectable } from '@angular/core'; |
|
|
|
import { Injectable } from '@angular/core'; |
|
|
|
import {HttpClient} from '_@angular_common@9.0.7@@angular/common/http'; |
|
|
|
import {HttpClient} from '_@angular_common@9.0.7@@angular/common/http'; |
|
|
|
import {CommonsService} from './commons.service'; |
|
|
|
import {CommonsService} from './commons.service'; |
|
|
|
import {environment} from "../../environments/environment"; |
|
|
|
import {environment} from '../../environments/environment'; |
|
|
|
|
|
|
|
|
|
|
|
@Injectable({ |
|
|
|
@Injectable({ |
|
|
|
providedIn: 'root' |
|
|
|
providedIn: 'root' |
|
|
@ -94,4 +94,130 @@ export class ApiProductService { |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* @Author Sum1Dream |
|
|
|
|
|
|
|
* @methodName getStarbucksProducts |
|
|
|
|
|
|
|
* @Description // 查询星巴克产品
|
|
|
|
|
|
|
|
* @Date 13:53 2022/6/30 |
|
|
|
|
|
|
|
* @Param callBack |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
public getStarbucksProducts(callBack) { |
|
|
|
|
|
|
|
this.http.get(environment.baseUrl + 'apiProduct/getStarbucksProducts').subscribe(data => { |
|
|
|
|
|
|
|
callBack(data); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* @Author Sum1Dream |
|
|
|
|
|
|
|
* @methodName insertProductConfig |
|
|
|
|
|
|
|
* @Description // 新增第三方产品配置
|
|
|
|
|
|
|
|
* @Date 14:22 2022/6/30 |
|
|
|
|
|
|
|
* @Param params: object, callBack |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
public productConfig(params: object, callBack) { |
|
|
|
|
|
|
|
this.http.post(environment.baseUrl + 'bsProductConfig/productConfig', params).subscribe(data => { |
|
|
|
|
|
|
|
callBack(data); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* @Author Sum1Dream |
|
|
|
|
|
|
|
* @methodName insertProductConfig |
|
|
|
|
|
|
|
* @Description // 新增第三方产品配置
|
|
|
|
|
|
|
|
* @Date 14:22 2022/6/30 |
|
|
|
|
|
|
|
* @Param params: object, callBack |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
public updateProductConfig(params: object, callBack) { |
|
|
|
|
|
|
|
this.http.post(environment.baseUrl + 'bsProductConfig/updateProductConfig', params).subscribe(data => { |
|
|
|
|
|
|
|
callBack(data); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* 查询产品列表 |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* @param paramsObject 对象 |
|
|
|
|
|
|
|
* @param callBack 回调 |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
public getProductConfig(paramsObject: object, callBack) { |
|
|
|
|
|
|
|
this.http.get(environment.baseUrl + 'bsProductConfig/getProductConfig?' + this.common.getWhereCondition(paramsObject)).subscribe(data => { |
|
|
|
|
|
|
|
callBack(data); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* 根据id查询产品详情 |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* @param id id |
|
|
|
|
|
|
|
* @param callBack 回调 |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
public findProductConfig(id: number, callBack) { |
|
|
|
|
|
|
|
this.http.get(environment.baseUrl + 'bsProductConfig/findProductConfig?id=' + id).subscribe(data => { |
|
|
|
|
|
|
|
callBack(data); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* @Author Sum1Dream |
|
|
|
|
|
|
|
* @methodName findStarbucksProducts |
|
|
|
|
|
|
|
* @Description // 查询产品详情
|
|
|
|
|
|
|
|
* @Date 10:29 2022/7/1 |
|
|
|
|
|
|
|
* @Param id: number, callBack |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
public findStarbucksProducts(id: number, callBack) { |
|
|
|
|
|
|
|
this.http.get(environment.baseUrl + 'bsProductConfig/findStarbucksProducts?id=' + id).subscribe(data => { |
|
|
|
|
|
|
|
callBack(data); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* @Author Sum1Dream |
|
|
|
|
|
|
|
* @methodName getListApiMemberProduct |
|
|
|
|
|
|
|
* @Description // 查询会员产品列表
|
|
|
|
|
|
|
|
* @Date 10:38 2022/7/12 |
|
|
|
|
|
|
|
* @Param paramsObject: object, callBack |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
public getListApiMemberProduct(paramsObject: object, callBack) { |
|
|
|
|
|
|
|
this.http.get(environment.baseUrl + 'apiMemberProduct/getListApiMemberProduct?' + this.common.getWhereCondition(paramsObject)).subscribe(data => { |
|
|
|
|
|
|
|
callBack(data); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* @Author Sum1Dream |
|
|
|
|
|
|
|
* @methodName insertMemberProduct |
|
|
|
|
|
|
|
* @Description // 新增会员产品
|
|
|
|
|
|
|
|
* @Date 10:39 2022/7/12 |
|
|
|
|
|
|
|
* @Param params: object, callBack |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
public insertMemberProduct(params: object, callBack) { |
|
|
|
|
|
|
|
this.http.post(environment.baseUrl + 'apiMemberProduct/insertMemberProduct', params).subscribe(data => { |
|
|
|
|
|
|
|
callBack(data); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* @Author Sum1Dream |
|
|
|
|
|
|
|
* @methodName updateMemberProduct |
|
|
|
|
|
|
|
* @Description // 修改会员产品
|
|
|
|
|
|
|
|
* @Date 10:40 2022/7/12 |
|
|
|
|
|
|
|
* @Param params: object, callBack |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
public updateMemberProduct(params: object, callBack) { |
|
|
|
|
|
|
|
this.http.post(environment.baseUrl + 'apiMemberProduct/updateMemberProduct', params).subscribe(data => { |
|
|
|
|
|
|
|
callBack(data); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* 根据id查询详情 |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* @param id id |
|
|
|
|
|
|
|
* @param callBack 回调 |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
public findMemberProductById(id: number, callBack) { |
|
|
|
|
|
|
|
this.http.get(environment.baseUrl + 'apiMemberProduct/findById?id=' + id).subscribe(data => { |
|
|
|
|
|
|
|
callBack(data); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|