You've already forked FrameTour-BE
乱七八糟的修改,其他外围流程逻辑完善
This commit is contained in:
@ -44,6 +44,10 @@ public class JwtTokenUtil {
|
||||
*/
|
||||
public String generateToken(JwtInfo jwtInfo) throws Exception {
|
||||
// 过期时间,默认 15 天
|
||||
return generateToken(jwtInfo, expire);
|
||||
}
|
||||
|
||||
public static String generateToken(JwtInfo jwtInfo, int expire) throws Exception {
|
||||
LocalDateTime expireTime = LocalDateTime.now().plusDays(expire);
|
||||
byte[] bytes = RsaKeyUtil.toBytes(PRI_KEY);
|
||||
String token = JwtAnalysisUtil.generateToken(jwtInfo, bytes, expireTime);
|
||||
|
@ -14,6 +14,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.net.URI;
|
||||
import java.util.Date;
|
||||
|
||||
@Slf4j
|
||||
@ -117,4 +118,9 @@ public class OssUtil {
|
||||
return false;
|
||||
}
|
||||
|
||||
public void deleteFileByUrl(String faceUrl) {
|
||||
URI uri = URI.create(faceUrl);
|
||||
String objectName = uri.getPath();
|
||||
deleteFile(objectName);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user