Browse Source

接口优化

dev
nizongfeng 3 years ago
parent
commit
27ea2ff423
2 changed files with 6 additions and 6 deletions
  1. +5
    -5
      application/admin/service/PaymentOrderService.php
  2. +1
    -1
      application/admin/service/ReceiptOrderService.php

+ 5
- 5
application/admin/service/PaymentOrderService.php View File

@@ -179,7 +179,7 @@ class PaymentOrderService
$item_where_arr[] = " a.item_id = {$param["item_id"]} "; $item_where_arr[] = " a.item_id = {$param["item_id"]} ";
} }
if (!empty($param['hotel_id'])) { if (!empty($param['hotel_id'])) {
$item_where_arr[] = " a.hotel_id = {$param["hotel_id"]} ";
$hotel_where_arr[] = " b.hotel_id = {$param["hotel_id"]} ";
} }


switch ($param['inPayment']) { switch ($param['inPayment']) {
@@ -208,12 +208,12 @@ class PaymentOrderService


//时间区间查询 //时间区间查询
if (!empty($param['startTime']) ) { if (!empty($param['startTime']) ) {
$item_where_arr[] = " a.create_time >= {$param["startTime"]} 00:00:00 ";
$hotel_where_arr[]=" b.create_time >= {$param['startTime']} 00:00:00 ";
$item_where_arr[] = " a.create_time >= '{$param["startTime"]} 00:00:00' ";
$hotel_where_arr[]=" b.create_time >= '{$param['startTime']} 00:00:00' ";
} }
if (!empty($param['endTime'])) { if (!empty($param['endTime'])) {
$item_where_arr[] = " a.create_time <= {$param["endTime"]} 23:59:59 ";
$hotel_where_arr[]=" b.create_time <= {$param['endTime']} 23:59:59 ";
$item_where_arr[] = " a.create_time <= '{$param["endTime"]} 23:59:59' ";
$hotel_where_arr[]=" b.create_time <= '{$param['endTime']} 23:59:59' ";
} }


return $dao->getSubOrderListByWhere(join(" and ",$hotel_where_arr),join(" and ",$item_where_arr),join(" and ",$where_arr),$param); return $dao->getSubOrderListByWhere(join(" and ",$hotel_where_arr),join(" and ",$item_where_arr),join(" and ",$where_arr),$param);


+ 1
- 1
application/admin/service/ReceiptOrderService.php View File

@@ -121,7 +121,7 @@ class ReceiptOrderService
$orderMainDao = new OrderMainDao(); $orderMainDao = new OrderMainDao();
$where = ["id"=>["neq",""]]; $where = ["id"=>["neq",""]];
if (!empty($param['order_id'])) { if (!empty($param['order_id'])) {
$where["order"]=$param['order_id'];
$where["id"]=$param['order_id'];
} }
if (!empty($param['channel_id'])) { if (!empty($param['channel_id'])) {
$where['channel_id'] = $param['channel_id']; $where['channel_id'] = $param['channel_id'];


Loading…
Cancel
Save