|
@@ -1149,10 +1149,11 @@ class NewsService implements NewsServiceInterface
|
|
}
|
|
}
|
|
//手动推荐文章
|
|
//手动推荐文章
|
|
$commend_ids = $result['commend_id'] ? json_decode($result['commend_id']) : [];
|
|
$commend_ids = $result['commend_id'] ? json_decode($result['commend_id']) : [];
|
|
- $commendArticle = Article::whereIn('id', $commend_ids)
|
|
|
|
- ->where('status', 1)
|
|
|
|
- ->select('id', 'title', 'catid', 'imgurl', 'hits', 'created_at')
|
|
|
|
- ->orderBy('updated_at', 'desc')
|
|
|
|
|
|
+ $commendArticle = Article::whereIn('article.id', $commend_ids)
|
|
|
|
+ ->leftjoin('website_category', 'website_category.category_id', '=', 'article.catid')
|
|
|
|
+ ->where('article.status', 1)
|
|
|
|
+ ->select('article.id', 'article.title', 'article.catid', 'article.imgurl', 'article.hits', 'article.created_at', 'website_category.alias', 'website_category.alias_pinyin')
|
|
|
|
+ ->orderBy('article.updated_at', 'desc')
|
|
->limit(5)
|
|
->limit(5)
|
|
->get();
|
|
->get();
|
|
$result['category_id'] = $category['category_id'];
|
|
$result['category_id'] = $category['category_id'];
|
|
@@ -5061,21 +5062,21 @@ class NewsService implements NewsServiceInterface
|
|
'address_arr_id' => $data['address_arr_id'], // 企业地址
|
|
'address_arr_id' => $data['address_arr_id'], // 企业地址
|
|
'address' => $data['address'], // 企业详细地址
|
|
'address' => $data['address'], // 企业详细地址
|
|
]);
|
|
]);
|
|
- if(empty($result['userinfo'])){
|
|
|
|
|
|
+ if (empty($result['userinfo'])) {
|
|
Db::rollBack();
|
|
Db::rollBack();
|
|
return Result::error('修改企业会员信息失败!');
|
|
return Result::error('修改企业会员信息失败!');
|
|
}
|
|
}
|
|
$result['user'] = User::where('id', $data['user_id'])->update([
|
|
$result['user'] = User::where('id', $data['user_id'])->update([
|
|
'email' => $data['email'], // 企业邮箱
|
|
'email' => $data['email'], // 企业邮箱
|
|
]);
|
|
]);
|
|
- if(empty($result['user'])){
|
|
|
|
|
|
+ if (empty($result['user'])) {
|
|
Db::rollBack();
|
|
Db::rollBack();
|
|
return Result::error('修改个人中心信息失败!');
|
|
return Result::error('修改个人中心信息失败!');
|
|
}
|
|
}
|
|
// 该企业会员若是未发布招聘信息则暂无该企业会员的企业信息
|
|
// 该企业会员若是未发布招聘信息则暂无该企业会员的企业信息
|
|
- if(!empty($job_company)){
|
|
|
|
|
|
+ if (!empty($job_company)) {
|
|
$result['job_company'] = JobCompany::where('user_id', $data['user_id'])->update($company);
|
|
$result['job_company'] = JobCompany::where('user_id', $data['user_id'])->update($company);
|
|
- if(empty($result['job_company'])){
|
|
|
|
|
|
+ if (empty($result['job_company'])) {
|
|
Db::rollBack();
|
|
Db::rollBack();
|
|
return Result::error('修改企业会员信息失败!');
|
|
return Result::error('修改企业会员信息失败!');
|
|
}
|
|
}
|