package cn.com.countrygarden.bi.main.service.wcx;


import cn.com.countrygarden.bi.main.dto.wcx.WcxRoleDto;
import cn.com.countrygarden.bi.main.exception.ServiceException;
import cn.com.countrygarden.bi.main.model.PageData;
import cn.com.countrygarden.bi.main.model.sys.UserRoles;

import java.util.List;

/**
 * 微创新角色接口
 */
public interface WcxRoleService {
      void save(WcxRoleDto dto);

      boolean deleteById(String roleId);

      void update(WcxRoleDto dto);

      PageData selectPageList(WcxRoleDto dto);

      boolean checkRoleDto(WcxRoleDto dto);

      /**
       * 更新权重
       * @param weightRatio
       * @param roleType
       * @return
       */
      boolean updateWeightRatio(Integer weightRatio, String roleType);


      int selectWeightRatioByRoleType(String roleType);

      /**
       * 获取系统人员角色
       * @param sysUserCode
       * @return
       */
      List<UserRoles> selectSysRoleBySysUserCode(String sysUserCode);

      /**
       * 获取最大用户角色权限
       * @param sysUserRoles
       * @return
       */
      String getMaxRole(List<UserRoles> sysUserRoles) throws ServiceException;
}
