conn.execute(sql, [info.fans_nickname || info.buyer_phone || info.fans_nickname
, info.buyer_phone, info.outer_user_id], function(err, result) {
if (err) {
return callback(err);
}
customer_id = result.insertId;
callback(null, customer_id);
});
});
});
var address_info = order.address_info;
var order_info = order.order_info;
task.push(function(callback) {
var sql= `INSERT INTO \`order\`(customer_id
, outer_id
, outer_order_id
, source
, creator
, created
, delivery_area
, delivery_city
, delivery_province
, delivery_address
, receiver_tel
, receiver_name
, community_id
, building_no
)
VALUES (?, ?, ?, '有赞', 'bot', NOW(), ?, ?, ?, ?, ?, ?, ?, ?)`;
conn.execute(sql, [customer_id,
order.order_info.tid,
])
});