/** * Copyright 2018-2028 Akaxin Group *
* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at *
* http://www.apache.org/licenses/LICENSE-2.0 *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.windchat.im.web.admin.service.impl;
import java.util.List;
import java.util.Set;
import com.windchat.im.web.admin.service.IGroupService;
import org.springframework.stereotype.Service;
import com.akaxin.site.business.dao.UserGroupDao;
import com.akaxin.site.business.impl.site.SiteConfig;
import com.windchat.im.storage.bean.GroupMemberBean;
import com.windchat.im.storage.bean.GroupProfileBean;
import com.windchat.im.storage.bean.SimpleGroupBean;
/**
* @author Sam{@link an.guoyue254@gmail.com}
* @since 2018-04-17 18:59:24
*/
@Service("groupManageService")
public class GroupManageService implements IGroupService {
@Override
public GroupProfileBean getGroupProfile(String siteGroupId) {
GroupProfileBean groupProfile = UserGroupDao.getInstance().getGroupProfile(siteGroupId);
groupProfile.setDefaultState(isUserDefaultGroup(groupProfile.getGroupId()) ? 1 : 0);
return groupProfile;
}
private boolean isUserDefaultGroup(String siteGroupId) {
Set