feat: 新增多个服务类及工具类,重构部分代码结构
重构服务类结构,将分散的服务统一整合到service包下 新增ProjectConstant常量类及多个实体服务类 添加SecurityUtils安全工具类和BeanCacher工具类 优化部分UI控件和转换器的实现
This commit is contained in:
@@ -1,11 +1,5 @@
|
||||
package com.ecep.contract.controller;
|
||||
|
||||
import static com.ecep.contract.AppV2.DEFAULT_DB_DATABASE;
|
||||
import static com.ecep.contract.AppV2.DEFAULT_DB_HOST;
|
||||
import static com.ecep.contract.AppV2.DEFAULT_DB_PASSWORD;
|
||||
import static com.ecep.contract.AppV2.DEFAULT_DB_PORT;
|
||||
import static com.ecep.contract.AppV2.DEFAULT_DB_USERNAME;
|
||||
|
||||
import java.io.FileOutputStream;
|
||||
import java.net.Inet4Address;
|
||||
import java.net.InetAddress;
|
||||
@@ -36,7 +30,6 @@ import org.springframework.util.StringUtils;
|
||||
import com.ecep.contract.Desktop;
|
||||
import com.ecep.contract.MessageHolder;
|
||||
import com.ecep.contract.SpringApp;
|
||||
import com.ecep.contract.ds.other.controller.HomeWindowController;
|
||||
import com.zaxxer.hikari.HikariDataSource;
|
||||
|
||||
import javafx.application.Platform;
|
||||
@@ -82,24 +75,9 @@ public class LoginWidowController implements MessageHolder {
|
||||
}
|
||||
|
||||
String getHost() {
|
||||
return properties.getProperty("db.server.host", DEFAULT_DB_HOST);
|
||||
return properties.getProperty("server.host");
|
||||
}
|
||||
|
||||
String getPort() {
|
||||
return properties.getProperty("db.server.port", DEFAULT_DB_PORT);
|
||||
}
|
||||
|
||||
String getDatabase() {
|
||||
return properties.getProperty("db.server.database", DEFAULT_DB_DATABASE);
|
||||
}
|
||||
|
||||
public String getUserName() {
|
||||
return properties.getProperty("db.server.username", DEFAULT_DB_USERNAME);
|
||||
}
|
||||
|
||||
public String getPassword() {
|
||||
return properties.getProperty("db.server.password", DEFAULT_DB_PASSWORD);
|
||||
}
|
||||
|
||||
public void tryLogin() {
|
||||
// CompletableFuture<ButtonType> future = new CompletableFuture<>();
|
||||
@@ -122,6 +100,16 @@ public class LoginWidowController implements MessageHolder {
|
||||
}
|
||||
|
||||
|
||||
private String getPassword() {
|
||||
// TODO Auto-generated method stub
|
||||
throw new UnsupportedOperationException("Unimplemented method 'getPassword'");
|
||||
}
|
||||
|
||||
private String getUserName() {
|
||||
// TODO Auto-generated method stub
|
||||
throw new UnsupportedOperationException("Unimplemented method 'getUserName'");
|
||||
}
|
||||
|
||||
CompletableFuture<List<LoginWidowController.MacIP>> getMacAndIP() {
|
||||
return CompletableFuture.supplyAsync(() -> {
|
||||
// mac ip
|
||||
@@ -204,6 +192,16 @@ public class LoginWidowController implements MessageHolder {
|
||||
|
||||
}
|
||||
|
||||
private String getDatabase() {
|
||||
// TODO Auto-generated method stub
|
||||
throw new UnsupportedOperationException("Unimplemented method 'getDatabase'");
|
||||
}
|
||||
|
||||
private String getPort() {
|
||||
// TODO Auto-generated method stub
|
||||
throw new UnsupportedOperationException("Unimplemented method 'getPort'");
|
||||
}
|
||||
|
||||
private void createSession(Connection connection, EmployeeInfo employeeInfo) {
|
||||
employeeInfo.sessionId = addHistory(connection, employeeInfo.employeeId, employeeInfo.binds.getFirst());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user