// Path: Server/src/main/java/com/easychat/exception/BadRequestException.java
// public class BadRequestException extends BasicException{
//     public BadRequestException(String error, String description) {
//         super(error, description);
//     }
// }
// 
// Path: Server/src/main/java/com/easychat/repository/GroupRelationshipRepository.java
// public interface GroupRelationshipRepository extends JpaRepository<GroupRelationship, Long>, GroupRelationshipRepositoryCustom {
//     List<GroupRelationship> findByGid(Long gid);
//     GroupRelationship findByGidAndUid(Long gid, Long uid);
// }
// 
// Path: Server/src/main/java/com/easychat/repository/GroupRepository.java
// public interface GroupRepository extends JpaRepository<Group, Long> {
//     List<Group> findByName(String name);
// 
// 
// }
// 
// Path: Server/src/main/java/com/easychat/service/GroupService.java
// public interface GroupService {
//     boolean exists(long gid);
//     String createGroup(String json);
//     String deleteGroup(long gid,long uid);
//     String updateGroupAvatarAndAnnouncement(long gid ,long uid ,String json);
//     String quitGroup(long gid, long uid );
//     String inviteIntoGroup(long gid ,String json);
// }


import com.easychat.exception.BadRequestException;
import com.easychat.repository.GroupRelationshipRepository;
import com.easychat.repository.GroupRepository;
import com.easychat.service.GroupService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
package com.easychat.service.impl;


/**
 * Created by king on 2015/12/7.
 */
@Service
public class GroupServiceImpl implements GroupService {
    private GroupRepository groupRepository;
// Path: Server/src/main/java/com/easychat/exception/BadRequestException.java
// public class BadRequestException extends BasicException{
//     public BadRequestException(String error, String description) {
//         super(error, description);
//     }
// }
// 
// Path: Server/src/main/java/com/easychat/repository/GroupRelationshipRepository.java
// public interface GroupRelationshipRepository extends JpaRepository<GroupRelationship, Long>, GroupRelationshipRepositoryCustom {
//     List<GroupRelationship> findByGid(Long gid);
//     GroupRelationship findByGidAndUid(Long gid, Long uid);
// }
// 
// Path: Server/src/main/java/com/easychat/repository/GroupRepository.java
// public interface GroupRepository extends JpaRepository<Group, Long> {
//     List<Group> findByName(String name);
// 
// 
// }
// 
// Path: Server/src/main/java/com/easychat/service/GroupService.java
// public interface GroupService {
//     boolean exists(long gid);
//     String createGroup(String json);
//     String deleteGroup(long gid,long uid);
//     String updateGroupAvatarAndAnnouncement(long gid ,long uid ,String json);
//     String quitGroup(long gid, long uid );
//     String inviteIntoGroup(long gid ,String json);
// }


// Path: Server/src/main/java/com/easychat/service/impl/GroupServiceImpl.java
import com.easychat.exception.BadRequestException;
import com.easychat.repository.GroupRelationshipRepository;
import com.easychat.repository.GroupRepository;
import com.easychat.service.GroupService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

package com.easychat.service.impl;


/**
 * Created by king on 2015/12/7.
 */
@Service
public class GroupServiceImpl implements GroupService {
    private GroupRepository groupRepository;
    private GroupRelationshipRepository groupRelationshipRepository;