11
This commit is contained in:
1 parent
8bd9cbbf70
commit
5766d5e754
9 files changed
+49
-9
No files matched your search
@@ -5,6 +5,7 @@ import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class MessageTotalDto {
|
||||
@@ -19,6 +20,16 @@ public class MessageTotalDto {
|
||||
*/
|
||||
private Long receiveId;
|
||||
|
||||
/**
|
||||
* 排除发送人id
|
||||
*/
|
||||
private List<Long> excludeSendIds;
|
||||
|
||||
/**
|
||||
* 排除接收人id
|
||||
*/
|
||||
private List<Long> excludeReceiveIds;
|
||||
|
||||
/**
|
||||
* 发送时间范围
|
||||
*/
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
spring:
|
||||
datasource:
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
url: jdbc:mysql://123.157.250.162:3306/im_platform?useSSL=false&useUnicode=true&characterEncoding=utf-8&allowPublicKeyRetrieval=true
|
||||
url: jdbc:mysql://139.224.25.207:3306/im_platform?useSSL=false&useUnicode=true&characterEncoding=utf-8&allowPublicKeyRetrieval=true
|
||||
username: im_platform
|
||||
password: 3tKHbkSHfycbriN7
|
||||
data:
|
||||
redis:
|
||||
host: localhost
|
||||
host: 139.224.25.207
|
||||
port: 6379
|
||||
database: 10
|
||||
password: 179965
|
||||
|
||||
minio:
|
||||
endpoint: https://minioapi.zianxin.com #内网地址
|
||||
|
||||
@@ -12,7 +12,7 @@ spring:
|
||||
database: 10
|
||||
|
||||
minio:
|
||||
endpoint: http://192.168.0.6:9000 #内网地址
|
||||
endpoint: https://minioapi.zianxin.com #内网地址
|
||||
domain: https://minioapi.zianxin.com #外网访问地址
|
||||
accessKey: EnBCxtxZ9j0tJJKqjRjG
|
||||
secretKey: imxrsyk1hM3lZ8dSbzz2QQSrw43rH33uZvnHXFzb
|
||||
|
||||
@@ -10,6 +10,18 @@
|
||||
<if test="dto.receiveId != null">
|
||||
and a.recv_id = #{dto.receiveId}
|
||||
</if>
|
||||
<if test="dto.excludeSendIds != null and dto.excludeSendIds.size() != 0">
|
||||
and a.send_id not in
|
||||
<foreach collection="dto.excludeSendIds" item="v" open="(" close=")" separator=",">
|
||||
#{v}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="dto.excludeReceiveIds != null and dto.excludeReceiveIds.size() != 0">
|
||||
and a.recv_id not in
|
||||
<foreach collection="dto.excludeReceiveIds" item="v" open="(" close=")" separator=",">
|
||||
#{v}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="dto.timeRange != null and dto.timeRange.length == 2">
|
||||
and a.send_time between #{dto.timeRange[0]} and #{dto.timeRange[1]}
|
||||
</if>
|
||||
|
||||
@@ -1,14 +1,18 @@
|
||||
package com.bx.imserver.netty;
|
||||
|
||||
import com.bx.imcommon.contant.IMRedisKey;
|
||||
import com.bx.imcommon.enums.IMTerminalType;
|
||||
import com.bx.imcommon.mq.RedisMQTemplate;
|
||||
import jakarta.annotation.PostConstruct;
|
||||
import jakarta.annotation.PreDestroy;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.boot.CommandLineRunner;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
@Slf4j
|
||||
@Component
|
||||
@@ -21,6 +25,16 @@ public class IMServerGroup implements CommandLineRunner {
|
||||
|
||||
private final List<IMServer> imServers;
|
||||
|
||||
@PostConstruct
|
||||
public void init() {
|
||||
for (Integer code : IMTerminalType.codes()) {
|
||||
String messageUserKey = String.join(":", IMRedisKey.IM_USER_SERVER_ID, String.valueOf(-100L), String.valueOf(code));
|
||||
String serviceUserKey = String.join(":", IMRedisKey.IM_USER_SERVER_ID, String.valueOf(-200L), String.valueOf(code));
|
||||
redisMQTemplate.opsForValue().set(messageUserKey, IMServerGroup.serverId);
|
||||
redisMQTemplate.opsForValue().set(serviceUserKey, IMServerGroup.serverId);
|
||||
}
|
||||
}
|
||||
|
||||
/***
|
||||
* 判断服务器是否就绪
|
||||
*
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
spring:
|
||||
data:
|
||||
redis:
|
||||
host: 127.0.0.1
|
||||
host: 139.224.25.207
|
||||
port: 6379
|
||||
password: 179965
|
||||
database: 10
|
||||
@@ -5,5 +5,5 @@ VUE_APP_NAME = "盒子IM"
|
||||
# 接口请求地址
|
||||
VUE_APP_BASE_API = '/api'
|
||||
# ws地址
|
||||
VUE_APP_WS_URL = 'ws://127.0.0.1:8876/im'
|
||||
# VUE_APP_WS_URL = 'ws://chatapp.zianxin.com/im'
|
||||
# VUE_APP_WS_URL = 'ws://127.0.0.1:8876/im'
|
||||
VUE_APP_WS_URL = 'ws://chatapp.zianxin.com/im'
|
||||
@@ -3,6 +3,6 @@ ENV = 'production'
|
||||
# app名称
|
||||
VUE_APP_NAME = "盒子IM"
|
||||
# 接口地址
|
||||
VUE_APP_BASE_API = 'https://www.boxim.online/api'
|
||||
VUE_APP_BASE_API = 'https://chatsever.zianxin.com'
|
||||
# ws地址
|
||||
VUE_APP_WS_URL = 'wss://www.boxim.online/im'
|
||||
VUE_APP_WS_URL = 'ws://chatapp.zianxin.com/im'
|
||||
@@ -5,7 +5,8 @@ module.exports = {
|
||||
devServer: {
|
||||
proxy: {
|
||||
'/api': {
|
||||
target: 'http://127.0.0.1:8888',
|
||||
// target: 'http://127.0.0.1:8888',
|
||||
target: "http://chatsever.zianxin.com",
|
||||
changeOrigin: true,
|
||||
ws: false,
|
||||
pathRewrite: {
|
||||
|
||||
Reference in new issue
Block a user