Commit 8ac18421 by 王昆

gsb

parent a8f5089f
...@@ -69,6 +69,9 @@ class ActionAPI extends APIBase { ...@@ -69,6 +69,9 @@ class ActionAPI extends APIBase {
case "itemByIds": case "itemByIds":
opResult = await this.storderitemSve.byIds(action_body); opResult = await this.storderitemSve.byIds(action_body);
break; break;
case "itemByInvoiceId":
opResult = await this.storderitemSve.bySaasInvoiceId(action_body);
break;
case "updateItemInvoice": case "updateItemInvoice":
opResult = await this.storderitemSve.updateInvoice(action_body); opResult = await this.storderitemSve.updateInvoice(action_body);
break; break;
......
...@@ -31,6 +31,17 @@ class StOrderItemDao extends Dao { ...@@ -31,6 +31,17 @@ class StOrderItemDao extends Dao {
return await this.customQuery(sql.join(" "), params); return await this.customQuery(sql.join(" "), params);
} }
async bySaasInvoiceId(params) {
let attrs = params.attrs || "*";
let sql = [];
sql.push("SELECT");
sql.push(attrs);
sql.push("FROM");
sql.push(this.model.tableName);
sql.push("WHERE saas_invoice_id = :saas_invoice_id ");
return await this.customQuery(sql.join(" "), params);
}
async updateTrade(params, t) { async updateTrade(params, t) {
let sql = "UPDATE st_order_item SET trade_time = :trade_time, trade_status = '00', trade_desc = :trade_desc WHERE id IN (:ids) AND trade_status = '01' "; let sql = "UPDATE st_order_item SET trade_time = :trade_time, trade_status = '00', trade_desc = :trade_desc WHERE id IN (:ids) AND trade_status = '01' ";
await this.customUpdate(sql, params, t); await this.customUpdate(sql, params, t);
......
...@@ -78,6 +78,11 @@ class StOrderItemService extends ServiceBase { ...@@ -78,6 +78,11 @@ class StOrderItemService extends ServiceBase {
let list = await this.dao.byIds(params); let list = await this.dao.byIds(params);
return system.getResultSuccess(list); return system.getResultSuccess(list);
} }
async bySaasInvoiceId(params) {
let rs = await this.dao.bySaasInvoiceId(params);
return system.getResultSuccess(rs);
}
} }
module.exports = StOrderItemService; module.exports = StOrderItemService;
......
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