|
|
@@ -402,7 +402,7 @@ class ServiceOrderLogic extends BaseLogic
|
|
|
$order_info = \app\common\model\recharge\RechargeOrder::with(['order_goods'=>function ($query) {
|
|
|
$query->visible(['goods_name','goods_image','goods_number','good_unit']);
|
|
|
},'service_work'=>function ($query) {
|
|
|
- $query->visible(['work_sn','real_name','mobile','address','service_status','appointment_time','master_worker_id','work_images','finished_images','finished_time','spare_total','service_work_spare_id'])->append(['service_status_text','user_service_status','user_service_status_text']);
|
|
|
+ $query->visible(['work_sn','real_name','mobile','address','service_status','appointment_time','master_worker_id','work_images','finished_images','finished_time','spare_total','service_work_spare_id','refund_approval'])->append(['service_status_text','user_service_status','user_service_status_text']);
|
|
|
}])
|
|
|
->visible(['id','sn','payment_type','order_total','order_amount','paid_amount','pay_status','create_time','title','work_id'])
|
|
|
->where([
|
|
|
@@ -523,6 +523,29 @@ class ServiceOrderLogic extends BaseLogic
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ public static function getDetailStatus($params)
|
|
|
+ {
|
|
|
+ try {
|
|
|
+ $order_info = \app\common\model\recharge\RechargeOrder::with(['service_work'=>function ($query) {
|
|
|
+ $query->visible(['work_sn'])->append(['service_status_text','user_service_status','user_service_status_text']);
|
|
|
+ }])
|
|
|
+ ->visible(['id','sn'])
|
|
|
+ ->where([
|
|
|
+ 'order_type' => 0,
|
|
|
+ 'user_id' => $params['user_id'],
|
|
|
+ 'sn'=>$params['sn']
|
|
|
+ ])->findOrEmpty()->toArray();
|
|
|
+ if(empty($order_info)){
|
|
|
+ throw new Exception('订单不存在');
|
|
|
+ }
|
|
|
+ return $order_info;
|
|
|
+ }
|
|
|
+ catch (\Exception $e) {
|
|
|
+ self::setError($e->getMessage());
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
/**
|
|
|
* 获取订单支付详情
|