完善需求和逻辑问题
This commit is contained in:
parent
9a1fc9a3d4
commit
4bdbc48a72
@ -1,5 +1,8 @@
|
||||
package com.upchina.group.query.message;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.upchina.common.handler.BizException;
|
||||
import com.upchina.common.result.ResponseStatus;
|
||||
import com.upchina.common.vo.BackendUserVO;
|
||||
import com.upchina.group.constant.*;
|
||||
import com.upchina.group.entity.GroupMessage;
|
||||
@ -60,6 +63,12 @@ public class SendGroupMessageAdminQuery {
|
||||
message.setQuoteId(quoteId);
|
||||
message.setInteractiveType(interactiveType);
|
||||
if (GroupInteractiveType.PRIVATE.value.equals(interactiveType)) {
|
||||
if (StrUtil.isEmpty(toUserId)) {
|
||||
throw new BizException(ResponseStatus.PARM_ERROR, "接收用户ID为空");
|
||||
}
|
||||
if (StrUtil.isEmpty(toUserName)) {
|
||||
throw new BizException(ResponseStatus.PARM_ERROR, "接收用户名称为空");
|
||||
}
|
||||
message.setToUserId(toUserId);
|
||||
message.setToUserName(toUserName);
|
||||
message.setPrivateUserId(toUserId);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user