修改猜词的音符异常
删除热点资源,主页样式优化
This commit is contained in:
@@ -57,6 +57,8 @@ public class SourceController extends BaseModelController {
|
||||
model.addAttribute("sourceList",sourceList);
|
||||
model.addAttribute("pageParam",myPageParam);
|
||||
|
||||
sourceHotPot(model);
|
||||
|
||||
// 分类信息
|
||||
List<SourceCategory> categoryList = sourceCategoryService.list(null);
|
||||
model.addAttribute("categoryList",categoryList);
|
||||
@@ -80,10 +82,8 @@ public class SourceController extends BaseModelController {
|
||||
return "source/list::s_table_refresh";
|
||||
}
|
||||
|
||||
// 列表展示
|
||||
@GetMapping("/hotspot")
|
||||
public String sourceHotPot(Model model){
|
||||
Page<Source> pageParam = new Page<>(1, 21);
|
||||
private void sourceHotPot(Model model){
|
||||
Page<Source> pageParam = new Page<>(1, 10);
|
||||
QueryWrapper<Source> sourceQuery = new QueryWrapper<>();
|
||||
sourceQuery.orderByDesc("down_record");
|
||||
sourceService.page(pageParam,sourceQuery);
|
||||
@@ -95,8 +95,7 @@ public class SourceController extends BaseModelController {
|
||||
x.setSourceContent(QuinnConstant.GUN);
|
||||
});
|
||||
}
|
||||
model.addAttribute("sourceList",sourceList);
|
||||
return "source/hotspot";
|
||||
model.addAttribute("topSourceList",sourceList);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -5,9 +5,11 @@ import com.quinn.common.ExpBucket;
|
||||
import com.quinn.utils.JsonUtils;
|
||||
import com.quinn.vo.MyPageParam;
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
import org.springframework.core.io.Resource;
|
||||
import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
|
||||
import org.springframework.core.io.support.ResourcePatternResolver;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
import org.springframework.util.ResourceUtils;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import java.io.*;
|
||||
@@ -49,9 +51,12 @@ public class BucketImage implements InitializingBean {
|
||||
}
|
||||
|
||||
private void makeDictionary() throws IOException {
|
||||
File file = ResourceUtils.getFile("classpath:bqb/image.json");
|
||||
ResourcePatternResolver resolver = new PathMatchingResourcePatternResolver();
|
||||
Resource[] resources = resolver.getResources("bqb/image.json");
|
||||
Resource resource = resources[0];
|
||||
InputStream is = resource.getInputStream();
|
||||
InputStreamReader insReader = new InputStreamReader(
|
||||
new FileInputStream(file), "UTF-8");
|
||||
is, "UTF-8");
|
||||
BufferedReader bufReader = new BufferedReader(insReader);
|
||||
String json = bufReader.readLine();
|
||||
bufReader.close();
|
||||
|
||||
@@ -5,9 +5,11 @@ import com.quinn.common.QuinnConstant;
|
||||
import com.quinn.utils.JsonUtils;
|
||||
import com.quinn.utils.QuinnUtils;
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
import org.springframework.core.io.Resource;
|
||||
import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
|
||||
import org.springframework.core.io.support.ResourcePatternResolver;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
import org.springframework.util.ResourceUtils;
|
||||
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
@@ -34,9 +36,12 @@ public class TodayLove implements InitializingBean {
|
||||
}
|
||||
|
||||
private void makeDictionary() throws IOException {
|
||||
File file = ResourceUtils.getFile("classpath:bqb/love.json");
|
||||
ResourcePatternResolver resolver = new PathMatchingResourcePatternResolver();
|
||||
Resource[] resources = resolver.getResources("bqb/love.json");
|
||||
Resource resource = resources[0];
|
||||
InputStream is = resource.getInputStream();
|
||||
InputStreamReader insReader = new InputStreamReader(
|
||||
new FileInputStream(file), "UTF-8");
|
||||
is, "UTF-8");
|
||||
BufferedReader bufReader = new BufferedReader(insReader);
|
||||
String json = bufReader.readLine();
|
||||
bufReader.close();
|
||||
|
||||
Reference in New Issue
Block a user