package cn.com.ty.lift.business.project.dao.mapper;

import cn.com.ty.lift.business.project.dao.entity.ProjectUser;
import cn.com.ty.lift.business.project.dao.entity.model.ProjectAppUser;
import cn.com.ty.lift.business.project.dao.entity.model.request.ProjectRequest;
import cn.com.ty.lift.business.project.dao.entity.model.response.ProjectRelevanceResponse;
import cn.com.ty.lift.business.project.dao.entity.model.response.ProjectUserResponse;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author bieao
 * @date 2019/12/09
 * @description 项目关系人数据层
 */
public interface ProjectUserMapper extends BaseMapper<ProjectUser> {

    List<ProjectUserResponse> findUserListById(@Param("projectId") Long projectId, @Param("mtCompanyId") Long mtCompanyId);

    /**
     * @param request 项目ID、公司ID
     * @return List<ProjectAppUser> 项目成员名称和头像地址
     * @description 根据项目id查询项目人员
     * @date 2020/1/2 10:52 上午
     */
    List<ProjectAppUser> findProjectUserListById(@Param("request") ProjectRequest request);

    int batchRemoveWithParams(ProjectRequest request);

    IPage<ProjectRelevanceResponse> findProjectListByUserId(IPage<ProjectRelevanceResponse> page, @Param("request") ProjectRequest request);
}