Commit fc3382f5 by sxy

fix: 调整传输结构

parent 14a3f542
...@@ -52,7 +52,7 @@ class FgbusinesschancService extends ServiceBase { ...@@ -52,7 +52,7 @@ class FgbusinesschancService extends ServiceBase {
async createOrderInfoAndPayFq(req, actionBody) { async createOrderInfoAndPayFq(req, actionBody) {
let sql = `SELECT * FROM order_info_fq WHERE order_pkid =:order_pkid`; let sql = `SELECT * FROM order_info_fq WHERE order_pkid =:order_pkid`;
let list = await this.customQuery(sql, { let list = await this.customQuery(sql, {
order_pkid: actionBody.order_pkid order_pkid: actionBody.orderInfo.order_pkid
}); });
if (!list || list.length === 0) { if (!list || list.length === 0) {
// 插入 order_info_fq // 插入 order_info_fq
...@@ -68,8 +68,8 @@ class FgbusinesschancService extends ServiceBase { ...@@ -68,8 +68,8 @@ class FgbusinesschancService extends ServiceBase {
"ownership_company", "source", "source_type", "contract_number", "ownership_company", "source", "source_type", "contract_number",
"contract_amount"]; "contract_amount"];
keys.forEach((item, index) => { keys.forEach((item, index) => {
if (actionBody[item]) { if (actionBody.orderInfo[item]) {
data[item] = actionBody[item] data[item] = actionBody.orderInfo[item]
} }
}) })
sql = `INSERT INTO order_info_fq (${Object.keys(data).join()}) VALUE (:${Object.keys(data).join(",:")}) `; sql = `INSERT INTO order_info_fq (${Object.keys(data).join()}) VALUE (:${Object.keys(data).join(",:")}) `;
...@@ -79,7 +79,7 @@ class FgbusinesschancService extends ServiceBase { ...@@ -79,7 +79,7 @@ class FgbusinesschancService extends ServiceBase {
sql = `SELECT * FROM pay_fq WHERE order_no =:order_no`; sql = `SELECT * FROM pay_fq WHERE order_no =:order_no`;
list = await this.customQuery(sql, { list = await this.customQuery(sql, {
order_no: actionBody.order_no order_no: actionBody.payInfo.order_no
}); });
if (!list || list.length === 0) { if (!list || list.length === 0) {
// 插入 pay_fq // 插入 pay_fq
...@@ -97,8 +97,8 @@ class FgbusinesschancService extends ServiceBase { ...@@ -97,8 +97,8 @@ class FgbusinesschancService extends ServiceBase {
"remark", "payment_item_id" "remark", "payment_item_id"
]; ];
keys.forEach((item, index) => { keys.forEach((item, index) => {
if (actionBody[item]) { if (actionBody.payInfo[item]) {
data[item] = actionBody[item] data[item] = actionBody.payInfo[item]
} }
}) })
sql = `INSERT INTO pay_fq (${Object.keys(data).join()}) VALUE (:${Object.keys(data).join(",:")}) `; sql = `INSERT INTO pay_fq (${Object.keys(data).join()}) VALUE (:${Object.keys(data).join(",:")}) `;
......
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