package org.sky.scientific.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.sky.core.tenant.annotation.TenantIgnore;
import org.sky.scientific.pojo.dto.SubjectQueryDto;
import org.sky.scientific.pojo.entity.Subject;
import org.sky.scientific.pojo.vo.SubjectVO;

import java.util.List;


/**
 * SubjectMapper 接口
 */
public interface SubjectMapper extends BaseMapper<Subject> {

	@TenantIgnore
	List<SubjectVO> lazyList(@Param("tenantId") String tenantId, @Param("ew") SubjectQueryDto sub);

	boolean deleteSubject(Long subjectId);

	Subject getByName(@Param("name") String name, @Param("parentId") Long parentId, @Param("tenantId") String tenantId);


	String getMaxCode(@Param("parentId") Long parentId, @Param("tenantId") String tenantId);
}
