...
|
...
|
@@ -3,7 +3,9 @@ |
|
|
namespace app\admin\controller\mobile\userjob;
|
|
|
|
|
|
use app\common\controller\Backend;
|
|
|
use Exception;
|
|
|
use think\Db;
|
|
|
use think\exception\PDOException;
|
|
|
|
|
|
/**
|
|
|
* 求职管理
|
...
|
...
|
@@ -120,4 +122,42 @@ class UserJob extends Backend |
|
|
$this->success('审核成功');
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 删除
|
|
|
*/
|
|
|
public function del($ids = "")
|
|
|
{
|
|
|
if ($ids) {
|
|
|
$pk = $this->model->getPk();
|
|
|
$adminIds = $this->getDataLimitAdminIds();
|
|
|
if (is_array($adminIds)) {
|
|
|
$this->model->where($this->dataLimitField, 'in', $adminIds);
|
|
|
}
|
|
|
$list = $this->model->where($pk, 'in', $ids)->select();
|
|
|
|
|
|
$count = 0;
|
|
|
Db::startTrans();
|
|
|
try {
|
|
|
foreach ($list as $k => $v) {
|
|
|
// 删除求职下载
|
|
|
Db::name('mobile_user_job_download')->where('user_job_id',$v['id'])->delete();
|
|
|
$count += $v->delete();
|
|
|
}
|
|
|
Db::commit();
|
|
|
} catch (PDOException $e) {
|
|
|
Db::rollback();
|
|
|
$this->error($e->getMessage());
|
|
|
} catch (Exception $e) {
|
|
|
Db::rollback();
|
|
|
$this->error($e->getMessage());
|
|
|
}
|
|
|
if ($count) {
|
|
|
$this->success();
|
|
|
} else {
|
|
|
$this->error(__('No rows were deleted'));
|
|
|
}
|
|
|
}
|
|
|
$this->error(__('Parameter %s can not be empty', 'ids'));
|
|
|
}
|
|
|
} |
...
|
...
|
|