change package name,fixes error

This commit is contained in:
2025-08-05 14:44:03 +08:00
parent 9832336b89
commit 69700c8fe1
22 changed files with 46 additions and 39 deletions

View File

@@ -15,7 +15,7 @@
<version>3.5.4</version> <version>3.5.4</version>
<relativePath/> <!-- lookup parent from repository --> <relativePath/> <!-- lookup parent from repository -->
</parent> </parent>
<groupId>com.ttstd</groupId> <groupId>com.onekeycall</groupId>
<artifactId>VideoTablet</artifactId> <artifactId>VideoTablet</artifactId>
<version>0.0.1-SNAPSHOT</version> <version>0.0.1-SNAPSHOT</version>
<name>VideoTablet</name> <name>VideoTablet</name>

View File

@@ -1,4 +1,4 @@
package com.ttstd.videotablet; package com.onekeycall.videotablet;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;

View File

@@ -1,4 +1,4 @@
package com.ttstd.videotablet.config; package com.onekeycall.videotablet.config;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;

View File

@@ -1,4 +1,4 @@
package com.ttstd.videotablet.config; package com.onekeycall.videotablet.config;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;

View File

@@ -1,4 +1,4 @@
package com.ttstd.videotablet.config; package com.onekeycall.videotablet.config;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;

View File

@@ -1,6 +1,6 @@
package com.ttstd.videotablet.controller; package com.onekeycall.videotablet.controller;
import com.ttstd.videotablet.result.Result; import com.onekeycall.videotablet.result.Result;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.StringRedisTemplate; import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;

View File

@@ -1,8 +1,8 @@
package com.ttstd.videotablet.controller; package com.onekeycall.videotablet.controller;
import com.ttstd.videotablet.entity.User; import com.onekeycall.videotablet.entity.User;
import com.ttstd.videotablet.service.UserService; import com.onekeycall.videotablet.service.UserService;
import com.ttstd.videotablet.utils.TextUtils; import com.onekeycall.videotablet.utils.TextUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate; import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;

View File

@@ -1,10 +1,10 @@
package com.ttstd.videotablet.controller; package com.onekeycall.videotablet.controller;
import com.aliyun.dysmsapi20170525.models.SendSmsResponse; import com.aliyun.dysmsapi20170525.models.SendSmsResponse;
import com.aliyun.tea.TeaException; import com.aliyun.tea.TeaException;
import com.ttstd.videotablet.result.Result; import com.onekeycall.videotablet.result.Result;
import com.ttstd.videotablet.sms.SendSms; import com.onekeycall.videotablet.sms.SendSms;
import com.ttstd.videotablet.utils.TextUtils; import com.onekeycall.videotablet.utils.TextUtils;
import org.apache.commons.lang3.RandomStringUtils; import org.apache.commons.lang3.RandomStringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate; import org.springframework.data.redis.core.RedisTemplate;

View File

@@ -1,7 +1,6 @@
package com.ttstd.videotablet.dto; package com.onekeycall.videotablet.dto;
import lombok.Data; import lombok.Data;
import java.util.Date;
/** /**
* 双Token认证令牌对AccessToken + RefreshToken * 双Token认证令牌对AccessToken + RefreshToken

View File

@@ -1,4 +1,4 @@
package com.ttstd.videotablet.entity; package com.onekeycall.videotablet.entity;
import jakarta.persistence.*; import jakarta.persistence.*;
import org.springframework.security.core.GrantedAuthority; import org.springframework.security.core.GrantedAuthority;

View File

@@ -1,6 +1,6 @@
package com.ttstd.videotablet.handler; package com.onekeycall.videotablet.handler;
import com.ttstd.videotablet.result.Result; import com.onekeycall.videotablet.result.Result;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
import org.springframework.validation.FieldError; import org.springframework.validation.FieldError;
import org.springframework.web.bind.MethodArgumentNotValidException; import org.springframework.web.bind.MethodArgumentNotValidException;

View File

@@ -1,6 +1,6 @@
package com.ttstd.videotablet.repository; package com.onekeycall.videotablet.repository;
import com.ttstd.videotablet.entity.User; import com.onekeycall.videotablet.entity.User;
import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaRepository;
import java.util.Optional; import java.util.Optional;

View File

@@ -1,4 +1,4 @@
package com.ttstd.videotablet.result; package com.onekeycall.videotablet.result;
/** /**
* 接口返回工具类 * 接口返回工具类

View File

@@ -1,4 +1,4 @@
package com.ttstd.videotablet.result; package com.onekeycall.videotablet.result;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;

View File

@@ -1,4 +1,4 @@
package com.ttstd.videotablet.result; package com.onekeycall.videotablet.result;
/** /**
* 状态码 * 状态码

View File

@@ -1,7 +1,7 @@
package com.ttstd.videotablet.service; package com.onekeycall.videotablet.service;
import com.ttstd.videotablet.entity.User; import com.onekeycall.videotablet.entity.User;
import com.ttstd.videotablet.repository.UserRepository; import com.onekeycall.videotablet.repository.UserRepository;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate; import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.security.core.userdetails.UserDetails; import org.springframework.security.core.userdetails.UserDetails;

View File

@@ -1,4 +1,4 @@
package com.ttstd.videotablet.sms; package com.onekeycall.videotablet.sms;
// This file is auto-generated, don't edit it. Thanks. // This file is auto-generated, don't edit it. Thanks.

View File

@@ -1,4 +1,4 @@
package com.ttstd.videotablet.utils; package com.onekeycall.videotablet.utils;
import java.io.File; import java.io.File;
import java.io.FileInputStream; import java.io.FileInputStream;

View File

@@ -1,6 +1,6 @@
package com.ttstd.videotablet.utils; package com.onekeycall.videotablet.utils;
import com.ttstd.videotablet.dto.TokenPair; import com.onekeycall.videotablet.dto.TokenPair;
import io.jsonwebtoken.Jwts; import io.jsonwebtoken.Jwts;
import io.jsonwebtoken.security.Keys; import io.jsonwebtoken.security.Keys;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@@ -18,9 +18,12 @@ public class JwtUtil {
@Autowired @Autowired
private StringRedisTemplate redisTemplate; private StringRedisTemplate redisTemplate;
@Value("${jwt.secret}") private String secret; @Value("${jwt.secret}")
@Value("${jwt.access-expire}") private Long accessExpire; private String secret;
@Value("${jwt.refresh-expire}") private Long refreshExpire; @Value("${jwt.access-expire}")
private Long accessExpire;
@Value("${jwt.refresh-expire}")
private Long refreshExpire;
// 生成双Token关联设备指纹 // 生成双Token关联设备指纹
public TokenPair generateTokenPair(String username, String deviceId) { public TokenPair generateTokenPair(String username, String deviceId) {
@@ -50,7 +53,7 @@ public class JwtUtil {
TimeUnit.MILLISECONDS TimeUnit.MILLISECONDS
); );
return new TokenPair(accessToken, refreshToken); return new TokenPair(accessToken, refreshToken, accessExpire, refreshExpire, deviceId);
} }
// Token解析与校验 // Token解析与校验

View File

@@ -1,4 +1,4 @@
package com.ttstd.videotablet.utils; package com.onekeycall.videotablet.utils;
public class TextUtils { public class TextUtils {
public static boolean isEmpty(CharSequence str) { public static boolean isEmpty(CharSequence str) {

View File

@@ -28,3 +28,8 @@ spring.data.redis.lettuce.shutdown-timeout=100ms
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL8Dialect spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL8Dialect
spring.jpa.hibernate.ddl-auto=update spring.jpa.hibernate.ddl-auto=update
spring.jpa.show-sql=true spring.jpa.show-sql=true
jwt.secret='wPQ1qRFo4YbuA849tmwKnDpQ8891vJBo'
# 可选,根据你的需要设置过期时间
jwt.access-expire=86400000
jwt.refresh-expire=2592000000

View File

@@ -1,4 +1,4 @@
package com.ttstd.videotablet; package com.onekeycall.videotablet;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest;