Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gic-cloud
Overview
Overview
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
data-hook
gic-cloud
Commits
e04109c1
Commit
e04109c1
authored
May 20, 2024
by
guojx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
获取数据库连接接口调整
parent
1fd11f80
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
88 deletions
+10
-88
FreeQuerySource.java
...main/java/com/gic/cloud/data/hook/vo/FreeQuerySource.java
+0
-82
FreeQueryController.java
...java/com/gic/cloud/data/hook/web/FreeQueryController.java
+10
-6
No files found.
gic-cloud-data-hook/src/main/java/com/gic/cloud/data/hook/vo/FreeQuerySource.java
deleted
100644 → 0
View file @
1fd11f80
package
com
.
gic
.
cloud
.
data
.
hook
.
vo
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* @Author guojx
* @Date 2024/5/17 15:36
*/
public
class
FreeQuerySource
implements
Serializable
{
/** 自定义查询编号 */
protected
String
id
=
""
;
/** 自定义查询编号
* @return
*/
public
String
getId
()
{
return
id
;
}
/** 自定义查询编号
* @param id
*/
public
void
setId
(
String
id
)
{
this
.
id
=
id
;
}
/** 商户编号 */
protected
String
enterpriseId
=
""
;
/** 商户编号
* @return
*/
public
String
getEnterpriseId
()
{
return
enterpriseId
;
}
/** 商户编号
* @param enterpriseId
*/
public
void
setEnterpriseId
(
String
enterpriseId
)
{
this
.
enterpriseId
=
enterpriseId
;
}
/** 商户名称 */
protected
String
enterpriseName
=
""
;
/** 商户名称
* @return
*/
public
String
getEnterpriseName
()
{
return
enterpriseName
;
}
/** 商户名称
* @param enterpriseName
*/
public
void
setEnterpriseName
(
String
enterpriseName
)
{
this
.
enterpriseName
=
enterpriseName
;
}
private
Integer
isPrivate
=
0
;
private
Date
dbExpiration
;
public
Integer
getIsPrivate
()
{
return
isPrivate
;
}
public
void
setIsPrivate
(
Integer
isPrivate
)
{
this
.
isPrivate
=
isPrivate
;
}
public
Date
getDbExpiration
()
{
return
dbExpiration
;
}
public
void
setDbExpiration
(
Date
dbExpiration
)
{
this
.
dbExpiration
=
dbExpiration
;
}
}
gic-cloud-data-hook/src/main/java/com/gic/cloud/data/hook/web/FreeQueryController.java
View file @
e04109c1
...
...
@@ -8,7 +8,6 @@ import com.gic.cloud.data.hook.api.entity.GeneralResult;
import
com.gic.cloud.data.hook.api.service.IFreeQueryService
;
import
com.gic.cloud.data.hook.api.service.SearchLogService
;
import
com.gic.cloud.data.hook.vo.FreeQueryRecord
;
import
com.gic.cloud.data.hook.vo.FreeQuerySource
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.enterprise.api.service.EnterpriseService
;
import
com.gic.web.common.utils.SessionContextUtils
;
...
...
@@ -125,7 +124,7 @@ public class FreeQueryController {
@RequestMapping
(
"/get-free-query-count"
)
public
GeneralResult
getFreeQueryCount
(
String
sql
,
String
enterpriseId
,
HttpServletRequest
request
,
HttpServletResponse
response
)
{
GeneralResult
result
=
new
GeneralResult
();
com
.
gic
.
cloud
.
data
.
hook
.
api
.
dto
.
FreeQuerySource
freeQuerySource
=
this
.
freeQueryService
.
getFreeQuerySource
(
SessionContextUtils
.
getLoginUserEnterpriseId
());
FreeQuerySource
freeQuerySource
=
this
.
freeQueryService
.
getFreeQuerySource
(
SessionContextUtils
.
getLoginUserEnterpriseId
());
if
(
freeQuerySource
!=
null
){
Date
expireTime
=
freeQuerySource
.
getDbExpiration
();
Integer
isPrivate
=
freeQuerySource
.
getIsPrivate
();
...
...
@@ -236,11 +235,16 @@ public class FreeQueryController {
@RequestMapping
(
"/get-custom-database"
)
public
FreeQuerySource
getCustomDatabase
(){
com
.
gic
.
cloud
.
data
.
hook
.
api
.
dto
.
FreeQuerySource
freeQuerySource
=
this
.
freeQueryService
.
getFreeQuerySource
(
SessionContextUtils
.
getLoginUserEnterpriseId
());
FreeQuerySource
freeQuerySource
=
this
.
freeQueryService
.
getFreeQuerySource
(
SessionContextUtils
.
getLoginUserEnterpriseId
());
if
(
freeQuerySource
==
null
){
freeQuerySource
=
new
com
.
gic
.
cloud
.
data
.
hook
.
api
.
dto
.
FreeQuerySource
();
freeQuerySource
=
new
FreeQuerySource
();
freeQuerySource
.
setDatabase
(
this
.
enterpriseService
.
getEnterpriseById
(
SessionContextUtils
.
getLoginUserEnterpriseId
()).
getFactoryCode
());
}
if
(
freeQuerySource
!=
null
)
{
freeQuerySource
.
setUrl
(
null
);
freeQuerySource
.
setUsername
(
null
);
freeQuerySource
.
setPassword
(
null
);
}
return
EntityUtil
.
changeEntityNew
(
FreeQuerySource
.
class
,
freeQuerySource
);
}
...
...
@@ -251,10 +255,10 @@ public class FreeQueryController {
* @return
*/
@RequestMapping
(
"/get-db-cache"
)
public
com
.
gic
.
cloud
.
data
.
hook
.
api
.
dto
.
FreeQuerySource
cache
(
String
a
,
String
b
){
public
FreeQuerySource
cache
(
String
a
,
String
b
){
ServiceResponse
<
String
>
stringServiceResponse
=
this
.
freeQueryService
.
testCacheDb
(
a
,
b
);
System
.
out
.
println
(
JSON
.
toJSONString
(
stringServiceResponse
));
return
new
com
.
gic
.
cloud
.
data
.
hook
.
api
.
dto
.
FreeQuerySource
();
return
new
FreeQuerySource
();
}
...
...
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