优化部分引用
This commit is contained in:
parent
59fde72a18
commit
19da87a044
@ -5,15 +5,15 @@ import org.springframework.web.bind.annotation.GetMapping;
|
||||
|
||||
@Controller
|
||||
public class NavigationController {
|
||||
@GetMapping("/personal/")
|
||||
public String personal_index(){
|
||||
return "self";
|
||||
}
|
||||
|
||||
@GetMapping("/personal/mobile")
|
||||
public String personal_mobile(){
|
||||
return "selfMobile";
|
||||
}
|
||||
// @GetMapping("/personal/")
|
||||
// public String personal_index(){
|
||||
// return "self";
|
||||
// }
|
||||
//
|
||||
// @GetMapping("/personal/mobile")
|
||||
// public String personal_mobile(){
|
||||
// return "selfMobile";
|
||||
// }
|
||||
|
||||
@GetMapping("/")
|
||||
public String index(){
|
||||
@ -25,8 +25,4 @@ public class NavigationController {
|
||||
return "mobile";
|
||||
}
|
||||
|
||||
@GetMapping("/publish/")
|
||||
public String publish_index(){
|
||||
return "publish";
|
||||
}
|
||||
}
|
||||
|
||||
@ -65,7 +65,7 @@ public class PersonalController {
|
||||
}
|
||||
|
||||
@PostMapping("/extendShareTime")
|
||||
public String extendShareTime(String path, Integer extendHour) throws JsonProcessingException {
|
||||
public String extendShareTime(String path, Integer extendHour) {
|
||||
return personalService.extendShareTime(path, extendHour);
|
||||
}
|
||||
|
||||
|
||||
@ -35,14 +35,4 @@ public class GalleryTask {
|
||||
|
||||
@JsonIgnore
|
||||
private String path;
|
||||
|
||||
@JsonIgnore
|
||||
public boolean is_download_complete(){
|
||||
return status == DOWNLOAD_COMPLETE;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public boolean is_compress_complete(){
|
||||
return status == COMPRESS_COMPLETE;
|
||||
}
|
||||
}
|
||||
|
||||
@ -21,8 +21,4 @@ public class User {
|
||||
|
||||
@JsonProperty("isEnable")
|
||||
boolean isEnable;
|
||||
|
||||
public String getUniqueId(){
|
||||
return id < 10 ? "0" + id: "" + id;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -3,6 +3,7 @@ package com.lion.lionwebsite.Interceptor;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.springframework.web.servlet.HandlerInterceptor;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
|
||||
public class HumanInterceptor implements HandlerInterceptor {
|
||||
|
||||
@ -4,6 +4,7 @@ import com.lion.lionwebsite.Dao.UserMapper;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.springframework.lang.NonNullApi;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.servlet.HandlerInterceptor;
|
||||
|
||||
|
||||
@ -12,7 +12,6 @@ import com.lion.lionwebsite.Util.GalleryUtil;
|
||||
import com.lion.lionwebsite.Util.Response;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.servlet.ServletOutputStream;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import lombok.Data;
|
||||
@ -21,10 +20,6 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.io.*;
|
||||
import java.net.URI;
|
||||
import java.net.URL;
|
||||
import java.net.http.HttpClient;
|
||||
import java.net.http.HttpRequest;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.ZoneId;
|
||||
import java.util.*;
|
||||
@ -387,6 +382,7 @@ public class GalleryManageService {
|
||||
tagMapper.disMarkTagByGid(gallery.getGid()); //删除本子标记
|
||||
gid2name_cache.remove(gallery.getGid()); //删除本子缓存
|
||||
page2pageNameCache.remove(gallery.getName()); //移除页数缓存
|
||||
pageNameCacheMapper.deletePageNameByGid(gid);
|
||||
|
||||
if(new File(TargetPath + "/" + gallery.getName()).isDirectory()) //删除本地缓存
|
||||
FileUtil.del(TargetPath + "/" + gallery.getName());
|
||||
|
||||
@ -6,7 +6,6 @@ import com.lion.lionwebsite.Dao.ShareFileMapper;
|
||||
import com.lion.lionwebsite.Domain.CustomConfiguration;
|
||||
import com.lion.lionwebsite.Domain.ShareFile;
|
||||
import com.lion.lionwebsite.Util.CustomUtil;
|
||||
import com.lion.lionwebsite.Util.GalleryUtil;
|
||||
import jakarta.annotation.Resource;
|
||||
import lombok.Data;
|
||||
import org.apache.http.HttpEntity;
|
||||
@ -26,7 +25,6 @@ import java.nio.file.attribute.BasicFileAttributes;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import static java.nio.file.FileVisitResult.CONTINUE;
|
||||
|
||||
|
||||
@ -245,6 +245,8 @@ public class RemoteService {
|
||||
boolean result = promise.await(10, TimeUnit.SECONDS);
|
||||
if(result){
|
||||
ResponseMessage rsm = (ResponseMessage)promise.getNow();
|
||||
if(rsm.getResult() != 0)
|
||||
log.error("更新本子" + gallery.getName() + "出错" + rsm.getResult());
|
||||
}
|
||||
}catch (InterruptedException e){
|
||||
e.printStackTrace();
|
||||
|
||||
@ -99,7 +99,6 @@ public class FileDownload {
|
||||
if (transmitted < contentLength) {
|
||||
len = randomAccessFile.read(buff, 0, (int) (contentLength - transmitted));
|
||||
outputStream.write(buff, 0, len);
|
||||
transmitted += len;
|
||||
}
|
||||
|
||||
outputStream.flush();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user