Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-tool
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张帅
amos-tool
Commits
56347814
Commit
56347814
authored
Sep 19, 2023
by
zhaozhi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
查询数据库增加前缀和后缀
parent
e9558382
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
6 deletions
+6
-6
DataBaseLinkModel.java
...m/yeejoin/amos/api/tool/face/model/DataBaseLinkModel.java
+3
-3
DataBaseLink.java
...m/yeejoin/amos/api/tool/face/orm/entity/DataBaseLink.java
+2
-2
DataBaseLinkService.java
...ejoin/amos/api/tool/face/service/DataBaseLinkService.java
+1
-1
No files found.
src/main/java/com/yeejoin/amos/api/tool/face/model/DataBaseLinkModel.java
View file @
56347814
...
...
@@ -38,16 +38,16 @@ public class DataBaseLinkModel extends BaseModel {
private
String
prefix
;
@ApiModelProperty
(
value
=
"后缀"
)
private
String
post
fix
;
private
String
suf
fix
;
public
DataBaseLinkModel
(
String
ip
,
String
port
,
String
dbName
,
String
userName
,
String
passWord
,
String
prefix
,
String
post
fix
)
{
public
DataBaseLinkModel
(
String
ip
,
String
port
,
String
dbName
,
String
userName
,
String
passWord
,
String
prefix
,
String
suf
fix
)
{
this
.
ip
=
ip
;
this
.
port
=
port
;
this
.
dbName
=
dbName
;
this
.
userName
=
userName
;
this
.
passWord
=
passWord
;
this
.
prefix
=
prefix
;
this
.
postfix
=
post
fix
;
this
.
suffix
=
suf
fix
;
}
...
...
src/main/java/com/yeejoin/amos/api/tool/face/orm/entity/DataBaseLink.java
View file @
56347814
...
...
@@ -52,7 +52,7 @@ public class DataBaseLink extends BaseEntity {
@TableField
(
"PREFIX"
)
private
String
prefix
;
@TableField
(
"
POST
FIX"
)
private
String
post
fix
;
@TableField
(
"
SUF
FIX"
)
private
String
suf
fix
;
}
src/main/java/com/yeejoin/amos/api/tool/face/service/DataBaseLinkService.java
View file @
56347814
...
...
@@ -151,7 +151,7 @@ public class DataBaseLinkService extends BaseService<DataBaseLinkModel, DataBase
Class
.
forName
(
"com.mysql.cj.jdbc.Driver"
);
// 连接新增的数据库
String
dbUrl
=
"jdbc:mysql://"
+
model
.
getIp
()
+
":"
+
model
.
getPort
()
+
"/"
+
model
.
getPrefix
()+
model
.
getDbName
()+
model
.
get
Post
fix
();
model
.
getPrefix
()+
model
.
getDbName
()+
model
.
get
Suf
fix
();
// model.getDbName();
// 解密pwd,并连接
return
DriverManager
.
getConnection
(
dbUrl
,
model
.
getUserName
(),
AESUtils
.
decrypt
(
model
.
getPassWord
()));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment