Commit a8f5089f by 王昆

gsb

parent 942ca790
......@@ -72,6 +72,9 @@ class ActionAPI extends APIBase {
case "updateItemInvoice":
opResult = await this.storderitemSve.updateInvoice(action_body);
break;
case "cancelItemInvoice":
opResult = await this.storderitemSve.cancelInvoice(action_body);
break;
default:
......
......@@ -41,6 +41,11 @@ class StOrderItemDao extends Dao {
await this.customUpdate(sql, params, t);
}
async cancelInvoice(params, t) {
let sql = "UPDATE st_order_item SET saas_invoice_id = '' WHERE saas_invoice_id = :saas_invoice_id ";
await this.customUpdate(sql, params, t);
}
async countItems(params, t) {
let sql = "SELECT count(1) AS num FROM st_order_item WHERE order_id = :order_id AND trade_status = :trade_status";
let list = await this.customQuery(sql, params, t);
......
......@@ -69,6 +69,10 @@ class StOrderItemService extends ServiceBase {
let rs = await this.dao.updateInvoice(params);
return system.getResult(rs);
}
async cancelInvoice(params) {
let rs = await this.dao.cancelInvoice(params);
return system.getResult(rs);
}
async byIds(params) {
let list = await this.dao.byIds(params);
......
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