Commit ee996e33 by 王昆

gsb

parent b76b8df6
...@@ -120,8 +120,12 @@ class ActionAPI extends APIBase { ...@@ -120,8 +120,12 @@ class ActionAPI extends APIBase {
case "invoiceInfoPage": case "invoiceInfoPage":
opResult = await this.saasmerchanttitleSve.invoiceInfoPage(action_body); opResult = await this.saasmerchanttitleSve.invoiceInfoPage(action_body);
break; break;
case "mchtTitles":
opResult = await this.saasmerchanttitleSve.byMerchantId(action_body);
break;
case "mchtAddrs":
opResult = await this.saasmerchantaddrSve.byMerchantId(action_body);
break;
// ------------------------------以下api为历史将要弃用的--------------------------------------- // ------------------------------以下api为历史将要弃用的---------------------------------------
// 商户api // 商户api
// case "infoList": // case "infoList":
......
const system = require("../../../system"); const system = require("../../../system");
const ServiceBase = require("../../sve.base") const ServiceBase = require("../../sve.base")
const settings = require("../../../../config/settings") const settings = require("../../../../config/settings")
class SaasmerchanttitleService extends ServiceBase { class SaasmerchantAddrService extends ServiceBase {
constructor() { constructor() {
super("merchant", ServiceBase.getDaoName(SaasmerchanttitleService)); super("merchant", ServiceBase.getDaoName(SaasmerchantAddrService));
this.saasMerchantAddrDao = system.getObject("db.merchant.saasmerchantaddrDao"); }
async byMerchantId(params) {
let list = await this.dao.getAllByMerchantId(params.saas_merchant_id) || [];
for (let row of list) {
this.handleDate(row, ["created_at"], null, -8);
}
return system.getResultSuccess(list);
} }
/** /**
...@@ -93,4 +99,4 @@ class SaasmerchanttitleService extends ServiceBase { ...@@ -93,4 +99,4 @@ class SaasmerchanttitleService extends ServiceBase {
} }
module.exports = SaasmerchanttitleService; module.exports = SaasmerchantAddrService;
\ No newline at end of file \ No newline at end of file
...@@ -4,13 +4,15 @@ const settings = require("../../../../config/settings") ...@@ -4,13 +4,15 @@ const settings = require("../../../../config/settings")
class SaasmerchanttitleService extends ServiceBase { class SaasmerchanttitleService extends ServiceBase {
constructor() { constructor() {
super("merchant", ServiceBase.getDaoName(SaasmerchanttitleService)); super("merchant", ServiceBase.getDaoName(SaasmerchanttitleService));
this.saasmerchantaddrDao = system.getObject("db.merchant.saasmerchantaddrDao");
} }
async byMerchantId(params) {
let list = await this.dao.getAllByMerchantId(params.saas_merchant_id) || [];
for (let row of list) {
this.handleDate(row, ["created_at"], null, -8);
}
return system.getResultSuccess(list);
}
} }
module.exports = SaasmerchanttitleService; module.exports = SaasmerchanttitleService;
\ No newline at end of file
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