Commit 72986719 by Future

测试环境配置

parent 45a0897d
spring-boot-plus:
# 是否启用ansi控制台输出有颜色的字体,local环境建议开启,服务器环境设置为false
enable-ansi: false
# 是否启用ansi控制台输出有颜色的字体,dev环境建议开启,服务器环境设置为false
enable-ansi: true
# 当前环境服务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
......@@ -47,4 +47,7 @@ public class UserBaseDto implements Serializable {
@ApiModelProperty("与我关系 1-陌生人 2-好友 3-被我拉黑")
private Integer relation;
@ApiModelProperty("好友的昵称备注")
private String friendName;
}
......@@ -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())) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment