Commit c69feb22 authored by 任国军's avatar 任国军

cassandra-server add app_id

parent 6c07a3cb
Pipeline #11952 passed with stage
in 4 seconds
...@@ -134,8 +134,8 @@ class ProductService extends Service { ...@@ -134,8 +134,8 @@ class ProductService extends Service {
async getAllProductsByType(type) { async getAllProductsByType(type) {
const { ctx } = this; const { ctx } = this;
const url = this.config.NODE_BASE_URL + '/cassandra-server/bu_basic/list?type=' + type; const url = this.config.NODE_BASE_URL + '/cassandra-server/bu_basic/list';
const products_results = await ctx.helper.send_request(url, {}, { method: 'GET' }); const products_results = await ctx.helper.send_request(url, {type, app_id: ctx.appId}, { method: 'GET' });
// ctx.logger.info(JSON.stringify({ url, products_results })); // ctx.logger.info(JSON.stringify({ url, products_results }));
let products = []; let products = [];
if (products_results.status !== 200 || !products_results.data || !products_results.data.ret) { if (products_results.status !== 200 || !products_results.data || !products_results.data.ret) {
...@@ -171,7 +171,7 @@ class ProductService extends Service { ...@@ -171,7 +171,7 @@ class ProductService extends Service {
const userId = ctx.userId; const userId = ctx.userId;
const appUserId = ctx.appUserId; const appUserId = ctx.appUserId;
const url = ctx.app.config.NODE_BASE_URL + '/cassandra-server/loan_list/bu_class/list'; const url = ctx.app.config.NODE_BASE_URL + '/cassandra-server/loan_list/bu_class/list';
const param = { uid: userId, app_uid: appUserId }; const param = { uid: userId, app_uid: appUserId, app_id: ctx.appId };
const resp = await ctx.helper.send_request(url, param, { method: 'GET' }); const resp = await ctx.helper.send_request(url, param, { method: 'GET' });
if (resp.status !== 200) { if (resp.status !== 200) {
ctx.failed('[bu_class]内部接口错误'); ctx.failed('[bu_class]内部接口错误');
...@@ -204,7 +204,7 @@ class ProductService extends Service { ...@@ -204,7 +204,7 @@ class ProductService extends Service {
async getCommonBusinessList() { async getCommonBusinessList() {
const { ctx } = this; const { ctx } = this;
const url = ctx.app.config.NODE_BASE_URL + '/cassandra-server/bu_basic/list'; const url = ctx.app.config.NODE_BASE_URL + '/cassandra-server/bu_basic/list';
const param = { type: 4 }; const param = { type: 4, app_id: ctx.appId };
const resp = await ctx.helper.send_request(url, param, { method: 'GET' }); const resp = await ctx.helper.send_request(url, param, { method: 'GET' });
if (resp.status !== 200) { if (resp.status !== 200) {
ctx.failed('[bu_basic]内部接口错误'); ctx.failed('[bu_basic]内部接口错误');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment