You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
829 B
20 lines
829 B
<?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.teaching.backend.mapper.courses.StudentCoursesMapper"> |
|
|
|
<insert id="insertBatchSomeColumn" parameterType="java.util.List"> |
|
INSERT INTO student_courses (student, course) |
|
VALUES |
|
<foreach collection="list" item="item" index="index" separator=","> |
|
(#{item.student}, #{item.course}) |
|
</foreach> |
|
</insert> |
|
<select id="selectBatchSomeStudent" resultType="com.teaching.backend.model.entity.courses.StudentCourses" parameterType="java.lang.String"> |
|
SELECT |
|
sc.student student |
|
FROM |
|
student_courses sc |
|
WHERE |
|
sc.course = #{courseId} |
|
</select> |
|
</mapper>
|
|
|