Jelajahi Sumber

1.机构专辑查询条件调整、群详情添加校验

yuanliang 1 tahun lalu
induk
melakukan
c4bcfde74f

+ 1 - 1
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/TenantGroupServiceImpl.java

@@ -207,7 +207,7 @@ public class TenantGroupServiceImpl extends ServiceImpl<TenantGroupMapper, Tenan
                 if (CollectionUtils.isNotEmpty(userIds)) {
                     // 加群成员
                     try {
-                        imGroupService.addGroupMember(oldGroup.getImGroupId(), new HashSet<>(userIds));
+                        imGroupService.addGroupMember(imGroupId, new HashSet<>(userIds));
                     } catch (Exception e) {
                         log.error("加入机构小组群失败", e);
                         throw new BizException("加入机构小组群失败");

+ 1 - 0
cooleshow-user/user-biz/src/main/resources/config/mybatis/TenantAlbumMapper.xml

@@ -33,6 +33,7 @@
             <if test="param.keyword !=null and param.keyword.trim() !=''">
                 and (t.name_ like concat('%',#{param.keyword},'%')
                 or i.name_ like concat('%',#{param.keyword},'%')
+                or i.brief_Introduction_ like concat('%',#{param.keyword},'%')
                 )
             </if>
             <if test="param.tenantId != null ">

+ 3 - 1
cooleshow-user/user-teacher/src/main/java/com/yonge/cooleshow/teacher/controller/ImGroupController.java

@@ -2,6 +2,7 @@ package com.yonge.cooleshow.teacher.controller;
 
 
 import com.alibaba.fastjson.JSON;
+import com.yonge.cooleshow.auth.api.entity.SysUser;
 import com.yonge.cooleshow.biz.dal.dto.ImGroupResultDto;
 import com.yonge.cooleshow.biz.dal.dto.ImGroupSearchDto;
 import com.yonge.cooleshow.biz.dal.entity.ImGroup;
@@ -88,8 +89,9 @@ public class ImGroupController extends BaseController {
     @ApiOperation("获取群详情")
     @PostMapping(value = "/getDetail/{groupId}")
     public HttpResponseResult<ImGroup> getDetail(@ApiParam(value = "群编号", required = true) @PathVariable("groupId") String groupId) throws Exception {
+        SysUser user = sysUserService.getUser();
         ImGroup group = imGroupService.getById(groupId);
-        if (group == null) {
+        if (group == null || group.getCreateBy().equals(user.getId())) {
             return failed(HttpStatus.NO_CONTENT, "群组不存在");
         }
         return succeed(group);