fix: 修复找不到表的问题
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 213 KiB |
@ -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
|
||||||
|
|||||||
@ -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)
|
||||||
|
|||||||
@ -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;
|
||||||
|
|
||||||
|
|||||||
@ -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;
|
||||||
|
|||||||
@ -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;
|
||||||
|
|
||||||
|
|||||||
@ -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;
|
||||||
|
|||||||
@ -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;
|
||||||
|
|||||||
@ -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;
|
||||||
|
|||||||
@ -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;
|
||||||
|
|||||||
@ -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;
|
||||||
|
|||||||
@ -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
|
||||||
|
|||||||
@ -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
|
||||||
|
|||||||
@ -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;
|
||||||
|
|||||||
@ -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;
|
||||||
|
|||||||
@ -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;
|
||||||
|
|||||||
@ -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
|
||||||
|
|||||||
@ -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
|
||||||
|
|||||||
@ -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
|
||||||
|
|||||||
@ -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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,12 +1,12 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright [2025] [JinBooks of copyright http://www.jinbooks.com]
|
* Copyright [2025] [JinBooks of copyright http://www.jinbooks.com]
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
* You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
@ -14,10 +14,6 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
package com.jinbooks.web.contorller;
|
package com.jinbooks.web.contorller;
|
||||||
@ -62,72 +58,74 @@ import org.springframework.http.MediaType;
|
|||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* @author Crystal.Sea
|
* @author Crystal.Sea
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping(value = "/login")
|
@RequestMapping(value = "/login")
|
||||||
public class LoginEndpoint {
|
public class LoginEndpoint {
|
||||||
private static final Logger logger = LoggerFactory.getLogger(LoginEndpoint.class);
|
private static final Logger logger = LoggerFactory.getLogger(LoginEndpoint.class);
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
AuthTokenService authTokenService;
|
AuthTokenService authTokenService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
ApplicationConfig applicationConfig;
|
ApplicationConfig applicationConfig;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
LoginConfig loginConfig;
|
LoginConfig loginConfig;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
AbstractAuthenticationProvider authenticationProvider ;
|
AbstractAuthenticationProvider authenticationProvider;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
LoginService loginService;
|
LoginService loginService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
SecretKeyManager secretKeyManager;
|
SecretKeyManager secretKeyManager;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* init login。登录界面初始化信息
|
* init login。登录界面初始化信息
|
||||||
* @return
|
*
|
||||||
*/
|
* @return
|
||||||
@GetMapping(value={"/get"}, produces = {MediaType.APPLICATION_JSON_VALUE})
|
*/
|
||||||
public Message<LoginConfigDto> get() {
|
@GetMapping(value = {"/get"}, produces = {MediaType.APPLICATION_JSON_VALUE})
|
||||||
logger.debug("/login.");
|
public Message<LoginConfigDto> get() {
|
||||||
LoginConfigDto conf = new LoginConfigDto();
|
logger.debug("/login.");
|
||||||
ConfigLoginPolicy loginPolicy = loginService.getConfigLoginPolicy();
|
LoginConfigDto conf = new LoginConfigDto();
|
||||||
Institutions inst = (Institutions)WebContext.getAttribute(WebConstants.CURRENT_INST);
|
ConfigLoginPolicy loginPolicy = loginService.getConfigLoginPolicy();
|
||||||
conf.setInst(inst);
|
Institutions inst = (Institutions) WebContext.getAttribute(WebConstants.CURRENT_INST);
|
||||||
conf.setCaptcha(loginPolicy.getCaptchaMgt().toUpperCase());
|
conf.setInst(inst);
|
||||||
conf.setState(authTokenService.genRandomJwt());
|
conf.setCaptcha(loginPolicy.getCaptchaMgt().toUpperCase());
|
||||||
LoginSecretKey loginSecretKey = secretKeyManager.getSecretKey();
|
conf.setState(authTokenService.genRandomJwt());
|
||||||
conf.setSecretKey(loginSecretKey.getSecretKey());
|
LoginSecretKey loginSecretKey = secretKeyManager.getSecretKey();
|
||||||
conf.setSecretPublicKey(loginSecretKey.getPublicKey());
|
conf.setSecretKey(loginSecretKey.getSecretKey());
|
||||||
return new Message<>(conf);
|
conf.setSecretPublicKey(loginSecretKey.getPublicKey());
|
||||||
}
|
return new Message<>(conf);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 常规用户名和密码登录
|
* 常规用户名和密码登录
|
||||||
* @param credential
|
*
|
||||||
* @return
|
* @param credential
|
||||||
*/
|
* @return
|
||||||
@PostMapping(value={"/signin"}, produces = {MediaType.APPLICATION_JSON_VALUE})
|
*/
|
||||||
public Message<AuthJwt> signin( @RequestBody LoginCredential credential) {
|
@PostMapping(value = {"/signin"}, produces = {MediaType.APPLICATION_JSON_VALUE})
|
||||||
Message<AuthJwt> authJwtMessage = new Message<>(Message.FAIL);
|
public Message<AuthJwt> signin(@RequestBody LoginCredential credential) {
|
||||||
secretKeyManager.decrypt(credential);
|
Message<AuthJwt> authJwtMessage = new Message<>(Message.FAIL);
|
||||||
if(authTokenService.validateJwtToken(credential.getState())){
|
secretKeyManager.decrypt(credential);
|
||||||
Authentication authentication = authenticationProvider.authenticate(credential);
|
if (authTokenService.validateJwtToken(credential.getState())) {
|
||||||
if(authentication != null) {//success
|
Authentication authentication = authenticationProvider.authenticate(credential);
|
||||||
AuthJwt authJwt = authTokenService.genAuthJwt(authentication);
|
if (authentication != null) {
|
||||||
authJwtMessage.setData(Message.SUCCESS,authJwt);
|
//success
|
||||||
}else {//fail
|
AuthJwt authJwt = authTokenService.genAuthJwt(authentication);
|
||||||
String errorMsg = WebContext.getAttribute(WebConstants.LOGIN_ERROR_SESSION_MESSAGE) == null ?
|
authJwtMessage.setData(Message.SUCCESS, authJwt);
|
||||||
"" : WebContext.getAttribute(WebConstants.LOGIN_ERROR_SESSION_MESSAGE).toString();
|
} else {//fail
|
||||||
authJwtMessage.setMessage(errorMsg);
|
String errorMsg = WebContext.getAttribute(WebConstants.LOGIN_ERROR_SESSION_MESSAGE) == null ?
|
||||||
logger.debug("login fail , message {}",errorMsg);
|
"" : WebContext.getAttribute(WebConstants.LOGIN_ERROR_SESSION_MESSAGE).toString();
|
||||||
}
|
authJwtMessage.setMessage(errorMsg);
|
||||||
}
|
logger.debug("login fail , message {}", errorMsg);
|
||||||
return authJwtMessage;
|
}
|
||||||
}
|
}
|
||||||
|
return authJwtMessage;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user