Commit 79c50c8d by Future

异常不抛出

parent f4d9f105
...@@ -53,8 +53,10 @@ public class ImConversationController extends BaseController { ...@@ -53,8 +53,10 @@ public class ImConversationController extends BaseController {
*/ */
@PostMapping("/saveOrUpdateName") @PostMapping("/saveOrUpdateName")
@ApiOperation(value = "添加或修改会话名称", notes = "权限:目前只有创建者有权限操作") @ApiOperation(value = "添加或修改会话名称", notes = "权限:目前只有创建者有权限操作")
public ApiResult<Boolean> saveOrUpdateName(@RequestBody ImConversationNameUpdate imConversationNameUpdate) throws Exception { public ApiResult<Boolean> saveOrUpdateName(@RequestBody ImConversationNameUpdate param) {
return imConversationService.saveOrUpdateName(imConversationNameUpdate); log.info("添加或修改会话名称入参 {}", JSON.toJSONString(param));
imConversationService.saveOrUpdateName(param);
return ApiResult.ok();
} }
...@@ -63,8 +65,9 @@ public class ImConversationController extends BaseController { ...@@ -63,8 +65,9 @@ public class ImConversationController extends BaseController {
*/ */
@PostMapping("/saveOrUpdateAttr") @PostMapping("/saveOrUpdateAttr")
@ApiOperation(value = "添加或修改会话拓展字段", notes = "权限:所有client都权限操作") @ApiOperation(value = "添加或修改会话拓展字段", notes = "权限:所有client都权限操作")
public ApiResult<Boolean> saveOrUpdateAttr(@RequestBody ImConversationAttrUpdate imConversationAttrUpdate) throws Exception { public ApiResult<Boolean> saveOrUpdateAttr(@RequestBody ImConversationAttrUpdate imConversationAttrUpdate) {
return imConversationService.saveOrUpdateAttr(imConversationAttrUpdate); imConversationService.saveOrUpdateAttr(imConversationAttrUpdate);
return ApiResult.ok();
} }
...@@ -73,7 +76,7 @@ public class ImConversationController extends BaseController { ...@@ -73,7 +76,7 @@ public class ImConversationController extends BaseController {
*/ */
@PostMapping("/leave") @PostMapping("/leave")
@ApiOperation(value = "client退出会话", notes = "若是创建者退出,[创建者]权限将会转移给按加入会话时间排序的下一个client") @ApiOperation(value = "client退出会话", notes = "若是创建者退出,[创建者]权限将会转移给按加入会话时间排序的下一个client")
public ApiResult<Boolean> leaveConversation(@RequestBody ImClientLeaveConversation imClientToConversation) throws Exception { public ApiResult<Boolean> leaveConversation(@RequestBody ImClientLeaveConversation imClientToConversation) {
log.info("client退出会话入参 {}", JSON.toJSONString(imClientToConversation)); log.info("client退出会话入参 {}", JSON.toJSONString(imClientToConversation));
return imConversationService.leaveConversation(imClientToConversation); return imConversationService.leaveConversation(imClientToConversation);
} }
......
...@@ -79,7 +79,7 @@ public interface ImConversationService extends BaseService<ImConversation> { ...@@ -79,7 +79,7 @@ public interface ImConversationService extends BaseService<ImConversation> {
/** /**
* client退出会话 * client退出会话
*/ */
ApiResult<Boolean> leaveConversation(ImClientLeaveConversation imClientToConversation) throws Exception; ApiResult<Boolean> leaveConversation(ImClientLeaveConversation imClientToConversation);
/** /**
* 群主转让 * 群主转让
...@@ -121,12 +121,12 @@ public interface ImConversationService extends BaseService<ImConversation> { ...@@ -121,12 +121,12 @@ public interface ImConversationService extends BaseService<ImConversation> {
/** /**
* 添加或修改会话名称 * 添加或修改会话名称
*/ */
ApiResult<Boolean> saveOrUpdateName(ImConversationNameUpdate imConversationNameUpdate) throws Exception; ApiResult<Boolean> saveOrUpdateName(ImConversationNameUpdate imConversationNameUpdate);
/** /**
* 添加或修改会话拓展字段 * 添加或修改会话拓展字段
*/ */
ApiResult<Boolean> saveOrUpdateAttr(ImConversationAttrUpdate imConversationAttrUpdate) throws Exception; void saveOrUpdateAttr(ImConversationAttrUpdate imConversationAttrUpdate);
/** /**
* 修改 * 修改
...@@ -135,7 +135,7 @@ public interface ImConversationService extends BaseService<ImConversation> { ...@@ -135,7 +135,7 @@ public interface ImConversationService extends BaseService<ImConversation> {
* @return * @return
* @throws Exception * @throws Exception
*/ */
boolean updateImConversation(ImConversation imConversation) throws Exception; boolean updateImConversation(ImConversation imConversation);
/** /**
* 修改为 是否单向隐藏会话","云端聊天记录不删除;假设有A和B两个用户,A删会话,B还能发; 如果B发了消息,A这边要重新把会话显示出来,并能显示之前的聊天记录" * 修改为 是否单向隐藏会话","云端聊天记录不删除;假设有A和B两个用户,A删会话,B还能发; 如果B发了消息,A这边要重新把会话显示出来,并能显示之前的聊天记录"
...@@ -169,7 +169,7 @@ public interface ImConversationService extends BaseService<ImConversation> { ...@@ -169,7 +169,7 @@ public interface ImConversationService extends BaseService<ImConversation> {
* @return * @return
* @throws Exception * @throws Exception
*/ */
Paging<ImConversationQueryVo> getImConversationPageList(ImConversationPageParam imConversationPageParam) throws Exception; Paging<ImConversationQueryVo> getImConversationPageList(ImConversationPageParam imConversationPageParam);
/** /**
...@@ -178,14 +178,14 @@ public interface ImConversationService extends BaseService<ImConversation> { ...@@ -178,14 +178,14 @@ public interface ImConversationService extends BaseService<ImConversation> {
* @return * @return
* @throws Exception * @throws Exception
*/ */
List<ConversationVo> getMyImConversationListAndMsgCount() throws Exception; List<ConversationVo> getMyImConversationListAndMsgCount();
/** /**
* 根据会话id查询单个会话信息 与会话的未读条数 * 根据会话id查询单个会话信息 与会话的未读条数
* @param param * @param param
* @return * @return
*/ */
ConversationVo infoImConversationAndMsgCount(ImConversationQueryParam param) throws Exception; ConversationVo infoImConversationAndMsgCount(ImConversationQueryParam param);
/** /**
* 获取加入的所有会话 * 获取加入的所有会话
...@@ -193,7 +193,7 @@ public interface ImConversationService extends BaseService<ImConversation> { ...@@ -193,7 +193,7 @@ public interface ImConversationService extends BaseService<ImConversation> {
* @return * @return
* @throws Exception * @throws Exception
*/ */
List<ImConversation> getMyImConversationList() throws Exception; List<ImConversation> getMyImConversationList();
/** /**
* 判断重复会话中的Attributes是否一样 * 判断重复会话中的Attributes是否一样
......
...@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; ...@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.metadata.OrderItem; import com.baomidou.mybatisplus.core.metadata.OrderItem;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.google.common.collect.Maps;
import com.wecloud.im.entity.ImApplication; import com.wecloud.im.entity.ImApplication;
import com.wecloud.im.entity.ImClient; import com.wecloud.im.entity.ImClient;
import com.wecloud.im.entity.ImConversationMembers; import com.wecloud.im.entity.ImConversationMembers;
...@@ -129,9 +130,9 @@ public class ImConversationMembersServiceImpl extends BaseServiceImpl<ImConversa ...@@ -129,9 +130,9 @@ public class ImConversationMembersServiceImpl extends BaseServiceImpl<ImConversa
// 封装响应的实体 // 封装响应的实体
ImMessageOnlineSend imMessageOnlineSend = new ImMessageOnlineSend(); ImMessageOnlineSend imMessageOnlineSend = new ImMessageOnlineSend();
imMessageOnlineSend.setCreateTime(new Date()); imMessageOnlineSend.setCreateTime(new Date());
imMessageOnlineSend.setType(MsgTypeEnum.CONVERSATION_DISBAND.getUriCode()); imMessageOnlineSend.setType(MsgTypeEnum.CONVERSATION_MEMBER_NAME_MODIFY.getUriCode());
imMessageOnlineSend.setSender(currentClient.getClientId()); imMessageOnlineSend.setSender(currentClient.getClientId());
Map<String, Object> content = new HashMap<>(); Map<String, Object> content = Maps.newHashMap();
content.put("operator", currentClient.getClientId()); content.put("operator", currentClient.getClientId());
content.put("remarkName", param.getClientRemarkName()); content.put("remarkName", param.getClientRemarkName());
imMessageOnlineSend.setContent(content); imMessageOnlineSend.setContent(content);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment