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
e1830081
Commit
e1830081
authored
Sep 13, 2021
by
giaogiao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
LinkedHashMap改为HashMap;
增加打印日志
parent
0b9373cc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
6 deletions
+11
-6
common/src/main/java/com/wecloud/im/param/add/ImConversationCreate.java
+2
-2
common/src/main/java/com/wecloud/im/service/impl/ImConversationServiceImpl.java
+9
-4
No files found.
common/src/main/java/com/wecloud/im/param/add/ImConversationCreate.java
View file @
e1830081
...
@@ -7,7 +7,7 @@ import lombok.Data;
...
@@ -7,7 +7,7 @@ import lombok.Data;
import
lombok.EqualsAndHashCode
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
import
lombok.experimental.Accessors
;
import
java.util.
Linked
HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
/**
/**
...
@@ -27,7 +27,7 @@ public class ImConversationCreate extends BaseEntity {
...
@@ -27,7 +27,7 @@ public class ImConversationCreate extends BaseEntity {
private
String
name
;
private
String
name
;
@ApiModelProperty
(
"json格式,可选 自定义属性,供开发者扩展使用。"
)
@ApiModelProperty
(
"json格式,可选 自定义属性,供开发者扩展使用。"
)
private
Linked
HashMap
attributes
;
private
HashMap
attributes
;
@ApiModelProperty
(
"可选 邀请加入会话的客户端,如创建单聊,则填入对方的clientId"
)
@ApiModelProperty
(
"可选 邀请加入会话的客户端,如创建单聊,则填入对方的clientId"
)
private
List
<
String
>
clientIds
;
private
List
<
String
>
clientIds
;
...
...
common/src/main/java/com/wecloud/im/service/impl/ImConversationServiceImpl.java
View file @
e1830081
...
@@ -40,7 +40,6 @@ import org.springframework.transaction.annotation.Transactional;
...
@@ -40,7 +40,6 @@ import org.springframework.transaction.annotation.Transactional;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.LinkedHashMap
;
import
java.util.List
;
import
java.util.List
;
/**
/**
...
@@ -135,13 +134,19 @@ public class ImConversationServiceImpl extends BaseServiceImpl<ImConversationMap
...
@@ -135,13 +134,19 @@ public class ImConversationServiceImpl extends BaseServiceImpl<ImConversationMap
// 是否存在重复会话
// 是否存在重复会话
Integer
repetitionConversation
=
getRepetitionConversation
(
createClient
.
getId
(),
inviteClient
.
getId
());
Integer
repetitionConversation
=
getRepetitionConversation
(
createClient
.
getId
(),
inviteClient
.
getId
());
if
(
repetitionConversation
!=
0
)
{
if
(
repetitionConversation
!=
0
)
{
ImConversation
repetitionConversationInfo
=
imConversationMapper
.
getRepetitionConversationInfo
(
createClient
.
getId
(),
inviteClient
.
getId
());
ImConversation
repetitionConversationInfo
=
imConversationMapper
.
getRepetitionConversationInfo
(
createClient
.
getId
(),
inviteClient
.
getId
());
log
.
info
(
"出现Conversation重复"
);
JsonMapper
jsonMapper
=
new
JsonMapper
();
JsonMapper
jsonMapper
=
new
JsonMapper
();
LinkedHashMap
linkedHashMap
=
jsonMapper
.
readValue
(
repetitionConversationInfo
.
getAttributes
(),
LinkedHashMap
.
class
);
HashMap
dbAttributesMap
=
jsonMapper
.
readValue
(
repetitionConversationInfo
.
getAttributes
(),
HashMap
.
class
);
log
.
info
(
"DBAttributes:"
+
repetitionConversationInfo
.
getAttributes
());
log
.
info
(
"RequestAttributes:"
+
jsonMapper
.
writeValueAsString
(
imConversationCreate
.
getAttributes
()));
if
(
linkedHash
Map
.
equals
(
imConversationCreate
.
getAttributes
()))
{
if
(
dbAttributes
Map
.
equals
(
imConversationCreate
.
getAttributes
()))
{
log
.
info
(
imConversationCreate
.
getAttributes
()
+
",出现
重复"
);
log
.
info
(
"出现Attributes
重复"
);
ImConversationCreateVo
imConversationCreateVo
=
new
ImConversationCreateVo
();
ImConversationCreateVo
imConversationCreateVo
=
new
ImConversationCreateVo
();
imConversationCreateVo
.
setId
(
repetitionConversationInfo
.
getId
());
imConversationCreateVo
.
setId
(
repetitionConversationInfo
.
getId
());
// 为重复
// 为重复
...
...
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