package com.jeeplus.test.reimbursement.reimbursementType.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jeeplus.core.domain.TreeMapper;
import com.jeeplus.test.reimbursement.reimbursementType.domain.ReimbursementTypeInfo;
import org.apache.ibatis.annotations.Param;

public interface ReimbursementTypeMapper extends BaseMapper<ReimbursementTypeInfo>, TreeMapper<ReimbursementTypeInfo> {

    /**
     * 根据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);
}
