<?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.lideeyunji.core.framework.mapper.example.ExampleDbFormMapper">

    <delete id="delScoreByStudentId">
        update yunji_zexample_score set is_deleted = -1 where student_id in
        <foreach collection="studentIdList" item="studentId" open="(" separator="," close=")">
            #{studentId}
        </foreach>
    </delete>

    <select id="getStudentPage" resultType="java.util.Map">
        select * from yunji_zexample_student where is_deleted = 0
    </select>

    <select id="getStudentBySon" resultType="java.lang.Long">
        select id from yunji_zexample_student where is_deleted = 0 and sno = #{sno}
    </select>

    <select id="getStudentExcludIdBySon" resultType="java.lang.Long">
        select id from yunji_zexample_student where is_deleted = 0 and sno = #{sno} and id != #{id}
    </select>

    <select id="getStudentById" resultType="java.util.Map">
        select * from yunji_zexample_student where id = #{id}
    </select>

    <select id="getSubmoredateByMainDateId" resultType="java.util.Map">
        select * from yunji_zexample_sub_more_date where is_deleted = 0 and rl_id = #{mainDateId}
    </select>
</mapper>