|
|
@@ -141,12 +141,18 @@ class OrderService extends BaseService
|
|
|
* 订单详情
|
|
|
* @param $id
|
|
|
*/
|
|
|
- public function getOrderInfo($id)
|
|
|
+ public function getOrderInfo($id, $no='')
|
|
|
{
|
|
|
+ $where = ['order_no'=>$no,'a.id' => $id, 'a.mark' => 1];
|
|
|
+ if($no){
|
|
|
+ unset($where['id']);
|
|
|
+ }else{
|
|
|
+ unset($where['no']);
|
|
|
+ }
|
|
|
$statusArr = [1 => '待支付', 2 => '待发货', 3 => '待收货', 4 => '已完成'];
|
|
|
$info = $this->model->from('orders as a')->with(['orderGoods','store'])
|
|
|
->leftJoin('member as b', 'b.id', '=', 'a.user_id')
|
|
|
- ->where(['a.id' => $id, 'a.mark' => 1])
|
|
|
+ ->where($where)
|
|
|
->select(['a.*'])
|
|
|
->first();
|
|
|
|