package com.brilliance.isc.mda.dao;
import java.util.Date;
import java.util.List;

import com.brilliance.isc.vo.manager.TskUsrInfoVo;
import org.apache.ibatis.annotations.Param;

import com.brilliance.isc.bo.TaskDistUser;
import org.apache.ibatis.annotations.Mapper;

@Mapper
public interface TaskDistUserMapper {

    int deleteByPrimaryKey(Long id);

    int insert(TaskDistUser record);

    int insertSelective(TaskDistUser record);

    TaskDistUser selectByPrimaryKey(Long id);

    int updateByExtkeySelective(TaskDistUser record);

    int updateByPrimaryKeySelective(TaskDistUser record);

    int updateByPrimaryKey(TaskDistUser record);

    TaskDistUser selectOneByExtkey(@Param("extkey") String extkey);

    List<TaskDistUser> selectAllByBranchinr(@Param("branchinr") String branchinr);

    List<TaskDistUser> selectAllByParticipateFlagAndStatus(@Param("participateFlag") String participateFlag, @Param("status") String status);

    int updateStatusByExtkey(@Param("extkey") String extkey, @Param("status") String status);

    int updateParticipateFlagByExtkey(@Param("extkey") String extkey, @Param("participateFlag") String participateFlag);

    int updateStatusAndLastLoginTimeByExtkey(@Param("extkey") String extkey, @Param("status") String status, @Param("lastLoginTime") Date lastLoginTime);

    int updateAssignedTaskCountByExtkey(@Param("extkey") String extkey, @Param("assignedTaskCount") Integer assignedTaskCount);

    int updateAssignedTaskCountAndLastCommitTimeByExtkey(@Param("extkey") String extkey, @Param("assignedTaskCount") Integer assignedTaskCount, @Param("lastCommitTime") Date lastCommitTime);

    int deleteByExtkey(@Param("extkey") String extkey);

    List<TaskDistUser> selectConditionList(TaskDistUser condition);

    List<TaskDistUser> selectListByPositionAndBranchinr(@Param("inrList") List<String> inrList,@Param("bizPosition") String bizPosition);

    List<TskUsrInfoVo> selectUsrByCondition(TaskDistUser record);

}
