/**
 * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
 */
package com.jeeplus.modules.filing.basicInformation.mapper;

import com.jeeplus.core.persistence.BaseMapper;
import com.jeeplus.core.persistence.annotation.MyBatisMapper;
import com.jeeplus.modules.filing.basicInformation.entity.BasicInformation;
import com.jeeplus.modules.filing.basicInformation.entity.BasicInformationChild;

import java.util.List;

/**
 * 基础信息管理
 * @author qy
 * @version 2021-03-23
 */
@MyBatisMapper
public interface BasicInformationMapper extends BaseMapper<BasicInformation> {
    /**
     * 根据父级id查找所有的字类id
     * */
    List<BasicInformationChild> findChildList(BasicInformationChild basicInformation);

    List<BasicInformationChild> findChildListBy(BasicInformation basicInformation);

    /**
     * 查早所有的父级数据
     * */
    BasicInformation findOne(String id);

    /**
     * 插入子级信息
     * */
    void insertChild(BasicInformationChild basicInformationChild);

    /**
     * 修改子级信息
     * */
    void updateChild(BasicInformationChild basicInformationChild);

    /**
     * 删除子级信息
     * */
    void deleteChild(BasicInformationChild basicInformationChild);

    /**
     * 通过projectCode查询项目是否已经存在
     */
    BasicInformation findByProjectCode(String projectCode);

    /**
     * 父类修改项目编码后字类自动更新对应父级id
     * */
    void updateChildParent(BasicInformationChild basicInformationChild);

    List<BasicInformation> findChildByCode(String projectCode);

    /**
     * 查询所有父级集合的id
     * */
    List<String> findALlId();


    List<BasicInformation> findAllChildList(BasicInformation basicInformation);
}