package com.ruoyi.bgt.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.bgt.domain.BgtProjectRecruit;
import com.ruoyi.bgt.domain.dto.BgtProjectRecruitQueryDTO;
import com.ruoyi.bgt.domain.vo.BgtProjectRecruitVO;
import com.ruoyi.common.core.mybatisplus.cache.MybatisPlusRedisCache;
import com.ruoyi.common.core.mybatisplus.core.BaseMapperPlus;
import com.ruoyi.wgz.bo.req.WgzAppRegisteredProjectReq;
import com.ruoyi.wgz.bo.req.WgzAppUnderwayReq;
import com.ruoyi.wgz.bo.res.WgzAppCancelRegistrationProjectDetailsRes;
import com.ruoyi.wgz.bo.res.WgzAppProjectDetailsRes;
import com.ruoyi.wgz.bo.res.WgzAppRegisteredProjectRes;
import com.ruoyi.wgz.bo.res.WgzAppUnderwayRes;
import com.ruoyi.wgz.bo.rests.WgzAppCancelRegistrationProjectDetailsTwo;
import org.apache.ibatis.annotations.CacheNamespace;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 包工头招工Mapper接口
 *
 * @author ruoyi
 * @date 2025-02-17
 */
// 如使需切换数据源 请勿使用缓存 会造成数据不一致现象
@CacheNamespace(implementation = MybatisPlusRedisCache.class, eviction = MybatisPlusRedisCache.class)
public interface BgtProjectRecruitMapper extends BaseMapperPlus<BgtProjectRecruit> {

	Page<BgtProjectRecruitVO> appQueryPageList(@Param("page") Page<BgtProjectRecruitQueryDTO> page, @Param("dto") BgtProjectRecruitQueryDTO dto);

	WgzAppProjectDetailsRes userProjectDetails(@Param("id") Long id);

	// 获取指定用户已申请的项目信息
	Page<WgzAppRegisteredProjectRes> userRegisteredProject(@Param("page") Page<WgzAppRegisteredProjectReq> page,@Param("userId") Long userId);

	// 获取指定项目下的所有成员
	List<WgzAppCancelRegistrationProjectDetailsTwo> GetsTheMembersUnderTheCurrentProject (@Param("recruitId") Long recruitId);
}
