Accept Merge Request #196: (feature/dgg -> develop)
Merge Request: fix: 修复后台删除师傅时,未同步删除师傅第三方账户表中数据 Created By: @大狗哥 Accepted By: @大狗哥 URL: https://g-bcrc3009.coding.net/p/allocatr/d/allocatr/git/merge/196
This commit is contained in:
commit
d619ffde69
|
|
@ -9,6 +9,7 @@ use app\admin\model\Order;
|
|||
use app\admin\model\OrderDispatch;
|
||||
use app\admin\model\WorkerItem;
|
||||
use app\common\controller\Backend;
|
||||
use app\common\model\WorkerVendor;
|
||||
use fast\Tree;
|
||||
use think\Db;
|
||||
use think\exception\PDOException;
|
||||
|
|
@ -499,6 +500,9 @@ ORDER BY distance;",[$order->lng,$order->lat]);
|
|||
foreach ($list as $item) {
|
||||
$count += $item->delete();
|
||||
}
|
||||
|
||||
// 删除师傅第三方账户表数据
|
||||
WorkerVendor::whereIn('worker_id', $ids)->delete();
|
||||
Db::commit();
|
||||
} catch (PDOException|Exception $e) {
|
||||
Db::rollback();
|
||||
|
|
|
|||
|
|
@ -196,7 +196,7 @@ class WorkerApi extends BaseService
|
|||
*/
|
||||
public function workerLogin(int $id): bool
|
||||
{
|
||||
$user = $this->getWorkerModel()->find($id);
|
||||
$user = $this->getWorkerModel()->where('deletetime', null)->find($id);
|
||||
$this->tryLogin($user);
|
||||
|
||||
$user = $user->toArray();
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user