package org.springblade.manager.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.springblade.manager.entity.WbsTree;
import org.springblade.manager.entity.WbsTreePrivate;
import org.springblade.manager.vo.WbsTreePrivateVO;
import org.springblade.manager.vo.WbsTreeVO;

import java.util.List;


/**
 * Mapper 接口
 *
 * @author liuyc
 * @since 2022-05-24
 */
public interface WbsTreePrivateMapper extends BaseMapper<WbsTreePrivate> {
    List<WbsTreePrivate> selectAll();

    /**
     * 获取树形节点
     */
    List<WbsTreePrivateVO> tree(@Param("wbsId") String wbsId,
                                @Param("projectId") String projectId);


    WbsTreePrivate selectByCondition(@Param("id") String id,
                                     @Param("projectId") String projectId);

    void deleteByCondition(String id, String wbsId, String projectId);

    void deleteByCondition2(String id, String wbsId, String projectId);

    WbsTreePrivate selectByCondition2(String id, String projectId, String wbsId);

    void updateByCondition(String id, String projectId, String wbsId);

    void updateTableByCondition(@Param("parentId") String id,
                                @Param("projectId") String projectId,
                                @Param("wbsId") String wbsId);

    Integer insertCombination1(@Param("wbsTree") WbsTree wbsTree,
                               @Param("projectId") String projectId);

    Integer insertCombination2(@Param("wbsTree") WbsTreePrivate wbsTree,
                               @Param("projectId") String projectId);

    WbsTreePrivate selectByCondition1(String id, String templateProjectId);

    List<WbsTree> selectIsTable(Long tableParentId);


}
