|
@@ -17,6 +17,7 @@ import com.yonge.cooleshow.biz.dal.entity.ImGroup;
|
|
|
import com.yonge.cooleshow.biz.dal.entity.ImGroupMember;
|
|
|
import com.yonge.cooleshow.biz.dal.entity.Student;
|
|
|
import com.yonge.cooleshow.biz.dal.entity.Subject;
|
|
|
+import com.yonge.cooleshow.biz.dal.entity.SysConfig;
|
|
|
import com.yonge.cooleshow.biz.dal.entity.Teacher;
|
|
|
import com.yonge.cooleshow.biz.dal.entity.TenantGroup;
|
|
|
import com.yonge.cooleshow.biz.dal.entity.TenantGroupAlbum;
|
|
@@ -28,6 +29,7 @@ import com.yonge.cooleshow.biz.dal.mapper.TenantGroupAlbumMapper;
|
|
|
import com.yonge.cooleshow.biz.dal.mapper.TenantGroupMapper;
|
|
|
import com.yonge.cooleshow.biz.dal.service.ImGroupMemberService;
|
|
|
import com.yonge.cooleshow.biz.dal.service.ImGroupService;
|
|
|
+import com.yonge.cooleshow.biz.dal.service.SysConfigService;
|
|
|
import com.yonge.cooleshow.biz.dal.service.SysUserService;
|
|
|
import com.yonge.cooleshow.biz.dal.service.TenantGroupService;
|
|
|
import com.yonge.cooleshow.biz.dal.service.im.ImGroupCoreService;
|
|
@@ -36,6 +38,7 @@ import com.yonge.cooleshow.biz.dal.wrapper.StudentWrapper;
|
|
|
import com.yonge.cooleshow.biz.dal.wrapper.TenantGroupAlbumWrapper;
|
|
|
import com.yonge.cooleshow.biz.dal.wrapper.TenantGroupWrapper;
|
|
|
import com.yonge.cooleshow.biz.dal.wrapper.im.ImGroupWrapper;
|
|
|
+import com.yonge.cooleshow.common.constant.SysConfigConstant;
|
|
|
import com.yonge.toolset.base.exception.BizException;
|
|
|
import com.yonge.toolset.mybatis.support.PageUtil;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
@@ -71,6 +74,8 @@ public class TenantGroupServiceImpl extends ServiceImpl<TenantGroupMapper, Tenan
|
|
|
private SysUserService sysUserService;
|
|
|
@Autowired
|
|
|
private TenantGroupAlbumMapper tenantGroupAlbumMapper;
|
|
|
+ @Autowired
|
|
|
+ private SysConfigService sysConfigService;
|
|
|
|
|
|
/**
|
|
|
* 查询详情
|
|
@@ -162,6 +167,12 @@ public class TenantGroupServiceImpl extends ServiceImpl<TenantGroupMapper, Tenan
|
|
|
|
|
|
this.save(entity);
|
|
|
if (adminId != null && Boolean.TRUE.equals(imGroupCreate)) {
|
|
|
+ // 群成员数量限制校验
|
|
|
+ SysConfig config = sysConfigService.findByParamName(SysConfigConstant.GROUP_MEMBER_LIMIT);
|
|
|
+ if (config != null && Integer.parseInt(config.getParamValue()) < userIds.size()) {
|
|
|
+ throw new BizException("群成员人数上限为:" + config.getParamValue() + "人");
|
|
|
+ }
|
|
|
+
|
|
|
// 建群
|
|
|
try {
|
|
|
ImGroupWrapper.ImGroup imGroup = new ImGroupWrapper.ImGroup();
|