fix: 修复后台删除师傅时,未同步删除师傅第三方账户表中数据
This commit is contained in:
parent
6275693575
commit
3cf3fa44ec
|
|
@ -9,6 +9,7 @@ use app\admin\model\Order;
|
||||||
use app\admin\model\OrderDispatch;
|
use app\admin\model\OrderDispatch;
|
||||||
use app\admin\model\WorkerItem;
|
use app\admin\model\WorkerItem;
|
||||||
use app\common\controller\Backend;
|
use app\common\controller\Backend;
|
||||||
|
use app\common\model\WorkerVendor;
|
||||||
use fast\Tree;
|
use fast\Tree;
|
||||||
use think\Db;
|
use think\Db;
|
||||||
use think\exception\PDOException;
|
use think\exception\PDOException;
|
||||||
|
|
@ -441,6 +442,9 @@ ORDER BY distance;",[$order->lng,$order->lat]);
|
||||||
foreach ($list as $item) {
|
foreach ($list as $item) {
|
||||||
$count += $item->delete();
|
$count += $item->delete();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 删除师傅第三方账户表数据
|
||||||
|
WorkerVendor::whereIn('worker_id', $ids)->delete();
|
||||||
Db::commit();
|
Db::commit();
|
||||||
} catch (PDOException|Exception $e) {
|
} catch (PDOException|Exception $e) {
|
||||||
Db::rollback();
|
Db::rollback();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user