群详情接口

1 parent 922ec016
package com.linkwechat.web.controller.wecom;
import cn.hutool.core.collection.CollectionUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.linkwechat.common.constant.WeConstans;
import com.linkwechat.common.core.controller.BaseController;
......@@ -60,6 +61,22 @@ public class WeGroupController extends BaseController {
/**
* 群详情
* @param chatId
* @return
*/
@GetMapping("/chatDetail/{chatId}")
public AjaxResult chatDetail(@PathVariable String chatId){
List<WeGroup> weGroups = this.weGroupService.selectWeGroupList(WeGroup.builder()
.chatId(chatId)
.build());
if(CollectionUtil.isNotEmpty(weGroups)){
return AjaxResult.success(weGroups.stream().findFirst().get());
}
return AjaxResult.success();
}
/**
* 获取所有群接口(不分页)
* @param weGroup
* @return
......
......@@ -25,6 +25,7 @@
LEFT JOIN we_group_tag_rel wgtr ON wg.chat_id=wgtr.chat_id
LEFT JOIN we_tag wt ON wt.tag_id=wgtr.tag_id
<where>
<if test="chatId !=null and chatId !=''">wg.chat_id=#{chatId}</if>
<if test="delFlag !=null"> wg.del_flag=#{delFlag}</if>
<if test="groupName != null and groupName != ''"> and wg.group_name like concat('%', #{groupName}, '%')</if>
<if test="groupLeaderName != null and groupLeaderName != ''"> and wu.user_name like concat('%', #{groupLeaderName}, '%')</if>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!