|
@@ -3218,21 +3218,21 @@ class NewsService implements NewsServiceInterface
|
|
$user_id = isset($data['user_id']) ? $data['user_id'] : '';
|
|
$user_id = isset($data['user_id']) ? $data['user_id'] : '';
|
|
unset($data['type_id']);
|
|
unset($data['type_id']);
|
|
if ($type_id != '10000') {
|
|
if ($type_id != '10000') {
|
|
- $where[] = ['job_resume.user_id', '=', $user_id];
|
|
|
|
|
|
+ $where[] = ['job_apply.user_id', '=', $user_id];
|
|
}
|
|
}
|
|
- $result = jobResume::where($where)
|
|
|
|
|
|
+ $result = jobApply::where($where)
|
|
// ->when(!empty($data['status1']), function ($query) use ($data) {
|
|
// ->when(!empty($data['status1']), function ($query) use ($data) {
|
|
// return $query->whereIn('job_hunting.status', [1, 3]); //1待审核2已审核3已拒绝
|
|
// return $query->whereIn('job_hunting.status', [1, 3]); //1待审核2已审核3已拒绝
|
|
// })
|
|
// })
|
|
// ->leftJoin('user', 'user.id', '=', 'job_hunting.user_id') 'user.nickname as nickname', , 'user.user_name as username'
|
|
// ->leftJoin('user', 'user.id', '=', 'job_hunting.user_id') 'user.nickname as nickname', , 'user.user_name as username'
|
|
->where('job_enum.egroup', '=', 'income')
|
|
->where('job_enum.egroup', '=', 'income')
|
|
->where('job_hunting.status', 2) //已审核
|
|
->where('job_hunting.status', 2) //已审核
|
|
- ->leftJoin('job_hunting', 'job_hunting.id', '=', 'job_resume.hunt_id')
|
|
|
|
|
|
+ ->leftJoin('job_hunting', 'job_hunting.id', '=', 'job_apply.hunt_id')
|
|
->leftJoin('district', 'district.id', '=', 'job_hunting.city_id')
|
|
->leftJoin('district', 'district.id', '=', 'job_hunting.city_id')
|
|
->leftJoin('job_enum', 'job_enum.evalue', '=', 'job_hunting.salary')
|
|
->leftJoin('job_enum', 'job_enum.evalue', '=', 'job_hunting.salary')
|
|
->leftJoin('user', 'job_hunting.user_id', '=', 'user.id')
|
|
->leftJoin('user', 'job_hunting.user_id', '=', 'user.id')
|
|
->leftJoin('job_position', 'job_hunting.job_name_get', '=', 'job_position.zwid')
|
|
->leftJoin('job_position', 'job_hunting.job_name_get', '=', 'job_position.zwid')
|
|
- ->select('job_resume.*', 'job_position.zwname as job_name', 'job_hunting.salary as salary', 'district.name as cityname', 'job_enum.ename as salary_name', 'user.nickname as nickname', 'user.user_name as username')
|
|
|
|
|
|
+ ->select('job_apply.*', 'job_position.zwname as job_name', 'job_hunting.salary as salary', 'district.name as cityname', 'job_enum.ename as salary_name', 'user.nickname as nickname', 'user.user_name as username')
|
|
->orderBy("job_hunting.updated_at", "desc")
|
|
->orderBy("job_hunting.updated_at", "desc")
|
|
->limit($data['page_size'])
|
|
->limit($data['page_size'])
|
|
->offset(($data['page'] - 1) * $data['page_size'])
|
|
->offset(($data['page'] - 1) * $data['page_size'])
|
|
@@ -3240,12 +3240,12 @@ class NewsService implements NewsServiceInterface
|
|
if (empty($result)) {
|
|
if (empty($result)) {
|
|
return Result::error("查询失败", 0);
|
|
return Result::error("查询失败", 0);
|
|
}
|
|
}
|
|
- $count = jobResume::where($where)
|
|
|
|
- ->leftJoin('job_hunting', 'job_hunting.id', '=', 'job_resume.hunt_id')
|
|
|
|
|
|
+ $count = jobApply::where($where)
|
|
|
|
+ ->leftJoin('job_hunting', 'job_hunting.id', '=', 'job_apply.hunt_id')
|
|
->leftJoin('district', 'district.id', '=', 'job_hunting.city_id')
|
|
->leftJoin('district', 'district.id', '=', 'job_hunting.city_id')
|
|
->leftJoin('job_enum', 'job_enum.evalue', '=', 'job_hunting.salary')
|
|
->leftJoin('job_enum', 'job_enum.evalue', '=', 'job_hunting.salary')
|
|
->leftJoin('user', 'job_hunting.user_id', '=', 'user.id')
|
|
->leftJoin('user', 'job_hunting.user_id', '=', 'user.id')
|
|
- ->select('job_resume.*', 'job_hunting.job_name_get as job_name', 'job_hunting.salary as salary', 'district.name as cityname', 'job_enum.ename as salary_name', 'user.nickname as nickname', 'user.user_name as username')
|
|
|
|
|
|
+ ->select('job_apply.*', 'job_hunting.job_name_get as job_name', 'job_hunting.salary as salary', 'district.name as cityname', 'job_enum.ename as salary_name', 'user.nickname as nickname', 'user.user_name as username')
|
|
->count();
|
|
->count();
|
|
$data = [
|
|
$data = [
|
|
'rows' => $result->toArray(),
|
|
'rows' => $result->toArray(),
|
|
@@ -4655,7 +4655,7 @@ class NewsService implements NewsServiceInterface
|
|
$data['img_url'] = substr($matches[1][0], 0, 240);
|
|
$data['img_url'] = substr($matches[1][0], 0, 240);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- if ($data['keyword'] == '') {
|
|
|
|
|
|
+ if ($data['keyword'] == '' || $data['keyword'] == array()) {
|
|
//提取标题+内容中的关键词
|
|
//提取标题+内容中的关键词
|
|
$data['keyword'] = $data['title'];
|
|
$data['keyword'] = $data['title'];
|
|
// . substr(str_replace(' ', '', strip_tags($data['content'])), 0, 20);
|
|
// . substr(str_replace(' ', '', strip_tags($data['content'])), 0, 20);
|
|
@@ -4669,6 +4669,7 @@ class NewsService implements NewsServiceInterface
|
|
//提取内容中的描述
|
|
//提取内容中的描述
|
|
$data['description'] = substr(preg_replace('/\s+/', '', strip_tags($data['detail'])), 0, 100);
|
|
$data['description'] = substr(preg_replace('/\s+/', '', strip_tags($data['detail'])), 0, 100);
|
|
}
|
|
}
|
|
|
|
+ var_dump($data, '--');
|
|
|
|
|
|
$result = Book::insertGetId($data);
|
|
$result = Book::insertGetId($data);
|
|
if (empty($result)) {
|
|
if (empty($result)) {
|