package com.winsun.mapper;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.winsun.bean.SchoolPackage;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

/**
 * @Author: chancy
 * @Date: 2020/2/13 17:24
 */
@Mapper
@Component
public interface SchoolPackageMapper extends BaseMapper<SchoolPackage> {
    /**
     * 删除相应学校对套餐的中间表信息
     * @return
     */
    @Delete("delete from hhr_school_package where school_id = #{id}")
    Integer deleteIntermediateTableBySchool(@Param("id") String id);

    /**
     * 删除相应套餐对学校的中间表信息
     * @return
     */
    @Delete("delete from hhr_school_package where package_id = #{id}")
    Integer deleteIntermediateTableByPackage(@Param("id") String id);
}
