package com.jeeplus.test.cw.reimbursementApproval.approvalType.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jeeplus.core.domain.TreeMapper;
import com.jeeplus.test.cw.reimbursementApproval.approvalType.domain.CwReimbursementTypeInfo;
import org.apache.ibatis.annotations.Param;

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

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