Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
scrm
/
rop-merchant
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 6faa436c
authored
Aug 13, 2021
by
zhouhb
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
[+]代码修改
1 parent
268a7233
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
7 deletions
src/main/java/cn/com/glsx/merchants/config/UserAspect.java
src/main/java/cn/com/glsx/merchants/response/StaffExportResponse.java
src/main/java/cn/com/glsx/merchants/service/StaffService.java
src/main/java/cn/com/glsx/merchants/util/FileUploadUtil.java
src/main/java/cn/com/glsx/merchants/config/UserAspect.java
View file @
6faa436
...
...
@@ -65,9 +65,9 @@ public class UserAspect {
field
.
setAccessible
(
true
);
field
.
set
(
object
,
user
.
getId
());
field3
.
setAccessible
(
true
);
field3
.
set
(
object
,
user
.
get
Real
name
());
field3
.
set
(
object
,
user
.
get
User
name
());
field1
.
setAccessible
(
true
);
field1
.
set
(
object
,
user
.
get
Real
name
());
field1
.
set
(
object
,
user
.
get
User
name
());
field2
.
setAccessible
(
true
);
field2
.
set
(
object
,
user
.
getId
());
field4
.
setAccessible
(
true
);
...
...
@@ -107,7 +107,7 @@ public class UserAspect {
}
else
{
merchantUser
.
setSource
(
Contants
.
SYSTEM_SOURCE_OPERATION
);
}
log
.
info
(
"登录的用户{}"
,
user
);
log
.
info
(
"登录的用户{}"
,
user
);
BeanUtils
.
copyProperties
(
user
,
merchantUser
);
return
merchantUser
;
}
...
...
src/main/java/cn/com/glsx/merchants/response/StaffExportResponse.java
View file @
6faa436
...
...
@@ -62,7 +62,7 @@ public class StaffExportResponse implements Serializable {
*/
@ExcelIgnore
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
Date
cre
atedTime
;
private
Date
upd
atedTime
;
/**
* 创建时间
...
...
src/main/java/cn/com/glsx/merchants/service/StaffService.java
View file @
6faa436
...
...
@@ -152,12 +152,12 @@ public class StaffService {
if
(
listRpcResponse
.
isSuccess
())
{
List
<
StaffExportResponse
>
staffResponses
=
ConvertResponse
.
convertList
(
listRpcResponse
.
getResult
(),
StaffExportResponse
.
class
);
staffResponses
.
forEach
(
index
->
{
index
.
setCreateDate
(
DateUtils
.
format
(
index
.
get
Cre
atedTime
(),
DateUtils
.
NORMAL_DATE_TIME_PATTERN
));
index
.
setCreateDate
(
DateUtils
.
format
(
index
.
get
Upd
atedTime
(),
DateUtils
.
NORMAL_DATE_TIME_PATTERN
));
});
String
time
=
new
Date
().
getTime
()+
""
;
String
filename
=
"员工列表"
+
time
;
byte
[]
bytes
=
ExcelUtiles
.
exportGoodsExcel
(
staffResponses
,
StaffExportResponse
.
class
);
FileUploadServerData
fileUploadServerData
=
FileUploadUtil
.
uploadToFileSystem
(
systemProperty
.
getUploadFileUrl
(),
""
,
bytes
,
"xlsx"
);
FileUploadServerData
fileUploadServerData
=
FileUploadUtil
.
uploadToFileSystem
(
systemProperty
.
getUploadFileUrl
(),
filename
,
bytes
,
"xlsx"
);
return
fileUploadServerData
.
getUrl
();
}
throw
new
RpcServiceException
(
listRpcResponse
.
getException
().
getErrId
(),
listRpcResponse
.
getMessage
());
...
...
src/main/java/cn/com/glsx/merchants/util/FileUploadUtil.java
View file @
6faa436
...
...
@@ -51,7 +51,7 @@ public class FileUploadUtil {
form
.
add
(
"systemSign"
,
"biz"
);
form
.
add
(
"filePath"
,
""
);
// fileName由服务端指定
form
.
add
(
"param1"
,
""
);
form
.
add
(
"param1"
,
fileName
);
form
.
add
(
"param2"
,
""
);
form
.
add
(
"param3"
,
""
);
form
.
add
(
"files"
,
fileType
+
"@"
+
Base64
.
encodeBase64String
(
uploadData
));
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment