Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gic-platform-auth
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
base_platform_enterprise
gic-platform-auth
Commits
42e32cac
Commit
42e32cac
authored
Apr 14, 2020
by
陶光胜
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' into 'master'
Developer See merge request
!3
parents
291c26e3
7ac58514
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
72 additions
and
19 deletions
+72
-19
pom.xml
gic-platform-auth-service/pom.xml
+0
-10
CollaboratorController.java
...a/com/gic/auth/web/controller/CollaboratorController.java
+34
-9
TestObj.java
...m-auth-web/src/main/java/com/gic/auth/web/vo/TestObj.java
+38
-0
No files found.
gic-platform-auth-service/pom.xml
View file @
42e32cac
...
...
@@ -18,16 +18,6 @@
<maven.compiler.source>
1.8
</maven.compiler.source>
<maven.compiler.target>
1.8
</maven.compiler.target>
<libraryVersion>
4.0-SNAPSHOT
</libraryVersion>
<gic-sharding-sdk>
3.1-SNAPSHOT
</gic-sharding-sdk>
<!-- api依赖,正式版会在 gic-pom-base 里生成 -->
<gic-store-api>
4.0-SNAPSHOT
</gic-store-api>
<gic-redis-data>
4.0-SNAPSHOT
</gic-redis-data>
<gic-bizdict-api>
4.0.0-SNAPSHOT
</gic-bizdict-api>
<gic-platform-auth-api>
4.0-SNAPSHOT
</gic-platform-auth-api>
<gic-wechat-business-api>
4.0-SNAPSHOT
</gic-wechat-business-api>
<gic-member-api>
4.0-SNAPSHOT
</gic-member-api>
<gic-open-platform-api>
4.0-SNAPSHOT
</gic-open-platform-api>
<application-center-api>
4.0-SNAPSHOT
</application-center-api>
</properties>
<dependencies>
...
...
gic-platform-auth-web/src/main/java/com/gic/auth/web/controller/CollaboratorController.java
View file @
42e32cac
...
...
@@ -7,6 +7,7 @@ import java.util.stream.Stream;
import
javax.servlet.http.HttpServletRequest
;
import
com.alibaba.fastjson.JSON
;
import
com.gic.auth.web.vo.TestObj
;
import
com.gic.download.qo.HeaderQO
;
import
com.gic.enterprise.context.RequestContext
;
import
org.apache.logging.log4j.LogManager
;
...
...
@@ -69,7 +70,7 @@ public class CollaboratorController extends DownloadUtils{
report
.
setApplyUserId
(
userDetail
.
getUserInfo
().
getUserId
());
report
.
setDataContent
(
"北丐-测试"
);
report
.
setDataCount
(
result
.
getResult
().
getTotalCount
());
report
.
setDataType
(
1
);
report
.
setDataType
(
2
);
//只适用于对接gic的登录拦截模块
report
.
setDataUrl
((
String
)
request
.
getAttribute
(
"moduleMenuUrl"
));
LOGGER
.
info
(
"下载测试:{}"
,
JSON
.
toJSONString
(
RequestContext
.
getContext
().
getRequest
().
getAttributeNames
()));
...
...
@@ -84,19 +85,43 @@ public class CollaboratorController extends DownloadUtils{
ExecutorPoolSingleton
.
getInstance
().
executeTask
(
new
Runnable
()
{
@Override
public
void
run
()
{
DownloadDataLoader
<
CollaboratorListDTO
>
loader
=
new
DownloadDataLoader
<
CollaboratorListDTO
>()
{
List
<
Map
<
String
,
Object
>>
dataList
=
new
ArrayList
<>();
Map
<
String
,
Object
>
map1
=
new
HashMap
<>(
8
);
map1
.
put
(
"test1"
,
"test1"
);
map1
.
put
(
"2"
,
new
TestObj
(
"域名2门店1-1"
,
"域名2门店2-1"
));
map1
.
put
(
"3"
,
new
TestObj
(
"域名3门店1-1"
,
"域名3门店2-1"
));
dataList
.
add
(
map1
);
Map
<
String
,
Object
>
map2
=
new
HashMap
<>(
8
);
map2
.
put
(
"test1"
,
"test2"
);
map2
.
put
(
"2"
,
new
TestObj
(
"域名2门店1-2"
,
"域名2门店2-2"
));
map2
.
put
(
"3"
,
new
TestObj
(
"域名3门店1-2"
,
"域名3门店2-2"
));
dataList
.
add
(
map2
);
DownloadDataLoader
<
Map
<
String
,
Object
>>
loader
=
new
DownloadDataLoader
<
Map
<
String
,
Object
>>()
{
@Override
protected
List
<
CollaboratorListDTO
>
getDownloadData
(
Integer
pageNum
)
throws
Exception
{
protected
List
<
Map
<
String
,
Object
>
>
getDownloadData
(
Integer
pageNum
)
throws
Exception
{
params
.
setCurrentPage
(
pageNum
);
ServiceResponse
<
Page
<
CollaboratorListDTO
>>
result
=
collaboratorApiService
.
page
(
params
);
return
result
.
getResult
().
getResult
();
// ServiceResponse<Page<CollaboratorListDTO>> result = collaboratorApiService.page(params);
if
(
pageNum
==
2
)
{
//第二页结束test
return
null
;
}
return
dataList
;
}
};
List
<
HeaderQO
>
headerList
=
Stream
.
of
(
new
HeaderQO
(
"测试1"
,
Arrays
.
asList
(
"名称"
,
"时间"
,
"时间"
)),
new
HeaderQO
(
"测试2"
,
null
)).
collect
(
Collectors
.
toList
());
String
[]
fields
=
new
String
[]
{
"collaboratorName"
,
"phone"
,
"createTime"
};
LinkedHashMap
<
String
,
List
<
String
>>
headerList
=
new
LinkedHashMap
<>();
headerList
.
put
(
"测试1"
,
null
);
headerList
.
put
(
"域名2"
,
Arrays
.
asList
(
"门店1"
,
"门店2"
));
headerList
.
put
(
"域名3"
,
Arrays
.
asList
(
"门店1"
,
"门店2"
));
LinkedHashMap
<
String
,
List
<
String
>>
propertyNameList
=
new
LinkedHashMap
<>();
propertyNameList
.
put
(
"test1"
,
null
);
propertyNameList
.
put
(
"2"
,
Arrays
.
asList
(
"store1"
,
"store2"
));
propertyNameList
.
put
(
"3"
,
Arrays
.
asList
(
"store1"
,
"store2"
));
Map
<
String
,
List
<
String
>>
needEncryptField
=
new
HashMap
<>(
16
);
needEncryptField
.
put
(
"test1"
,
null
);
needEncryptField
.
put
(
"2"
,
Arrays
.
asList
(
"store1"
));
needEncryptField
.
put
(
"3"
,
Arrays
.
asList
(
"store2"
));
try
{
download
OfDoubleHeaderTitle
(
path
,
reportId
,
fileName
,
excelExtensionCode
,
headerList
,
Arrays
.
asList
(
fields
),
loader
,
Arrays
.
asList
(
"phone"
)
,
null
);
download
ForDoubleHeaderTitle
(
path
,
reportId
,
fileName
,
excelExtensionCode
,
headerList
,
propertyNameList
,
loader
,
needEncryptField
,
null
);
}
catch
(
Exception
e
)
{
LOGGER
.
warn
(
e
);
}
...
...
gic-platform-auth-web/src/main/java/com/gic/auth/web/vo/TestObj.java
0 → 100644
View file @
42e32cac
package
com
.
gic
.
auth
.
web
.
vo
;
import
java.io.Serializable
;
public
class
TestObj
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
4882149987195822359L
;
private
String
store1
;
private
String
store2
;
public
TestObj
()
{
}
public
TestObj
(
String
store1
,
String
store2
)
{
this
.
store1
=
store1
;
this
.
store2
=
store2
;
}
public
String
getStore1
()
{
return
store1
;
}
public
TestObj
setStore1
(
String
store1
)
{
this
.
store1
=
store1
;
return
this
;
}
public
String
getStore2
()
{
return
store2
;
}
public
TestObj
setStore2
(
String
store2
)
{
this
.
store2
=
store2
;
return
this
;
}
}
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