package com.czg.account.service;

import com.czg.account.dto.PageDTO;
import com.czg.account.dto.role.RoleAddDTO;
import com.czg.account.dto.role.RoleEditDTO;
import com.czg.account.dto.role.RolePermissionDTO;
import com.czg.account.dto.role.RoleSaveTemplateDTO;
import com.czg.account.entity.SysRole;
import com.mybatisflex.core.paginate.Page;
import com.mybatisflex.core.service.IService;

import java.util.List;

/**
 * 角色表 服务层。
 *
 * @author Administrator
 * @since 2025-02-08
 */
public interface SysRoleService extends IService<SysRole> {

    List<SysRole> getByUserId(Long id);

    Page<SysRole> getList(Long shopId, PageDTO pageDTO, String key, String startTime, String endTime);

    Boolean add(RoleAddDTO roleAddDTO);

    Boolean edit(RoleEditDTO roleEditDTO);

    List<Long> getRoleMenu(long shopId, Integer id, Integer type);

    Boolean editPermission(long shopId, RolePermissionDTO rolePermissionDTO);

    Boolean saveByTemplate(long shopId, RoleSaveTemplateDTO dto);

}
