更新打包固件;流量倍率过滤改为2倍;修复缩略图加载失败;更新e站搜索参数
This commit is contained in:
parent
0838434d64
commit
e8cc4b1097
1
pom.xml
1
pom.xml
@ -113,6 +113,7 @@
|
||||
<plugin>
|
||||
<groupId>org.graalvm.buildtools</groupId>
|
||||
<artifactId>native-maven-plugin</artifactId>
|
||||
<version>0.10.3</version>
|
||||
<configuration>
|
||||
<imageName>lionwebsite</imageName>
|
||||
<buildArgs>
|
||||
|
||||
@ -32,7 +32,7 @@ public interface SubMapper {
|
||||
@Insert("insert into sub_update_record (user, ip, UA, time, location) values (#{user}, #{ip}, #{UA}, #{time}, #{location})")
|
||||
void insertSubUpdateRecord(SubUpdateRecord subUpdateRecord);
|
||||
|
||||
@Select("select * from sub_update_record")
|
||||
@Select("select * from sub_update_record order by time desc")
|
||||
ArrayList<SubUpdateRecord> selectAllSubUpdateRecord();
|
||||
|
||||
@Delete("delete from sub_update_record where user=#{user}")
|
||||
|
||||
@ -106,7 +106,7 @@ public class LocalServiceImpl{
|
||||
if (matcher.find()) {
|
||||
// 将匹配到的数字添加到列表中
|
||||
float ratio = Float.parseFloat(matcher.group());
|
||||
if(ratio <= 1) {
|
||||
if(ratio <= 2) {
|
||||
stringBuilder.append(node).append("\n");
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -31,7 +31,7 @@ public class QueryService {
|
||||
public String query(String keyword, String prev, String next) {
|
||||
Response response = Response.generateResponse();
|
||||
String result;
|
||||
String param = "?f_search=" + keyword.replace(" ", "+");
|
||||
String param = "?f_search=" + keyword.replace(" ", "+") + "&f_sft=on&f_sfu=on&f_sfl=on";
|
||||
|
||||
if(prev != null)
|
||||
param += "&prev=" + prev;
|
||||
@ -111,11 +111,12 @@ public class QueryService {
|
||||
}
|
||||
|
||||
path = "https://ehgt.org/" + path;
|
||||
try(ServletOutputStream outputStream = response.getOutputStream();
|
||||
FileInputStream inputStream = new FileInputStream(image.getAbsoluteFile())){
|
||||
try(ServletOutputStream outputStream = response.getOutputStream()){
|
||||
new URI(path).toURL().openConnection().getInputStream().transferTo(new FileOutputStream(CachePath + fileName + suffix));
|
||||
GalleryUtil.convertImg(CachePath + fileName + suffix, suffix);
|
||||
FileInputStream inputStream = new FileInputStream(image.getAbsoluteFile()); //如果放到括号里,会导致图片未创建时创建文件流失败报错
|
||||
outputStream.write(inputStream.readAllBytes());
|
||||
inputStream.close();
|
||||
}catch (IOException | URISyntaxException e){
|
||||
System.out.println(e.getMessage());
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user