package com.njcn.mapper.configuration;

import com.njcn.pojo.configuration.SysSet;
import com.njcn.pojo.data.FunctionPloyEntity;
import com.njcn.pojo.data.MenuEntity;
import com.njcn.pojo.data.TimerManage;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;

import java.util.Date;
import java.util.List;
import java.util.Set;
import java.util.UUID;

public interface SysMapper extends Mapper<SysSet> {

    int update(SysSet set);

    List<MenuEntity> listMenu(@Param("systype") String systype);

    List<MenuEntity> parentMenulist(@Param("systype") String systype);

    List<MenuEntity> menuTypeList(@Param("name") String name);

    void insertData(@Param("menuEntity") MenuEntity menuEntity, @Param("userIndex") String userIndex, @Param("sysType") String sysType);

    void updateData(@Param("menuEntity") MenuEntity menuEntity, @Param("userIndex") String userIndex);

    void deleteMenu(@Param("id") String id, @Param("userIndex") String userIndex, @Param("time") Date time);

    List<FunctionPloyEntity> menuPloyList(@Param("sysType") String sysType);

    List<MenuEntity> roleList();

    void insertRoleMenuData(@Param("roleId") String roleId, @Param("list") List<String> list, @Param("uuid") String uuid);

    void insertFunctionRoleData(@Param("uuid") String uuid, @Param("roleId") String roleId, @Param("name") String name, @Param("des") String des, @Param("date") Date date, @Param("userIndex") String userIndex, @Param("sysType") String sysType);

    void deleteRoleMenuData(@Param("roleId") String roleId, @Param("id") String id);

    void updateRoleMenuData(@Param("id") String id, @Param("name") String name, @Param("des") String des, @Param("date") Date date, @Param("userIndex") String userIndex);

    void deleteFunctionRoleData(@Param("id") String id, @Param("date") Date date, @Param("userIndex") String userIndex);

    List<String> roleStateList(@Param("sysType") String sysType);

    List<String> getRoleFunction(@Param("roleId") String roleId, @Param("id") String id);

    List<MenuEntity> getListMenu(@Param("list") List<String> list, @Param("sysType") String sysType);

    List<TimerManage> getTimerManage();

    Integer setTimerState(@Param("guid") String guid, @Param("state") Integer state);

    String getTimerManageByGuid(@Param("guid") String guid);
}
