数据
This commit is contained in:
@@ -93,6 +93,10 @@ public class ChatManager {
|
||||
Long userId = LoginHelper.getUserId();
|
||||
User fromUser = userService.getById(userId);
|
||||
User toUser = userService.getById(callReq.getToUid());
|
||||
boolean openVideo = systemConfigManager.getSystemConfigOfBool(SystemConfigEnum.OPEN_VIDEO);
|
||||
if(!openVideo){
|
||||
throw new ServiceException("聊天功能未开放");
|
||||
}
|
||||
if(fromUser == null){
|
||||
throw new ServiceException("用户不存在");
|
||||
}
|
||||
|
||||
@@ -21,6 +21,8 @@ public enum SystemConfigEnum {
|
||||
OPEN_REGISTER("1", "开启注册",SystemConfigGroupEnum.BUSINESS, new BooleanSystemConfigCheck()),
|
||||
INIT_VIDEO_MESSAGE("提示:禁止任何涉黄、任何微信QQ引导到其它平台行为", "视频接通提示语",SystemConfigGroupEnum.BUSINESS),
|
||||
SHARE_URL("https://h5.qx96688.com/index/invite/index", "分享链接",SystemConfigGroupEnum.BUSINESS),
|
||||
OPEN_MESSAGE("1", "开启聊天功能",SystemConfigGroupEnum.BUSINESS),
|
||||
OPEN_VIDEO("1", "开启视频功能",SystemConfigGroupEnum.BUSINESS),
|
||||
// INVITE_GIFT_RATE("100", "礼物分销成功率",SystemConfigGroupEnum.BUSINESS, new RateIntegerSystemConfigCheck()),
|
||||
// INVITE_GUARD_RATE("100", "守护分销成功率",SystemConfigGroupEnum.BUSINESS, new RateIntegerSystemConfigCheck()),
|
||||
// INVITE_VIDEO_RATE("100", "视频分销成功率",SystemConfigGroupEnum.BUSINESS, new RateIntegerSystemConfigCheck()),
|
||||
|
||||
@@ -99,6 +99,10 @@ public class ImService {
|
||||
resp.setContent(message.getContent());
|
||||
return resp;
|
||||
}
|
||||
boolean openMessage = systemConfigManager.getSystemConfigOfBool(SystemConfigEnum.OPEN_MESSAGE);
|
||||
if(!openMessage){
|
||||
throw new ServiceException("聊天功能未开放");
|
||||
}
|
||||
if(fromUserId.equals(toUserId)){
|
||||
throw new ServiceException("不能给自己发送哦!");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user