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
69dd9110
Commit
69dd9110
authored
May 17, 2024
by
guojx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
老板接口优化,删除数据库连接
parent
12684af0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
200 additions
and
5 deletions
+200
-5
FreeQueryRecordVO.java
...in/java/com/gic/cloud/data/hook/vo/FreeQueryRecordVO.java
+110
-0
FreeQuerySourceVO.java
...in/java/com/gic/cloud/data/hook/vo/FreeQuerySourceVO.java
+82
-0
FreeQueryController.java
...java/com/gic/cloud/data/hook/web/FreeQueryController.java
+8
-5
No files found.
gic-cloud-data-hook/src/main/java/com/gic/cloud/data/hook/vo/FreeQueryRecordVO.java
0 → 100644
View file @
69dd9110
package
com
.
gic
.
cloud
.
data
.
hook
.
vo
;
import
org.apache.commons.lang3.StringUtils
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* @Author guojx
* @Date 2024/5/17 15:33
*/
public
class
FreeQueryRecordVO
implements
Serializable
{
/** 查询定义编号(timestamp) */
protected
String
id
=
""
;
/** 查询定义编号(timestamp)
* @return
*/
public
String
getId
()
{
return
id
;
}
/** 查询定义编号(timestamp)
* @param id
*/
public
void
setId
(
String
id
)
{
this
.
id
=
id
;
}
/** 更新时间 */
protected
Date
updateTime
=
null
;
/** 更新时间
* @return
*/
public
Date
getUpdateTime
()
{
return
updateTime
;
}
/** 更新时间
* @param updateTime
*/
public
void
setUpdateTime
(
Date
updateTime
)
{
this
.
updateTime
=
updateTime
;
}
/** 用户编号 */
protected
String
userId
=
""
;
/** 用户编号
* @return
*/
public
String
getUserId
()
{
return
userId
;
}
/** 用户编号
* @param userId
*/
public
void
setUserId
(
String
userId
)
{
this
.
userId
=
userId
;
}
/** 查询定义名称 */
protected
String
name
=
""
;
/** 查询定义名称
* @return
*/
public
String
getName
()
{
return
name
;
}
/** 查询定义名称
* @param name
*/
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
/** 查询内容 */
protected
String
content
=
""
;
/** 查询内容
* @return
*/
public
String
getContent
()
{
return
content
;
}
/** 查询内容
* @param content
*/
public
void
setContent
(
String
content
)
{
this
.
content
=
content
;
}
/**
* 是否否有旧的表extract开头的表,1:有 需要提示:老版取数平台extract表将停止更新并下线,请根据映射关系表调整查询语句
*/
private
Integer
hasOldTable
;
public
Integer
getHasOldTable
()
{
if
(
StringUtils
.
isNotBlank
(
content
)
&&
content
.
contains
(
"extract_"
))
{
return
1
;
}
return
0
;
}
}
gic-cloud-data-hook/src/main/java/com/gic/cloud/data/hook/vo/FreeQuerySourceVO.java
0 → 100644
View file @
69dd9110
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
FreeQuerySourceVO
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 @
69dd9110
...
@@ -10,6 +10,9 @@ import com.gic.cloud.data.hook.api.entity.GeneralResult;
...
@@ -10,6 +10,9 @@ import com.gic.cloud.data.hook.api.entity.GeneralResult;
import
com.gic.cloud.data.hook.api.service.IFlatQueryResultService
;
import
com.gic.cloud.data.hook.api.service.IFlatQueryResultService
;
import
com.gic.cloud.data.hook.api.service.IFreeQueryService
;
import
com.gic.cloud.data.hook.api.service.IFreeQueryService
;
import
com.gic.cloud.data.hook.api.service.SearchLogService
;
import
com.gic.cloud.data.hook.api.service.SearchLogService
;
import
com.gic.cloud.data.hook.vo.FreeQueryRecordVO
;
import
com.gic.cloud.data.hook.vo.FreeQuerySourceVO
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.enterprise.api.dto.EnterpriseDTO
;
import
com.gic.enterprise.api.dto.EnterpriseDTO
;
import
com.gic.enterprise.api.service.EnterpriseService
;
import
com.gic.enterprise.api.service.EnterpriseService
;
import
com.gic.web.common.utils.SessionContextUtils
;
import
com.gic.web.common.utils.SessionContextUtils
;
...
@@ -56,8 +59,9 @@ public class FreeQueryController {
...
@@ -56,8 +59,9 @@ public class FreeQueryController {
* @return
* @return
*/
*/
@RequestMapping
(
"/free-query-record-list"
)
@RequestMapping
(
"/free-query-record-list"
)
public
List
<
FreeQueryRecord
>
freeQueryRecordList
(
String
userId
,
String
fuzzy
,
HttpServletRequest
request
,
HttpServletResponse
response
)
{
public
List
<
FreeQueryRecordVO
>
freeQueryRecordList
(
String
userId
,
String
fuzzy
,
HttpServletRequest
request
,
HttpServletResponse
response
)
{
return
this
.
freeQueryService
.
getFreeQueryRecordListByUserId
(
userId
,
fuzzy
);
// 限定 10 个/分页
List
<
FreeQueryRecord
>
list
=
this
.
freeQueryService
.
getFreeQueryRecordListByUserId
(
userId
,
fuzzy
);
// 限定 10 个/分页
return
EntityUtil
.
changeEntityListNew
(
FreeQueryRecordVO
.
class
,
list
);
}
}
/** 创建自定义查询记录
/** 创建自定义查询记录
...
@@ -236,14 +240,13 @@ public class FreeQueryController {
...
@@ -236,14 +240,13 @@ public class FreeQueryController {
@RequestMapping
(
"/get-custom-database"
)
@RequestMapping
(
"/get-custom-database"
)
public
FreeQuerySource
getCustomDatabase
(){
public
FreeQuerySource
VO
getCustomDatabase
(){
FreeQuerySource
freeQuerySource
=
this
.
freeQueryService
.
getFreeQuerySource
(
SessionContextUtils
.
getLoginUserEnterpriseId
());
FreeQuerySource
freeQuerySource
=
this
.
freeQueryService
.
getFreeQuerySource
(
SessionContextUtils
.
getLoginUserEnterpriseId
());
System
.
out
.
println
(
JSON
.
toJSONString
(
freeQuerySource
));
if
(
freeQuerySource
==
null
){
if
(
freeQuerySource
==
null
){
freeQuerySource
=
new
FreeQuerySource
();
freeQuerySource
=
new
FreeQuerySource
();
freeQuerySource
.
setDatabase
(
this
.
enterpriseService
.
getEnterpriseById
(
SessionContextUtils
.
getLoginUserEnterpriseId
()).
getFactoryCode
());
freeQuerySource
.
setDatabase
(
this
.
enterpriseService
.
getEnterpriseById
(
SessionContextUtils
.
getLoginUserEnterpriseId
()).
getFactoryCode
());
}
}
return
freeQuerySource
;
return
EntityUtil
.
changeEntityNew
(
FreeQuerySourceVO
.
class
,
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