Commit dcd92061 by linboxuan

uncommuneGetOrder api update

parent f064f920
...@@ -278,7 +278,7 @@ class OrderInfoService extends ServiceBase { ...@@ -278,7 +278,7 @@ class OrderInfoService extends ServiceBase {
var customerContactObj = { var customerContactObj = {
uapp_id: pobj.appInfo.uapp_id,//int(11) // uapp_id: pobj.appInfo.uapp_id,//int(11) //
sourceOrderNo: orderNo,//交付订单号 sourceOrderNo: orderNo,//交付订单号
contactName: orderContact.contacts || "",//手机号 contactName: orderContact.contacts || "",//联系人
mobile: orderContact.mobile,//手机号 mobile: orderContact.mobile,//手机号
email: orderContact.email || "" email: orderContact.email || ""
}; };
......
...@@ -17,8 +17,9 @@ class OrderInfoService extends ServiceBase { ...@@ -17,8 +17,9 @@ class OrderInfoService extends ServiceBase {
// var sql = "select `isSolution`,`orderNo`,`channelServiceNo`,`channelOrderNo`,`channelUserId`,`ownerUserId`,`payTime`,`quantity`,`serviceQuantity`,`orderStatusName`,`orderStatus`,`totalSum`,`payTotalSum`,`refundSum`," // var sql = "select `isSolution`,`orderNo`,`channelServiceNo`,`channelOrderNo`,`channelUserId`,`ownerUserId`,`payTime`,`quantity`,`serviceQuantity`,`orderStatusName`,`orderStatus`,`totalSum`,`payTotalSum`,`refundSum`,"
// + " `invoiceApplyStatus`,`opNotes`,`channelItemCode`,`channelItemName`,`price`,priceDesc,priceTypeName,channelItemAppendName,`serviceItemCode`,`picUrl`,created_at from v_order where uapp_id=:uapp_id"; // + " `invoiceApplyStatus`,`opNotes`,`channelItemCode`,`channelItemName`,`price`,priceDesc,priceTypeName,channelItemAppendName,`serviceItemCode`,`picUrl`,created_at from v_order where uapp_id=:uapp_id";
// var sqlCount = "select count(1) as dataCount from v_order where uapp_id=:uapp_id"; // var sqlCount = "select count(1) as dataCount from v_order where uapp_id=:uapp_id";
var sql = "select `orderNo`,`channelUserId`,`payTime`,`orderStatusName`,`orderStatus`,`totalSum`,`payTotalSum`,`refundSum`,`refundTime`," var sql = "select `orderNo`,`channelUserId`,`payTime`,`quantity`,`orderStatusName`,`orderStatus`,`totalSum`,`payTotalSum`,`totalDiscounts`,`refundSum`,`refundTime`,"
+ " `channelItemCode`,`channelItemName`,`price`,priceDesc,priceTypeName,`serviceItemCode`,`picUrl`,`created_at`,`updated_at` from v_order where uapp_id=:uapp_id"; + " `channelItemCode`,`channelItemName`,`price`,priceDesc,priceTypeName,`serviceItemCode`,`picUrl`,v_order.`created_at`,v_order.`updated_at`,"
+ " c_order_contacts.contactName,c_order_contacts.mobile from v_order left join c_order_contacts on v_order.orderNo=c_order_contacts.sourceOrderNo where v_order.uapp_id=:uapp_id";
var sqlCount = "select count(1) as dataCount from v_order where uapp_id=:uapp_id"; var sqlCount = "select count(1) as dataCount from v_order where uapp_id=:uapp_id";
paramWhere.uapp_id = pobj.appInfo.uapp_id; paramWhere.uapp_id = pobj.appInfo.uapp_id;
...@@ -31,13 +32,13 @@ class OrderInfoService extends ServiceBase { ...@@ -31,13 +32,13 @@ class OrderInfoService extends ServiceBase {
if (actionBody.startTime && actionBody.entTime) { if (actionBody.startTime && actionBody.entTime) {
var startTime = actionBody.startTime.trim() + " 00:00:00"; var startTime = actionBody.startTime.trim() + " 00:00:00";
var entTime = actionBody.entTime + " 23:59:59"; var entTime = actionBody.entTime + " 23:59:59";
sql += " and updated_at >=:startTime and updated_at<=:entTime"; sql += " and v_order.updated_at >=:startTime and v_order.updated_at<=:entTime";
sqlCount += " and updated_at >=:startTime and updated_at<=:entTime"; sqlCount += " and v_order.updated_at >=:startTime and v_order.updated_at<=:entTime";
paramWhere.startTime = startTime; paramWhere.startTime = startTime;
paramWhere.entTime = entTime; paramWhere.entTime = entTime;
} }
sql += " order by id desc LIMIT " + pageSize + " OFFSET " + from; sql += " order by v_order.id desc LIMIT " + pageSize + " OFFSET " + from;
var list = await this.customQuery(sql, paramWhere); var list = await this.customQuery(sql, paramWhere);
var result = system.getResultSuccess(list); var result = system.getResultSuccess(list);
......
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