package org.dromara.art.mapper;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.dromara.art.domain.ArtSchool;
import org.dromara.art.domain.vo.ArtSchoolVo;
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;

/**
 * 学校基础信息主表Mapper接口
 *
 * @author ZhouWenTao
 * @date 2026-02-17
 */
public interface ArtSchoolMapper extends BaseMapperPlus<ArtSchool, ArtSchoolVo> {

    @Delete("DELETE FROM art_school WHERE school_id = #{schoolId}")
    int deletePhyBySchoolId(@Param("schoolId") Long schoolId);

    @Select("SELECT school_id FROM art_school WHERE main_code = #{mainCode} LIMIT 1")
    Long selectSchoolIdIgnoreLogicByMainCode(@Param("mainCode") String mainCode);
}
