Commit 6f1c47c0 by 孙亚楠

dd

parent b1c2d3ae
...@@ -217,7 +217,7 @@ class OrderCtl extends CtlBase { ...@@ -217,7 +217,7 @@ class OrderCtl extends CtlBase {
item.product_info = productMap[item.product_id]; item.product_info = productMap[item.product_id];
} }
// 设置计费内容 // 设置计费内容
// await this.feeSve.setRowsFee(res.data.rows, "engine_account_id"); await this.feeSve.setRowsFee(res.data.rows, "engine_account_id");
return res; return res;
}catch (e) { }catch (e) {
console.log(e); console.log(e);
...@@ -248,6 +248,26 @@ class OrderCtl extends CtlBase { ...@@ -248,6 +248,26 @@ class OrderCtl extends CtlBase {
} }
} }
/**
* fn:查询商户下可用订单的产品
* @param pobj
* @param pobj2
* @param req
* @param res
* @returns {Promise<void>}
*/
async getMerchantLiveProduct(pobj, pobj2, req, res){
if(!pobj.merchant_id){
return system.getResult(null, `参数错误 商户ID不能为空`);
}
try{
return await this.orderSve.getMerchantLiveProduct(pobj);
}catch (e) {
console.log(e);
return system.getResult(null, `系统错误`);
}
}
} }
module.exports = OrderCtl; module.exports = OrderCtl;
\ No newline at end of file
...@@ -123,9 +123,12 @@ class FeeService extends ServiceBase { ...@@ -123,9 +123,12 @@ class FeeService extends ServiceBase {
} }
ids.push(id); ids.push(id);
} }
let map = await this.accountBulk({ids: ids}).data || {}; let map = await this.accountBulk({ids: ids});
map = map.data || {};
for (let item of rows) { for (let item of rows) {
item.fee = map[Number(item[field] || 0)] || {}; item.fee = map[Number(item[field] || 0)] || {balance:0};
item.allowance=Number(item.product_specifications) - Number(item.fee.balance || 0);
item.allowance = item.allowance < 0 ? 0 : item.allowance;
} }
} }
......
...@@ -60,8 +60,14 @@ class UserService extends ServiceBase { ...@@ -60,8 +60,14 @@ class UserService extends ServiceBase {
return await this.callms("sve_order", "updOrderSimple", params); return await this.callms("sve_order", "updOrderSimple", params);
} }
/**
* fn:查询商户下可用订单的产品
* @param params
* @returns {Promise<{msg: string, data, bizmsg: *|string, status: number}|any|undefined>}
*/
async getMerchantLiveProduct(params){
return await this.callms("sve_order", "getMerchantLiveProduct", params);
}
} }
......
...@@ -190,7 +190,7 @@ class System { ...@@ -190,7 +190,7 @@ class System {
// 产品引擎 // 产品引擎
engine_product: local + ":3571" + path, engine_product: local + ":3571" + path,
// 计费引擎 // 计费引擎
engine_fee: dev + ":3572" + path, engine_fee: local + ":3572" + path,
// 认证引擎 // 认证引擎
engine_auth: local + ":3573" + path, engine_auth: local + ":3573" + path,
// 签约引擎 // 签约引擎
......
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