修改老师端单点登录
parent
7b0ad54236
commit
ec4bd7c526
@ -1,196 +1,210 @@
|
||||
<?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.sztzjy.financial_bigdata.mapper.SysCourseChapterMapper">
|
||||
<resultMap id="BaseResultMap" type="com.sztzjy.financial_bigdata.entity.SysCourseChapter">
|
||||
<id column="chapter_id" jdbcType="VARCHAR" property="chapterId" />
|
||||
<result column="chapter_name" jdbcType="VARCHAR" property="chapterName" />
|
||||
<result column="course_id" jdbcType="VARCHAR" property="courseId" />
|
||||
<result column="sequence" jdbcType="INTEGER" property="sequence" />
|
||||
</resultMap>
|
||||
<sql id="Example_Where_Clause">
|
||||
<where>
|
||||
<foreach collection="oredCriteria" item="criteria" separator="or">
|
||||
<if test="criteria.valid">
|
||||
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||
<foreach collection="criteria.criteria" item="criterion">
|
||||
<choose>
|
||||
<when test="criterion.noValue">
|
||||
and ${criterion.condition}
|
||||
</when>
|
||||
<when test="criterion.singleValue">
|
||||
and ${criterion.condition} #{criterion.value}
|
||||
</when>
|
||||
<when test="criterion.betweenValue">
|
||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||
</when>
|
||||
<when test="criterion.listValue">
|
||||
and ${criterion.condition}
|
||||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||||
#{listItem}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
<resultMap id="BaseResultMap" type="com.sztzjy.financial_bigdata.entity.SysCourseChapter">
|
||||
<id column="chapter_id" jdbcType="VARCHAR" property="chapterId"/>
|
||||
<result column="chapter_name" jdbcType="VARCHAR" property="chapterName"/>
|
||||
<result column="course_id" jdbcType="VARCHAR" property="courseId"/>
|
||||
<result column="sequence" jdbcType="INTEGER" property="sequence"/>
|
||||
</resultMap>
|
||||
<sql id="Example_Where_Clause">
|
||||
<where>
|
||||
<foreach collection="oredCriteria" item="criteria" separator="or">
|
||||
<if test="criteria.valid">
|
||||
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||
<foreach collection="criteria.criteria" item="criterion">
|
||||
<choose>
|
||||
<when test="criterion.noValue">
|
||||
and ${criterion.condition}
|
||||
</when>
|
||||
<when test="criterion.singleValue">
|
||||
and ${criterion.condition} #{criterion.value}
|
||||
</when>
|
||||
<when test="criterion.betweenValue">
|
||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||
</when>
|
||||
<when test="criterion.listValue">
|
||||
and ${criterion.condition}
|
||||
<foreach close=")" collection="criterion.value" item="listItem" open="("
|
||||
separator=",">
|
||||
#{listItem}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</foreach>
|
||||
</trim>
|
||||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
</if>
|
||||
</foreach>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Update_By_Example_Where_Clause">
|
||||
<where>
|
||||
<foreach collection="example.oredCriteria" item="criteria" separator="or">
|
||||
<if test="criteria.valid">
|
||||
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||
<foreach collection="criteria.criteria" item="criterion">
|
||||
<choose>
|
||||
<when test="criterion.noValue">
|
||||
and ${criterion.condition}
|
||||
</when>
|
||||
<when test="criterion.singleValue">
|
||||
and ${criterion.condition} #{criterion.value}
|
||||
</when>
|
||||
<when test="criterion.betweenValue">
|
||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||
</when>
|
||||
<when test="criterion.listValue">
|
||||
and ${criterion.condition}
|
||||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||||
#{listItem}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Update_By_Example_Where_Clause">
|
||||
<where>
|
||||
<foreach collection="example.oredCriteria" item="criteria" separator="or">
|
||||
<if test="criteria.valid">
|
||||
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||
<foreach collection="criteria.criteria" item="criterion">
|
||||
<choose>
|
||||
<when test="criterion.noValue">
|
||||
and ${criterion.condition}
|
||||
</when>
|
||||
<when test="criterion.singleValue">
|
||||
and ${criterion.condition} #{criterion.value}
|
||||
</when>
|
||||
<when test="criterion.betweenValue">
|
||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||
</when>
|
||||
<when test="criterion.listValue">
|
||||
and ${criterion.condition}
|
||||
<foreach close=")" collection="criterion.value" item="listItem" open="("
|
||||
separator=",">
|
||||
#{listItem}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</foreach>
|
||||
</trim>
|
||||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
chapter_id
|
||||
, chapter_name, course_id, sequence
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.sztzjy.financial_bigdata.entity.SysCourseChapterExample"
|
||||
resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List"/>
|
||||
from sys_course_chapter
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause"/>
|
||||
</if>
|
||||
<if test="orderByClause != null">
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from sys_course_chapter
|
||||
where chapter_id = #{chapterId,jdbcType=VARCHAR}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
||||
delete
|
||||
from sys_course_chapter
|
||||
where chapter_id = #{chapterId,jdbcType=VARCHAR}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.sztzjy.financial_bigdata.entity.SysCourseChapterExample">
|
||||
delete from sys_course_chapter
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause"/>
|
||||
</if>
|
||||
</foreach>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
chapter_id, chapter_name, course_id, sequence
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.sztzjy.financial_bigdata.entity.SysCourseChapterExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from sys_course_chapter
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
<if test="orderByClause != null">
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from sys_course_chapter
|
||||
where chapter_id = #{chapterId,jdbcType=VARCHAR}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
||||
delete from sys_course_chapter
|
||||
where chapter_id = #{chapterId,jdbcType=VARCHAR}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.sztzjy.financial_bigdata.entity.SysCourseChapterExample">
|
||||
delete from sys_course_chapter
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.sztzjy.financial_bigdata.entity.SysCourseChapter">
|
||||
insert into sys_course_chapter (chapter_id, chapter_name, course_id,
|
||||
sequence)
|
||||
values (#{chapterId,jdbcType=VARCHAR}, #{chapterName,jdbcType=VARCHAR}, #{courseId,jdbcType=VARCHAR},
|
||||
#{sequence,jdbcType=INTEGER})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.sztzjy.financial_bigdata.entity.SysCourseChapter">
|
||||
insert into sys_course_chapter
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="chapterId != null">
|
||||
chapter_id,
|
||||
</if>
|
||||
<if test="chapterName != null">
|
||||
chapter_name,
|
||||
</if>
|
||||
<if test="courseId != null">
|
||||
course_id,
|
||||
</if>
|
||||
<if test="sequence != null">
|
||||
sequence,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="chapterId != null">
|
||||
#{chapterId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="chapterName != null">
|
||||
#{chapterName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="courseId != null">
|
||||
#{courseId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="sequence != null">
|
||||
#{sequence,jdbcType=INTEGER},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.sztzjy.financial_bigdata.entity.SysCourseChapterExample" resultType="java.lang.Long">
|
||||
select count(*) from sys_course_chapter
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update sys_course_chapter
|
||||
<set>
|
||||
<if test="record.chapterId != null">
|
||||
chapter_id = #{record.chapterId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.chapterName != null">
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.sztzjy.financial_bigdata.entity.SysCourseChapter">
|
||||
insert into sys_course_chapter (chapter_id, chapter_name, course_id,
|
||||
sequence)
|
||||
values (#{chapterId,jdbcType=VARCHAR}, #{chapterName,jdbcType=VARCHAR}, #{courseId,jdbcType=VARCHAR},
|
||||
#{sequence,jdbcType=INTEGER})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.sztzjy.financial_bigdata.entity.SysCourseChapter">
|
||||
insert into sys_course_chapter
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="chapterId != null">
|
||||
chapter_id,
|
||||
</if>
|
||||
<if test="chapterName != null">
|
||||
chapter_name,
|
||||
</if>
|
||||
<if test="courseId != null">
|
||||
course_id,
|
||||
</if>
|
||||
<if test="sequence != null">
|
||||
sequence,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="chapterId != null">
|
||||
#{chapterId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="chapterName != null">
|
||||
#{chapterName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="courseId != null">
|
||||
#{courseId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="sequence != null">
|
||||
#{sequence,jdbcType=INTEGER},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.sztzjy.financial_bigdata.entity.SysCourseChapterExample"
|
||||
resultType="java.lang.Long">
|
||||
select count(*) from sys_course_chapter
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause"/>
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update sys_course_chapter
|
||||
<set>
|
||||
<if test="record.chapterId != null">
|
||||
chapter_id = #{record.chapterId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.chapterName != null">
|
||||
chapter_name = #{record.chapterName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.courseId != null">
|
||||
course_id = #{record.courseId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.sequence != null">
|
||||
sequence = #{record.sequence,jdbcType=INTEGER},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause"/>
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update sys_course_chapter
|
||||
set chapter_id = #{record.chapterId,jdbcType=VARCHAR},
|
||||
chapter_name = #{record.chapterName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.courseId != null">
|
||||
course_id = #{record.courseId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.sequence != null">
|
||||
sequence = #{record.sequence,jdbcType=INTEGER},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update sys_course_chapter
|
||||
set chapter_id = #{record.chapterId,jdbcType=VARCHAR},
|
||||
chapter_name = #{record.chapterName,jdbcType=VARCHAR},
|
||||
course_id = #{record.courseId,jdbcType=VARCHAR},
|
||||
sequence = #{record.sequence,jdbcType=INTEGER}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.sztzjy.financial_bigdata.entity.SysCourseChapter">
|
||||
update sys_course_chapter
|
||||
<set>
|
||||
<if test="chapterName != null">
|
||||
chapter_name = #{chapterName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="courseId != null">
|
||||
course_id = #{courseId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="sequence != null">
|
||||
sequence = #{sequence,jdbcType=INTEGER},
|
||||
</if>
|
||||
</set>
|
||||
where chapter_id = #{chapterId,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.sztzjy.financial_bigdata.entity.SysCourseChapter">
|
||||
update sys_course_chapter
|
||||
set chapter_name = #{chapterName,jdbcType=VARCHAR},
|
||||
course_id = #{courseId,jdbcType=VARCHAR},
|
||||
sequence = #{sequence,jdbcType=INTEGER}
|
||||
where chapter_id = #{chapterId,jdbcType=VARCHAR}
|
||||
</update>
|
||||
sequence = #{record.sequence,jdbcType=INTEGER}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause"/>
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.sztzjy.financial_bigdata.entity.SysCourseChapter">
|
||||
update sys_course_chapter
|
||||
<set>
|
||||
<if test="chapterName != null">
|
||||
chapter_name = #{chapterName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="courseId != null">
|
||||
course_id = #{courseId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="sequence != null">
|
||||
sequence = #{sequence,jdbcType=INTEGER},
|
||||
</if>
|
||||
</set>
|
||||
where chapter_id = #{chapterId,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.sztzjy.financial_bigdata.entity.SysCourseChapter">
|
||||
update sys_course_chapter
|
||||
set chapter_name = #{chapterName,jdbcType=VARCHAR},
|
||||
course_id = #{courseId,jdbcType=VARCHAR},
|
||||
sequence = #{sequence,jdbcType=INTEGER}
|
||||
where chapter_id = #{chapterId,jdbcType=VARCHAR}
|
||||
</update>
|
||||
|
||||
<select id="selectChapterDataBySchoolId" parameterType="java.lang.String" resultMap="BaseResultMap">
|
||||
SELECT *
|
||||
FROM sys_course
|
||||
JOIN sys_course_chapter
|
||||
WHERE sys_course.course_id = sys_course_chapter.course_id
|
||||
AND school_Id in (999999999, #{schoolId})
|
||||
</select>
|
||||
</mapper>
|
Loading…
Reference in New Issue