public Page doMain(WebForm form, Module module) {
if(chatRoom!=null){
ChatUser user=getChatUser();
if(!chatRoom.join(user))form.addResult("msg","不能加入房间,可能是权限不够!");
form.addResult("chatRoom",chatRoom);
form.addResult("user",user);
}
else
{
form.addResult("msg","会议未启动或者会议室不存在!");
}
return module.findPage("main");
}
//处理用户发言信息
public Page doSend(WebForm form, Module module) {
if(chatRoom==null)return new Page("err","/err.html","thml");//返回会议室不存在的错误
Chat chat=(Chat)form.toPo(Chat.class);
chat.setCid(chatRoom.geneId());
chatRoom.talk(chat);
return doRecive(form,module);
}
延伸阅读
文章来源于领测软件测试网 https://www.ltesting.net/