|
@@ -9,6 +9,7 @@ import org.jeecg.modules.app.vo.*;
|
|
import org.jeecg.modules.system.app.entity.AppBanner;
|
|
import org.jeecg.modules.system.app.entity.AppBanner;
|
|
import org.jeecg.modules.system.app.entity.AppCourses;
|
|
import org.jeecg.modules.system.app.entity.AppCourses;
|
|
import org.jeecg.modules.system.app.entity.AppInstructor;
|
|
import org.jeecg.modules.system.app.entity.AppInstructor;
|
|
|
|
+import org.jeecg.modules.system.app.entity.AppSearchHot;
|
|
import org.jeecg.modules.system.app.mapper.*;
|
|
import org.jeecg.modules.system.app.mapper.*;
|
|
import org.jeecg.modules.system.entity.SysDepart;
|
|
import org.jeecg.modules.system.entity.SysDepart;
|
|
import org.jeecg.modules.system.entity.SysUser;
|
|
import org.jeecg.modules.system.entity.SysUser;
|
|
@@ -43,6 +44,8 @@ public class AppHomeServiceImpl implements IAppHomeService {
|
|
private AppCategoryMapper appCategoryMapper;
|
|
private AppCategoryMapper appCategoryMapper;
|
|
@Resource
|
|
@Resource
|
|
private AppGameMapper appGameMapper;
|
|
private AppGameMapper appGameMapper;
|
|
|
|
+ @Resource
|
|
|
|
+ private AppSearchHotMapper appSearchHotMapper;
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public HomeVO homeInfo() {
|
|
public HomeVO homeInfo() {
|
|
@@ -164,6 +167,18 @@ public class AppHomeServiceImpl implements IAppHomeService {
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public Object search(SearchDTO searchDTO) {
|
|
public Object search(SearchDTO searchDTO) {
|
|
|
|
+ AppSearchHot appSearchHot = appSearchHotMapper.selectOne(Wrappers.<AppSearchHot>lambdaQuery()
|
|
|
|
+ .eq(AppSearchHot::getSearchContent, searchDTO.getKeyword())
|
|
|
|
+ .last("LIMIT 1"));
|
|
|
|
+ if(null == appSearchHot){
|
|
|
|
+ appSearchHotMapper.insert(new AppSearchHot()
|
|
|
|
+ .setSearchContent(searchDTO.getKeyword())
|
|
|
|
+ .setSearchCount(1)
|
|
|
|
+ .setIsActive(1)
|
|
|
|
+ .setIsRecommend(0));
|
|
|
|
+ }else {
|
|
|
|
+ appSearchHotMapper.updateById(appSearchHot.setSearchCount(appSearchHot.getSearchCount() + 1));
|
|
|
|
+ }
|
|
switch (searchDTO.getVenueType().charAt(0)) {
|
|
switch (searchDTO.getVenueType().charAt(0)) {
|
|
case '0':
|
|
case '0':
|
|
return convertSearchPlaceVOPage(searchDTO);
|
|
return convertSearchPlaceVOPage(searchDTO);
|
|
@@ -176,6 +191,13 @@ public class AppHomeServiceImpl implements IAppHomeService {
|
|
}
|
|
}
|
|
return new Page<>();
|
|
return new Page<>();
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public List<AppSearchHot> getHotSearch() {
|
|
|
|
+ return appSearchHotMapper.selectList(Wrappers.<AppSearchHot>lambdaQuery()
|
|
|
|
+ .last("LIMIT 10").orderByDesc(AppSearchHot::getSearchCount));
|
|
|
|
+ }
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* @Author SheepHy
|
|
* @Author SheepHy
|
|
* @Description 全局搜索场地分页查询
|
|
* @Description 全局搜索场地分页查询
|