package com.foreverwin.mesnac.meapi.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.foreverwin.mesnac.meapi.model.UserGroup;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author robert
 * @since 2021-06-29
 */
@Repository
public interface UserGroupMapper extends BaseMapper<UserGroup> {

     int checkUserGroup(@Param("site")String site, @Param("list")List<String> item);

     //根据升级的用户组得到正确的用户组
     List<UserGroup> getUserGroupListByGroups(@Param("site")String site,@Param("list")List<String> item);

     UserGroup getCustomFieldByGroup(@Param("site")String site,
                                     @Param("userGroup")String userGroup);

     List<UserGroup> selectUserGroupListByUserBo(@Param("userBo") String userBo);
     Integer getUserGroupByUser(@Param("userBO")String userBO,@Param("userGroupBO")String userGroupBO);

     Integer findUserGroupByUser(@Param("site")String site,@Param("user")String user,@Param("list")List<String> list);

     List<UserGroup> findUserGroupListByUser(@Param("site")String site,@Param("user")String user);

     List<UserGroup> findAbnormalUserGroup(@Param("site")String site, @Param("param")Map<String,Object> param);

}