Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wecloud_im_server
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hewei
wecloud_im_server
Commits
60209023
Commit
60209023
authored
Dec 20, 2021
by
hweeeeeei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
System.currentTimeMillis() 替代new Date().getTime()
parent
6eb22920
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
13 additions
and
16 deletions
+13
-16
bootstrap/src/test/java/io/geekidea/springbootplus/test/SignTest.java
+1
-3
config/src/main/resources/static/verifyCode.html
+1
-1
core/src/main/java/com/wecloud/rtc/service/impl/MangerRtcCacheServiceImpl.java
+1
-2
core/src/main/java/com/wecloud/rtc/service/impl/RtcServiceImpl.java
+6
-6
docs/对接文档/内部/wecloud-im前端Websocket对接文档.md
+2
-2
docs/对接文档/客户/wecloud-im即时通讯聊天云服务_外部客户对接文档.md
+2
-2
No files found.
bootstrap/src/test/java/io/geekidea/springbootplus/test/SignTest.java
View file @
60209023
...
@@ -6,8 +6,6 @@ import com.fasterxml.jackson.databind.json.JsonMapper;
...
@@ -6,8 +6,6 @@ import com.fasterxml.jackson.databind.json.JsonMapper;
import
com.wecloud.im.ws.model.request.ReceiveModel
;
import
com.wecloud.im.ws.model.request.ReceiveModel
;
import
org.springframework.util.DigestUtils
;
import
org.springframework.util.DigestUtils
;
import
java.util.Date
;
/**
/**
* 客户方签名字符串生成 单元测试
* 客户方签名字符串生成 单元测试
*/
*/
...
@@ -38,7 +36,7 @@ public class SignTest {
...
@@ -38,7 +36,7 @@ public class SignTest {
String
clientId
=
"client_333"
;
String
clientId
=
"client_333"
;
String
appKey
=
"elLwpel1gWCHDqZy"
;
String
appKey
=
"elLwpel1gWCHDqZy"
;
String
appSecret
=
"68809bb5a9077a83631aeb0b17b5965d6b2302faf2ab3737"
;
String
appSecret
=
"68809bb5a9077a83631aeb0b17b5965d6b2302faf2ab3737"
;
String
timestamp
=
String
.
valueOf
(
new
Date
().
getTime
());
String
timestamp
=
String
.
valueOf
(
System
.
currentTimeMillis
());
getSign
(
timestamp
,
clientId
,
appKey
,
appSecret
);
getSign
(
timestamp
,
clientId
,
appKey
,
appSecret
);
}
}
...
...
config/src/main/resources/static/verifyCode.html
View file @
60209023
...
@@ -38,7 +38,7 @@
...
@@ -38,7 +38,7 @@
<script
type=
"text/javascript"
>
<script
type=
"text/javascript"
>
function
changeImage
()
{
function
changeImage
()
{
document
.
getElementById
(
'imageCode'
).
src
=
"http://localhost:8888/api/verificationCode/getImage?time="
+
new
Date
().
getTime
();
document
.
getElementById
(
'imageCode'
).
src
=
"http://localhost:8888/api/verificationCode/getImage?time="
+
System
.
currentTimeMillis
();
}
}
var
url
=
"http://localhost:8888/api/verificationCode/getBase64Image"
;
var
url
=
"http://localhost:8888/api/verificationCode/getBase64Image"
;
...
...
core/src/main/java/com/wecloud/rtc/service/impl/MangerRtcCacheServiceImpl.java
View file @
60209023
...
@@ -11,7 +11,6 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -11,7 +11,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Set
;
import
java.util.Set
;
...
@@ -64,7 +63,7 @@ public class MangerRtcCacheServiceImpl implements MangerRtcCacheService {
...
@@ -64,7 +63,7 @@ public class MangerRtcCacheServiceImpl implements MangerRtcCacheService {
//当前房主
//当前房主
rtcChannelInfo
.
setOwner
(
clientId
);
rtcChannelInfo
.
setOwner
(
clientId
);
//创建时间
//创建时间
rtcChannelInfo
.
setCreateTimestamp
(
new
Date
().
getTime
());
rtcChannelInfo
.
setCreateTimestamp
(
System
.
currentTimeMillis
());
String
rtcChannelInfoJson
=
new
JsonMapper
().
writeValueAsString
(
rtcChannelInfo
);
String
rtcChannelInfoJson
=
new
JsonMapper
().
writeValueAsString
(
rtcChannelInfo
);
...
...
core/src/main/java/com/wecloud/rtc/service/impl/RtcServiceImpl.java
View file @
60209023
...
@@ -100,7 +100,7 @@ public class RtcServiceImpl implements RtcService {
...
@@ -100,7 +100,7 @@ public class RtcServiceImpl implements RtcService {
// rtcCallResponse.setConversationId(createRtcChannelParam.getConversationId());
// rtcCallResponse.setConversationId(createRtcChannelParam.getConversationId());
rtcCallResponse
.
setChannelId
(
rtcChannelId
);
rtcCallResponse
.
setChannelId
(
rtcChannelId
);
rtcCallResponse
.
setClientId
(
client
.
getClientId
());
rtcCallResponse
.
setClientId
(
client
.
getClientId
());
rtcCallResponse
.
setTimestamp
(
new
Date
().
getTime
());
rtcCallResponse
.
setTimestamp
(
System
.
currentTimeMillis
());
wsRtcWrite
.
rtcCall
(
rtcCallResponse
,
imApplication
.
getAppKey
(),
createRtcChannelParam
.
getToClient
());
wsRtcWrite
.
rtcCall
(
rtcCallResponse
,
imApplication
.
getAppKey
(),
createRtcChannelParam
.
getToClient
());
// TODO 待开发 下发安卓和ios系统推送
// TODO 待开发 下发安卓和ios系统推送
...
@@ -133,7 +133,7 @@ public class RtcServiceImpl implements RtcService {
...
@@ -133,7 +133,7 @@ public class RtcServiceImpl implements RtcService {
rtcSdpForwardResponse
.
setChannelId
(
joinRtcChannelParam
.
getChannelId
());
rtcSdpForwardResponse
.
setChannelId
(
joinRtcChannelParam
.
getChannelId
());
rtcSdpForwardResponse
.
setClientId
(
client
.
getClientId
());
rtcSdpForwardResponse
.
setClientId
(
client
.
getClientId
());
rtcSdpForwardResponse
.
setTimestamp
(
new
Date
().
getTime
());
rtcSdpForwardResponse
.
setTimestamp
(
System
.
currentTimeMillis
());
wsRtcWrite
.
clientJoin
(
rtcSdpForwardResponse
,
imApplication
.
getAppKey
(),
toClientId
);
wsRtcWrite
.
clientJoin
(
rtcSdpForwardResponse
,
imApplication
.
getAppKey
(),
toClientId
);
}
}
...
@@ -159,7 +159,7 @@ public class RtcServiceImpl implements RtcService {
...
@@ -159,7 +159,7 @@ public class RtcServiceImpl implements RtcService {
rtcClientRejectResponse
.
setChannelId
(
rejectRtcChannelParam
.
getChannelId
());
rtcClientRejectResponse
.
setChannelId
(
rejectRtcChannelParam
.
getChannelId
());
rtcClientRejectResponse
.
setClientId
(
client
.
getClientId
());
rtcClientRejectResponse
.
setClientId
(
client
.
getClientId
());
rtcClientRejectResponse
.
setTimestamp
(
new
Date
().
getTime
());
rtcClientRejectResponse
.
setTimestamp
(
System
.
currentTimeMillis
());
wsRtcWrite
.
clientReject
(
rtcClientRejectResponse
,
imApplication
.
getAppKey
(),
toClientId
);
wsRtcWrite
.
clientReject
(
rtcClientRejectResponse
,
imApplication
.
getAppKey
(),
toClientId
);
}
}
return
ApiResult
.
ok
(
true
);
return
ApiResult
.
ok
(
true
);
...
@@ -193,7 +193,7 @@ public class RtcServiceImpl implements RtcService {
...
@@ -193,7 +193,7 @@ public class RtcServiceImpl implements RtcService {
rtcClientLeaveResponse
.
setChannelId
(
leaveRtcChannelParam
.
getChannelId
());
rtcClientLeaveResponse
.
setChannelId
(
leaveRtcChannelParam
.
getChannelId
());
rtcClientLeaveResponse
.
setClientId
(
client
.
getClientId
());
rtcClientLeaveResponse
.
setClientId
(
client
.
getClientId
());
rtcClientLeaveResponse
.
setTimestamp
(
new
Date
().
getTime
());
rtcClientLeaveResponse
.
setTimestamp
(
System
.
currentTimeMillis
());
wsRtcWrite
.
clientLeave
(
rtcClientLeaveResponse
,
imApplication
.
getAppKey
(),
toClientId
);
wsRtcWrite
.
clientLeave
(
rtcClientLeaveResponse
,
imApplication
.
getAppKey
(),
toClientId
);
}
}
...
@@ -237,7 +237,7 @@ public class RtcServiceImpl implements RtcService {
...
@@ -237,7 +237,7 @@ public class RtcServiceImpl implements RtcService {
rtcSdpForwardResponse
.
setChannelId
(
rtcChannelId
);
rtcSdpForwardResponse
.
setChannelId
(
rtcChannelId
);
rtcSdpForwardResponse
.
setClientId
(
client
.
getClientId
());
rtcSdpForwardResponse
.
setClientId
(
client
.
getClientId
());
rtcSdpForwardResponse
.
setTimestamp
(
new
Date
().
getTime
());
rtcSdpForwardResponse
.
setTimestamp
(
System
.
currentTimeMillis
());
wsRtcWrite
.
sdpForward
(
rtcSdpForwardResponse
,
imApplication
.
getAppKey
(),
toClientId
);
wsRtcWrite
.
sdpForward
(
rtcSdpForwardResponse
,
imApplication
.
getAppKey
(),
toClientId
);
}
}
...
@@ -278,7 +278,7 @@ public class RtcServiceImpl implements RtcService {
...
@@ -278,7 +278,7 @@ public class RtcServiceImpl implements RtcService {
rtcCandidateForwardResponse
.
setChannelId
(
rtcChannelId
);
rtcCandidateForwardResponse
.
setChannelId
(
rtcChannelId
);
rtcCandidateForwardResponse
.
setClientId
(
client
.
getClientId
());
rtcCandidateForwardResponse
.
setClientId
(
client
.
getClientId
());
rtcCandidateForwardResponse
.
setTimestamp
(
new
Date
().
getTime
());
rtcCandidateForwardResponse
.
setTimestamp
(
System
.
currentTimeMillis
());
wsRtcWrite
.
candidateForward
(
rtcCandidateForwardResponse
,
imApplication
.
getAppKey
(),
toClientId
);
wsRtcWrite
.
candidateForward
(
rtcCandidateForwardResponse
,
imApplication
.
getAppKey
(),
toClientId
);
}
}
...
...
docs/对接文档/内部/wecloud-im前端Websocket对接文档.md
View file @
60209023
# wec
loud-im 前端Websocket对接文档
# wec
loud-im 前端Websocket对接文档
...
@@ -114,7 +114,7 @@ public static void main(String[] args) {
...
@@ -114,7 +114,7 @@ public static void main(String[] args) {
String
clientId
=
"client_123123"
;
String
clientId
=
"client_123123"
;
String
appKey
=
"elLwpel1gWCHDqZy"
;
String
appKey
=
"elLwpel1gWCHDqZy"
;
String
appSecret
=
"68809bb5a9077a83631aeb0b17b5965d6b2302faf2ab3737"
;
String
appSecret
=
"68809bb5a9077a83631aeb0b17b5965d6b2302faf2ab3737"
;
String
timestamp
=
String
.
valueOf
(
new
Date
().
getTime
());
String
timestamp
=
String
.
valueOf
(
System
.
currentTimeMillis
());
getSign
(
timestamp
,
clientId
,
appKey
,
appSecret
);
getSign
(
timestamp
,
clientId
,
appKey
,
appSecret
);
}
}
```
```
...
...
docs/对接文档/客户/wecloud-im即时通讯聊天云服务_外部客户对接文档.md
View file @
60209023
# wec
loud-im 即时通讯云对接文档
# wec
loud-im 即时通讯云对接文档
...
@@ -160,7 +160,7 @@ public static void main(String[] args) {
...
@@ -160,7 +160,7 @@ public static void main(String[] args) {
String
clientId
=
"client_123123"
;
String
clientId
=
"client_123123"
;
String
appKey
=
"elLwpel1gWCHDqZy"
;
String
appKey
=
"elLwpel1gWCHDqZy"
;
String
appSecret
=
"68809bb5a9077a83631aeb0b17b5965d6b2302faf2ab3737"
;
String
appSecret
=
"68809bb5a9077a83631aeb0b17b5965d6b2302faf2ab3737"
;
String
timestamp
=
String
.
valueOf
(
new
Date
().
getTime
());
String
timestamp
=
String
.
valueOf
(
System
.
currentTimeMillis
());
getSign
(
timestamp
,
clientId
,
appKey
,
appSecret
);
getSign
(
timestamp
,
clientId
,
appKey
,
appSecret
);
}
}
```
```
...
...
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