From 7f919b4ea684db259a42ef061e14de1ca9e88de9 Mon Sep 17 00:00:00 2001 From: luofei <604446095@qq.com> Date: Mon, 7 Aug 2023 17:12:20 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=BA=86=E7=89=A9=E6=B5=81?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E6=94=B9=E5=8F=98=E7=9A=84=E6=9D=A1=E4=BB=B6?= =?UTF-8?q?=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/controller/LogisticsController.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/app/api/controller/LogisticsController.php b/app/api/controller/LogisticsController.php index fc4c56aa..02bfce17 100644 --- a/app/api/controller/LogisticsController.php +++ b/app/api/controller/LogisticsController.php @@ -222,11 +222,12 @@ class LogisticsController extends BaseApiController { //获取参数 $logistics_id = input('logistics_id', 0, 'intval'); + $user_id = input('user_id', 0, 'intval'); //获取物流信息 - $logistics = Db::name('logistics')->where('id', $logistics_id)->where('status',0)->find(); + $logistics = Db::name('logistics')->where('id', $logistics_id)->where('courier_id',$user_id)->where('status',0)->find(); if (!$logistics) return $this->fail('物流信息不存在'); //获取配送员信息 - $courier = Db::connect('mysql3')->name('la_user')->field('real_name,mobile')->where('id', $logistics['courier_id'])->find(); + $courier = Db::connect('mysql3')->name('la_user')->field('real_name,mobile')->where('id', $user_id)->find(); //设置记录信息 $record = [ 'lst_id' => $logistics['id'], @@ -255,11 +256,12 @@ class LogisticsController extends BaseApiController { //获取参数 $logistics_id = input('logistics_id', 0, 'intval'); + $user_id = input('user_id', 0, 'intval'); //获取物流信息 - $logistics = Db::name('logistics')->where('id', $logistics_id)->where('status',1)->find(); + $logistics = Db::name('logistics')->where('id', $logistics_id)->where('courier_id',$user_id)->where('status',1)->find(); if (!$logistics) return $this->fail('物流信息不存在'); //获取配送员信息 - $courier = Db::connect('mysql3')->name('la_user')->field('real_name,mobile')->where('id', $logistics['courier_id'])->find(); + $courier = Db::connect('mysql3')->name('la_user')->field('real_name,mobile')->where('id', $user_id)->find(); //设置记录信息 $record = [ 'lst_id' => $logistics['id'],