自动生成配置文件和mapper xml

newBigdata
xiaoCJ 11 months ago
parent b771b1e3cf
commit 6a73e7b149

@ -65,54 +65,12 @@ public class TeaGradeManageController {
private SysWeightMapper sysWeightMapper; private SysWeightMapper sysWeightMapper;
@Autowired @Autowired
private StuTheoryExamMapper stuTheoryExamMapper; private StuTheoryExamMapper stuTheoryExamMapper;
@Autowired
// @AnonymousAccess private SysCaseQuestionMapper sysCaseQuestionMapper;
// @PostMapping("/getExamInfo") @Autowired
// @ApiOperation("考试模式--页面展示(学生端实战考核复用)") private SysCaseQuestionStepMapper sysCaseQuestionStepMapper;
// public ResultEntity<PageInfo<TeaExamManageCountDto>> getExamInfo(@RequestParam Integer index, @Autowired
// @RequestParam Integer size, private SysObjectiveQuestionMapper sysObjectiveQuestionMapper;
// @ApiParam("ManyAnswer为考试时间JudgeAnswer为发布人") @RequestParam String schoolId) {
//
// List<TeaExamManage> teaExamManages = teaExamManageMapper.selectBySchoolId(schoolId);
// List<TeaExamManageCountDto>teaExamManageCountDtos =new AstList();
// for (TeaExamManage teaExamManage : teaExamManages) {
// List<String> nameList = new ArrayList<>();
// TeaExamManageCountDto copyexamManageWithBLOBs = new TeaExamManageCountDto();
// int num = 0;
// //获取班级和考试人数
// String classId = teaAndStudentExamMapper.selectByExamId(teaExamManage.getExamManageId());
// String[] split = classId.split(",");
// for (String s : split) {
// StuClass stuClass = stuClassMapper.selectByPrimaryKey(s);
// String className = stuClass.getClassName();
// nameList.add(className);
// int count = userMapper.selectNumByClass(s);
// num = num + count;
// }
// copyexamManageWithBLOBs.setExamClass(nameList);
// copyexamManageWithBLOBs.setExamNum(num);
// BeanUtils.copyProperties(teaExamManage, copyexamManageWithBLOBs);
// Date now = new Date(); // 当前日期
// Date endTime = teaExamManage.getEndTime(); // 从 teaExamManage 对象中获取的日期
// Date startTime = teaExamManage.getStartTime();
//
// if (now.compareTo(endTime) > 0) {
// copyexamManageWithBLOBs.setExamStatus("已结束");
// } else if (now.compareTo(startTime) < 0) {
// copyexamManageWithBLOBs.setExamStatus("未开始");
// } else {
// copyexamManageWithBLOBs.setExamStatus("进行中");
// }
// String concatenatedTimeString = startTime + " -- " + endTime;
// copyexamManageWithBLOBs.setExamTime(concatenatedTimeString); //考试时间
// String userId = teaExamManage.getUserId();
// StuUser stuUser = userMapper.selectByPrimaryKey(userId);
// copyexamManageWithBLOBs.setName(stuUser.getName()); //发布人
// teaExamManageCountDtos.add(copyexamManageWithBLOBs);
// }
// PageUtil.pageHelper(teaExamManageCountDtos, index, size);
// return new ResultEntity<>(new PageInfo<>(teaExamManageCountDtos));
// }
@AnonymousAccess @AnonymousAccess
@ -124,34 +82,80 @@ public class TeaGradeManageController {
List<TeaExamManage> teaExamManages = teaExamManageMapper.selectBySchoolId(schoolId); List<TeaExamManage> teaExamManages = teaExamManageMapper.selectBySchoolId(schoolId);
List<TeaExamManageCountDto> teaExamManageCountDtos = new ArrayList<>(); List<TeaExamManageCountDto> teaExamManageCountDtos = new ArrayList<>();
Map<String, StuUser> userMap = new HashMap<>();
// 批量查询班级信息 List<String> userIds = new ArrayList<>();
List<String> examIds = new ArrayList<>();
for (TeaExamManage teaExamManage : teaExamManages) { for (TeaExamManage teaExamManage : teaExamManages) {
examIds.add(teaExamManage.getExamManageId()); String userId = teaExamManage.getUserId();
userIds.add(userId);
} }
//存储用户信息
List<StuUser> stuUsers = userMapper.selectByPrimaryKeys(userIds);
for (StuUser stuUser : stuUsers) {
userMap.put(stuUser.getUserid(), stuUser);
}
for (TeaExamManage teaExamManage : teaExamManages) {
TeaExamManageCountDto copyexamManageWithBLOBs = new TeaExamManageCountDto();
//获取班级和考试人数
TeaAndStudentExam teaAndStudentExam = teaAndStudentExamMapper.selectByExamMangeId(teaExamManage.getExamManageId());
String classId = teaAndStudentExam.getClassId();
String[] split = classId.split(",");
List<String> ids = new ArrayList<>(Arrays.asList(split));
int num = userMapper.selectNumByClass(ids);
copyexamManageWithBLOBs.setExamClass(teaAndStudentExam.getClassName());
copyexamManageWithBLOBs.setExamNum(num);
BeanUtils.copyProperties(teaExamManage, copyexamManageWithBLOBs);
Date now = new Date(); // 当前日期
Date endTime = teaExamManage.getEndTime(); // 从 teaExamManage 对象中获取的日期
Date startTime = teaExamManage.getStartTime();
if (now.compareTo(endTime) > 0) {
copyexamManageWithBLOBs.setExamStatus("已结束");
} else if (now.compareTo(startTime) < 0) {
copyexamManageWithBLOBs.setExamStatus("未开始");
} else {
copyexamManageWithBLOBs.setExamStatus("进行中");
}
String concatenatedTimeString = startTime + " -- " + endTime;
copyexamManageWithBLOBs.setExamTime(concatenatedTimeString); //考试时间
String userId = teaExamManage.getUserId();
StuUser stuUser = userMap.get(userId);
copyexamManageWithBLOBs.setName(stuUser.getName()); //发布人
teaExamManageCountDtos.add(copyexamManageWithBLOBs);
}
PageInfo pageInfo = PageUtil.pageHelper(teaExamManageCountDtos, index, size); PageInfo pageInfo = PageUtil.pageHelper(teaExamManageCountDtos, index, size);
return new ResultEntity<PageInfo<TeaExamManageCountDto>>(pageInfo); return new ResultEntity<>(pageInfo);
} }
@AnonymousAccess @AnonymousAccess
@PostMapping("/getExamInfoAndRank") @PostMapping("/getExamInfoAndRank")
@ApiOperation("考试模式--成绩排名和成绩情况展示") //TODO 图片可能需要一个接口去取 @ApiOperation("考试模式--成绩排名和成绩情况展示") //TODO 图片可能需要一个接口去取
public ResultEntity<PageInfo> getExamInfoAndRank(@RequestParam Integer index, public ResultEntity<PageInfo<TeaExamAndUserDto>> getExamInfoAndRank(@RequestParam Integer index,
@RequestParam Integer size, @RequestParam Integer size,
@RequestParam String schoolId, @RequestParam String schoolId,
@ApiParam("学号或姓名搜索框") @RequestParam(required = false) String keyWord, @ApiParam("学号或姓名搜索框") @RequestParam(required = false) String keyWord,
@RequestParam(required = false) String classId, @RequestParam(required = false) String classId,
@RequestParam(required = false) String examManageId) { @RequestParam(required = false) String examManageId) {
List<TeaExamAndUserDto> list = getTeaExamAndUserDtos(schoolId, keyWord, classId, examManageId); List<TeaExamAndUserDto> list = getTeaExamAndUserDtos(schoolId, keyWord, classId, examManageId);
list.sort(new TeaGradeManageServiceImpl.StuUserDtoComparator()); //比较器按得分排序 list.sort(new TeaGradeManageServiceImpl.StuUserDtoComparator()); //比较器按得分排序
PageInfo<TeaExamAndUserDto> pageInfo = PageUtil.pageHelper(list, index, size); PageInfo<TeaExamAndUserDto> pageInfo = PageUtil.pageHelper(list, index, size);
return new ResultEntity<>(pageInfo); return new ResultEntity<>(pageInfo);
} }
@AnonymousAccess
@PostMapping("/getExamNameAndId")
@ApiOperation("考试模式--考试名称下拉框") //TODO 图片可能需要一个接口去取
public ResultEntity<List<Map<String, String>>> getExamNameAndId(@RequestParam String schoolId) {
List<Map<String, String>> list = teaExamManageMapper.selectNameAndIdBySchoolId(schoolId);
return new ResultEntity<>(list);
}
@GetMapping("/exportExam") @GetMapping("/exportExam")
@ApiOperation("考试模式--页面单个考试导出") @ApiOperation("考试模式--页面单个考试导出")
@ -210,12 +214,55 @@ public class TeaGradeManageController {
} }
@AnonymousAccess @AnonymousAccess
@PostMapping("/getGradeReport") @PostMapping("/getGradeReportCase")
@ApiOperation("考试模式--成绩报告接口") //TODO 待写 成绩报告接口 需要计算题目的正确率,暂时没想好 @ApiOperation("考试模式--成绩报告案例题questionOriginal所属章节contentOriginal为考核点数量") //TODO 案例题正确率字段暂无
public void getGradeReport() { public ResultEntity<PageInfo<SysCaseQuestion>> getGradeReportCase(@RequestParam Integer index,
@RequestParam Integer size,
@RequestParam String examManageId) {
TeaExamManageWithBLOBs teaExamManageWithBLOBs = teaExamManageMapper.selectByPrimaryKey(examManageId);
String caseIdList = teaExamManageWithBLOBs.getCaseIdlist();
List<String> list = Arrays.asList(caseIdList.split(","));
PageHelper.startPage(index, size);
List<SysCaseQuestion> resultList = sysCaseQuestionStepMapper.getGradeReportCase(list);
PageInfo pageInfo = new PageInfo(resultList);
return new ResultEntity(pageInfo);
}
@AnonymousAccess
@PostMapping("/getGradeReportObjective")
@ApiOperation("考试模式--成绩报告客观题") //TODO 客观题正确率字段暂无
public ResultEntity<PageInfo<SysCaseQuestion>> getGradeReportObjective(@RequestParam Integer index,
@RequestParam Integer size,
@RequestParam String examManageId) {
TeaExamManageWithBLOBs teaExamManageWithBLOBs = teaExamManageMapper.selectByPrimaryKey(examManageId);
if (teaExamManageWithBLOBs == null) {
return null;
}
List<String> list = new ArrayList();
if (StringUtils.isNotBlank(teaExamManageWithBLOBs.getSingleIdlist())) {
String singleIdList = teaExamManageWithBLOBs.getSingleIdlist();
String[] split = singleIdList.split(",");
list.addAll(Arrays.asList(split));
}
if (StringUtils.isNotBlank(teaExamManageWithBLOBs.getManyIdlist())) {
String manyIdList = teaExamManageWithBLOBs.getManyIdlist();
String[] split = manyIdList.split(",");
list.addAll(Arrays.asList(split));
}
if (StringUtils.isNotBlank(teaExamManageWithBLOBs.getJudgeIdlist())) {
String judgeIdList = teaExamManageWithBLOBs.getJudgeIdlist();
String[] split = judgeIdList.split(",");
list.addAll(Arrays.asList(split));
}
PageHelper.startPage(index, size);
List<SysCaseQuestion> resultList = sysObjectiveQuestionMapper.getGradeReportObjective(list);
PageInfo pageInfo = new PageInfo(resultList);
return new ResultEntity(pageInfo);
} }
@AnonymousAccess @AnonymousAccess
@GetMapping("/exportRank") @GetMapping("/exportRank")
@ApiOperation("考试模式--成绩排名页面导出") @ApiOperation("考试模式--成绩排名页面导出")

@ -313,6 +313,76 @@ public class TeaAndStudentExamExample {
addCriterion("class_id not between", value1, value2, "classId"); addCriterion("class_id not between", value1, value2, "classId");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andClassNameIsNull() {
addCriterion("class_name is null");
return (Criteria) this;
}
public Criteria andClassNameIsNotNull() {
addCriterion("class_name is not null");
return (Criteria) this;
}
public Criteria andClassNameEqualTo(String value) {
addCriterion("class_name =", value, "className");
return (Criteria) this;
}
public Criteria andClassNameNotEqualTo(String value) {
addCriterion("class_name <>", value, "className");
return (Criteria) this;
}
public Criteria andClassNameGreaterThan(String value) {
addCriterion("class_name >", value, "className");
return (Criteria) this;
}
public Criteria andClassNameGreaterThanOrEqualTo(String value) {
addCriterion("class_name >=", value, "className");
return (Criteria) this;
}
public Criteria andClassNameLessThan(String value) {
addCriterion("class_name <", value, "className");
return (Criteria) this;
}
public Criteria andClassNameLessThanOrEqualTo(String value) {
addCriterion("class_name <=", value, "className");
return (Criteria) this;
}
public Criteria andClassNameLike(String value) {
addCriterion("class_name like", value, "className");
return (Criteria) this;
}
public Criteria andClassNameNotLike(String value) {
addCriterion("class_name not like", value, "className");
return (Criteria) this;
}
public Criteria andClassNameIn(List<String> values) {
addCriterion("class_name in", values, "className");
return (Criteria) this;
}
public Criteria andClassNameNotIn(List<String> values) {
addCriterion("class_name not in", values, "className");
return (Criteria) this;
}
public Criteria andClassNameBetween(String value1, String value2) {
addCriterion("class_name between", value1, value2, "className");
return (Criteria) this;
}
public Criteria andClassNameNotBetween(String value1, String value2) {
addCriterion("class_name not between", value1, value2, "className");
return (Criteria) this;
}
} }
public static class Criteria extends GeneratedCriteria { public static class Criteria extends GeneratedCriteria {

@ -47,5 +47,5 @@ public class TeaExamManageCountDto {
private int examNum; private int examNum;
@ApiModelProperty("考试班级") @ApiModelProperty("考试班级")
private List<String> examClass; private String examClass;
} }

@ -39,6 +39,9 @@ public class TeaExamManageDto {
@ApiModelProperty("班级id") @ApiModelProperty("班级id")
private String classId; private String classId;
@ApiModelProperty("班级名字")
private String className;
@ApiModelProperty("LOGO地址") @ApiModelProperty("LOGO地址")
private String logoAddress; private String logoAddress;

@ -54,6 +54,14 @@ public interface StuUserMapper {
+")</script>") +")</script>")
int selectNumByClass(@Param("classIdList") List<String> classIdList); int selectNumByClass(@Param("classIdList") List<String> classIdList);
// @Select("select count(*) from stu_userinfo where class_id = #{s}")
// int selectNumByClass(@Param("s") String s);
List<Integer> selectNumByClasss(List<String> classIdList); @Select("<script>" +
"select userid,name FROM stu_userinfo WHERE userid IN("
+"<foreach collection='userIds' separator=',' item='id'>"
+ "#{id} "
+ "</foreach> "
+")</script>")
List<StuUser> selectByPrimaryKeys(@Param("userIds")List<String> userIds);
} }

@ -1,11 +1,14 @@
package com.sztzjy.financial_bigdata.mapper; package com.sztzjy.financial_bigdata.mapper;
import com.sztzjy.financial_bigdata.entity.SysCaseQuestion;
import com.sztzjy.financial_bigdata.entity.SysCaseQuestionStep; import com.sztzjy.financial_bigdata.entity.SysCaseQuestionStep;
import com.sztzjy.financial_bigdata.entity.SysCaseQuestionStepExample; import com.sztzjy.financial_bigdata.entity.SysCaseQuestionStepExample;
import java.util.List; import java.util.List;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
@Mapper @Mapper
public interface SysCaseQuestionStepMapper { public interface SysCaseQuestionStepMapper {
long countByExample(SysCaseQuestionStepExample example); long countByExample(SysCaseQuestionStepExample example);
@ -29,4 +32,7 @@ public interface SysCaseQuestionStepMapper {
int updateByPrimaryKeySelective(SysCaseQuestionStep record); int updateByPrimaryKeySelective(SysCaseQuestionStep record);
int updateByPrimaryKey(SysCaseQuestionStep record); int updateByPrimaryKey(SysCaseQuestionStep record);
List<SysCaseQuestion> getGradeReportCase(@Param("list") List<String> list);
} }

@ -1,5 +1,6 @@
package com.sztzjy.financial_bigdata.mapper; package com.sztzjy.financial_bigdata.mapper;
import com.sztzjy.financial_bigdata.entity.SysCaseQuestion;
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 java.util.List; import java.util.List;
@ -47,4 +48,6 @@ public interface SysObjectiveQuestionMapper {
List<SysObjectiveQuestion> selectRandomObjectiveMany(); List<SysObjectiveQuestion> selectRandomObjectiveMany();
List<SysObjectiveQuestion> selectRandomObjectiveJudge(); List<SysObjectiveQuestion> selectRandomObjectiveJudge();
List<SysCaseQuestion> getGradeReportObjective(@Param("list") List<String> list);
} }

@ -2,12 +2,12 @@ package com.sztzjy.financial_bigdata.mapper;
import com.sztzjy.financial_bigdata.entity.TeaAndStudentExam; import com.sztzjy.financial_bigdata.entity.TeaAndStudentExam;
import com.sztzjy.financial_bigdata.entity.TeaAndStudentExamExample; import com.sztzjy.financial_bigdata.entity.TeaAndStudentExamExample;
import java.util.List;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select; import org.apache.ibatis.annotations.Select;
import java.util.List;
@Mapper @Mapper
public interface TeaAndStudentExamMapper { public interface TeaAndStudentExamMapper {
long countByExample(TeaAndStudentExamExample example); long countByExample(TeaAndStudentExamExample example);
@ -32,6 +32,5 @@ public interface TeaAndStudentExamMapper {
int updateByPrimaryKey(TeaAndStudentExam record); int updateByPrimaryKey(TeaAndStudentExam record);
// @Select("select class_id from tea_and_student_exam where exam_manage_id =#{examManageId}") TeaAndStudentExam selectByExamMangeId(@Param("examManageId") String examManageId);
// String selectByExamId(@Param("examManageId") String examManageId);
} }

@ -3,7 +3,10 @@ package com.sztzjy.financial_bigdata.mapper;
import com.sztzjy.financial_bigdata.entity.TeaExamManage; import com.sztzjy.financial_bigdata.entity.TeaExamManage;
import com.sztzjy.financial_bigdata.entity.TeaExamManageExample; import com.sztzjy.financial_bigdata.entity.TeaExamManageExample;
import com.sztzjy.financial_bigdata.entity.TeaExamManageWithBLOBs; import com.sztzjy.financial_bigdata.entity.TeaExamManageWithBLOBs;
import java.math.BigDecimal;
import java.util.List; import java.util.List;
import java.util.Map;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
@ -46,4 +49,12 @@ public interface TeaExamManageMapper {
List<TeaExamManage> selectBySchoolId(@Param("schoolId")String schoolId); List<TeaExamManage> selectBySchoolId(@Param("schoolId")String schoolId);
@Select("select exam_name,exam_manage_id from tea_exam_manage where school_id =#{schoolId}")
List<Map<String, String>> selectNameAndIdBySchoolId(@Param("schoolId")String schoolId);
@Select("select sse.total_score,sum(tam.case_score+tam.single_score+tam.many_score+tam.judge_score) " +
"FROM tea_exam_manage tam JOIN stu_student_exam sse ON tam.exam_manage_id = sse.exam_manage_id" +
" GROUP BY sse.total_score ORDER BY MAX(tam.end_time) limit 1")
Map<BigDecimal,BigDecimal> getLastEaxmScore();
} }

@ -9,6 +9,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* @Author xcj * @Author xcj
@ -66,13 +67,14 @@ public class StuIndexServiceImpl implements StuIndexService {
int examSize = stuStudentExamWithBLOBs.size(); //参与考核次数 int examSize = stuStudentExamWithBLOBs.size(); //参与考核次数
stuTheoryIndexInfoDto.setTaskNum(examSize); stuTheoryIndexInfoDto.setTaskNum(examSize);
//TODO 最近一次考核正确率
// Map<BD>teaExamManageMapper.getLastEaxmScore();//拿到最近考试的得分和 老师设置的题目总分 // TODO 最近一次考核正确率
int lastRank = studentExamMapper.selectLastExamRank(userId); // 最近一次考核排名 int lastRank = studentExamMapper.selectLastExamRank(userId); // 最近一次考核排名
stuTheoryIndexInfoDto.setLastTaskRank(lastRank); stuTheoryIndexInfoDto.setLastTaskRank(lastRank);
//TODO 正确率最低的考核案例 //TODO 正确率最低的考核案例 案例题正确率字段暂无
//理论考试数据 //理论考试数据
StuTheoryIndexInfoDto theoryIndexInfoDto = stuTheoryRecordMapper.selectTheoryInfo(userId); StuTheoryIndexInfoDto theoryIndexInfoDto = stuTheoryRecordMapper.selectTheoryInfo(userId);

@ -54,7 +54,7 @@ public class TeaExamManageServiceImpl implements ITeaExamManageService {
if (teaExamManagedto.getEndTime() == null || teaExamManagedto.getStartTime() == null) { if (teaExamManagedto.getEndTime() == null || teaExamManagedto.getStartTime() == null) {
return new ResultEntity<>(HttpStatus.BAD_REQUEST, "请输入考试时间!"); return new ResultEntity<>(HttpStatus.BAD_REQUEST, "请输入考试时间!");
} }
if (StringUtils.isBlank(teaExamManagedto.getClassId())) { if (StringUtils.isBlank(teaExamManagedto.getClassId())||StringUtils.isBlank(teaExamManagedto.getClassName())) {
return new ResultEntity<>(HttpStatus.BAD_REQUEST, "请选择考试班级!"); return new ResultEntity<>(HttpStatus.BAD_REQUEST, "请选择考试班级!");
} }
if (teaExamManageWithBLOBs.getCaseWeight() == null || teaExamManageWithBLOBs.getObjectiveWeight() == null) { if (teaExamManageWithBLOBs.getCaseWeight() == null || teaExamManageWithBLOBs.getObjectiveWeight() == null) {
@ -65,6 +65,7 @@ public class TeaExamManageServiceImpl implements ITeaExamManageService {
TeaAndStudentExam teaAndStudentExam = new TeaAndStudentExam(); TeaAndStudentExam teaAndStudentExam = new TeaAndStudentExam();
teaAndStudentExam.setExamManageId(examManageId); teaAndStudentExam.setExamManageId(examManageId);
teaAndStudentExam.setClassId(teaExamManagedto.getClassId()); teaAndStudentExam.setClassId(teaExamManagedto.getClassId());
teaAndStudentExam.setClassName(teaExamManagedto.getClassName());
teaAndStudentExam.setId(IdUtil.randomUUID()); teaAndStudentExam.setId(IdUtil.randomUUID());
teaAndStudentExamMapper.insert(teaAndStudentExam); teaAndStudentExamMapper.insert(teaAndStudentExam);
teaExamManageWithBLOBs.setExamManageId(examManageId); teaExamManageWithBLOBs.setExamManageId(examManageId);

@ -1,307 +1,333 @@
<?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.SysCaseQuestionStepMapper"> <mapper namespace="com.sztzjy.financial_bigdata.mapper.SysCaseQuestionStepMapper">
<resultMap id="BaseResultMap" type="com.sztzjy.financial_bigdata.entity.SysCaseQuestionStep"> <resultMap id="BaseResultMap" type="com.sztzjy.financial_bigdata.entity.SysCaseQuestionStep">
<id column="case_step_id" jdbcType="VARCHAR" property="caseStepId" /> <id column="case_step_id" jdbcType="VARCHAR" property="caseStepId"/>
<result column="case_id" jdbcType="VARCHAR" property="caseId" /> <result column="case_id" jdbcType="VARCHAR" property="caseId"/>
<result column="title" jdbcType="VARCHAR" property="title" /> <result column="title" jdbcType="VARCHAR" property="title"/>
<result column="content" jdbcType="VARCHAR" property="content" /> <result column="content" jdbcType="VARCHAR" property="content"/>
<result column="question" jdbcType="VARCHAR" property="question" /> <result column="question" jdbcType="VARCHAR" property="question"/>
<result column="answer" jdbcType="VARCHAR" property="answer" /> <result column="answer" jdbcType="VARCHAR" property="answer"/>
<result column="content_original" jdbcType="VARCHAR" property="contentOriginal" /> <result column="content_original" jdbcType="VARCHAR" property="contentOriginal"/>
<result column="question_original" jdbcType="VARCHAR" property="questionOriginal" /> <result column="question_original" jdbcType="VARCHAR" property="questionOriginal"/>
<result column="answer_original" jdbcType="VARCHAR" property="answerOriginal" /> <result column="answer_original" jdbcType="VARCHAR" property="answerOriginal"/>
<result column="sort" jdbcType="INTEGER" property="sort" /> <result column="sort" jdbcType="INTEGER" property="sort"/>
<result column="score" jdbcType="DECIMAL" property="score" /> <result column="score" jdbcType="DECIMAL" property="score"/>
</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>
</if> </sql>
</foreach> <sql id="Base_Column_List">
</where> case_step_id
</sql> , case_id, title, content, question, answer, content_original, question_original,
<sql id="Base_Column_List">
case_step_id, case_id, title, content, question, answer, content_original, question_original,
answer_original, sort, score answer_original, sort, score
</sql> </sql>
<select id="selectByExample" parameterType="com.sztzjy.financial_bigdata.entity.SysCaseQuestionStepExample" resultMap="BaseResultMap"> <select id="selectByExample" parameterType="com.sztzjy.financial_bigdata.entity.SysCaseQuestionStepExample"
select resultMap="BaseResultMap">
<if test="distinct"> select
distinct <if test="distinct">
</if> distinct
<include refid="Base_Column_List" /> </if>
from sys_case_question_step <include refid="Base_Column_List"/>
<if test="_parameter != null"> from sys_case_question_step
<include refid="Example_Where_Clause" /> <if test="_parameter != null">
</if> <include refid="Example_Where_Clause"/>
<if test="orderByClause != null"> </if>
order by ${orderByClause} <if test="orderByClause != null">
</if> order by ${orderByClause}
</select> </if>
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap"> </select>
select <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
<include refid="Base_Column_List" /> select
from sys_case_question_step <include refid="Base_Column_List"/>
where case_step_id = #{caseStepId,jdbcType=VARCHAR} from sys_case_question_step
</select> where case_step_id = #{caseStepId,jdbcType=VARCHAR}
<delete id="deleteByPrimaryKey" parameterType="java.lang.String"> </select>
delete from sys_case_question_step <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
where case_step_id = #{caseStepId,jdbcType=VARCHAR} delete
</delete> from sys_case_question_step
<delete id="deleteByExample" parameterType="com.sztzjy.financial_bigdata.entity.SysCaseQuestionStepExample"> where case_step_id = #{caseStepId,jdbcType=VARCHAR}
delete from sys_case_question_step </delete>
<if test="_parameter != null"> <delete id="deleteByExample" parameterType="com.sztzjy.financial_bigdata.entity.SysCaseQuestionStepExample">
<include refid="Example_Where_Clause" /> delete from sys_case_question_step
</if> <if test="_parameter != null">
</delete> <include refid="Example_Where_Clause"/>
<insert id="insert" parameterType="com.sztzjy.financial_bigdata.entity.SysCaseQuestionStep"> </if>
insert into sys_case_question_step (case_step_id, case_id, title, </delete>
content, question, answer, <insert id="insert" parameterType="com.sztzjy.financial_bigdata.entity.SysCaseQuestionStep">
content_original, question_original, answer_original, insert into sys_case_question_step (case_step_id, case_id, title,
sort, score) content, question, answer,
values (#{caseStepId,jdbcType=VARCHAR}, #{caseId,jdbcType=VARCHAR}, #{title,jdbcType=VARCHAR}, content_original, question_original, answer_original,
#{content,jdbcType=VARCHAR}, #{question,jdbcType=VARCHAR}, #{answer,jdbcType=VARCHAR}, sort, score)
#{contentOriginal,jdbcType=VARCHAR}, #{questionOriginal,jdbcType=VARCHAR}, #{answerOriginal,jdbcType=VARCHAR}, values (#{caseStepId,jdbcType=VARCHAR}, #{caseId,jdbcType=VARCHAR}, #{title,jdbcType=VARCHAR},
#{sort,jdbcType=INTEGER}, #{score,jdbcType=DECIMAL}) #{content,jdbcType=VARCHAR}, #{question,jdbcType=VARCHAR}, #{answer,jdbcType=VARCHAR},
</insert> #{contentOriginal,jdbcType=VARCHAR}, #{questionOriginal,jdbcType=VARCHAR},
<insert id="insertSelective" parameterType="com.sztzjy.financial_bigdata.entity.SysCaseQuestionStep"> #{answerOriginal,jdbcType=VARCHAR},
insert into sys_case_question_step #{sort,jdbcType=INTEGER}, #{score,jdbcType=DECIMAL})
<trim prefix="(" suffix=")" suffixOverrides=","> </insert>
<if test="caseStepId != null"> <insert id="insertSelective" parameterType="com.sztzjy.financial_bigdata.entity.SysCaseQuestionStep">
case_step_id, insert into sys_case_question_step
</if> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="caseId != null"> <if test="caseStepId != null">
case_id, case_step_id,
</if> </if>
<if test="title != null"> <if test="caseId != null">
title, case_id,
</if> </if>
<if test="content != null"> <if test="title != null">
content, title,
</if> </if>
<if test="question != null"> <if test="content != null">
question, content,
</if> </if>
<if test="answer != null"> <if test="question != null">
answer, question,
</if> </if>
<if test="contentOriginal != null"> <if test="answer != null">
content_original, answer,
</if> </if>
<if test="questionOriginal != null"> <if test="contentOriginal != null">
question_original, content_original,
</if> </if>
<if test="answerOriginal != null"> <if test="questionOriginal != null">
answer_original, question_original,
</if> </if>
<if test="sort != null"> <if test="answerOriginal != null">
sort, answer_original,
</if> </if>
<if test="score != null"> <if test="sort != null">
score, sort,
</if> </if>
</trim> <if test="score != null">
<trim prefix="values (" suffix=")" suffixOverrides=","> score,
<if test="caseStepId != null"> </if>
#{caseStepId,jdbcType=VARCHAR}, </trim>
</if> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="caseId != null"> <if test="caseStepId != null">
#{caseId,jdbcType=VARCHAR}, #{caseStepId,jdbcType=VARCHAR},
</if> </if>
<if test="title != null"> <if test="caseId != null">
#{title,jdbcType=VARCHAR}, #{caseId,jdbcType=VARCHAR},
</if> </if>
<if test="content != null"> <if test="title != null">
#{content,jdbcType=VARCHAR}, #{title,jdbcType=VARCHAR},
</if> </if>
<if test="question != null"> <if test="content != null">
#{question,jdbcType=VARCHAR}, #{content,jdbcType=VARCHAR},
</if> </if>
<if test="answer != null"> <if test="question != null">
#{answer,jdbcType=VARCHAR}, #{question,jdbcType=VARCHAR},
</if> </if>
<if test="contentOriginal != null"> <if test="answer != null">
#{contentOriginal,jdbcType=VARCHAR}, #{answer,jdbcType=VARCHAR},
</if> </if>
<if test="questionOriginal != null"> <if test="contentOriginal != null">
#{questionOriginal,jdbcType=VARCHAR}, #{contentOriginal,jdbcType=VARCHAR},
</if> </if>
<if test="answerOriginal != null"> <if test="questionOriginal != null">
#{answerOriginal,jdbcType=VARCHAR}, #{questionOriginal,jdbcType=VARCHAR},
</if> </if>
<if test="sort != null"> <if test="answerOriginal != null">
#{sort,jdbcType=INTEGER}, #{answerOriginal,jdbcType=VARCHAR},
</if> </if>
<if test="score != null"> <if test="sort != null">
#{score,jdbcType=DECIMAL}, #{sort,jdbcType=INTEGER},
</if> </if>
</trim> <if test="score != null">
</insert> #{score,jdbcType=DECIMAL},
<select id="countByExample" parameterType="com.sztzjy.financial_bigdata.entity.SysCaseQuestionStepExample" resultType="java.lang.Long"> </if>
select count(*) from sys_case_question_step </trim>
<if test="_parameter != null"> </insert>
<include refid="Example_Where_Clause" /> <select id="countByExample" parameterType="com.sztzjy.financial_bigdata.entity.SysCaseQuestionStepExample"
</if> resultType="java.lang.Long">
</select> select count(*) from sys_case_question_step
<update id="updateByExampleSelective" parameterType="map"> <if test="_parameter != null">
update sys_case_question_step <include refid="Example_Where_Clause"/>
<set> </if>
<if test="record.caseStepId != null"> </select>
case_step_id = #{record.caseStepId,jdbcType=VARCHAR}, <update id="updateByExampleSelective" parameterType="map">
</if> update sys_case_question_step
<if test="record.caseId != null"> <set>
<if test="record.caseStepId != null">
case_step_id = #{record.caseStepId,jdbcType=VARCHAR},
</if>
<if test="record.caseId != null">
case_id = #{record.caseId,jdbcType=VARCHAR},
</if>
<if test="record.title != null">
title = #{record.title,jdbcType=VARCHAR},
</if>
<if test="record.content != null">
content = #{record.content,jdbcType=VARCHAR},
</if>
<if test="record.question != null">
question = #{record.question,jdbcType=VARCHAR},
</if>
<if test="record.answer != null">
answer = #{record.answer,jdbcType=VARCHAR},
</if>
<if test="record.contentOriginal != null">
content_original = #{record.contentOriginal,jdbcType=VARCHAR},
</if>
<if test="record.questionOriginal != null">
question_original = #{record.questionOriginal,jdbcType=VARCHAR},
</if>
<if test="record.answerOriginal != null">
answer_original = #{record.answerOriginal,jdbcType=VARCHAR},
</if>
<if test="record.sort != null">
sort = #{record.sort,jdbcType=INTEGER},
</if>
<if test="record.score != null">
score = #{record.score,jdbcType=DECIMAL},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause"/>
</if>
</update>
<update id="updateByExample" parameterType="map">
update sys_case_question_step
set case_step_id = #{record.caseStepId,jdbcType=VARCHAR},
case_id = #{record.caseId,jdbcType=VARCHAR}, case_id = #{record.caseId,jdbcType=VARCHAR},
</if>
<if test="record.title != null">
title = #{record.title,jdbcType=VARCHAR}, title = #{record.title,jdbcType=VARCHAR},
</if>
<if test="record.content != null">
content = #{record.content,jdbcType=VARCHAR}, content = #{record.content,jdbcType=VARCHAR},
</if>
<if test="record.question != null">
question = #{record.question,jdbcType=VARCHAR}, question = #{record.question,jdbcType=VARCHAR},
</if>
<if test="record.answer != null">
answer = #{record.answer,jdbcType=VARCHAR}, answer = #{record.answer,jdbcType=VARCHAR},
</if>
<if test="record.contentOriginal != null">
content_original = #{record.contentOriginal,jdbcType=VARCHAR}, content_original = #{record.contentOriginal,jdbcType=VARCHAR},
</if>
<if test="record.questionOriginal != null">
question_original = #{record.questionOriginal,jdbcType=VARCHAR}, question_original = #{record.questionOriginal,jdbcType=VARCHAR},
</if>
<if test="record.answerOriginal != null">
answer_original = #{record.answerOriginal,jdbcType=VARCHAR}, answer_original = #{record.answerOriginal,jdbcType=VARCHAR},
</if>
<if test="record.sort != null">
sort = #{record.sort,jdbcType=INTEGER}, sort = #{record.sort,jdbcType=INTEGER},
</if> score = #{record.score,jdbcType=DECIMAL}
<if test="record.score != null"> <if test="_parameter != null">
score = #{record.score,jdbcType=DECIMAL}, <include refid="Update_By_Example_Where_Clause"/>
</if> </if>
</set> </update>
<if test="_parameter != null"> <update id="updateByPrimaryKeySelective" parameterType="com.sztzjy.financial_bigdata.entity.SysCaseQuestionStep">
<include refid="Update_By_Example_Where_Clause" /> update sys_case_question_step
</if> <set>
</update> <if test="caseId != null">
<update id="updateByExample" parameterType="map"> case_id = #{caseId,jdbcType=VARCHAR},
update sys_case_question_step </if>
set case_step_id = #{record.caseStepId,jdbcType=VARCHAR}, <if test="title != null">
case_id = #{record.caseId,jdbcType=VARCHAR}, title = #{title,jdbcType=VARCHAR},
title = #{record.title,jdbcType=VARCHAR}, </if>
content = #{record.content,jdbcType=VARCHAR}, <if test="content != null">
question = #{record.question,jdbcType=VARCHAR}, content = #{content,jdbcType=VARCHAR},
answer = #{record.answer,jdbcType=VARCHAR}, </if>
content_original = #{record.contentOriginal,jdbcType=VARCHAR}, <if test="question != null">
question_original = #{record.questionOriginal,jdbcType=VARCHAR}, question = #{question,jdbcType=VARCHAR},
answer_original = #{record.answerOriginal,jdbcType=VARCHAR}, </if>
sort = #{record.sort,jdbcType=INTEGER}, <if test="answer != null">
score = #{record.score,jdbcType=DECIMAL} answer = #{answer,jdbcType=VARCHAR},
<if test="_parameter != null"> </if>
<include refid="Update_By_Example_Where_Clause" /> <if test="contentOriginal != null">
</if> content_original = #{contentOriginal,jdbcType=VARCHAR},
</update> </if>
<update id="updateByPrimaryKeySelective" parameterType="com.sztzjy.financial_bigdata.entity.SysCaseQuestionStep"> <if test="questionOriginal != null">
update sys_case_question_step question_original = #{questionOriginal,jdbcType=VARCHAR},
<set> </if>
<if test="caseId != null"> <if test="answerOriginal != null">
case_id = #{caseId,jdbcType=VARCHAR}, answer_original = #{answerOriginal,jdbcType=VARCHAR},
</if> </if>
<if test="title != null"> <if test="sort != null">
title = #{title,jdbcType=VARCHAR}, sort = #{sort,jdbcType=INTEGER},
</if> </if>
<if test="content != null"> <if test="score != null">
content = #{content,jdbcType=VARCHAR}, score = #{score,jdbcType=DECIMAL},
</if> </if>
<if test="question != null"> </set>
question = #{question,jdbcType=VARCHAR}, where case_step_id = #{caseStepId,jdbcType=VARCHAR}
</if> </update>
<if test="answer != null"> <update id="updateByPrimaryKey" parameterType="com.sztzjy.financial_bigdata.entity.SysCaseQuestionStep">
answer = #{answer,jdbcType=VARCHAR}, update sys_case_question_step
</if> set case_id = #{caseId,jdbcType=VARCHAR},
<if test="contentOriginal != null"> title = #{title,jdbcType=VARCHAR},
content_original = #{contentOriginal,jdbcType=VARCHAR}, content = #{content,jdbcType=VARCHAR},
</if> question = #{question,jdbcType=VARCHAR},
<if test="questionOriginal != null"> answer = #{answer,jdbcType=VARCHAR},
question_original = #{questionOriginal,jdbcType=VARCHAR}, content_original = #{contentOriginal,jdbcType=VARCHAR},
</if> question_original = #{questionOriginal,jdbcType=VARCHAR},
<if test="answerOriginal != null"> answer_original = #{answerOriginal,jdbcType=VARCHAR},
answer_original = #{answerOriginal,jdbcType=VARCHAR}, sort = #{sort,jdbcType=INTEGER},
</if> score = #{score,jdbcType=DECIMAL}
<if test="sort != null"> where case_step_id = #{caseStepId,jdbcType=VARCHAR}
sort = #{sort,jdbcType=INTEGER}, </update>
</if>
<if test="score != null"> <resultMap id="DtoMap" type="com.sztzjy.financial_bigdata.entity.SysCaseQuestionStep">
score = #{score,jdbcType=DECIMAL}, <result column="title" jdbcType="VARCHAR" property="title"/>
</if> <result column="chapter_name" jdbcType="VARCHAR" property="questionOriginal"/>
</set> <result column="step_count" jdbcType="VARCHAR" property="contentOriginal"/>
where case_step_id = #{caseStepId,jdbcType=VARCHAR} <result column="content" jdbcType="VARCHAR" property="questionOriginal"/>
</update> <result column="answer_original" jdbcType="VARCHAR" property="answerOriginal"/>
<update id="updateByPrimaryKey" parameterType="com.sztzjy.financial_bigdata.entity.SysCaseQuestionStep"> </resultMap>
update sys_case_question_step <select id="getGradeReportCase" parameterType="java.util.List" resultMap="DtoMap">
set case_id = #{caseId,jdbcType=VARCHAR}, SELECT s2.title, s3.chapter_name, COUNT(*) AS step_count
title = #{title,jdbcType=VARCHAR}, FROM sys_case_question_step s1
content = #{content,jdbcType=VARCHAR}, JOIN sys_case_question s2 ON s1.case_id = s2.case_id
question = #{question,jdbcType=VARCHAR}, JOIN sys_course_chapter s3 ON s2.chapter_id = s3.chapter_id
answer = #{answer,jdbcType=VARCHAR}, WHERE s2.case_id IN
content_original = #{contentOriginal,jdbcType=VARCHAR}, <foreach collection="list" separator="," item="id" open="(" close=")">
question_original = #{questionOriginal,jdbcType=VARCHAR}, #{id}
answer_original = #{answerOriginal,jdbcType=VARCHAR}, </foreach>
sort = #{sort,jdbcType=INTEGER}, GROUP BY s2.title, s3.chapter_name
score = #{score,jdbcType=DECIMAL} </select>
where case_step_id = #{caseStepId,jdbcType=VARCHAR}
</update>
</mapper> </mapper>

@ -450,4 +450,13 @@
</select> </select>
<select id="getGradeReportObjective" parameterType="java.util.List" resultMap="BaseResultMap">
SELECT content, chapter_name,answer,`type`
from sys_objective_question
WHERE objective_id IN
<foreach collection="list" separator="," item="id" open="(" close=")">
#{id}
</foreach>
</select>
</mapper> </mapper>

@ -5,6 +5,7 @@
<id column="id" jdbcType="VARCHAR" property="id" /> <id column="id" jdbcType="VARCHAR" property="id" />
<result column="exam_manage_id" jdbcType="VARCHAR" property="examManageId" /> <result column="exam_manage_id" jdbcType="VARCHAR" property="examManageId" />
<result column="class_id" jdbcType="VARCHAR" property="classId" /> <result column="class_id" jdbcType="VARCHAR" property="classId" />
<result column="class_name" jdbcType="VARCHAR" property="className" />
</resultMap> </resultMap>
<sql id="Example_Where_Clause"> <sql id="Example_Where_Clause">
<where> <where>
@ -65,7 +66,7 @@
</where> </where>
</sql> </sql>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id, exam_manage_id, class_id id, exam_manage_id, class_id, class_name
</sql> </sql>
<select id="selectByExample" parameterType="com.sztzjy.financial_bigdata.entity.TeaAndStudentExamExample" resultMap="BaseResultMap"> <select id="selectByExample" parameterType="com.sztzjy.financial_bigdata.entity.TeaAndStudentExamExample" resultMap="BaseResultMap">
select select
@ -98,10 +99,10 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.sztzjy.financial_bigdata.entity.TeaAndStudentExam"> <insert id="insert" parameterType="com.sztzjy.financial_bigdata.entity.TeaAndStudentExam">
insert into tea_and_student_exam (id, exam_manage_id, class_id insert into tea_and_student_exam (id, exam_manage_id, class_id,
) class_name)
values (#{id,jdbcType=VARCHAR}, #{examManageId,jdbcType=VARCHAR}, #{classId,jdbcType=VARCHAR} values (#{id,jdbcType=VARCHAR}, #{examManageId,jdbcType=VARCHAR}, #{classId,jdbcType=VARCHAR},
) #{className,jdbcType=VARCHAR})
</insert> </insert>
<insert id="insertSelective" parameterType="com.sztzjy.financial_bigdata.entity.TeaAndStudentExam"> <insert id="insertSelective" parameterType="com.sztzjy.financial_bigdata.entity.TeaAndStudentExam">
insert into tea_and_student_exam insert into tea_and_student_exam
@ -115,6 +116,9 @@
<if test="classId != null"> <if test="classId != null">
class_id, class_id,
</if> </if>
<if test="className != null">
class_name,
</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null"> <if test="id != null">
@ -126,6 +130,9 @@
<if test="classId != null"> <if test="classId != null">
#{classId,jdbcType=VARCHAR}, #{classId,jdbcType=VARCHAR},
</if> </if>
<if test="className != null">
#{className,jdbcType=VARCHAR},
</if>
</trim> </trim>
</insert> </insert>
<select id="countByExample" parameterType="com.sztzjy.financial_bigdata.entity.TeaAndStudentExamExample" resultType="java.lang.Long"> <select id="countByExample" parameterType="com.sztzjy.financial_bigdata.entity.TeaAndStudentExamExample" resultType="java.lang.Long">
@ -146,6 +153,9 @@
<if test="record.classId != null"> <if test="record.classId != null">
class_id = #{record.classId,jdbcType=VARCHAR}, class_id = #{record.classId,jdbcType=VARCHAR},
</if> </if>
<if test="record.className != null">
class_name = #{record.className,jdbcType=VARCHAR},
</if>
</set> </set>
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" /> <include refid="Update_By_Example_Where_Clause" />
@ -155,7 +165,8 @@
update tea_and_student_exam update tea_and_student_exam
set id = #{record.id,jdbcType=VARCHAR}, set id = #{record.id,jdbcType=VARCHAR},
exam_manage_id = #{record.examManageId,jdbcType=VARCHAR}, exam_manage_id = #{record.examManageId,jdbcType=VARCHAR},
class_id = #{record.classId,jdbcType=VARCHAR} class_id = #{record.classId,jdbcType=VARCHAR},
class_name = #{record.className,jdbcType=VARCHAR}
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" /> <include refid="Update_By_Example_Where_Clause" />
</if> </if>
@ -169,13 +180,20 @@
<if test="classId != null"> <if test="classId != null">
class_id = #{classId,jdbcType=VARCHAR}, class_id = #{classId,jdbcType=VARCHAR},
</if> </if>
<if test="className != null">
class_name = #{className,jdbcType=VARCHAR},
</if>
</set> </set>
where id = #{id,jdbcType=VARCHAR} where id = #{id,jdbcType=VARCHAR}
</update> </update>
<update id="updateByPrimaryKey" parameterType="com.sztzjy.financial_bigdata.entity.TeaAndStudentExam"> <update id="updateByPrimaryKey" parameterType="com.sztzjy.financial_bigdata.entity.TeaAndStudentExam">
update tea_and_student_exam update tea_and_student_exam
set exam_manage_id = #{examManageId,jdbcType=VARCHAR}, set exam_manage_id = #{examManageId,jdbcType=VARCHAR},
class_id = #{classId,jdbcType=VARCHAR} class_id = #{classId,jdbcType=VARCHAR},
class_name = #{className,jdbcType=VARCHAR}
where id = #{id,jdbcType=VARCHAR} where id = #{id,jdbcType=VARCHAR}
</update> </update>
<select id="selectByExamMangeId" parameterType="java.lang.String" resultMap="BaseResultMap">
select class_name,class_id from tea_and_student_exam where exam_manage_id = #{examManageId}
</select>
</mapper> </mapper>
Loading…
Cancel
Save