<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.xhkjedu.smarking.mapper.wholeparam.MspReportparamMapper">

    <!--获取学校年级下指定模块参数-->
    <select id="getGradeParamByGradeAndBelong" resultType="com.xhkjedu.smarking.model.wholeparam.MspReportparam">
        select * from msp_reportparam where schoolid = #{gp.schoolid} and gradeid=#{gp.gradeid} and rpbelong = #{gp.rpbelong}
    </select>

    <!--删除-->
    <delete id="deleteGradeparam">
        delete from msp_reportparam where rpid in
        <foreach collection="list" item="rpid" open="(" separator="," close=")">#{rpid}</foreach>
    </delete>

    <!--获取学校指定年级下所有参数-->
    <select id="listAllByGrade" resultType="com.xhkjedu.smarking.model.wholeparam.MspReportparam">
        select * from msp_reportparam where schoolid = #{schoolid} and (gradeid = #{gradeid} or gradeid = 0)
    </select>
</mapper>
