|
|
@@ -10,6 +10,8 @@ namespace app\admin\dao; |
|
|
|
|
|
|
|
|
|
|
|
use app\admin\command\Util; |
|
|
|
use app\admin\model\OrderHotel; |
|
|
|
use app\admin\model\OrderItem; |
|
|
|
use app\admin\model\PaymentOrder; |
|
|
|
use think\Db; |
|
|
|
use think\Exception; |
|
|
@@ -117,6 +119,25 @@ class PaymentOrderDao |
|
|
|
{ |
|
|
|
try { |
|
|
|
$where = ["a.del_flag"=>0,"a.group_id"=>$param['group_id']]; |
|
|
|
if (!empty($param['order_id'])) { |
|
|
|
$idList = []; |
|
|
|
$orderItemModel = new OrderItem(); |
|
|
|
$orderItem = $orderItemModel->where(["id"=>$param['order_id']])->find(); |
|
|
|
if ($orderItem != null && !empty($orderItem['payment_order_id'])) { |
|
|
|
$idList[] = $orderItem['payment_order_id']; |
|
|
|
} |
|
|
|
$orderHotelModel = new OrderHotel(); |
|
|
|
$orderHotel = $orderHotelModel->where(["id"=>$param['order_id']])->find(); |
|
|
|
if ($orderHotel != null && !empty($orderHotel['payment_order_id'])) { |
|
|
|
$idList[] = $orderHotel['payment_order_id']; |
|
|
|
} |
|
|
|
if (count($idList) == 0) { |
|
|
|
$where["a.id"]=0; |
|
|
|
}else{ |
|
|
|
$where["a.id"]=["in",$idList]; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (!empty($param['name'])) { |
|
|
|
$where['a.name'] = ["like","%".$param['name']."%"]; |
|
|
|
} |
|
|
|