Compare commits

...

2 Commits

Author SHA1 Message Date
1613d3525d fix: 修复找不到表的问题 2025-08-07 18:57:59 +08:00
49b57ab04c fix: 修复找不到表的问题 2025-08-07 18:57:26 +08:00
22 changed files with 91 additions and 86 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 213 KiB

View File

@ -1,6 +1,7 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip #distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
distributionUrl=https\://mirrors.cloud.tencent.com/gradle/gradle-8.8-bin.zip
networkTimeout=10000 networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists

View File

@ -36,7 +36,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore;
@Data @Data
@NoArgsConstructor @NoArgsConstructor
@TableName("JBX_FILE_STORAGE") @TableName("jbx_file_storage")
public class FileStorage { public class FileStorage {
@TableId(type = IdType.ASSIGN_ID) @TableId(type = IdType.ASSIGN_ID)

View File

@ -28,7 +28,7 @@ import lombok.NoArgsConstructor;
@Data @Data
@NoArgsConstructor @NoArgsConstructor
@TableName("JBX_INSTITUTIONS") @TableName("jbx_institutions")
public class Institutions extends BaseEntity implements Serializable { public class Institutions extends BaseEntity implements Serializable {
static final long serialVersionUID = -2375872012431214098L; static final long serialVersionUID = -2375872012431214098L;

View File

@ -40,7 +40,7 @@ import com.baomidou.mybatisplus.annotation.TableName;
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
@Data @Data
@NoArgsConstructor @NoArgsConstructor
@TableName("JBX_SOCIALS_ASSOCIATE") @TableName("jbx_socials_associate")
public class SocialsAssociate extends BaseEntity implements Serializable { public class SocialsAssociate extends BaseEntity implements Serializable {
@Serial @Serial
private static final long serialVersionUID = -207734216183303782L; private static final long serialVersionUID = -207734216183303782L;

View File

@ -35,7 +35,7 @@ import lombok.NoArgsConstructor;
@Data @Data
@NoArgsConstructor @NoArgsConstructor
@TableName("JBX_SOCIALS_PROVIDER") @TableName("jbx_socials_provider")
public class SocialsProvider extends BaseEntity implements Serializable { public class SocialsProvider extends BaseEntity implements Serializable {
static final long serialVersionUID = 1636727203025187769L; static final long serialVersionUID = 1636727203025187769L;

View File

@ -42,7 +42,7 @@ import com.baomidou.mybatisplus.annotation.TableName;
@Data @Data
@NoArgsConstructor @NoArgsConstructor
@TableName("JBX_SESSION_LIST") @TableName("jbx_session_list")
public class SessionList implements Serializable{ public class SessionList implements Serializable{
@Serial @Serial
private static final long serialVersionUID = -1321470643357719383L; private static final long serialVersionUID = -1321470643357719383L;

View File

@ -42,7 +42,7 @@ import lombok.NoArgsConstructor;
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
@Data @Data
@NoArgsConstructor @NoArgsConstructor
@TableName("JBX_HISTORY_CONNECTOR") @TableName("jbx_history_connector")
public class HistoryConnector extends BaseEntity implements Serializable{ public class HistoryConnector extends BaseEntity implements Serializable{
@Serial @Serial
private static final long serialVersionUID = 3465459057253994386L; private static final long serialVersionUID = 3465459057253994386L;

View File

@ -44,7 +44,7 @@ import com.jinbooks.entity.client.ClientUserAgent;
@Data @Data
@NoArgsConstructor @NoArgsConstructor
@TableName("JBX_HISTORY_LOGIN") @TableName("jbx_history_login")
public class HistoryLogin implements Serializable{ public class HistoryLogin implements Serializable{
@Serial @Serial
private static final long serialVersionUID = -1321470643357719383L; private static final long serialVersionUID = -1321470643357719383L;

View File

@ -43,7 +43,7 @@ import com.jinbooks.entity.BaseEntity;
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
@Data @Data
@NoArgsConstructor @NoArgsConstructor
@TableName("JBX_HISTORY_LOGIN_APPS") @TableName("jbx_history_login_apps")
public class HistoryLoginApps extends BaseEntity implements Serializable { public class HistoryLoginApps extends BaseEntity implements Serializable {
@Serial @Serial
private static final long serialVersionUID = -1600208317188910376L; private static final long serialVersionUID = -1600208317188910376L;

View File

@ -42,7 +42,7 @@ import lombok.NoArgsConstructor;
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
@Data @Data
@NoArgsConstructor @NoArgsConstructor
@TableName("JBX_HISTORY_SYNCHRONIZER") @TableName("jbx_history_synchronizer")
public class HistorySynchronizer extends BaseEntity implements Serializable{ public class HistorySynchronizer extends BaseEntity implements Serializable{
@Serial @Serial
private static final long serialVersionUID = -1184644499009162756L; private static final long serialVersionUID = -1184644499009162756L;

View File

@ -43,7 +43,7 @@ import lombok.NoArgsConstructor;
@Data @Data
@NoArgsConstructor @NoArgsConstructor
@TableName("JBX_HISTORY_SYSTEM_LOGS") @TableName("jbx_history_system_logs")
public class HistorySystemLogs implements Serializable { public class HistorySystemLogs implements Serializable {
@Serial @Serial

View File

@ -45,7 +45,7 @@ import lombok.NoArgsConstructor;
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
@Data @Data
@NoArgsConstructor @NoArgsConstructor
@TableName("JBX_ORGANIZATIONS") @TableName("jbx_organizations")
public class Organizations extends BaseEntity implements Serializable { public class Organizations extends BaseEntity implements Serializable {
@Serial @Serial

View File

@ -48,7 +48,7 @@ import lombok.NoArgsConstructor;
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
@Data @Data
@NoArgsConstructor @NoArgsConstructor
@TableName("JBX_USERINFO") @TableName("jbx_userinfo")
public class UserInfo extends BaseEntity implements Serializable { public class UserInfo extends BaseEntity implements Serializable {
@Serial @Serial
private static final long serialVersionUID = 6402443942083382236L; private static final long serialVersionUID = 6402443942083382236L;

View File

@ -37,7 +37,7 @@ import java.io.Serializable;
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
@Data @Data
@TableName("JBX_USERINFO") @TableName("jbx_userinfo")
public class UserInstInfo extends BaseEntity implements Serializable { public class UserInstInfo extends BaseEntity implements Serializable {
@Serial @Serial
private static final long serialVersionUID = 7092456146043154933L; private static final long serialVersionUID = 7092456146043154933L;

View File

@ -41,7 +41,7 @@ import com.jinbooks.web.WebContext;
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
@Data @Data
@NoArgsConstructor @NoArgsConstructor
@TableName("JBX_PERMISSION") @TableName("jbx_permission")
public class Permission extends BaseEntity implements Serializable { public class Permission extends BaseEntity implements Serializable {
@Serial @Serial
private static final long serialVersionUID = -8783585691243853899L; private static final long serialVersionUID = -8783585691243853899L;

View File

@ -32,7 +32,7 @@ import lombok.NoArgsConstructor;
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
@Data @Data
@NoArgsConstructor @NoArgsConstructor
@TableName("JBX_RESOURCES") @TableName("jbx_resources")
public class Resources extends BaseEntity implements Serializable { public class Resources extends BaseEntity implements Serializable {
@Serial @Serial

View File

@ -37,7 +37,7 @@ import java.util.Date;
*/ */
@Data @Data
@NoArgsConstructor @NoArgsConstructor
@TableName("JBX_ROLE_MEMBER") @TableName("jbx_role_member")
public class RoleMember implements Serializable { public class RoleMember implements Serializable {
@Serial @Serial

View File

@ -42,7 +42,7 @@ import lombok.NoArgsConstructor;
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
@Data @Data
@NoArgsConstructor @NoArgsConstructor
@TableName( "JBX_ROLES") @TableName( "jbx_roles")
public class Roles extends BaseEntity implements Serializable { public class Roles extends BaseEntity implements Serializable {
@Serial @Serial

View File

@ -262,4 +262,9 @@ public class UserInfoServiceImpl extends ServiceImpl<UserInfoMapper, UserInfo> i
public boolean switchBook(UserInfo userInfo) { public boolean switchBook(UserInfo userInfo) {
return getMapper().switchBook(userInfo) > 0; return getMapper().switchBook(userInfo) > 0;
} }
public String enPassword(String passwd){
return passwordEncoder.encode(passwd);
}
} }

View File

@ -16,10 +16,6 @@
*/ */
package com.jinbooks.web.contorller; package com.jinbooks.web.contorller;
import org.slf4j.Logger; import org.slf4j.Logger;
@ -62,7 +58,6 @@ import org.springframework.http.MediaType;
* </p> * </p>
* *
* @author Crystal.Sea * @author Crystal.Sea
*
*/ */
@RestController @RestController
@RequestMapping(value = "/login") @RequestMapping(value = "/login")
@ -79,7 +74,7 @@ public class LoginEndpoint {
LoginConfig loginConfig; LoginConfig loginConfig;
@Autowired @Autowired
AbstractAuthenticationProvider authenticationProvider ; AbstractAuthenticationProvider authenticationProvider;
@Autowired @Autowired
LoginService loginService; LoginService loginService;
@ -89,14 +84,15 @@ public class LoginEndpoint {
/** /**
* init login。登录界面初始化信息 * init login。登录界面初始化信息
*
* @return * @return
*/ */
@GetMapping(value={"/get"}, produces = {MediaType.APPLICATION_JSON_VALUE}) @GetMapping(value = {"/get"}, produces = {MediaType.APPLICATION_JSON_VALUE})
public Message<LoginConfigDto> get() { public Message<LoginConfigDto> get() {
logger.debug("/login."); logger.debug("/login.");
LoginConfigDto conf = new LoginConfigDto(); LoginConfigDto conf = new LoginConfigDto();
ConfigLoginPolicy loginPolicy = loginService.getConfigLoginPolicy(); ConfigLoginPolicy loginPolicy = loginService.getConfigLoginPolicy();
Institutions inst = (Institutions)WebContext.getAttribute(WebConstants.CURRENT_INST); Institutions inst = (Institutions) WebContext.getAttribute(WebConstants.CURRENT_INST);
conf.setInst(inst); conf.setInst(inst);
conf.setCaptcha(loginPolicy.getCaptchaMgt().toUpperCase()); conf.setCaptcha(loginPolicy.getCaptchaMgt().toUpperCase());
conf.setState(authTokenService.genRandomJwt()); conf.setState(authTokenService.genRandomJwt());
@ -108,23 +104,25 @@ public class LoginEndpoint {
/** /**
* 常规用户名和密码登录 * 常规用户名和密码登录
*
* @param credential * @param credential
* @return * @return
*/ */
@PostMapping(value={"/signin"}, produces = {MediaType.APPLICATION_JSON_VALUE}) @PostMapping(value = {"/signin"}, produces = {MediaType.APPLICATION_JSON_VALUE})
public Message<AuthJwt> signin( @RequestBody LoginCredential credential) { public Message<AuthJwt> signin(@RequestBody LoginCredential credential) {
Message<AuthJwt> authJwtMessage = new Message<>(Message.FAIL); Message<AuthJwt> authJwtMessage = new Message<>(Message.FAIL);
secretKeyManager.decrypt(credential); secretKeyManager.decrypt(credential);
if(authTokenService.validateJwtToken(credential.getState())){ if (authTokenService.validateJwtToken(credential.getState())) {
Authentication authentication = authenticationProvider.authenticate(credential); Authentication authentication = authenticationProvider.authenticate(credential);
if(authentication != null) {//success if (authentication != null) {
//success
AuthJwt authJwt = authTokenService.genAuthJwt(authentication); AuthJwt authJwt = authTokenService.genAuthJwt(authentication);
authJwtMessage.setData(Message.SUCCESS,authJwt); authJwtMessage.setData(Message.SUCCESS, authJwt);
}else {//fail } else {//fail
String errorMsg = WebContext.getAttribute(WebConstants.LOGIN_ERROR_SESSION_MESSAGE) == null ? String errorMsg = WebContext.getAttribute(WebConstants.LOGIN_ERROR_SESSION_MESSAGE) == null ?
"" : WebContext.getAttribute(WebConstants.LOGIN_ERROR_SESSION_MESSAGE).toString(); "" : WebContext.getAttribute(WebConstants.LOGIN_ERROR_SESSION_MESSAGE).toString();
authJwtMessage.setMessage(errorMsg); authJwtMessage.setMessage(errorMsg);
logger.debug("login fail , message {}",errorMsg); logger.debug("login fail , message {}", errorMsg);
} }
} }
return authJwtMessage; return authJwtMessage;

View File

@ -4,7 +4,7 @@
#server port #server port
server.port =${SERVER_PORT:2154} server.port =${SERVER_PORT:2154}
#server context path #server context path
server.servlet.context-path =/jinbooks-api #server.servlet.context-path =/jinbooks-api
############################################################################ ############################################################################
#domain name configuration # #domain name configuration #
############################################################################ ############################################################################
@ -40,9 +40,10 @@ spring.datasource.type =com.alibaba.druid.pool.DruidDat
#spring.datasource.url=jdbc:highgo://192.168.56.107:5866/highgo?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai #spring.datasource.url=jdbc:highgo://192.168.56.107:5866/highgo?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
#mysql #mysql
spring.datasource.driver-class-name =com.mysql.cj.jdbc.Driver spring.datasource.driver-class-name =com.mysql.cj.jdbc.Driver
spring.datasource.url =jdbc:mysql://${DATABASE_HOST:192.168.31.233}:${DATABASE_PORT:3306}/${DATABASE_NAME:jinbooks}?allowPublicKeyRetrieval=true&autoReconnect=true&characterEncoding=UTF-8&serverTimezone=GMT%2B8 #spring.datasource.url =jdbc:mysql://${DATABASE_HOST:www.xiaolanyu.cn}:${DATABASE_PORT:33060}/${DATABASE_NAME:jinbooks}?allowPublicKeyRetrieval=true&autoReconnect=true&characterEncoding=UTF-8&serverTimezone=GMT%2B8
spring.datasource.username =${DATABASE_USER:jinbooks} spring.datasource.url =jdbc:mysql://${DATABASE_HOST:192.168.1.210}:${DATABASE_PORT:33060}/${DATABASE_NAME:jinbooks}?allowPublicKeyRetrieval=true&autoReconnect=true&characterEncoding=UTF-8&serverTimezone=GMT%2B8
spring.datasource.password =${DATABASE_PWD:Jinbooks321!} spring.datasource.username =${DATABASE_USER:root}
spring.datasource.password =${DATABASE_PWD:Xueqiang1230@}
#mybatis #mybatis
mybatis-plus.dialect =mysql mybatis-plus.dialect =mysql
@ -69,9 +70,9 @@ logging.level.org.apache.ibatis=DEBUG
#redis server configuration # #redis server configuration #
############################################################################ ############################################################################
spring.redis.cluster.nodes = spring.redis.cluster.nodes =
spring.redis.host =${REDIS_HOST:localhost} spring.redis.host =${REDIS_HOST:192.168.1.210}
spring.redis.port =${REDIS_PORT:6379} spring.redis.port =${REDIS_PORT:6379}
spring.redis.password =${REDIS_PWD:Hlh967484.} spring.redis.password =${REDIS_PWD:}
spring.redis.timeout =10000 spring.redis.timeout =10000
spring.redis.jedis.pool.max-wait =1000 spring.redis.jedis.pool.max-wait =1000
spring.redis.jedis.pool.max-idle =200 spring.redis.jedis.pool.max-idle =200