package com.manage.dao;

import com.manage.entity.Power_User;
import com.manage.vo.Power_UserVo;
import com.manage.vo.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface Power_UserMapper {
    int deleteByPrimaryKey(Integer userId);

    int insert(Power_User record);

    int insertSelective(Power_User record);

    Power_UserVo selectByPrimaryKey(Integer userId);

    int updateByPrimaryKeySelective(Power_User record);

    int updateByPrimaryKey(Power_User record);

    public List<Power_User> checkUserName(String userName);

    public Power_UserVo findPowerUserByUserNameAndUserPwd(Power_User powerUser);

    List<Power_UserVo> findSomeByMore(Power_UserVo powerUser);

    int getTotal(Power_UserVo powerUser);

    List<Power_UserVo> selectList();

    List<Power_UserVo> selectAllByDeptId(@Param("deptId") Integer deptId,@Param("userName")String userName);
    List<Power_UserVo> selectAllBySysRole(@Param("dictId") Integer dictId);
    List<Power_UserVo> selectAllByRoleIdAndDictId(@Param("roleId") Integer roleId,@Param("dictId") Integer dictId);

    Integer updatePassword(@Param("userPwd") String userPwd, @Param("userId") Integer userId, @Param("updater")String updater, @Param("updateDate")String updateDate);

    Integer validPassword(@Param("userPwd") String userPwd, @Param("userId") Integer userId, @Param("updater")String updater, @Param("updateDate")String updateDate);

    List<Power_UserVo> selectAllBySysId(@Param("hospitalId")Integer hospitalId,@Param("userName")String userName);

    List<Power_UserVo> selectUserListByNoticeTypeId(@Param("noticeTypeId")Integer noticeTypeId,@Param("hospitalId")Integer hospitalId);

    Integer selectHospitalIdByUserId(@Param("userId")Integer userId);

    List<Power_UserVo> selectUsersBySysFlagAndHospitalId(@Param("sysFlag")String sysFlag,@Param("hospitalId")Integer hospitalId);

    List<User> selectUserIdAndUserNameList(@Param("userId") Integer userId);

    Integer selectEffectiveCount();

    List<Power_UserVo> selectAllNotAdmin();

    int SimpleInsert(List<Power_User> list);

    Power_UserVo findPowerUserByUserNameAndRemark(Power_User powerUser);

    List<Power_User> getUserTreeByHospitalId(@Param("hospitalId")Integer hospitalId);

    List<Power_User> getUserTreeByDeptId(@Param("deptId")Integer deptId);

    /**
     * 查询有审批权限的用户id
     * */
    List<Power_User> selectUserIdsWithApprove(@Param("menuUrl")String menuUrl);

    List<Power_User> loadPosition();
}