Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Q
qk_backend
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
quanku
qk_backend
Commits
f0acbe1b
Commit
f0acbe1b
authored
Oct 24, 2023
by
shiyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
消息发送时间格式化
parent
8ea3cd68
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
ch-wx-api/src/main/java/com/wwdz/ch/wx/api/IMCallbackController.java
...rc/main/java/com/wwdz/ch/wx/api/IMCallbackController.java
+5
-1
No files found.
ch-wx-api/src/main/java/com/wwdz/ch/wx/api/IMCallbackController.java
View file @
f0acbe1b
...
...
@@ -80,7 +80,7 @@ public class IMCallbackController {
imRecord
.
setFromAccount
(
imUtil
.
revertAppletUserId
(
fromAccount
));
imRecord
.
setToAccount
(
imUtil
.
revertAppletUserId
(
toAccount
));
imRecord
.
setMsgTime
(
new
Date
(
msgTime
));
imRecord
.
setMsgTime
(
new
Date
(
msgTime
*
1000L
));
imRecord
.
setMsgKey
(
msgKey
);
imRecord
.
setMsgType
(
IMEnum
.
MsgTypeEnum
.
getCodeByValue
(
msgType
));
imRecord
.
setSendMsgResult
(
Integer
.
valueOf
(
sendMsgResult
));
...
...
@@ -104,6 +104,10 @@ public class IMCallbackController {
"\"MsgContent\":{\"Text\":\"秦始皇并没有发行货币,而是统一了货币。他颁布了统一的货币,即圆形方孔钱,也称为“秦钱”。这种货币由铜制成,大小不一,但一般都呈圆形,中间有一个孔,方便钱货交流。\"}}],"
+
"\"UnreadMsgNum\":151,\"MsgVersion\":0,\"MsgRandom\":730361011,\"EventTime\":1698131421787,\"MsgSeq\":164841877,\"MsgKey\":\"164841877_730361011_1698131421\","
+
"\"From_Account\":\"cjxc-applet-dev_ai10002\",\"MsgTime\":1698131421}"
;
long
MsgTime
=
Long
.
valueOf
(
JsonUtils
.
getValueByPath
(
jsonStr
,
"MsgTime"
));
System
.
out
.
println
(
new
Date
(
MsgTime
));
System
.
out
.
println
(
new
Date
(
MsgTime
*
1000L
));
//消息体
String
msgBody
=
JsonUtils
.
getValueByPath
(
jsonStr
,
"MsgBody"
);
System
.
out
.
println
(
"msgBody = "
+
msgBody
);
...
...
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