|
|
@@ -35,6 +35,24 @@ class RechargeService extends BaseService
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
+ * 获取订单信息
|
|
|
+ * @param $orderSn
|
|
|
+ * @return array
|
|
|
+ */
|
|
|
+ public function orderInfo($orderSn){
|
|
|
+ $info = $this->model::where(['order_sn'=> $orderSn, 'mark'=> 1])
|
|
|
+ ->whereIn('status',[1,2])
|
|
|
+ ->select(['id','order_sn as out_trade_no','user_id','pay_money','money as total','status'])
|
|
|
+ ->first();
|
|
|
+ $info = $info? $info->toArray() : [];
|
|
|
+ if($info){
|
|
|
+ $info['type'] = 1;
|
|
|
+ $info['pay_money'] = $info['pay_money']? $info['pay_money'] : $info['total'];
|
|
|
+ }
|
|
|
+ return $info;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
* 获取列表
|
|
|
* @return array
|
|
|
* @since 2020/11/11
|