添加热点缓存
This commit is contained in:
@@ -2,6 +2,8 @@ package org.jiayunet.service;
|
||||
|
||||
import org.jiayunet.ai.AiChatAbility;
|
||||
import org.jiayunet.ai.AiResponseCleanTool;
|
||||
import org.jiayunet.config.CacheConfig;
|
||||
import org.springframework.cache.annotation.Cacheable;
|
||||
import org.springframework.util.StopWatch;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
@@ -212,6 +214,7 @@ public class JobService {
|
||||
* <p>岗位关联公司、公司关联行业(bg_industry level=2),按上架岗位数量倒序取前 limit 个</p>
|
||||
* <p>只返回行业ID和名称,岗位数量仅用于排序不对外暴露</p>
|
||||
*/
|
||||
@Cacheable(cacheNames = CacheConfig.HOT_INDUSTRY)
|
||||
public List<HotIndustryVo> listHotIndustries(Integer limit) {
|
||||
return jobMapper.selectHotIndustries(limit);
|
||||
}
|
||||
@@ -221,6 +224,7 @@ public class JobService {
|
||||
* <p>bg_job.category_id 存三级叶子,SQL 内自关联上溯到二级后按二级分组,按上架岗位数量倒序取前 limit 个</p>
|
||||
* <p>只返回岗位类型ID和名称,岗位数量仅用于排序不对外暴露</p>
|
||||
*/
|
||||
@Cacheable(cacheNames = CacheConfig.HOT_JOB_CATEGORY)
|
||||
public List<HotJobCategoryVo> listHotJobCategories(Integer limit) {
|
||||
return jobMapper.selectHotJobCategories(limit);
|
||||
}
|
||||
@@ -230,6 +234,7 @@ public class JobService {
|
||||
* <p>岗位关联公司、公司关联地区,按上架岗位数量倒序取前 limit 个</p>
|
||||
* <p>只返回地区编码和名称,岗位数量仅用于排序不对外暴露</p>
|
||||
*/
|
||||
@Cacheable(cacheNames = CacheConfig.HOT_CITY)
|
||||
public List<HotCityVo> listHotCities(Integer limit) {
|
||||
return jobMapper.selectHotCities(limit);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user