package com.jeeplus.centrecareful.approvalType.mapper;


import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jeeplus.centrecareful.approvalType.domain.ZsReimbursementTypeInfo;
import com.jeeplus.core.domain.TreeMapper;
import com.jeeplus.sys.domain.WorkAttachmentInfo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author: 王强
 * @create: 2022-11-25 09:02
 **/
public interface ZsReimbursementTypeMapper extends BaseMapper<ZsReimbursementTypeInfo>, TreeMapper<ZsReimbursementTypeInfo> {

    /**
     * 根据name和parentId查询名称是否重复
     * @param name
     * @param parentId
     * @return
     */
    Integer checkNameIsExist(@Param("name") String name, @Param("parentId") String parentId);

    Integer getNo(@Param("parentId") String parentId);

    Integer getLevel(@Param("parentId") String parentId);

    List<String> getChildId(String id);

    /**
     * 获取所有业务类型的数据
     * @param type
     * @return
     */
    List<ZsReimbursementTypeInfo> getAllList(String type);
    @InterceptorIgnore(tenantLine = "true")
    List<WorkAttachmentInfo> findList(@Param("id") String id);
    @InterceptorIgnore(tenantLine = "true")
    Integer findIsExit(@Param("id") String id, @Param("name")String name);
}
