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 02337cc1
authored
Aug 13, 2021
by
zhouhb
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
[+]时间处理
1 parent
5ad74fed
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
2 deletions
src/main/java/cn/com/glsx/merchants/response/MerchantRopResponse.java
src/main/java/cn/com/glsx/merchants/response/StaffExportResponse.java
src/main/java/cn/com/glsx/merchants/response/StaffResponse.java
src/main/java/cn/com/glsx/merchants/service/StaffService.java
src/main/java/cn/com/glsx/merchants/response/MerchantRopResponse.java
View file @
02337cc
...
@@ -104,6 +104,13 @@ public class MerchantRopResponse {
...
@@ -104,6 +104,13 @@ public class MerchantRopResponse {
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
Date
createdTime
;
private
Date
createdTime
;
/**
* 更新时间
*/
@ApiModelProperty
(
name
=
"updatedTime"
,
notes
=
"更新时间"
,
dataType
=
"date"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
Date
updatedTime
;
/**
/**
* 渠道id
* 渠道id
...
...
src/main/java/cn/com/glsx/merchants/response/StaffExportResponse.java
View file @
02337cc
...
@@ -36,7 +36,7 @@ public class StaffExportResponse implements Serializable {
...
@@ -36,7 +36,7 @@ public class StaffExportResponse implements Serializable {
* 状态
* 状态
*/
*/
@Excel
(
name
=
"状态"
,
orderNum
=
"3"
)
@Excel
(
name
=
"状态"
,
orderNum
=
"3"
)
private
String
status
;
private
String
status
Name
;
/**
/**
...
@@ -67,7 +67,7 @@ public class StaffExportResponse implements Serializable {
...
@@ -67,7 +67,7 @@ public class StaffExportResponse implements Serializable {
/**
/**
* 创建时间
* 创建时间
*/
*/
@Excel
(
name
=
"
创建
时间"
,
orderNum
=
"8"
)
@Excel
(
name
=
"
更新
时间"
,
orderNum
=
"8"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
String
createDate
;
private
String
createDate
;
...
...
src/main/java/cn/com/glsx/merchants/response/StaffResponse.java
View file @
02337cc
...
@@ -54,6 +54,13 @@ public class StaffResponse implements Serializable {
...
@@ -54,6 +54,13 @@ public class StaffResponse implements Serializable {
private
Date
createdTime
;
private
Date
createdTime
;
/**
/**
* 创建时间
*/
@ApiModelProperty
(
name
=
"updatedTime"
,
notes
=
"更新时间"
,
dataType
=
"Date"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
Date
updatedTime
;
/**
* 商户id
* 商户id
*/
*/
@ApiModelProperty
(
name
=
"merchantId"
,
notes
=
"商户id"
,
dataType
=
"Integer"
)
@ApiModelProperty
(
name
=
"merchantId"
,
notes
=
"商户id"
,
dataType
=
"Integer"
)
...
...
src/main/java/cn/com/glsx/merchants/service/StaffService.java
View file @
02337cc
...
@@ -26,6 +26,7 @@ import lombok.extern.slf4j.Slf4j;
...
@@ -26,6 +26,7 @@ import lombok.extern.slf4j.Slf4j;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
/**
/**
...
@@ -153,6 +154,8 @@ public class StaffService {
...
@@ -153,6 +154,8 @@ public class StaffService {
staffResponses
.
forEach
(
index
->
{
staffResponses
.
forEach
(
index
->
{
index
.
setCreateDate
(
DateUtils
.
format
(
index
.
getCreatedTime
(),
DateUtils
.
NORMAL_DATE_TIME_PATTERN
));
index
.
setCreateDate
(
DateUtils
.
format
(
index
.
getCreatedTime
(),
DateUtils
.
NORMAL_DATE_TIME_PATTERN
));
});
});
String
time
=
new
Date
().
getTime
()+
""
;
String
filename
=
"员工列表"
+
time
;
byte
[]
bytes
=
ExcelUtiles
.
exportGoodsExcel
(
staffResponses
,
StaffExportResponse
.
class
);
byte
[]
bytes
=
ExcelUtiles
.
exportGoodsExcel
(
staffResponses
,
StaffExportResponse
.
class
);
FileUploadServerData
fileUploadServerData
=
FileUploadUtil
.
uploadToFileSystem
(
systemProperty
.
getUploadFileUrl
(),
""
,
bytes
,
"xlsx"
);
FileUploadServerData
fileUploadServerData
=
FileUploadUtil
.
uploadToFileSystem
(
systemProperty
.
getUploadFileUrl
(),
""
,
bytes
,
"xlsx"
);
return
fileUploadServerData
.
getUrl
();
return
fileUploadServerData
.
getUrl
();
...
...
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