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
219ad39a
Commit
219ad39a
authored
Jun 03, 2020
by
陶光胜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
取数平台权限
parent
e75f3ece
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
202 additions
and
24 deletions
+202
-24
pom.xml
gic-cloud-data-hook-api/pom.xml
+1
-1
FlatQueryTable.java
.../java/com/gic/cloud/data/hook/api/dto/FlatQueryTable.java
+7
-0
FreeQuerySource.java
...java/com/gic/cloud/data/hook/api/dto/FreeQuerySource.java
+29
-0
FlatQueryTaskCondition.java
...ic/cloud/data/hook/api/entity/FlatQueryTaskCondition.java
+9
-0
IFlatQueryResultService.java
.../cloud/data/hook/api/service/IFlatQueryResultService.java
+4
-3
IFreeQueryService.java
...om/gic/cloud/data/hook/api/service/IFreeQueryService.java
+2
-4
pom.xml
gic-cloud-data-hook-service/pom.xml
+1
-1
MysqlHelper.java
...ain/java/com/gic/cloud/data/hook/service/MysqlHelper.java
+4
-1
FlatQueryResultServiceImpl.java
...ud/data/hook/service/impl/FlatQueryResultServiceImpl.java
+26
-8
FreeQueryServiceImpl.java
...ic/cloud/data/hook/service/impl/FreeQueryServiceImpl.java
+5
-0
FlatQueryTableDao.xml
...k-service/src/main/resources/mapper/FlatQueryTableDao.xml
+2
-1
pom.xml
gic-cloud-data-hook/pom.xml
+1
-1
AlarmController.java
...ain/java/com/gic/cloud/data/hook/web/AlarmController.java
+80
-0
FlatQueryController.java
...java/com/gic/cloud/data/hook/web/FlatQueryController.java
+30
-3
data-hook-dubbo-config.xml
...a-hook/src/main/webapp/WEB-INF/data-hook-dubbo-config.xml
+1
-1
No files found.
gic-cloud-data-hook-api/pom.xml
View file @
219ad39a
...
...
@@ -20,7 +20,7 @@
<name>
${project.artifactId}
</name>
<properties>
<libraryVersion>
3.0-SNAPSHOT
</libraryVersion>
</properties>
<distributionManagement>
<snapshotRepository>
...
...
gic-cloud-data-hook-api/src/main/java/com/gic/cloud/data/hook/api/dto/FlatQueryTable.java
View file @
219ad39a
...
...
@@ -129,6 +129,13 @@ public class FlatQueryTable implements Serializable {
this
.
isFavo
=
isFavo
;
}
private
String
authStoreId
;
public
String
getAuthStoreId
()
{
return
authStoreId
;
}
public
void
setAuthStoreId
(
String
authStoreId
)
{
this
.
authStoreId
=
authStoreId
;
}
}
gic-cloud-data-hook-api/src/main/java/com/gic/cloud/data/hook/api/dto/FreeQuerySource.java
View file @
219ad39a
package
com
.
gic
.
cloud
.
data
.
hook
.
api
.
dto
;
import
java.io.Serializable
;
import
java.util.Date
;
/** 自定义查询 DTO
*
...
...
@@ -110,4 +111,32 @@ public class FreeQuerySource implements Serializable {
public
void
setPassword
(
String
password
)
{
this
.
password
=
password
;
}
private
String
database
=
""
;
private
Integer
isPrivate
=
0
;
private
Date
dbExpiration
;
public
String
getDatabase
()
{
return
database
;
}
public
void
setDatabase
(
String
database
)
{
this
.
database
=
database
;
}
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-api/src/main/java/com/gic/cloud/data/hook/api/entity/FlatQueryTaskCondition.java
View file @
219ad39a
...
...
@@ -177,4 +177,13 @@ public class FlatQueryTaskCondition {
}
private
List
<
String
>
authStoreIdList
;
public
List
<
String
>
getAuthStoreIdList
()
{
return
authStoreIdList
;
}
public
void
setAuthStoreIdList
(
List
<
String
>
authStoreIdList
)
{
this
.
authStoreIdList
=
authStoreIdList
;
}
}
gic-cloud-data-hook-api/src/main/java/com/gic/cloud/data/hook/api/service/IFlatQueryResultService.java
View file @
219ad39a
...
...
@@ -22,7 +22,7 @@ public interface IFlatQueryResultService {
* @return
*/
public
FlatQueryResult
getFlatQueryResult
(
String
tableId
,
List
<
String
>
enterpriseIds
,
List
<
FlatQueryCondition
>
queryConditions
,
String
orderField
,
String
orderDir
,
Boolean
execDistinct
,
Integer
queryDataType
,
Integer
limitRange
,
int
dataPermission
);
Boolean
execDistinct
,
Integer
queryDataType
,
Integer
limitRange
,
int
dataPermission
,
List
<
String
>
authStoreList
);
/** 评估自助指标查询下载任务数据量
* @param tableId
...
...
@@ -34,7 +34,7 @@ public interface IFlatQueryResultService {
* @return
*/
public
Integer
estimateFlatQueryDownloadTask
(
String
tableId
,
List
<
String
>
enterpriseIds
,
List
<
FlatQueryCondition
>
queryConditions
,
String
orderField
,
String
orderDir
,
Boolean
execDistinct
);
String
orderField
,
String
orderDir
,
Boolean
execDistinct
,
List
<
String
>
authStoreIdList
);
/** 创建自助指标查询的下载任务
* @param userId
...
...
@@ -51,7 +51,8 @@ public interface IFlatQueryResultService {
*/
public
DownloadTask
buildFlatQueryDownloadTask
(
String
userId
,
String
name
,
String
moduleName
,
Integer
amount
,
String
format
,
String
tableId
,
List
<
String
>
enterpriseIds
,
List
<
FlatQueryCondition
>
queryConditions
,
String
orderField
,
String
orderDir
,
Boolean
execDistinct
,
String
useCompress
,
Integer
queryDataType
,
String
applyId
);
String
useCompress
,
Integer
queryDataType
,
String
applyId
,
List
<
String
>
authStoreIdList
);
/** 获取自助指标字段过滤条件数据
* @param tableId
...
...
gic-cloud-data-hook-api/src/main/java/com/gic/cloud/data/hook/api/service/IFreeQueryService.java
View file @
219ad39a
package
com
.
gic
.
cloud
.
data
.
hook
.
api
.
service
;
import
com.gic.cloud.data.hook.api.dto.DownloadTask
;
import
com.gic.cloud.data.hook.api.dto.FreeQueryRecord
;
import
com.gic.cloud.data.hook.api.dto.FreeQueryResult
;
import
com.gic.cloud.data.hook.api.dto.FreeQueryTable
;
import
com.gic.cloud.data.hook.api.dto.*
;
import
java.util.List
;
...
...
@@ -79,4 +76,5 @@ public interface IFreeQueryService {
public
List
<
String
>
getColumnsByTable
(
String
tableName
);
FreeQuerySource
getFreeQuerySource
(
String
enterpriseId
);
}
gic-cloud-data-hook-service/pom.xml
View file @
219ad39a
...
...
@@ -43,7 +43,7 @@
<dependency>
<groupId>
com.gic
</groupId>
<artifactId>
gic-cloud-data-hook-api
</artifactId>
<version>
${
dataHookVersion
}
</version>
<version>
${
gic-cloud-data-hook-api
}
</version>
</dependency>
<dependency>
<groupId>
com.gic
</groupId>
...
...
gic-cloud-data-hook-service/src/main/java/com/gic/cloud/data/hook/service/MysqlHelper.java
View file @
219ad39a
...
...
@@ -46,7 +46,7 @@ public class MysqlHelper implements ApplicationContextAware {
}
/** MysqlHelper 单例 */
p
rivate
static
MysqlHelper
instance
=
null
;
p
ublic
static
MysqlHelper
instance
=
null
;
/** 构造函数 */
public
MysqlHelper
()
{
...
...
@@ -77,6 +77,9 @@ public class MysqlHelper implements ApplicationContextAware {
source
.
setUrl
(
url
);
source
.
setUsername
(
result
.
getString
(
"usr"
));
source
.
setPassword
(
result
.
getString
(
"password"
));
source
.
setDatabase
(
result
.
getString
(
"database"
));
source
.
setDbExpiration
(
result
.
getDate
(
"db_expiration"
));
source
.
setIsPrivate
(
result
.
getInt
(
"isprivate"
));
conn
.
close
();
return
source
;
}
...
...
gic-cloud-data-hook-service/src/main/java/com/gic/cloud/data/hook/service/impl/FlatQueryResultServiceImpl.java
View file @
219ad39a
...
...
@@ -17,6 +17,7 @@ import com.google.common.collect.Lists;
import
com.opencsv.CSVWriter
;
import
com.opencsv.ResultSetHelper
;
import
io.netty.handler.codec.http.HttpUtil
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.poi.ss.usermodel.Cell
;
import
org.apache.poi.ss.usermodel.Row
;
...
...
@@ -76,7 +77,7 @@ public class FlatQueryResultServiceImpl implements IFlatQueryResultService {
* @return
*/
public
String
buildFlatQuerySQL
(
Boolean
queryOrDownload
,
String
tableId
,
List
<
String
>
enterpriseIds
,
List
<
FlatQueryCondition
>
queryConditions
,
String
orderField
,
String
orderDir
,
Boolean
execDistinct
,
Integer
limitRange
)
{
Boolean
execDistinct
,
Integer
limitRange
,
List
<
String
>
authStoreIdList
)
{
log
.
debug
(
"buildFlatQuerySQL"
,
"自助指标查询来自 "
+
enterpriseIds
.
get
(
0
));
// 查询处理开始
String
queryDistinct
=
execDistinct
?
" DISTINCT "
:
""
;
...
...
@@ -152,6 +153,18 @@ public class FlatQueryResultServiceImpl implements IFlatQueryResultService {
}
// IF OVER
}
// FOR OVER
//管辖门店权限控制
if
(
CollectionUtils
.
isNotEmpty
(
authStoreIdList
)){
FlatQueryTable
table
=
this
.
flatQueryTableDao
.
getFlatQueryTableById
(
null
,
tableId
);
if
(
table
!=
null
){
queryFilters
+=
" AND "
+
table
.
getAuthStoreId
()
+
"in("
;
for
(
int
i
=
0
;
i
<
authStoreIdList
.
size
();
i
++){
queryFilters
+=
i
==
0
?
"'"
+
authStoreIdList
.
get
(
i
)
+
"'"
:
",'"
+
authStoreIdList
.
get
(
i
)
+
"'"
;
}
queryFilters
+=
")"
;
}
}
// 最终处理 queryFilters、LIMIT、DISTINCT
if
(!
StringUtils
.
isNotBlank
(
queryFilters
))
queryFilters
=
" AND "
+
queryFilters
;
// if (!queryFilters.equals("")) queryFilters = " WHERE " + queryFilters;
String
queryLimit
=
limitRange
>
0
?
" limit "
+
limitRange
:
""
;
...
...
@@ -163,7 +176,7 @@ public class FlatQueryResultServiceImpl implements IFlatQueryResultService {
@Override
public
FlatQueryResult
getFlatQueryResult
(
String
tableId
,
List
<
String
>
enterpriseIds
,
List
<
FlatQueryCondition
>
queryConditions
,
String
orderField
,
String
orderDir
,
Boolean
execDistinct
,
Integer
queryDataType
,
Integer
limitRange
,
int
dataPermission
)
{
Boolean
execDistinct
,
Integer
queryDataType
,
Integer
limitRange
,
int
dataPermission
,
List
<
String
>
authStoreIdList
)
{
log
.
debug
(
"getFlatQueryResult"
,
"自助指标查询来自 "
+
enterpriseIds
.
get
(
0
));
// 定义返回值
FlatQueryResult
result
=
new
FlatQueryResult
();
...
...
@@ -176,7 +189,8 @@ public class FlatQueryResultServiceImpl implements IFlatQueryResultService {
orderField
,
orderDir
,
execDistinct
,
limitRange
);
limitRange
,
authStoreIdList
);
// 进行查询
Connection
conn
=
HiveHelper
.
getHiveConnection
();
if
(
conn
!=
null
)
{
...
...
@@ -329,7 +343,7 @@ public class FlatQueryResultServiceImpl implements IFlatQueryResultService {
*/
public
Integer
estimateFlatQueryDownloadTask
(
String
tableId
,
List
<
String
>
enterpriseIds
,
List
<
FlatQueryCondition
>
queryConditions
,
String
orderField
,
String
orderDir
,
Boolean
execDistinct
)
{
String
orderDir
,
Boolean
execDistinct
,
List
<
String
>
authStoreIdList
)
{
Integer
result
=
-
1
;
// 生成正式查询
String
preQuery
=
this
.
buildFlatQuerySQL
(
...
...
@@ -340,7 +354,8 @@ public class FlatQueryResultServiceImpl implements IFlatQueryResultService {
orderField
,
orderDir
,
execDistinct
,
0
);
0
,
authStoreIdList
);
String
finQuery
=
"SELECT COUNT(1) FROM ("
+
preQuery
+
") AS tmpTable"
;
Connection
conn
=
HiveHelper
.
getHiveConnection
();
if
(
conn
!=
null
)
{
...
...
@@ -384,7 +399,7 @@ public class FlatQueryResultServiceImpl implements IFlatQueryResultService {
* @return
*/
public
DownloadTask
buildFlatQueryDownloadTask
(
String
userId
,
String
name
,
String
moduleName
,
Integer
amount
,
String
format
,
String
tableId
,
List
<
String
>
enterpriseIds
,
List
<
FlatQueryCondition
>
queryConditions
,
String
orderField
,
String
orderDir
,
Boolean
execDistinct
,
String
useCompress
,
Integer
queryDataType
,
String
applyId
)
{
String
useCompress
,
Integer
queryDataType
,
String
applyId
,
List
<
String
>
authStoreIdList
)
{
log
.
debug
(
"buildFlatQueryDownloadTask"
,
"自助指标下载请求来自 "
+
enterpriseIds
.
get
(
0
));
// 增加下载量
FlatQueryTable
table
=
this
.
flatQueryTableDao
.
getFlatQueryTableById
(
userId
,
tableId
);
...
...
@@ -436,7 +451,8 @@ public class FlatQueryResultServiceImpl implements IFlatQueryResultService {
if
(
curTask
.
getApplyPermitted
().
equals
(
Global
.
YES
))
{
condition
.
setBuildPermitted
(
Global
.
YES
);
}
else
condition
.
setBuildPermitted
(
Global
.
NO
);
//设置管辖门店权限
condition
.
setAuthStoreIdList
(
authStoreIdList
);
// 保存至列表
this
.
taskConditions
.
add
(
condition
);
return
curTask
;
...
...
@@ -481,7 +497,9 @@ public class FlatQueryResultServiceImpl implements IFlatQueryResultService {
condition
.
getConditions
(),
condition
.
getOrderField
(),
condition
.
getOrderDir
(),
condition
.
getExecDistinct
(),
0
);
condition
.
getExecDistinct
(),
0
,
condition
.
getAuthStoreIdList
());
Connection
conn
=
HiveHelper
.
getHiveConnection
();
if
(
conn
!=
null
)
{
...
...
gic-cloud-data-hook-service/src/main/java/com/gic/cloud/data/hook/service/impl/FreeQueryServiceImpl.java
View file @
219ad39a
...
...
@@ -161,6 +161,11 @@ public class FreeQueryServiceImpl implements IFreeQueryService {
}
@Override
public
FreeQuerySource
getFreeQuerySource
(
String
enterpriseId
)
{
return
MysqlHelper
.
instance
.
getFreeQuerySource
(
enterpriseId
);
}
@Override
public
Integer
getFreeQueryCount
(
String
sql
,
String
enterpriseId
)
{
//sql = prefixSQL(enterpriseId, sql);
Integer
result
=
-
1
;
...
...
gic-cloud-data-hook-service/src/main/resources/mapper/FlatQueryTableDao.xml
View file @
219ad39a
...
...
@@ -18,7 +18,8 @@
q.description,
q.click_count,
q.download_count,
f.is_favo
f.is_favo,
q.auth_store_id
</sql>
<sql
id=
"queryJoins"
>
...
...
gic-cloud-data-hook/pom.xml
View file @
219ad39a
...
...
@@ -36,7 +36,7 @@
<dependency>
<groupId>
com.gic
</groupId>
<artifactId>
gic-cloud-data-hook-api
</artifactId>
<version>
${
dataHookVersion
}
</version>
<version>
${
gic-cloud-data-hook-api
}
</version>
</dependency>
<dependency>
<groupId>
com.gic
</groupId>
...
...
gic-cloud-data-hook/src/main/java/com/gic/cloud/data/hook/web/AlarmController.java
0 → 100644
View file @
219ad39a
package
com
.
gic
.
cloud
.
data
.
hook
.
web
;
import
com.gic.cloud.data.hook.api.dto.FreeQuerySource
;
import
com.gic.cloud.data.hook.api.service.IFreeQueryService
;
import
com.gic.enterprise.api.dto.EnterpriseDTO
;
import
com.gic.enterprise.api.service.EnterpriseService
;
import
com.gic.web.common.utils.SessionContextUtils
;
import
com.lmax.disruptor.util.DaemonThreadFactory
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
java.util.Calendar
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.Map
;
@Controller
public
class
AlarmController
{
private
static
final
Logger
log
=
LogManager
.
getLogger
(
AlarmController
.
class
);
@Autowired
private
EnterpriseService
enterpriseService
;
@Autowired
private
IFreeQueryService
freeQueryService
;
@RequestMapping
(
"service-alarm"
)
public
Map
<
String
,
Object
>
serviceAlarm
(){
EnterpriseDTO
enterprise
=
this
.
enterpriseService
.
getEnterpriseById
(
SessionContextUtils
.
getLoginUserEnterpriseId
());
Integer
alarmWay
=
enterprise
.
getAlarmWay
();
Date
expireTime
=
enterprise
.
getDatahookEndDate
();
return
this
.
getAlarmResult
(
expireTime
,
alarmWay
);
}
@RequestMapping
(
"custom-alarm"
)
public
Map
<
String
,
Object
>
customAlarm
(){
EnterpriseDTO
enterprise
=
this
.
enterpriseService
.
getEnterpriseById
(
SessionContextUtils
.
getLoginUserEnterpriseId
());
Integer
alarmWay
=
enterprise
.
getAlarmWay
();
FreeQuerySource
freeQuerySource
=
this
.
freeQueryService
.
getFreeQuerySource
(
SessionContextUtils
.
getLoginUserEnterpriseId
());
Date
expireTime
=
freeQuerySource
.
getDbExpiration
();
return
this
.
getAlarmResult
(
expireTime
,
alarmWay
);
}
private
Map
<
String
,
Object
>
getAlarmResult
(
Date
expireTime
,
Integer
alarmWay
){
Map
<
String
,
Object
>
result
=
new
HashMap
<>();
if
(
expireTime
!=
null
){
if
(
expireTime
.
before
(
new
Date
())){
result
.
put
(
"type"
,
2
);
result
.
put
(
"remain"
,
0
);
}
else
{
Date
alarmTime
=
null
;
Calendar
calendar
=
Calendar
.
getInstance
();
if
(
alarmWay
==
1
){
calendar
.
setTime
(
expireTime
);
calendar
.
add
(
Calendar
.
MONTH
,
-
2
);
}
else
if
(
alarmWay
==
2
){
calendar
.
setTime
(
expireTime
);
calendar
.
add
(
Calendar
.
MONTH
,
-
1
);
}
else
{
calendar
.
setTime
(
expireTime
);
calendar
.
add
(
Calendar
.
DATE
,
-
7
);
}
alarmTime
=
calendar
.
getTime
();
if
(
alarmTime
.
before
(
new
Date
())){
result
.
put
(
"type"
,
1
);
result
.
put
(
"remain"
,
(
alarmTime
.
getTime
()
-
new
Date
().
getTime
())/
1000
/
3600
/
24
);
}
else
{
result
.
put
(
"type"
,
0
);
result
.
put
(
"remain"
,
0
);
}
}
}
else
{
result
.
put
(
"type"
,
0
);
result
.
put
(
"remain"
,
0
);
}
return
result
;
}
}
gic-cloud-data-hook/src/main/java/com/gic/cloud/data/hook/web/FlatQueryController.java
View file @
219ad39a
package
com
.
gic
.
cloud
.
data
.
hook
.
web
;
import
com.gic.clerk.api.dto.AuthorizedUser
;
import
com.gic.clerk.api.dto.PowerClerkDTO
;
import
com.gic.clerk.api.service.PowerService
;
import
com.gic.cloud.common.api.base.Page
;
import
com.gic.cloud.data.hook.api.dto.*
;
import
com.gic.cloud.data.hook.api.entity.FlatQueryCondition
;
...
...
@@ -11,6 +14,7 @@ import com.gic.cloud.data.hook.api.service.IFlatQueryTableService;
import
com.gic.cloud.data.hook.api.service.IMyFlatQueryService
;
import
com.gic.enterprise.api.dto.EnterpriseSettingDTO
;
import
com.gic.enterprise.api.service.EnterpriseService
;
import
com.gic.enterprise.api.service.StoreWidgetService
;
import
com.gic.web.common.utils.SessionContextUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
...
...
@@ -47,6 +51,10 @@ public class FlatQueryController {
private
IMyFlatQueryService
myFlatQueryService
;
@Autowired
private
EnterpriseService
enterpriseService
;
@Autowired
private
StoreWidgetService
storeWidgetService
;
@Autowired
private
PowerService
powerService
;
/** 查询表定义及下载量等信息
...
...
@@ -124,7 +132,8 @@ public class FlatQueryController {
executeRequest
.
getExecDistinct
(),
executeRequest
.
getQueryDataType
(),
1000
,
dataPermission
);
// 强制 1000 限制
dataPermission
,
this
.
getAuthStoreId
());
// 强制 1000 限制
}
/** 获取自助查询下载量评估
...
...
@@ -142,7 +151,8 @@ public class FlatQueryController {
executeRequest
.
getQueryConditions
(),
executeRequest
.
getOrderField
(),
executeRequest
.
getOrderDir
(),
executeRequest
.
getExecDistinct
()
executeRequest
.
getExecDistinct
(),
this
.
getAuthStoreId
()
);
result
.
setInfo
(
String
.
valueOf
(
amount
));
return
result
;
...
...
@@ -184,7 +194,8 @@ public class FlatQueryController {
executeRequest
.
getExecDistinct
(),
executeRequest
.
getUseCompress
()
?
Global
.
YES
:
Global
.
NO
,
executeRequest
.
getQueryDataType
(),
executeRequest
.
getApplyId
()
executeRequest
.
getApplyId
(),
this
.
getAuthStoreId
()
);
}
...
...
@@ -259,6 +270,22 @@ public class FlatQueryController {
}
private
List
<
String
>
getAuthStoreId
(){
List
<
String
>
list
=
new
ArrayList
<>();
AuthorizedUser
user
=
SessionContextUtils
.
getLoginUser
();
if
(
user
.
getSuperAdmin
()
!=
1
){
EnterpriseSettingDTO
setting
=
this
.
enterpriseService
.
getEnterpriseSettingByEnterpriseId
(
user
.
getEnterpriseId
());
if
(
setting
.
getEnableAccessControl
()
!=
null
&&
setting
.
getEnableAccessControl
()
==
1
)
{
PowerClerkDTO
clerkDetail
=
this
.
powerService
.
getClerkDetail
(
user
.
getUserId
());
List
<
String
>
authStoreList
=
this
.
storeWidgetService
.
getStoreWidgetStore
(
clerkDetail
.
getStoreWidgetId
(),
user
.
getEnterpriseId
(),
null
,
null
,
null
);
list
.
addAll
(
authStoreList
);
if
(
CollectionUtils
.
isEmpty
(
list
)){
list
.
add
(
"1"
);
}
}
}
return
list
;
}
...
...
gic-cloud-data-hook/src/main/webapp/WEB-INF/data-hook-dubbo-config.xml
View file @
219ad39a
...
...
@@ -25,7 +25,7 @@
<dubbo:reference
interface=
"com.gic.clerk.api.service.ClerkService"
id=
"clerkService"
timeout=
"6000"
retries=
"0"
/>
<dubbo:reference
interface=
"com.gic.clerk.api.service.UserService"
id=
"userService"
timeout=
"6000"
retries=
"0"
/>
<dubbo:reference
interface=
"com.gic.clerk.api.service.PowerService"
id=
"powerService"
timeout=
"6000"
retries=
"0"
/>
<dubbo:reference
interface=
"com.gic.enterprise.api.service.StoreWidgetService"
id=
"storeWidgetService"
timeout=
"6000"
retries=
"0"
/>
<!--<dubbo:reference interface="com.gic.enterprise.api.service.EnterPerformanceService" id="enterPerformanceService" timeout="10000" retries="0" />
<dubbo:reference interface="com.gic.cloud.communicate.api.service.performance.CloudPerformanceService" id="cloudPerformanceService" timeout="10000" retries="0" />
<dubbo:reference interface="com.gic.cloud.communicate.api.service.store.AreaService" id="areaService" timeout="10000" retries="0" />-->
...
...
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