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
72986719
Commit
72986719
authored
Feb 25, 2022
by
Future
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
测试环境配置
parent
45a0897d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
31 deletions
+37
-31
config/src/main/resources/config/application-test.yml
+33
-30
core/src/main/java/com/wecloud/im/user/param/UserBaseDto.java
+3
-0
core/src/main/java/com/wecloud/im/user/service/UserService.java
+1
-1
No files found.
config/src/main/resources/config/application-test.yml
View file @
72986719
spring-boot-plus
:
# 是否启用ansi控制台输出有颜色的字体,
local
环境建议开启,服务器环境设置为false
enable-ansi
:
fals
e
# 是否启用ansi控制台输出有颜色的字体,
dev
环境建议开启,服务器环境设置为false
enable-ansi
:
tru
e
# 当前环境服务IP地址
server-ip
:
127.0.0.1
# 文件上传下载配置
upload-path
:
/opt/upload/
# AOP配置
aop
:
log
:
enable
:
true
...
...
@@ -14,49 +13,53 @@ spring-boot-plus:
response-log-format
:
false
# 海外 upay 飞蛙等 IM测试外网
spring
:
datasource
:
url
:
jdbc:mysql://127.0.0.1:3306/wecloud_im?serverTimezone=UTC&useUnicode=true&characterEncoding=utf8&useSSL=false&allowPublicKeyRetrieval=true
username
:
web
password
:
axT8knPN5hAP
url
:
jdbc:mysql://127.0.0.1:3306/wecloud-im?serverTimezone=UTC&useUnicode=true&characterEncoding=utf8&useSSL=false&allowPublicKeyRetrieval=true
username
:
root
password
:
123456
#//测试外网
# url: jdbc:mysql://18.136.207.16:3306/wecloud_im?serverTimezone=UTC&useUnicode=true&characterEncoding=utf8&useSSL=false&allowPublicKeyRetrieval=true
# username: web
# password: axT8knPN5hAP
# Redis配置
redis
:
database
:
0
host
:
127.0.0.1
password
:
JH86uc53r8Ca
password
:
port
:
6379
cloud
:
nacos
:
discovery
:
server-addr
:
localhost:8848
# 国内IM测试外网
#spring:
# datasource:
# url: jdbc:mysql://127.0.0.1:3306/wecloud_im?serverTimezone=UTC&useUnicode=true&characterEncoding=utf8&useSSL=false&allowPublicKeyRetrieval=true
# username: root
# password: temple123456
#
# # Redis配置
# redis:
# database: 0
# host: 127.0.0.1
# password: temple123456
# port: 6379
# cloud:
# nacos:
# discovery:
# server-addr: localhost:8848
server-addr
:
127.0.0.1:8848
dubbo
:
protocol
:
port
:
20881
name
:
dubbo
registry
:
address
:
nacos://127.0.0.1:8848?username=nacos&password=nacos
provider
:
cluster
:
channelRouterCluster
consumer
:
check
:
false
# 打印SQL语句和结果集,本地开发环境可开启,线上注释掉
mybatis-plus
:
configuration
:
log-impl
:
org.apache.ibatis.logging.stdout.StdOutImpl
# 服务器负载均衡配置
load-blance
:
# 服务器运营商local,aws,huawei
server-type
:
aws
\ No newline at end of file
server-type
:
local
# NameServer地址 用;作为地址的分隔符
rocketmq
:
namesrvAddr
:
127.0.0.1:9876
# 生产者的组名
producerId
:
im-server
\ No newline at end of file
core/src/main/java/com/wecloud/im/user/param/UserBaseDto.java
View file @
72986719
...
...
@@ -47,4 +47,7 @@ public class UserBaseDto implements Serializable {
@ApiModelProperty
(
"与我关系 1-陌生人 2-好友 3-被我拉黑"
)
private
Integer
relation
;
@ApiModelProperty
(
"好友的昵称备注"
)
private
String
friendName
;
}
core/src/main/java/com/wecloud/im/user/service/UserService.java
View file @
72986719
...
...
@@ -126,7 +126,6 @@ public class UserService extends BaseServiceImpl<UserMapper, User> {
// 判断client是否存在
ImClient
imClient
=
imClientService
.
getOne
(
new
QueryWrapper
<
ImClient
>().
lambda
()
.
eq
(
ImClient:
:
getFkAppid
,
imApplication
.
getId
())
.
eq
(
ImClient:
:
getPlatform
,
param
.
getPlatform
())
.
eq
(
ImClient:
:
getClientId
,
user
.
getId
()));
if
(
imClient
==
null
)
{
imClient
=
new
ImClient
();
...
...
@@ -227,6 +226,7 @@ public class UserService extends BaseServiceImpl<UserMapper, User> {
ImFriend
imFriend
=
imFriendService
.
getByKey
(
currentClient
.
getClientId
(),
user
.
getId
().
toString
());
if
(
imFriend
!=
null
&&
FriendStateEnum
.
CONFORM
.
getCode
().
equals
(
imFriend
.
getState
()))
{
userBaseDto
.
setRelation
(
RelationEnum
.
FRIEND
.
getCode
());
userBaseDto
.
setFriendName
(
imFriend
.
getFriendName
());
}
// 查询是否被拉黑
if
(
imClientBlacklistService
.
isBeBlack
(
currentClient
.
getClientId
(),
user
.
getId
().
toString
()))
{
...
...
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