Commit 4d542c6a by 孙亚楠

d

parent 8b83d217
...@@ -37,8 +37,10 @@ class OrderService extends ServiceBase { ...@@ -37,8 +37,10 @@ class OrderService extends ServiceBase {
* @returns {Promise<{msg: string, data, bizmsg: *|string, status: number}|*|undefined>} * @returns {Promise<{msg: string, data, bizmsg: *|string, status: number}|*|undefined>}
*/ */
async audit(params) { async audit(params) {
console.log(`审核参数` + JSON.stringify(params));
var rs = await this.callms("order", "saasOrderBulkAudit", params); var rs = await this.callms("order", "saasOrderBulkAudit", params);
console.log( `审核结果 ${rs} `);
console.log(JSON.stringify(rs));
if(params.audit_status == "20" && rs.status === 0 && params.ids && params.ids.length > 0) { if(params.audit_status == "20" && rs.status === 0 && params.ids && params.ids.length > 0) {
for(let id of params.ids) { for(let id of params.ids) {
this.pushOrderToDeliver(id,params.deliver_id); this.pushOrderToDeliver(id,params.deliver_id);
...@@ -53,7 +55,10 @@ class OrderService extends ServiceBase { ...@@ -53,7 +55,10 @@ class OrderService extends ServiceBase {
* @returns {Promise<void>} * @returns {Promise<void>}
*/ */
async pushOrderToDeliver(id,deliver_id) { async pushOrderToDeliver(id,deliver_id) {
console.log("推送参数 "+id +"===>"+deliver_id)
let order = await this.callms("order", "saasOrderInfo", {id: id}) || {}; let order = await this.callms("order", "saasOrderInfo", {id: id}) || {};
console.log("查询到的订单" + JSON.stringify(order));
order = order.data; order = order.data;
if (!order) { if (!order) {
return; return;
...@@ -75,9 +80,10 @@ class OrderService extends ServiceBase { ...@@ -75,9 +80,10 @@ class OrderService extends ServiceBase {
deliver_id:deliver_id, deliver_id:deliver_id,
price:order.price || 0 price:order.price || 0
}; };
console.log("推送订单到交付平台参数"+JSON.stringify(data))
// 推送订单到交付平台 // 推送订单到交付平台
let url = settings.deliverSysApi().orderPushApi; let url = settings.deliverSysApi().orderPushApi;
console.log("推送订单到交付平台URL"+url)
let res = await axios({ let res = await axios({
method: 'post', method: 'post',
url: url, url: url,
......
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