/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.manager.mapper;

import org.apache.ibatis.annotations.Param;
import org.springblade.manager.dto.FindAllUserByConditionDTO;
import org.springblade.manager.entity.ContractInfo;
import org.springblade.manager.entity.WbsTree;
import org.springblade.manager.vo.*;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.system.user.entity.User;
import org.springblade.system.user.vo.UserVO2;

import java.util.List;

/**
 * 合同段信息表 Mapper 接口
 *
 * @author liuyc
 * @since 2022-04-14
 */
public interface ContractInfoMapper extends BaseMapper<ContractInfo> {

    List<ContractInfo> selectContractByProjectIds(@Param("ids") List<Long> ids);

    /**
     * 自定义分页
     *
     * @param page
     * @param contractInfo
     * @return
     */
    List<ContractInfoVO> selectContractInfoPage(IPage page, ContractInfoVO contractInfo);

    List<ContractlnfoCountVO> selectContractInfoCount();

    List<ContractInfo> selectContractInfoPageByPid(@Param("pid") String pid);

    List<CRolePostVO> findJobByRoleId(@Param("id") String id);

    List<UserVO2> findAllUserByCondition(IPage page, @Param("Values") FindAllUserByConditionDTO values);

    List<User> findUserListByCondition(IPage page, @Param("Values") FindAllUserByConditionDTO values);

    List<User> findUserInfoByCondition(@Param("rId") String rId,
                                       @Param("pId") String pId,
                                       @Param("userName") String userName);

    List<User> findUserByName(@Param("name") String name);

    Integer updatePasswordByUserId(@Param("userId") String userId, @Param("password") String password);

    Boolean deleteFile(@Param("url") String url);

    List<WbsTreeContractTreeVO> tree(@Param("wbsId") String wbsId,
                                     @Param("projectId") String projectId,
                                     @Param("contractId") String contractId,
                                     @Param("wbsType") Integer wbsType,
                                     @Param("parentId") String parentId);

//    String selectStartFileId(@Param("id") String id);

}
