package com.house365.ws.dao.mapper;

import com.house365.beans.entity.DutyStaffEntity;
import com.house365.beans.entity.RequestLoginEntity;
import com.house365.beans.entity.UserEntity;
import com.house365.beans.entity.UserSimpleEntity;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

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

/**
 * @author Created by Administrator on 2019/1/9.
 */
@Repository
public interface UserMapper {

    UserEntity getById(int id);

    List<UserEntity> queryByConditions(Map<String, Object> map);

    List<UserSimpleEntity> queryUserInfoByd(Map<String, Object> map);

    List<UserSimpleEntity> queryUserInfoByPhone(Map<String, Object> map);

    List<DutyStaffEntity> getStaffDutyList();

    UserEntity getLimitLoginById(String name);

    List<DutyStaffEntity> getOndutyById(Integer uid);

    void addRequestLoginInfo(RequestLoginEntity requestlogin);

    List<RequestLoginEntity> getRequestLoginInfo(RequestLoginEntity requestloginentity);

    void authorizationById(RequestLoginEntity entity);

    void updateRequestById(RequestLoginEntity requestloginentity);

    RequestLoginEntity getRequestLoginInfoById(Integer id);

    List<DutyStaffEntity> getDutyByCondition(Map<String, Object> map);

    List<UserEntity> queryManagers(Map<String, Object> map);

    List<UserEntity> queryRuleManagers(Map<String, Object> map);

    List<UserEntity> getManagerByPid(Map<String, Object> map);

    void updateUserStatus(Map<String, Object> map);

    String getCityById(String userId);

    List<UserEntity> getDutyUserByCity(Map<String, Object> map);

    List<UserEntity> getDutyUserByCityAndOnDuty(String  cityCode);

    List<UserEntity> getUserByCity(Map<String, Object> map);

    void deleteDutyById(Integer userId);

    void addDuty(@Param("name")String name,@Param("userId") Integer userId, @Param("updateTime")Date updateTime, @Param("order")Integer order);

    void updateDutyStaff(DutyStaffEntity staff);

    DutyStaffEntity selectBuyDutyId(Integer userId);

    void updateDuty(@Param("order")Integer order,@Param("userId") Integer userId,@Param("updateTime")Date updateTime);
    void updateDutyOnduty(@Param("userId") Integer userId,@Param("updateTime")Date updateTime,@Param("onduty") Integer onduty);


}
