|
@@ -172,7 +172,15 @@ class Order extends Controller
|
|
|
$status =[7,8];
|
|
|
$query = ShopOrder::mQuery()->like('order_name');
|
|
|
$list = $query ->where('admin_id',$admin_id['id'])
|
|
|
- ->whereIn('status',$status)->where('refund_del',1)->whereOr('refund_status',3)->order('id desc')->page(true, false, false, 10);
|
|
|
+ ->where('refund_del',1)->where(function ($query) {
|
|
|
+ $query->where('status', 'in', '7,8')->whereOr('refund_status',3);
|
|
|
+ })->order('id desc')->page(true, false, false, 10);
|
|
|
+
|
|
|
+// $query->where(function ($query,$admin_id) {
|
|
|
+// $query->where('admin_id', $admin_id['id'])->whereor('id', 2);
|
|
|
+// })->whereOr(function ($query) {
|
|
|
+// $query->where('name', 'like', 'think')->whereOr('name', 'like', 'thinkphp');
|
|
|
+// })->select();
|
|
|
foreach ($list['list'] as $k=>$v){
|
|
|
$list['list'][$k]['goods_item']=ShopOrderItem::mk()->where('order_no',$list['list'][$k]['order_no'])->select();
|
|
|
$list['list'][$k]['user_address']=ShopOrderSend::mk()->where('order_no',$list['list'][$k]['order_no'])->find();
|
|
@@ -199,7 +207,8 @@ class Order extends Controller
|
|
|
'reason.default'=>'',
|
|
|
]);
|
|
|
$info = ShopOrder::mk()->where(['id'=>$data['order_id'],'admin_id'=>$admnd_id['id'],'status'=>7])->find();
|
|
|
- $pay_money = ShopOrderPay::mk()->where(['status' => 2, 'pay_no'=>$info['payment_trade']])->value('money');
|
|
|
+// $pay_money = ShopOrderPay::mk()->where(['status' => 2, 'pay_no'=>$info['payment_trade']])->value('money');
|
|
|
+ $pay_money = ShopOrderPay::mk()->where(['pay_no'=>$info['payment_trade']])->value('money');
|
|
|
|
|
|
if(empty($info)){
|
|
|
$this->error('订单信息有误');
|
|
@@ -219,7 +228,7 @@ class Order extends Controller
|
|
|
$this->success('已同意退款,支付金额原路退回');
|
|
|
}
|
|
|
else{
|
|
|
- $this->error('金额未退回查看支付账户');
|
|
|
+ $this->error('管理平台微信账户余额不足,请联系管理员');
|
|
|
}
|
|
|
}
|
|
|
//统一退货
|