dd
This commit is contained in:
parent
89e67246d5
commit
a58c7ac679
@ -176,6 +176,11 @@ class LogisticsLogic extends BaseLogic
|
|||||||
->value('c.user_id');
|
->value('c.user_id');
|
||||||
//判断配送员是否存在
|
//判断配送员是否存在
|
||||||
if(!$courier) return ['code'=>0, 'msg'=>'暂无配送员'];
|
if(!$courier) return ['code'=>0, 'msg'=>'暂无配送员'];
|
||||||
|
//获取配送员信息
|
||||||
|
$courierInfo = Courier::alias('u')
|
||||||
|
->field('u.id,u.nickname,a.phone')
|
||||||
|
->leftjoin('la_admin a', 'u.admin_id = a.id')
|
||||||
|
->where('u.id', $courier)->find()->toArray();
|
||||||
//写入数据
|
//写入数据
|
||||||
Logistics::startTrans();
|
Logistics::startTrans();
|
||||||
try {
|
try {
|
||||||
@ -206,7 +211,7 @@ class LogisticsLogic extends BaseLogic
|
|||||||
'create_time' => time(),
|
'create_time' => time(),
|
||||||
]);
|
]);
|
||||||
Logistics::commit();
|
Logistics::commit();
|
||||||
return ['code'=>1, 'msg'=>'操作成功'];
|
return ['code'=>1, 'msg'=>'操作成功',$courierInfo];
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
Logistics::rollback();
|
Logistics::rollback();
|
||||||
return ['code'=>0, 'msg'=>$e->getMessage()];
|
return ['code'=>0, 'msg'=>$e->getMessage()];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user