init
This commit is contained in:
@@ -6,7 +6,7 @@ import com.ruoyi.cai.domain.UserChatRecord;
|
||||
import com.ruoyi.cai.dto.app.dto.ImMessageDTO;
|
||||
import com.ruoyi.cai.dto.app.vo.ImResp;
|
||||
import com.ruoyi.cai.enums.GenderEnum;
|
||||
import com.ruoyi.cai.enums.ImTypeEnum;
|
||||
import com.ruoyi.cai.enums.ChatTypeEnum;
|
||||
import com.ruoyi.cai.enums.UserMemberTypeEnum;
|
||||
import com.ruoyi.cai.service.*;
|
||||
import com.ruoyi.common.exception.ServiceException;
|
||||
@@ -30,7 +30,7 @@ public class ImService {
|
||||
private InnerUserFilter innerUserFilter;
|
||||
|
||||
public ImResp sendMessage(Long fromUserId, ImMessageDTO message) {
|
||||
ImTypeEnum typeEnum = ImTypeEnum.getByType(message.getType());
|
||||
ChatTypeEnum typeEnum = ChatTypeEnum.getByType(message.getType());
|
||||
if(typeEnum == null || fromUserId == null){
|
||||
throw new ServiceException("参数异常");
|
||||
}
|
||||
@@ -51,7 +51,7 @@ public class ImService {
|
||||
throw new ServiceException("接收人账号不可用!");
|
||||
}
|
||||
// 自定义消息跳过所有流程
|
||||
if(typeEnum == ImTypeEnum.CUSTOM){
|
||||
if(typeEnum == ChatTypeEnum.CUSTOM){
|
||||
Account account = accountService.getByUserId(fromUserId);
|
||||
ImResp resp = new ImResp();
|
||||
resp.setCoin(account.getCoin()+ account.getIncomeCoin());
|
||||
@@ -106,7 +106,7 @@ public class ImService {
|
||||
throw new ServiceException("目前只能和女神私信!");
|
||||
}
|
||||
// 正则判断违规数据替换
|
||||
if(typeEnum == ImTypeEnum.MESSAGE){
|
||||
if(typeEnum == ChatTypeEnum.MESSAGE){
|
||||
|
||||
}
|
||||
if(fromUser.getIsAnchor().equals(1)){ // 女神发消息不要钱
|
||||
|
||||
Reference in New Issue
Block a user