...
|
...
|
@@ -2,9 +2,26 @@ |
|
|
|
|
|
namespace app\admin\controller\user;
|
|
|
|
|
|
use app\admin\model\Apply;
|
|
|
use app\admin\model\Deposit;
|
|
|
use app\admin\model\FactoryAdmin;
|
|
|
use app\admin\model\FactoryUser;
|
|
|
use app\admin\model\user\Realname;
|
|
|
use app\admin\model\UserSalary;
|
|
|
use app\api\model\JobCollect;
|
|
|
use app\api\model\JobKeyword;
|
|
|
use app\api\model\UserBorrow;
|
|
|
use app\api\model\UserKeyword;
|
|
|
use app\api\model\UserRecruitSubsidyLog;
|
|
|
use app\api\model\UserWorkLog;
|
|
|
use app\api\model\UserWorkSubsidyLog;
|
|
|
use app\common\controller\Backend;
|
|
|
use app\common\library\Auth;
|
|
|
use app\common\model\Record;
|
|
|
use Exception;
|
|
|
use fast\Tree;
|
|
|
use think\Db;
|
|
|
use think\exception\PDOException;
|
|
|
|
|
|
/**
|
|
|
* 会员管理
|
...
|
...
|
@@ -140,7 +157,45 @@ class User extends Backend |
|
|
if (!$row) {
|
|
|
$this->error(__('No Results were found'));
|
|
|
}
|
|
|
Auth::instance()->delete($row['id']);
|
|
|
Db::startTrans();
|
|
|
try {
|
|
|
Auth::instance()->delete($row['id']);
|
|
|
// 职位报名
|
|
|
Apply::where('user_id',$row['id'])->delete();
|
|
|
// 提现
|
|
|
Deposit::where('user_id',$row['id'])->delete();
|
|
|
// 工厂管理
|
|
|
FactoryAdmin::where('user_id',$row['id'])->delete();
|
|
|
// 入职申请
|
|
|
FactoryUser::where('user_id',$row['id'])->delete();
|
|
|
// 职位收藏
|
|
|
JobCollect::where('user_id',$row['id'])->delete();
|
|
|
// 职位搜索关键字
|
|
|
JobKeyword::where('user_id',$row['id'])->delete();
|
|
|
// 实名认证
|
|
|
Realname::where('user_id',$row['id'])->delete();
|
|
|
// 通知记录
|
|
|
Record::where('user_id',$row['id'])->delete();
|
|
|
// 借支
|
|
|
UserBorrow::where('user_id',$row['id'])->delete();
|
|
|
// 搜索关键字
|
|
|
UserKeyword::where('user_id',$row['id'])->delete();
|
|
|
// 招聘补贴记录
|
|
|
UserRecruitSubsidyLog::where('user_id',$row['id'])->delete();
|
|
|
// 每月工资
|
|
|
UserSalary::where('user_id',$row['id'])->delete();
|
|
|
// 工时记录
|
|
|
UserWorkLog::where('user_id',$row['id'])->delete();
|
|
|
// 工时补贴记录
|
|
|
UserWorkSubsidyLog::where('user_id',$row['id'])->delete();
|
|
|
Db::commit();
|
|
|
} catch (PDOException $e) {
|
|
|
Db::rollback();
|
|
|
$this->error($e->getMessage());
|
|
|
} catch (Exception $e) {
|
|
|
Db::rollback();
|
|
|
$this->error($e->getMessage());
|
|
|
}
|
|
|
$this->success();
|
|
|
}
|
|
|
|
...
|
...
|
|