修改老师端单点登录

newBigdata
xiaoCJ 10 months ago
parent 7b0ad54236
commit ec4bd7c526

@ -36,4 +36,6 @@ public interface SysCourseChapterMapper {
@Select("SELECT COUNT(chapter_id) FROM sys_course JOIN sys_course_chapter WHERE sys_course.course_id = sys_course_chapter.course_id AND school_Id in(999999999,#{schoolId})") @Select("SELECT COUNT(chapter_id) FROM sys_course JOIN sys_course_chapter WHERE sys_course.course_id = sys_course_chapter.course_id AND school_Id in(999999999,#{schoolId})")
BigDecimal selectChapterBySchoolId(@Param("schoolId")String schoolId); BigDecimal selectChapterBySchoolId(@Param("schoolId")String schoolId);
List<SysCourseChapter> selectChapterDataBySchoolId(@Param("schoolId")String schoolId);
} }

@ -10,6 +10,7 @@ import com.sztzjy.financial_bigdata.service.common.ICourseService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.UUID; import java.util.UUID;
@ -72,7 +73,10 @@ public class CourseServiceImpl implements ICourseService {
public List<SysCourse> selectAllBySchoolId(String schoolId) { public List<SysCourse> selectAllBySchoolId(String schoolId) {
SysCourseExample example=new SysCourseExample(); SysCourseExample example=new SysCourseExample();
SysCourseExample.Criteria criteria = example.createCriteria(); SysCourseExample.Criteria criteria = example.createCriteria();
criteria.andSchoolIdEqualTo(schoolId); List<String> list =new ArrayList();
list.add("999999999");
list.add(schoolId);
criteria.andSchoolIdIn(list);
List<SysCourse> courseList = courseMapper.selectByExample(example); List<SysCourse> courseList = courseMapper.selectByExample(example);
return courseList; return courseList;
} }

@ -7,11 +7,11 @@ import com.sztzjy.financial_bigdata.entity.SysCourse;
import com.sztzjy.financial_bigdata.entity.SysCourseChapter; import com.sztzjy.financial_bigdata.entity.SysCourseChapter;
import com.sztzjy.financial_bigdata.entity.SysObjectiveQuestion; import com.sztzjy.financial_bigdata.entity.SysObjectiveQuestion;
import com.sztzjy.financial_bigdata.entity.SysObjectiveQuestionExample; import com.sztzjy.financial_bigdata.entity.SysObjectiveQuestionExample;
import com.sztzjy.financial_bigdata.mapper.SysCourseChapterMapper;
import com.sztzjy.financial_bigdata.mapper.SysObjectiveQuestionMapper; import com.sztzjy.financial_bigdata.mapper.SysObjectiveQuestionMapper;
import com.sztzjy.financial_bigdata.service.common.ICourseChapterService; import com.sztzjy.financial_bigdata.service.common.ICourseChapterService;
import com.sztzjy.financial_bigdata.service.common.ICourseService; import com.sztzjy.financial_bigdata.service.common.ICourseService;
import com.sztzjy.financial_bigdata.service.tea.ITeaObjectiveService; import com.sztzjy.financial_bigdata.service.tea.ITeaObjectiveService;
import io.swagger.models.auth.In;
import org.apache.poi.openxml4j.exceptions.InvalidFormatException; import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
import org.apache.poi.ss.usermodel.*; import org.apache.poi.ss.usermodel.*;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -30,6 +30,9 @@ public class TeaObjectiveServiceImpl implements ITeaObjectiveService {
ICourseService courseService; ICourseService courseService;
@Autowired @Autowired
ICourseChapterService chapterService; ICourseChapterService chapterService;
@Autowired
SysCourseChapterMapper sysCourseChapterMapper;
@Override @Override
public Boolean insertObjective(SysObjectiveQuestion objectiveQuestion) { public Boolean insertObjective(SysObjectiveQuestion objectiveQuestion) {
@ -112,13 +115,13 @@ public class TeaObjectiveServiceImpl implements ITeaObjectiveService {
iterator.next(); iterator.next();
while (iterator.hasNext()) { while (iterator.hasNext()) {
Row currentRow = iterator.next(); Row currentRow = iterator.next();
String courseName = currentRow.getCell(0).getStringCellValue(); //课程名称 String courseName = currentRow.getCell(0).getStringCellValue().trim(); //课程名称
String chapterName = currentRow.getCell(1).getStringCellValue(); //章节名称 String chapterName = currentRow.getCell(1).getStringCellValue().trim(); //章节名称
String type = String.valueOf(currentRow.getCell(2).getNumericCellValue()); //题目类型 String type = String.valueOf(currentRow.getCell(2).getNumericCellValue()).trim(); //题目类型
String score = String.valueOf(currentRow.getCell(3).getNumericCellValue()); //分数 String score = String.valueOf(currentRow.getCell(3).getNumericCellValue()).trim(); //分数
String content = currentRow.getCell(4).getStringCellValue(); //题目内容 String content = currentRow.getCell(4).getStringCellValue(); //题目内容
System.out.println(chapterName); System.out.println(chapterName);
System.out.println("!!!"+content); System.out.println("!!!" + content);
String question_a = ""; String question_a = "";
String question_b = ""; String question_b = "";
String question_c = ""; String question_c = "";
@ -145,12 +148,12 @@ public class TeaObjectiveServiceImpl implements ITeaObjectiveService {
obj.setChapterId(chapterMap.get(chapterName)); obj.setChapterId(chapterMap.get(chapterName));
obj.setChapterName(chapterName); obj.setChapterName(chapterName);
obj.setInputType(Constant.INPUT_TYPE_BUILT_IN); obj.setInputType(Constant.INPUT_TYPE_BUILT_IN);
if(type.equals("0.0")){ if (type.equals("0.0")) {
type="0"; type = "0";
}else if(type.equals("1.0")){ } else if (type.equals("1.0")) {
type="1"; type = "1";
}else { } else {
type="2"; type = "2";
} }
obj.setType(type); obj.setType(type);
obj.setScore(new BigDecimal(score)); obj.setScore(new BigDecimal(score));
@ -166,57 +169,69 @@ public class TeaObjectiveServiceImpl implements ITeaObjectiveService {
} }
} else { //老师批量新增题目 } else { //老师批量新增题目
List<SysCourse> courseList = courseService.selectAllBySchoolId(schoolId); List<SysCourse> courseList = courseService.selectAllBySchoolId(schoolId);
List<SysCourse> builtInList = courseService.selectAllBuiltIn();
courseList.addAll(builtInList);
Map<String, String> courseMap = new HashMap<>(); Map<String, String> courseMap = new HashMap<>();
Map<String, String> courseChapterMap = new HashMap<>();
for (int i = 0; i < courseList.size(); i++) { for (int i = 0; i < courseList.size(); i++) {
courseMap.put(courseList.get(i).getCourseName(), courseList.get(i).getCourseId()); courseMap.put(courseList.get(i).getCourseName(), courseList.get(i).getCourseId());
} }
List<SysCourseChapter> chapterList = sysCourseChapterMapper.selectChapterDataBySchoolId(schoolId);
for (int i = 0; i < chapterList.size(); i++) {
courseChapterMap.put(chapterList.get(i).getChapterName(), chapterList.get(i).getChapterId());
}
Workbook workbook = WorkbookFactory.create(file.getInputStream()); Workbook workbook = WorkbookFactory.create(file.getInputStream());
Sheet sheet = workbook.getSheetAt(0); Sheet sheet = workbook.getSheetAt(0);
// 迭代每一行 // 迭代每一行
Iterator<Row> iterator = sheet.iterator(); Iterator<Row> iterator = sheet.iterator();
iterator.next();
while (iterator.hasNext()) { while (iterator.hasNext()) {
Row currentRow = iterator.next(); Row currentRow = iterator.next();
String courseName = currentRow.getCell(0).getStringCellValue(); //课程名称 String courseName = currentRow.getCell(0).getStringCellValue(); //课程名称
String type = String.valueOf(currentRow.getCell(1).getNumericCellValue()); //题目类型 String chapterName = currentRow.getCell(1).getStringCellValue(); //章节名称
String score = String.valueOf(currentRow.getCell(2).getNumericCellValue()); //分数 String type = String.valueOf(currentRow.getCell(2).getNumericCellValue()); //题目类型
String content = currentRow.getCell(3).getStringCellValue(); //题目内容 String score = String.valueOf(currentRow.getCell(3).getNumericCellValue()); //分数
String content = currentRow.getCell(4).getStringCellValue(); //题目内容
String question_a = ""; String question_a = "";
String question_b = ""; String question_b = "";
String question_c = ""; String question_c = "";
String question_d = ""; String question_d = "";
if (type.equals("2.0") || type.equals("2")) { if (type.equals("2.0") || type.equals("2")) {
question_a = "正确"; question_a = "正确";
question_b = "错误"; question_b = "错误";
} else { } else {
question_a = currentRow.getCell(4).getStringCellValue(); question_a = currentRow.getCell(5).getStringCellValue();
question_b = currentRow.getCell(5).getStringCellValue(); question_b = currentRow.getCell(6).getStringCellValue();
question_c = currentRow.getCell(6).getStringCellValue(); question_c = currentRow.getCell(7).getStringCellValue();
question_d = currentRow.getCell(7).getStringCellValue(); question_d = currentRow.getCell(8).getStringCellValue();
} }
String answer = currentRow.getCell(8).getStringCellValue(); String answer = currentRow.getCell(9).getStringCellValue();
Cell cell = currentRow.getCell(9); Cell cell = currentRow.getCell(10);
String analyze = (cell != null) ? cell.getStringCellValue() : ""; String analyze = (cell != null) ? cell.getStringCellValue() : "";
SysObjectiveQuestion obj = new SysObjectiveQuestion(); SysObjectiveQuestion obj = new SysObjectiveQuestion();
obj.setObjectiveId(String.valueOf(UUID.randomUUID())); obj.setObjectiveId(String.valueOf(UUID.randomUUID()));
obj.setCourseId(courseMap.get(courseName)); obj.setCourseId(courseMap.get(courseName));
String s = courseMap.get(courseName);
System.out.println(s);
obj.setScore(new BigDecimal(score));
obj.setCourseName(courseName); obj.setCourseName(courseName);
obj.setChapterName(chapterName);
obj.setChapterId(courseChapterMap.get(chapterName));
obj.setInputType(Constant.INPUT_TYPE_TEACHER); obj.setInputType(Constant.INPUT_TYPE_TEACHER);
if(type.equals("0.0")){ if (type.equals("0.0")) {
type="0"; type = "0";
}else if(type.equals("1.0")){ } else if (type.equals("1.0")) {
type="1"; type = "1";
}else { } else {
type="2"; type = "2";
} }
obj.setType(String.valueOf(type));
obj.setScore(new BigDecimal(score)); obj.setType(type);
obj.setContent(content); obj.setContent(content);
obj.setQuestionA(question_a); obj.setQuestionA(question_a);
obj.setQuestionB(question_b); obj.setQuestionB(question_b);

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