新增部分接口

newBigdata
xiaoCJ
parent 3cd964188a
commit 0faa52059d

@ -190,6 +190,20 @@
<artifactId>jython-standalone</artifactId>
<version>2.7.2</version>
</dependency>
<dependency>
<groupId>org.xhtmlrenderer</groupId>
<artifactId>flying-saucer-pdf</artifactId>
<version>9.1.22</version>
</dependency>
<dependency>
<groupId>org.xhtmlrenderer</groupId>
<artifactId>flying-saucer-pdf-itext5</artifactId>
<version>9.1.22</version>
</dependency>
</dependencies>
<build>

@ -17,14 +17,8 @@ import com.sztzjy.financial_bigdata.service.tea.ITeaCaseStepService;
import com.sztzjy.financial_bigdata.util.ResultEntity;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.*;

@ -9,7 +9,10 @@ import org.python.core.Py;
import org.python.core.PyCode;
import org.python.util.PythonInterpreter;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.io.ByteArrayInputStream;
import java.io.InputStream;

@ -3,22 +3,26 @@ package com.sztzjy.financial_bigdata.controller.stu;
import com.sztzjy.financial_bigdata.annotation.AnonymousAccess;
import com.sztzjy.financial_bigdata.config.Constant;
import com.sztzjy.financial_bigdata.entity.*;
import com.sztzjy.financial_bigdata.entity.stu_dto.AllModuleProgressDto;
import com.sztzjy.financial_bigdata.entity.stu_dto.StuTheoryIndexInfoDto;
import com.sztzjy.financial_bigdata.entity.stu_dto.StuUserDto;
import com.sztzjy.financial_bigdata.mapper.*;
import com.sztzjy.financial_bigdata.service.stu.StuIndexService;
import com.sztzjy.financial_bigdata.util.ResultEntity;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.math.BigDecimal;
import java.util.*;
/**
* @Author xcj
@ -44,6 +48,19 @@ public class StuIndexController {
private SysResourceDataMapper sysResourceDataMapper;
@Autowired
private StuIndexService stuIndexService;
@Autowired
private SysResourceLearningMapper sysResourceLearningMapper;
@Autowired
private StuLearningTimeMapper stuLearningTimeMapper;
@Autowired
private StuTrainingMapper stuTrainingMapper;
@Autowired
private SysCourseChapterMapper sysCourseChapterMapper;
@Autowired
private StuTheoryExamMapper theoryExamMapper;
@Autowired
private TeaAndStudentExamMapper teaAndStudentExamMapper;
@AnonymousAccess
@ApiOperation("课程数据展示")
@ -83,7 +100,9 @@ public class StuIndexController {
}
for (String s : list) {
TeaExamManageWithBLOBs teaExamManageWithBLOBs = teaExamManageMapper.selectByPrimaryKey(s);
map.put(teaExamManageWithBLOBs.getExamManageId(), teaExamManageWithBLOBs.getExamName());
if (teaExamManageWithBLOBs != null) {
map.put(teaExamManageWithBLOBs.getExamManageId(), teaExamManageWithBLOBs.getExamName());
}
}
return new ResultEntity<>(map);
}
@ -132,9 +151,9 @@ public class StuIndexController {
@AnonymousAccess
@ApiOperation("个人中心--编辑")
@PostMapping("updatePersonalCenterInfo") //技能不要了
public ResultEntity updatePersonalCenterInfo(@RequestParam String userId,
@RequestParam(required = false) String phone,
@RequestParam(required = false) String email) {
public ResultEntity<String> updatePersonalCenterInfo(@RequestParam String userId,
@RequestParam(required = false) String phone,
@RequestParam(required = false) String email) {
if (StringUtils.isBlank(phone) && StringUtils.isBlank(email)) {
return new ResultEntity(HttpStatus.BAD_REQUEST, "请输入要编辑的内容");
}
@ -152,8 +171,137 @@ public class StuIndexController {
@AnonymousAccess
@ApiOperation("学习数据统计分析")
@PostMapping("learnDataCountAnalysis")
public ResultEntity learnDataCountAnalysis(@RequestParam String userId,@RequestParam String schoolId) {
stuIndexService.learnDataCountAnalysis(userId,schoolId);
return null;
public ResultEntity<StuTheoryIndexInfoDto> learnDataCountAnalysis(@RequestParam String userId, @RequestParam String schoolId) {
return new ResultEntity<>(stuIndexService.learnDataCountAnalysis(userId, schoolId));
}
@AnonymousAccess
@ApiOperation("设置资源学习人数和学习时长")
@PostMapping("setResourceNum")
public void setResourceNum(@RequestParam String schoolId, @ApiParam("学习时长,单位分钟") @RequestParam Integer time) {
SysResourceLearning sysResourceLearning = sysResourceLearningMapper.selectByPrimaryKey(schoolId);
if (sysResourceLearning == null) { //第一次 新增一条
SysResourceLearning newData = new SysResourceLearning();
newData.setSchoolId(schoolId);
newData.setLearningTime(time);
newData.setLearningNum(1);
sysResourceLearningMapper.insert(newData);
} else {
if (sysResourceLearning.getLearningNum() == null) {
sysResourceLearning.setLearningNum(1);
} else {
sysResourceLearning.setLearningNum(sysResourceLearning.getLearningNum() + 1);
}
if (sysResourceLearning.getLearningTime() == null) {
sysResourceLearning.setLearningTime(time);
} else {
sysResourceLearning.setLearningTime(sysResourceLearning.getLearningTime() + time);
}
}
}
@AnonymousAccess
@ApiOperation("设置各个模块学习时长")
@PostMapping("setLearningTimeByUserId")
public void setResourceNum(@ApiParam("实训演练模块,实战考核模块,理论考试模块,资源中心模块") @RequestParam String module,
@RequestParam String userId,
@ApiParam("学习时长,单位分钟") @RequestParam String time) {
StuLearningTimeExample example = new StuLearningTimeExample();
example.createCriteria().andModuleNameEqualTo(module).andUserIdEqualTo(userId);
List<StuLearningTime> stuLearningTimes = stuLearningTimeMapper.selectByExample(example);
if (stuLearningTimes.isEmpty()) {
StuLearningTime stuLearningTime = new StuLearningTime();
stuLearningTime.setUserId(userId);
stuLearningTime.setId(UUID.randomUUID().toString());
stuLearningTime.setModuleName(module);
stuLearningTime.setLearningTime(time);
stuLearningTimeMapper.insert(stuLearningTime);
} else {
StuLearningTime stuLearningTime = stuLearningTimes.get(0);
if (stuLearningTime.getLearningTime() == null) {
stuLearningTime.setLearningTime(time);
} else {
stuLearningTime.setLearningTime(stuLearningTime.getLearningTime() + time);
}
}
}
@AnonymousAccess
@ApiOperation("有效时长饼状图")
@PostMapping("getLearningTime")
public ResultEntity<List<StuLearningTime>> getLearningTime(@RequestParam String userId) {
StuLearningTimeExample example = new StuLearningTimeExample();
example.createCriteria().andUserIdEqualTo(userId);
return new ResultEntity<List<StuLearningTime>>(stuLearningTimeMapper.selectByExample(example));
}
@AnonymousAccess
@ApiOperation("完成进度统计图")
@PostMapping("getAllModuleProgress")
public ResultEntity<AllModuleProgressDto> getAllModuleProgress(@RequestParam String userId, @RequestParam String schoolId) {
AllModuleProgressDto allModuleProgressDto = new AllModuleProgressDto();
//实训演练完成进度 = 已完成模块数量/总模块数量
int progressFinishNum = stuTrainingMapper.selectProgressFinish(userId); //已学任务数量
int totalChapterNum = sysCourseChapterMapper.selectChapterBySchoolId(schoolId); //总章节数量
if (progressFinishNum != 0 && totalChapterNum != 0) {
double finalProgress = (double) progressFinishNum / totalChapterNum; //任务进度 = 已学数量/总章节数量
allModuleProgressDto.setTrainingProgress(finalProgress);
}
//实战考核完成进度 = 已做答的考试/ 所有发布的考试
StuStudentExamExample studentExamExample = new StuStudentExamExample();
studentExamExample.createCriteria().andUseridEqualTo(userId);
List<StuStudentExamWithBLOBs> stuStudentExamWithBLOBs = studentExamMapper.selectByExampleWithBLOBs(studentExamExample);
int stuSize = stuStudentExamWithBLOBs.size(); //拿到学生所有作答的考试
int totalSize = stuSize; //所有发布的考试
TeaAndStudentExamExample teaAndStudentExamExample = new TeaAndStudentExamExample();
List<TeaAndStudentExam> teaAndStudentExams = teaAndStudentExamMapper.selectByExample(teaAndStudentExamExample);
if (!stuStudentExamWithBLOBs.isEmpty()) {
for (StuStudentExamWithBLOBs stuStudentExamWithBLOB : stuStudentExamWithBLOBs) {
String examManageId = stuStudentExamWithBLOB.getExamManageId();
if (!teaAndStudentExams.isEmpty()) {
for (TeaAndStudentExam teaAndStudentExam : teaAndStudentExams) {
if (teaAndStudentExam.getClassId().contains(stuStudentExamWithBLOB.getClassId())) { //学生班级和老师添加时选择的班级一致
String examManageId1 = teaAndStudentExam.getExamManageId();
if (!examManageId.equals(examManageId1)) { //如果学生表的考试ID和老师表对应不上代表没有提交
totalSize++; //
}
}
}
}
}
}
//实战考核完成进度 = 已做答的考试/ 所有发布的考试
int i = stuSize / totalSize;
allModuleProgressDto.setExamProgress(i);
//理论考试完成进度 = 完成5次为100%一次为20%
int completedExamCount = theoryExamMapper.selectByUserID(userId);
double theoryProgress = 0;
if (completedExamCount >= 5) {
allModuleProgressDto.setTheoryProgress(100);
} else {
theoryProgress = completedExamCount * 20;
}
allModuleProgressDto.setTheoryProgress(theoryProgress);
return new ResultEntity<>(allModuleProgressDto);
}
@AnonymousAccess
@ApiOperation("历次考试成绩折线图")
@PostMapping("getTestScoresLineChart")
public ResultEntity<List<Map<String, BigDecimal>>> getTestScoresLineChart(@RequestParam String userId) {
List<Map<String, BigDecimal>> mapList = studentExamMapper.getTestScoresLineChart(userId);
return new ResultEntity<>(mapList);
}
}

@ -0,0 +1,78 @@
package com.sztzjy.financial_bigdata.controller.stu;
import cn.hutool.core.util.IdUtil;
import com.sztzjy.financial_bigdata.annotation.AnonymousAccess;
import com.sztzjy.financial_bigdata.entity.StuTrainingWithBLOBs;
import com.sztzjy.financial_bigdata.entity.stu_dto.ReceivingObject;
import com.sztzjy.financial_bigdata.mapper.StuTrainingMapper;
import com.sztzjy.financial_bigdata.util.PdfUtil;
import com.sztzjy.financial_bigdata.util.ResultEntity;
import com.sztzjy.financial_bigdata.util.file.IFileUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
/**
* @Author xcj
* @Date 2024/4/24
*/
@RestController
@Api(tags = "学生端--知识笔记")
@RequestMapping("api/stu/knowledgeNote")
public class StuKnowledgeNote {
@Autowired
private StuTrainingMapper stuTrainingMapper;
@Autowired
private IFileUtil fileUtil;
@Value("${file.path}")
private String filePath;
@AnonymousAccess
@ApiOperation("保存")
@PostMapping("save")
public ResultEntity<String> save(@RequestBody ReceivingObject receivingObject) {
StuTrainingWithBLOBs stuTrainingWithBLOBs = stuTrainingMapper.selectByPrimaryKey(receivingObject.getTrainingId());
if (StringUtils.isNotBlank(receivingObject.getKnowledgeNote())) {
stuTrainingWithBLOBs.setKnowledgeNote(receivingObject.getKnowledgeNote());
stuTrainingMapper.updateByPrimaryKeyWithBLOBs(stuTrainingWithBLOBs);
return new ResultEntity<>(HttpStatus.OK, "保存成功!");
} else {
return new ResultEntity<>(HttpStatus.BAD_REQUEST, "请输入内容后保存!");
}
}
@AnonymousAccess
@ApiOperation("导出")
@PostMapping("export")
public void export(HttpServletResponse response, String context) {
try {
String s = IdUtil.simpleUUID();
FileOutputStream fileOutputStream = new FileOutputStream(filePath + "/pdf/" + s + ".pdf");
PdfUtil.htmlStringToPdf(context, fileOutputStream);
fileUtil.download(response, s + ".pdf", "/pdf/" + s + ".pdf");
} catch (FileNotFoundException e) {
throw new RuntimeException(e);
}
}
@AnonymousAccess
@ApiOperation("回显")
@PostMapping("getKnowledgeNote")
public ResultEntity<String> getKnowledgeNote(@RequestParam String trainingId) {
StuTrainingWithBLOBs stuTrainingWithBLOBs = stuTrainingMapper.selectByPrimaryKey(trainingId);
return new ResultEntity<>(stuTrainingWithBLOBs.getKnowledgeNote());
}
}

@ -0,0 +1,167 @@
package com.sztzjy.financial_bigdata.controller.stu;
import cn.hutool.core.util.IdUtil;
import com.sztzjy.financial_bigdata.annotation.AnonymousAccess;
import com.sztzjy.financial_bigdata.entity.*;
import com.sztzjy.financial_bigdata.entity.stu_dto.StuTrainingDto;
import com.sztzjy.financial_bigdata.mapper.*;
import com.sztzjy.financial_bigdata.util.ResultEntity;
import com.sztzjy.financial_bigdata.util.file.IFileUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.util.Assert;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
/**
* @Author xcj
* @Date 2024/4/24
*/
@RestController
@Api(tags = "学生端--学习成绩")
@RequestMapping("api/stu/score")
public class StuScoreController {
@Autowired
private TrainingReportMapper trainingReportMapper;
@Autowired
private IFileUtil fileUtil;
@Autowired
private SysWeightMapper sysWeightMapper;
@Autowired
private StuTrainingMapper stuTrainingMapper;
@Autowired
private SysCourseChapterMapper sysCourseChapterMapper;
@AnonymousAccess
@ApiOperation("得分情况展示")
@PostMapping("getScoreInfo")
public ResultEntity<StuTrainingDto> getScoreInfo(@RequestParam String userId,
@RequestParam String chapterId,
@RequestParam String schoolId) {
StuTrainingExample stuTrainingExample =new StuTrainingExample();
stuTrainingExample.createCriteria().andUserIdEqualTo(userId).andChapterIdEqualTo(chapterId);
List<StuTrainingWithBLOBs> stuTrainings = stuTrainingMapper.selectByExampleWithBLOBs(stuTrainingExample);
StuTrainingDto stuTrainingDto =new StuTrainingDto();
//根据章节ID拿到课程ID 再去拿权重
SysCourseChapter sysCourseChapter = sysCourseChapterMapper.selectByPrimaryKey(chapterId);
SysWeightExample sysWeightExample =new SysWeightExample();
sysWeightExample.createCriteria().andCourseIdEqualTo(sysCourseChapter.getCourseId()).andSchoolIdEqualTo(schoolId);
List<SysWeight> sysWeights = sysWeightMapper.selectByExample(sysWeightExample);
if (!sysWeights.isEmpty())
{
SysWeight sysWeight = sysWeights.get(0);
BeanUtils.copyProperties(sysWeight,stuTrainingDto); //五个权重
}
if (!stuTrainings.isEmpty()){
StuTrainingWithBLOBs stuTrainingWithBLOBs = stuTrainings.get(0);
BeanUtils.copyProperties(stuTrainingWithBLOBs,stuTrainingDto); //四个完成情况和四个得分
TrainingReport trainingReport = trainingReportMapper.selectByPrimaryKey(stuTrainingWithBLOBs.getReportId());
//设置报告相关数据
if (trainingReport.getTeacherScore()==null){
stuTrainingDto.setReportCompleteStatus("未提交");
stuTrainingDto.setReportScore(null);
}else {
stuTrainingDto.setReportCompleteStatus("已提交");
stuTrainingDto.setReportScore(trainingReport.getTeacherScore());
}
}
return new ResultEntity<StuTrainingDto>(stuTrainingDto);
}
@AnonymousAccess
@ApiOperation("实验报告展示")
@PostMapping("getReportByUserId")
public ResultEntity<List<TrainingReport>> getReportByUserId(@RequestParam String userId) {
TrainingReportExample trainingReportExample = new TrainingReportExample();
trainingReportExample.createCriteria().andUserIdEqualTo(userId);
List<TrainingReport> trainingReports = trainingReportMapper.selectByExampleWithBLOBs(trainingReportExample);
return new ResultEntity<>(trainingReports);
}
@AnonymousAccess
@PostMapping("uploadReport")
@ApiOperation("上传报告")
public ResultEntity<String> uploadReport(@RequestPart(name = "file") MultipartFile file,
@ApiParam("文件名称") @RequestParam String fileName,
@RequestParam String userId,
@RequestParam String trainingId,
@ApiParam("章节ID") @RequestParam String chapterId,
@ApiParam("章节名称") @RequestParam String chapterName,
@RequestParam String schoolId) {
int size = (int) file.getSize() / (1024 * 1024); //拿到MB为单位的大小
String originalFilename = file.getOriginalFilename();
assert originalFilename != null;
String fileExtension = originalFilename.substring(originalFilename.lastIndexOf(".")).toLowerCase();
if (!fileExtension.equals(".pdf") && !fileExtension.equals(".doc") && !fileExtension.equals(".docx")) {
return new ResultEntity<>(HttpStatus.BAD_REQUEST, "文件必须为word或pdf");
}
//老师评分后不允许上传
TrainingReportExample example = new TrainingReportExample();
example.createCriteria().andSchoolIdEqualTo(schoolId).andUserIdEqualTo(userId).andChapterIdEqualTo(chapterId);
List<TrainingReport> trainingReports = trainingReportMapper.selectByExampleWithBLOBs(example);
if (!trainingReports.isEmpty()) { //上传过
TrainingReport trainingReport = trainingReports.get(0);
BigDecimal teacherScore = trainingReport.getTeacherScore();
if (teacherScore != null) { //老师评分过
return new ResultEntity<>(HttpStatus.BAD_REQUEST, "老师已评分,无法重新上传!");
} else { //老师没评分 多次上传 直接覆盖
String filePath = fileUtil.upload(file);
trainingReport.setFilePath(filePath);
trainingReport.setUploadTime(new Date());
trainingReport.setReportName(fileName);
trainingReport.setReportSize(size);
trainingReportMapper.updateByPrimaryKeyWithBLOBs(trainingReport);
return new ResultEntity<>(HttpStatus.BAD_REQUEST, "重新上传成功!");
}
} else { //第一次上传
String filePath = fileUtil.upload(file);
TrainingReport trainingReport = new TrainingReport();
trainingReport.setReportId(IdUtil.randomUUID());
trainingReport.setFilePath(filePath);
trainingReport.setUploadTime(new Date());
trainingReport.setReportName(fileName);
trainingReport.setChapterId(chapterId);
trainingReport.setChapterName(chapterName);
trainingReport.setUserId(userId);
trainingReport.setSchoolId(schoolId);
trainingReport.setReportSize(size);
StuTrainingWithBLOBs stuTrainingWithBLOBs = stuTrainingMapper.selectByPrimaryKey(trainingId);
stuTrainingWithBLOBs.setReportId(trainingReport.getReportId()); // 第一次上传时设置实训表的报告ID
stuTrainingMapper.updateByPrimaryKeyWithBLOBs(stuTrainingWithBLOBs);
return new ResultEntity<>(HttpStatus.OK, "上传成功!");
}
}
@AnonymousAccess
@ApiOperation("实验报告下载")
@PostMapping("downloadReport")
public void downloadReport(@RequestParam String reportId, HttpServletResponse response) {
TrainingReport trainingReport = trainingReportMapper.selectByPrimaryKey(reportId);
Assert.isTrue(trainingReport != null && trainingReport.getFilePath() != null, "报告不存在");
fileUtil.download(response, trainingReport.getReportName(), trainingReport.getFilePath());
}
@AnonymousAccess
@ApiOperation("实验报告查看评语")
@PostMapping("getTeacherCommentById")
public ResultEntity<String> getTeacherCommentById(@RequestParam String reportId) {
TrainingReport trainingReport = trainingReportMapper.selectByPrimaryKey(reportId);
return new ResultEntity<>(trainingReport.getTeacherComment());
}
}

@ -8,15 +8,15 @@ import com.sztzjy.financial_bigdata.entity.*;
import com.sztzjy.financial_bigdata.entity.tea_dto.TeaExamManageCountDto;
import com.sztzjy.financial_bigdata.entity.tea_dto.TeaExamManageDto;
import com.sztzjy.financial_bigdata.entity.tea_dto.TrainingDto;
import com.sztzjy.financial_bigdata.mapper.StuTrainingMapper;
import com.sztzjy.financial_bigdata.mapper.SysObjectiveQuestionMapper;
import com.sztzjy.financial_bigdata.mapper.TeaExamManageMapper;
import com.sztzjy.financial_bigdata.mapper.*;
import com.sztzjy.financial_bigdata.service.tea.ITeaExamManageService;
import com.sztzjy.financial_bigdata.util.ResultEntity;
import com.sztzjy.financial_bigdata.util.file.IFileUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.*;
@ -40,17 +40,21 @@ public class TeaExamManageController {
private TeaExamManageMapper teaExamManageMapper;
@Autowired
private StuTrainingMapper stuTrainingMapper;
@Autowired
private TeaAndStudentExamMapper teaAndStudentExamMapper;
@Autowired
private StuClassMapper stuClassMapper;
@Autowired
private IFileUtil fileUtil;
@AnonymousAccess
@PostMapping("/getSelectCountAndScore")
@ApiOperation("新增考试--获取选题量和分数")
public ResultEntity<Map<Integer, BigDecimal>> getsingleId(@RequestBody @ApiParam("所有ID用,隔开一次传过来") String ids) {
List<String> idList = new ArrayList<>(Arrays.asList(ids.split(",")));
public ResultEntity<Map<Integer, BigDecimal>> getsingleId(@RequestBody @ApiParam("所有ID用,隔开一次传过来") List<String> ids) {
Map<Integer, BigDecimal> map = new HashMap<>();
int i = 0;
BigDecimal score = BigDecimal.ZERO;
for (String id : idList) {
for (String id : ids) {
SysObjectiveQuestion sysObjectiveQuestion = sysObjectiveQuestionMapper.selectByPrimaryKey(id);
i++;
score = sysObjectiveQuestion.getScore().add(score);
@ -113,11 +117,30 @@ public class TeaExamManageController {
}
List<TeaExamManageWithBLOBs> teaExamManageWithBLOBs = teaExamManageMapper.selectByExampleWithBLOBs(teaExamManageExample);
Date currentTime = new Date();
for (TeaExamManageWithBLOBs teaExamManageWithBLOB : teaExamManageWithBLOBs) {
List<String> list = new ArrayList<>();
Date startTime = teaExamManageWithBLOB.getStartTime();
Date endTime = teaExamManageWithBLOB.getEndTime();
TeaAndStudentExamExample teaAndStudentExamExample = new TeaAndStudentExamExample();
teaAndStudentExamExample.createCriteria().andExamManageIdEqualTo(teaExamManageWithBLOB.getExamManageId());
List<TeaAndStudentExam> teaAndStudentExams = teaAndStudentExamMapper.selectByExample(teaAndStudentExamExample);
for (TeaAndStudentExam teaAndStudentExam : teaAndStudentExams) {
String classId = teaAndStudentExam.getClassId();
String[] split = classId.split(",");
for (String s : split) {
list.add(s);
}
}
String s = "";
for (String id : list) {
StuClass stuClass = stuClassMapper.selectByPrimaryKey(id);
s += stuClass.getClassName() + ",";
}
// 去掉最后一个逗号
if (!s.isEmpty()) {
s = s.substring(0, s.length() - 1);
}
teaExamManageWithBLOB.setLogoAddress(s);
if (currentTime.before(startTime)) {
// 当前时间早于开始时间,表示“未开始”
teaExamManageWithBLOB.setExamDescription("未开始");
@ -136,19 +159,34 @@ public class TeaExamManageController {
@AnonymousAccess
@PostMapping("/updateExam")
@ApiOperation("考试管理--编辑")
public ResultEntity<HttpStatus> updateExam(@RequestBody(required = false) @ApiParam("ID必传") TeaExamManageWithBLOBs examManage) {
public ResultEntity<HttpStatus> updateExam(@ModelAttribute @ApiParam("ID必传") TeaExamManageDto examManage) {
if (StringUtils.isBlank(examManage.getExamManageId())) {
return new ResultEntity<HttpStatus>(HttpStatus.BAD_REQUEST, "缺少必须的主键ID");
return new ResultEntity<>(HttpStatus.BAD_REQUEST, "缺少必须的主键ID");
}
TeaExamManageWithBLOBs newData =new TeaExamManageWithBLOBs();
BeanUtils.copyProperties(examManage,newData);
TeaExamManageWithBLOBs teaExamManageWithBLOBs = teaExamManageMapper.selectByPrimaryKey(examManage.getExamManageId());
if (examManage.getFile()!=null){
String path = fileUtil.upload(examManage.getFile()); //设置新的图片路径
teaExamManageWithBLOBs.setLogoAddress(path);
}
teaExamManageMapper.updateByPrimaryKeyWithBLOBs(examManage);
teaExamManageMapper.updateByPrimaryKeyWithBLOBs(newData);
return new ResultEntity<HttpStatus>(HttpStatus.OK, "修改成功!");
}
@AnonymousAccess
@PostMapping("/selectExamById")
@ApiOperation("考试管理--预览")
public ResultEntity<TeaExamManage> selectExamById(@RequestParam String examId) {
return new ResultEntity<TeaExamManage>(teaExamManageMapper.selectByPrimaryKey(examId));
TeaAndStudentExamExample teaAndStudentExamExample = new TeaAndStudentExamExample();
teaAndStudentExamExample.createCriteria().andExamManageIdEqualTo(examId);
List<TeaAndStudentExam> teaAndStudentExams = teaAndStudentExamMapper.selectByExample(teaAndStudentExamExample);
TeaExamManageWithBLOBs teaExamManageWithBLOBs = teaExamManageMapper.selectByPrimaryKey(examId);
String classId = teaAndStudentExams.get(0).getClassId();
teaExamManageWithBLOBs.setManyAnswer(classId);
return new ResultEntity<TeaExamManage>(teaExamManageWithBLOBs);
}
@AnonymousAccess
@PostMapping("/deleteExam")
@ApiOperation("考试管理--删除")
@ -156,9 +194,10 @@ public class TeaExamManageController {
teaExamManageMapper.deleteByPrimaryKey(examId);
return new ResultEntity<HttpStatus>(HttpStatus.OK, "删除成功!");
}
@AnonymousAccess
@PostMapping("/reloadExamById")
@ApiOperation("考试管理--指定人重考")
@ApiOperation("考试管理--指定人重考") //Todo 待写
public ResultEntity reloadExamById(@RequestParam String examId) {
return null;
}

@ -0,0 +1,53 @@
package com.sztzjy.financial_bigdata.entity;
import io.swagger.annotations.ApiModelProperty;
/**
*
* @author xcj
* stu_learning_time
*/
public class StuLearningTime {
@ApiModelProperty("学习时长表ID")
private String id;
@ApiModelProperty("模块名称 实训演练模块/实战考核模块/理论考试模块/资源中心模块")
private String moduleName;
@ApiModelProperty("用户ID")
private String userId;
@ApiModelProperty("学习时长")
private String learningTime;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id == null ? null : id.trim();
}
public String getModuleName() {
return moduleName;
}
public void setModuleName(String moduleName) {
this.moduleName = moduleName == null ? null : moduleName.trim();
}
public String getUserId() {
return userId;
}
public void setUserId(String userId) {
this.userId = userId == null ? null : userId.trim();
}
public String getLearningTime() {
return learningTime;
}
public void setLearningTime(String learningTime) {
this.learningTime = learningTime == null ? null : learningTime.trim();
}
}

@ -0,0 +1,479 @@
package com.sztzjy.financial_bigdata.entity;
import java.util.ArrayList;
import java.util.List;
public class StuLearningTimeExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public StuLearningTimeExample() {
oredCriteria = new ArrayList<>();
}
public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause;
}
public String getOrderByClause() {
return orderByClause;
}
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
public boolean isDistinct() {
return distinct;
}
public List<Criteria> getOredCriteria() {
return oredCriteria;
}
public void or(Criteria criteria) {
oredCriteria.add(criteria);
}
public Criteria or() {
Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria);
return criteria;
}
public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(criteria);
}
return criteria;
}
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria();
return criteria;
}
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> getCriteria() {
return criteria;
}
protected void addCriterion(String condition) {
if (condition == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion(condition));
}
protected void addCriterion(String condition, Object value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value));
}
protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value1, value2));
}
public Criteria andIdIsNull() {
addCriterion("id is null");
return (Criteria) this;
}
public Criteria andIdIsNotNull() {
addCriterion("id is not null");
return (Criteria) this;
}
public Criteria andIdEqualTo(String value) {
addCriterion("id =", value, "id");
return (Criteria) this;
}
public Criteria andIdNotEqualTo(String value) {
addCriterion("id <>", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThan(String value) {
addCriterion("id >", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThanOrEqualTo(String value) {
addCriterion("id >=", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThan(String value) {
addCriterion("id <", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThanOrEqualTo(String value) {
addCriterion("id <=", value, "id");
return (Criteria) this;
}
public Criteria andIdLike(String value) {
addCriterion("id like", value, "id");
return (Criteria) this;
}
public Criteria andIdNotLike(String value) {
addCriterion("id not like", value, "id");
return (Criteria) this;
}
public Criteria andIdIn(List<String> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<String> values) {
addCriterion("id not in", values, "id");
return (Criteria) this;
}
public Criteria andIdBetween(String value1, String value2) {
addCriterion("id between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andIdNotBetween(String value1, String value2) {
addCriterion("id not between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andModuleNameIsNull() {
addCriterion("module_name is null");
return (Criteria) this;
}
public Criteria andModuleNameIsNotNull() {
addCriterion("module_name is not null");
return (Criteria) this;
}
public Criteria andModuleNameEqualTo(String value) {
addCriterion("module_name =", value, "moduleName");
return (Criteria) this;
}
public Criteria andModuleNameNotEqualTo(String value) {
addCriterion("module_name <>", value, "moduleName");
return (Criteria) this;
}
public Criteria andModuleNameGreaterThan(String value) {
addCriterion("module_name >", value, "moduleName");
return (Criteria) this;
}
public Criteria andModuleNameGreaterThanOrEqualTo(String value) {
addCriterion("module_name >=", value, "moduleName");
return (Criteria) this;
}
public Criteria andModuleNameLessThan(String value) {
addCriterion("module_name <", value, "moduleName");
return (Criteria) this;
}
public Criteria andModuleNameLessThanOrEqualTo(String value) {
addCriterion("module_name <=", value, "moduleName");
return (Criteria) this;
}
public Criteria andModuleNameLike(String value) {
addCriterion("module_name like", value, "moduleName");
return (Criteria) this;
}
public Criteria andModuleNameNotLike(String value) {
addCriterion("module_name not like", value, "moduleName");
return (Criteria) this;
}
public Criteria andModuleNameIn(List<String> values) {
addCriterion("module_name in", values, "moduleName");
return (Criteria) this;
}
public Criteria andModuleNameNotIn(List<String> values) {
addCriterion("module_name not in", values, "moduleName");
return (Criteria) this;
}
public Criteria andModuleNameBetween(String value1, String value2) {
addCriterion("module_name between", value1, value2, "moduleName");
return (Criteria) this;
}
public Criteria andModuleNameNotBetween(String value1, String value2) {
addCriterion("module_name not between", value1, value2, "moduleName");
return (Criteria) this;
}
public Criteria andUserIdIsNull() {
addCriterion("user_id is null");
return (Criteria) this;
}
public Criteria andUserIdIsNotNull() {
addCriterion("user_id is not null");
return (Criteria) this;
}
public Criteria andUserIdEqualTo(String value) {
addCriterion("user_id =", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdNotEqualTo(String value) {
addCriterion("user_id <>", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdGreaterThan(String value) {
addCriterion("user_id >", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdGreaterThanOrEqualTo(String value) {
addCriterion("user_id >=", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdLessThan(String value) {
addCriterion("user_id <", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdLessThanOrEqualTo(String value) {
addCriterion("user_id <=", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdLike(String value) {
addCriterion("user_id like", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdNotLike(String value) {
addCriterion("user_id not like", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdIn(List<String> values) {
addCriterion("user_id in", values, "userId");
return (Criteria) this;
}
public Criteria andUserIdNotIn(List<String> values) {
addCriterion("user_id not in", values, "userId");
return (Criteria) this;
}
public Criteria andUserIdBetween(String value1, String value2) {
addCriterion("user_id between", value1, value2, "userId");
return (Criteria) this;
}
public Criteria andUserIdNotBetween(String value1, String value2) {
addCriterion("user_id not between", value1, value2, "userId");
return (Criteria) this;
}
public Criteria andLearningTimeIsNull() {
addCriterion("learning_time is null");
return (Criteria) this;
}
public Criteria andLearningTimeIsNotNull() {
addCriterion("learning_time is not null");
return (Criteria) this;
}
public Criteria andLearningTimeEqualTo(String value) {
addCriterion("learning_time =", value, "learningTime");
return (Criteria) this;
}
public Criteria andLearningTimeNotEqualTo(String value) {
addCriterion("learning_time <>", value, "learningTime");
return (Criteria) this;
}
public Criteria andLearningTimeGreaterThan(String value) {
addCriterion("learning_time >", value, "learningTime");
return (Criteria) this;
}
public Criteria andLearningTimeGreaterThanOrEqualTo(String value) {
addCriterion("learning_time >=", value, "learningTime");
return (Criteria) this;
}
public Criteria andLearningTimeLessThan(String value) {
addCriterion("learning_time <", value, "learningTime");
return (Criteria) this;
}
public Criteria andLearningTimeLessThanOrEqualTo(String value) {
addCriterion("learning_time <=", value, "learningTime");
return (Criteria) this;
}
public Criteria andLearningTimeLike(String value) {
addCriterion("learning_time like", value, "learningTime");
return (Criteria) this;
}
public Criteria andLearningTimeNotLike(String value) {
addCriterion("learning_time not like", value, "learningTime");
return (Criteria) this;
}
public Criteria andLearningTimeIn(List<String> values) {
addCriterion("learning_time in", values, "learningTime");
return (Criteria) this;
}
public Criteria andLearningTimeNotIn(List<String> values) {
addCriterion("learning_time not in", values, "learningTime");
return (Criteria) this;
}
public Criteria andLearningTimeBetween(String value1, String value2) {
addCriterion("learning_time between", value1, value2, "learningTime");
return (Criteria) this;
}
public Criteria andLearningTimeNotBetween(String value1, String value2) {
addCriterion("learning_time not between", value1, value2, "learningTime");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {
protected Criteria() {
super();
}
}
public static class Criterion {
private String condition;
private Object value;
private Object secondValue;
private boolean noValue;
private boolean singleValue;
private boolean betweenValue;
private boolean listValue;
private String typeHandler;
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
protected Criterion(String condition, Object value, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.typeHandler = typeHandler;
if (value instanceof List<?>) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value) {
this(condition, value, null);
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
}
}

@ -3,6 +3,8 @@ package com.sztzjy.financial_bigdata.entity;
import java.math.BigDecimal;
import io.swagger.annotations.ApiModelProperty;
import org.apache.ibatis.annotations.Select;
/**
*
*

@ -0,0 +1,42 @@
package com.sztzjy.financial_bigdata.entity;
import io.swagger.annotations.ApiModelProperty;
/**
*
* @author xcj
* sys_resource_learning
*/
public class SysResourceLearning {
@ApiModelProperty("学习ID")
private String schoolId;
@ApiModelProperty("学习人数")
private Integer learningNum;
@ApiModelProperty("学习时长/单位分钟")
private Integer learningTime;
public String getSchoolId() {
return schoolId;
}
public void setSchoolId(String schoolId) {
this.schoolId = schoolId == null ? null : schoolId.trim();
}
public Integer getLearningNum() {
return learningNum;
}
public void setLearningNum(Integer learningNum) {
this.learningNum = learningNum;
}
public Integer getLearningTime() {
return learningTime;
}
public void setLearningTime(Integer learningTime) {
this.learningTime = learningTime;
}
}

@ -0,0 +1,389 @@
package com.sztzjy.financial_bigdata.entity;
import java.util.ArrayList;
import java.util.List;
public class SysResourceLearningExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public SysResourceLearningExample() {
oredCriteria = new ArrayList<>();
}
public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause;
}
public String getOrderByClause() {
return orderByClause;
}
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
public boolean isDistinct() {
return distinct;
}
public List<Criteria> getOredCriteria() {
return oredCriteria;
}
public void or(Criteria criteria) {
oredCriteria.add(criteria);
}
public Criteria or() {
Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria);
return criteria;
}
public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(criteria);
}
return criteria;
}
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria();
return criteria;
}
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> getCriteria() {
return criteria;
}
protected void addCriterion(String condition) {
if (condition == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion(condition));
}
protected void addCriterion(String condition, Object value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value));
}
protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value1, value2));
}
public Criteria andSchoolIdIsNull() {
addCriterion("school_id is null");
return (Criteria) this;
}
public Criteria andSchoolIdIsNotNull() {
addCriterion("school_id is not null");
return (Criteria) this;
}
public Criteria andSchoolIdEqualTo(String value) {
addCriterion("school_id =", value, "schoolId");
return (Criteria) this;
}
public Criteria andSchoolIdNotEqualTo(String value) {
addCriterion("school_id <>", value, "schoolId");
return (Criteria) this;
}
public Criteria andSchoolIdGreaterThan(String value) {
addCriterion("school_id >", value, "schoolId");
return (Criteria) this;
}
public Criteria andSchoolIdGreaterThanOrEqualTo(String value) {
addCriterion("school_id >=", value, "schoolId");
return (Criteria) this;
}
public Criteria andSchoolIdLessThan(String value) {
addCriterion("school_id <", value, "schoolId");
return (Criteria) this;
}
public Criteria andSchoolIdLessThanOrEqualTo(String value) {
addCriterion("school_id <=", value, "schoolId");
return (Criteria) this;
}
public Criteria andSchoolIdLike(String value) {
addCriterion("school_id like", value, "schoolId");
return (Criteria) this;
}
public Criteria andSchoolIdNotLike(String value) {
addCriterion("school_id not like", value, "schoolId");
return (Criteria) this;
}
public Criteria andSchoolIdIn(List<String> values) {
addCriterion("school_id in", values, "schoolId");
return (Criteria) this;
}
public Criteria andSchoolIdNotIn(List<String> values) {
addCriterion("school_id not in", values, "schoolId");
return (Criteria) this;
}
public Criteria andSchoolIdBetween(String value1, String value2) {
addCriterion("school_id between", value1, value2, "schoolId");
return (Criteria) this;
}
public Criteria andSchoolIdNotBetween(String value1, String value2) {
addCriterion("school_id not between", value1, value2, "schoolId");
return (Criteria) this;
}
public Criteria andLearningNumIsNull() {
addCriterion("learning_num is null");
return (Criteria) this;
}
public Criteria andLearningNumIsNotNull() {
addCriterion("learning_num is not null");
return (Criteria) this;
}
public Criteria andLearningNumEqualTo(Integer value) {
addCriterion("learning_num =", value, "learningNum");
return (Criteria) this;
}
public Criteria andLearningNumNotEqualTo(Integer value) {
addCriterion("learning_num <>", value, "learningNum");
return (Criteria) this;
}
public Criteria andLearningNumGreaterThan(Integer value) {
addCriterion("learning_num >", value, "learningNum");
return (Criteria) this;
}
public Criteria andLearningNumGreaterThanOrEqualTo(Integer value) {
addCriterion("learning_num >=", value, "learningNum");
return (Criteria) this;
}
public Criteria andLearningNumLessThan(Integer value) {
addCriterion("learning_num <", value, "learningNum");
return (Criteria) this;
}
public Criteria andLearningNumLessThanOrEqualTo(Integer value) {
addCriterion("learning_num <=", value, "learningNum");
return (Criteria) this;
}
public Criteria andLearningNumIn(List<Integer> values) {
addCriterion("learning_num in", values, "learningNum");
return (Criteria) this;
}
public Criteria andLearningNumNotIn(List<Integer> values) {
addCriterion("learning_num not in", values, "learningNum");
return (Criteria) this;
}
public Criteria andLearningNumBetween(Integer value1, Integer value2) {
addCriterion("learning_num between", value1, value2, "learningNum");
return (Criteria) this;
}
public Criteria andLearningNumNotBetween(Integer value1, Integer value2) {
addCriterion("learning_num not between", value1, value2, "learningNum");
return (Criteria) this;
}
public Criteria andLearningTimeIsNull() {
addCriterion("learning_time is null");
return (Criteria) this;
}
public Criteria andLearningTimeIsNotNull() {
addCriterion("learning_time is not null");
return (Criteria) this;
}
public Criteria andLearningTimeEqualTo(Integer value) {
addCriterion("learning_time =", value, "learningTime");
return (Criteria) this;
}
public Criteria andLearningTimeNotEqualTo(Integer value) {
addCriterion("learning_time <>", value, "learningTime");
return (Criteria) this;
}
public Criteria andLearningTimeGreaterThan(Integer value) {
addCriterion("learning_time >", value, "learningTime");
return (Criteria) this;
}
public Criteria andLearningTimeGreaterThanOrEqualTo(Integer value) {
addCriterion("learning_time >=", value, "learningTime");
return (Criteria) this;
}
public Criteria andLearningTimeLessThan(Integer value) {
addCriterion("learning_time <", value, "learningTime");
return (Criteria) this;
}
public Criteria andLearningTimeLessThanOrEqualTo(Integer value) {
addCriterion("learning_time <=", value, "learningTime");
return (Criteria) this;
}
public Criteria andLearningTimeIn(List<Integer> values) {
addCriterion("learning_time in", values, "learningTime");
return (Criteria) this;
}
public Criteria andLearningTimeNotIn(List<Integer> values) {
addCriterion("learning_time not in", values, "learningTime");
return (Criteria) this;
}
public Criteria andLearningTimeBetween(Integer value1, Integer value2) {
addCriterion("learning_time between", value1, value2, "learningTime");
return (Criteria) this;
}
public Criteria andLearningTimeNotBetween(Integer value1, Integer value2) {
addCriterion("learning_time not between", value1, value2, "learningTime");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {
protected Criteria() {
super();
}
}
public static class Criterion {
private String condition;
private Object value;
private Object secondValue;
private boolean noValue;
private boolean singleValue;
private boolean betweenValue;
private boolean listValue;
private String typeHandler;
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
protected Criterion(String condition, Object value, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.typeHandler = typeHandler;
if (value instanceof List<?>) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value) {
this(condition, value, null);
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
}
}

@ -29,6 +29,9 @@ public class TeaResourceCenter {
@ApiModelProperty("视频/文件")
private String type;
@ApiModelProperty("使用次数")
private Integer count;
public String getResourceId() {
return resourceId;
}
@ -84,4 +87,12 @@ public class TeaResourceCenter {
public void setType(String type) {
this.type = type == null ? null : type.trim();
}
public Integer getCount() {
return count;
}
public void setCount(Integer count) {
this.count = count;
}
}

@ -593,6 +593,66 @@ public class TeaResourceCenterExample {
addCriterion("type not between", value1, value2, "type");
return (Criteria) this;
}
public Criteria andCountIsNull() {
addCriterion("count is null");
return (Criteria) this;
}
public Criteria andCountIsNotNull() {
addCriterion("count is not null");
return (Criteria) this;
}
public Criteria andCountEqualTo(Integer value) {
addCriterion("count =", value, "count");
return (Criteria) this;
}
public Criteria andCountNotEqualTo(Integer value) {
addCriterion("count <>", value, "count");
return (Criteria) this;
}
public Criteria andCountGreaterThan(Integer value) {
addCriterion("count >", value, "count");
return (Criteria) this;
}
public Criteria andCountGreaterThanOrEqualTo(Integer value) {
addCriterion("count >=", value, "count");
return (Criteria) this;
}
public Criteria andCountLessThan(Integer value) {
addCriterion("count <", value, "count");
return (Criteria) this;
}
public Criteria andCountLessThanOrEqualTo(Integer value) {
addCriterion("count <=", value, "count");
return (Criteria) this;
}
public Criteria andCountIn(List<Integer> values) {
addCriterion("count in", values, "count");
return (Criteria) this;
}
public Criteria andCountNotIn(List<Integer> values) {
addCriterion("count not in", values, "count");
return (Criteria) this;
}
public Criteria andCountBetween(Integer value1, Integer value2) {
addCriterion("count between", value1, value2, "count");
return (Criteria) this;
}
public Criteria andCountNotBetween(Integer value1, Integer value2) {
addCriterion("count not between", value1, value2, "count");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {

@ -29,7 +29,7 @@ public class TrainingReport {
@ApiModelProperty("实训报告上传时间")
private Date uploadTime;
@ApiModelProperty("实训报告大小")
@ApiModelProperty("实训报告大小/单位MB")
private Integer reportSize;
@ApiModelProperty("教师评分")

@ -0,0 +1,20 @@
package com.sztzjy.financial_bigdata.entity.stu_dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @Author xcj
* @Date 2024/4/23
*/
@Data
@NoArgsConstructor
public class AllModuleProgressDto {
@ApiModelProperty("实训演练完成进度")
private double trainingProgress;
@ApiModelProperty("实战考核完成进度")
private double examProgress;
@ApiModelProperty("理论考试完成进度")
private double theoryProgress;
}

@ -0,0 +1,15 @@
package com.sztzjy.financial_bigdata.entity.stu_dto;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @Author xcj
* @Date 2024/4/24
*/
@Data
@NoArgsConstructor
public class ReceivingObject {
private String knowledgeNote;
private String trainingId;
}

@ -0,0 +1,64 @@
package com.sztzjy.financial_bigdata.entity.stu_dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.math.BigDecimal;
/**
* @Author xcj
* @Date 2024/4/23
*/
@Data
@NoArgsConstructor
public class StuTheoryIndexInfoDto {
@ApiModelProperty("实训演练--已学任务数量")
private Integer learnedModuleTaskNum;
@ApiModelProperty("实训演练--已学案例数量")
private Integer learnedTaskNumCase;
@ApiModelProperty("实训演练--学习时长")
private String learnedDuration;
@ApiModelProperty("实训演练--任务进度")
private Integer progress;
@ApiModelProperty("实战考核--参与考核次数")
private Integer taskNum;
@ApiModelProperty("实战考核--最近一次考核正确率")
private BigDecimal lastTaskAccuracy;
@ApiModelProperty("实战考核--最近一次考核排名")
private Integer lastTaskRank;
@ApiModelProperty("实战考核--正确率最低的考核案例")
private String lowestAccuracyTask;
@ApiModelProperty("理论考试--理论考试次数")
private Integer theoryNum;
@ApiModelProperty("理论考试--最近一次考试得分")
private BigDecimal lastTaskScore;
@ApiModelProperty("理论考试--最近一次考试排名")
private Integer theoryLastRank;
@ApiModelProperty("理论考试--历次考试总时长")
private Integer theoryTotalDuration;
@ApiModelProperty("资源学习--资源数量")
private Integer AssetNum;
@ApiModelProperty("资源学习--学习人数")
private Integer assetStudyNum;
@ApiModelProperty("资源学习--学习时长")
private Integer assetLearningTime;
@ApiModelProperty("资源学习--最受欢迎资源名称")
private String mostPopularName;
}

@ -0,0 +1,74 @@
package com.sztzjy.financial_bigdata.entity.stu_dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.math.BigDecimal;
/**
* @Author xcj
* @Date 2024/4/24
*/
@Data
@NoArgsConstructor
public class StuTrainingDto {
@ApiModelProperty("知识概要权重")
private BigDecimal knowledgeSummaryWeight;
@ApiModelProperty("资源学习权重")
private BigDecimal resourceLearningWeight;
@ApiModelProperty("学习测评权重")
private BigDecimal learningEvalWeight;
@ApiModelProperty("实验实训权重")
private BigDecimal expTrainingWeight;
@ApiModelProperty("实验报告权重")
private BigDecimal reportWeight;
@ApiModelProperty("知识概要默认计分规则")
private BigDecimal knowledgeSummaryDefaultRule;
@ApiModelProperty("资源学习默认计分规则")
private BigDecimal resourceLearningDefaultRule;
@ApiModelProperty("学习测评默认计分规则")
private BigDecimal learningEvalDefaultRule;
@ApiModelProperty("实验实训默认计分规则")
private BigDecimal expTrainingDefautRule;
@ApiModelProperty("知识概要得分")
private BigDecimal knowledgeSummaryScore;
@ApiModelProperty("资源学习得分")
private BigDecimal resourceLearningScore;
@ApiModelProperty("学习评测得分")
private BigDecimal learningEvalScore;
@ApiModelProperty("案例题学生得分")
private BigDecimal caseStuScore;
@ApiModelProperty("实验报告得分")
private BigDecimal reportScore;
@ApiModelProperty("知识概要完成情况")
private Integer knowledgeSummaryCompleteStatus;
@ApiModelProperty("资源学习完成情况")
private Integer resourceLearningCompleteStatus;
@ApiModelProperty("学习评测完成情况")
private Integer learningEvalCompleteStatus;
@ApiModelProperty("实验实训完成情况")
private Integer expTrainingCompleteStatus;
@ApiModelProperty("实验报告完成情况")
private String reportCompleteStatus;
}

@ -18,6 +18,10 @@ public class TeaExamManageDto {
@ApiModelProperty("考试管理ID")
private String examManageId;
@ApiModelProperty("学校ID")
private String schoolId;
@ApiModelProperty("用户ID")
private String userId;
@ApiModelProperty("考试名称")

@ -0,0 +1,32 @@
package com.sztzjy.financial_bigdata.mapper;
import com.sztzjy.financial_bigdata.entity.StuLearningTime;
import com.sztzjy.financial_bigdata.entity.StuLearningTimeExample;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface StuLearningTimeMapper {
long countByExample(StuLearningTimeExample example);
int deleteByExample(StuLearningTimeExample example);
int deleteByPrimaryKey(String id);
int insert(StuLearningTime record);
int insertSelective(StuLearningTime record);
List<StuLearningTime> selectByExample(StuLearningTimeExample example);
StuLearningTime selectByPrimaryKey(String id);
int updateByExampleSelective(@Param("record") StuLearningTime record, @Param("example") StuLearningTimeExample example);
int updateByExample(@Param("record") StuLearningTime record, @Param("example") StuLearningTimeExample example);
int updateByPrimaryKeySelective(StuLearningTime record);
int updateByPrimaryKey(StuLearningTime record);
}

@ -3,10 +3,15 @@ package com.sztzjy.financial_bigdata.mapper;
import com.sztzjy.financial_bigdata.entity.StuStudentExam;
import com.sztzjy.financial_bigdata.entity.StuStudentExamExample;
import com.sztzjy.financial_bigdata.entity.StuStudentExamWithBLOBs;
import java.math.BigDecimal;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
@Mapper
public interface StuStudentExamMapper {
long countByExample(StuStudentExamExample example);
@ -38,4 +43,7 @@ public interface StuStudentExamMapper {
int updateByPrimaryKey(StuStudentExam record);
int selectLastExamRank(@Param("userId") String userId);
@Select("SELECT se.total_score,te.exam_name FROM stu_student_exam se JOIN tea_exam_manage te on se.exam_manage_id = te.exam_manage_id WHERE se.userid =#{userID} ORDER BY end_time ASC")
List<Map<String, BigDecimal>> getTestScoresLineChart(@Param("userId") String userId);
}

@ -7,6 +7,8 @@ import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
@Mapper
public interface StuTheoryExamMapper {
long countByExample(StuTheoryExamExample example);
@ -36,4 +38,7 @@ public interface StuTheoryExamMapper {
int updateByPrimaryKeyWithBLOBs(StuTheoryExamWithBLOBs record);
int updateByPrimaryKey(StuTheoryExam record);
@Select("select count(*) from stu_theory_exam where user_id = #{userId} ")
int selectByUserID(@Param("userId") String userId);
}

@ -2,10 +2,12 @@ package com.sztzjy.financial_bigdata.mapper;
import com.sztzjy.financial_bigdata.entity.StuTheoryRecord;
import com.sztzjy.financial_bigdata.entity.StuTheoryRecordExample;
import java.util.List;
import com.sztzjy.financial_bigdata.entity.stu_dto.StuTheoryIndexInfoDto;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@Mapper
public interface StuTheoryRecordMapper {
long countByExample(StuTheoryRecordExample example);
@ -29,4 +31,6 @@ public interface StuTheoryRecordMapper {
int updateByPrimaryKeySelective(StuTheoryRecord record);
int updateByPrimaryKey(StuTheoryRecord record);
StuTheoryIndexInfoDto selectTheoryInfo(@Param("userId") String userId);
}

@ -45,8 +45,8 @@ public interface StuTrainingMapper {
@Select("select count(progress) FROM stu_training WHERE progress = 1 and user_id = #{userId}")
int selectProgressFinish(@Param("userId") String userId);
@Select("SELECT COUNT(progress) FROM stu_training WHERE user_id = '8' AND (exp_training_score <> 0 AND exp_training_score IS NOT NULL)")
BigDecimal selectTrainingProgressFinish(@Param("userId") String userId);
@Select("SELECT COUNT(progress) FROM stu_training WHERE user_id = #{userId} AND (exp_training_score <> 0 AND exp_training_score IS NOT NULL)")
int selectTrainingProgressFinish(@Param("userId") String userId);
List<TrainingDto> selectTrainingByIds(@Param("ids") List<String> ids);
}

@ -0,0 +1,32 @@
package com.sztzjy.financial_bigdata.mapper;
import com.sztzjy.financial_bigdata.entity.SysResourceLearning;
import com.sztzjy.financial_bigdata.entity.SysResourceLearningExample;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface SysResourceLearningMapper {
long countByExample(SysResourceLearningExample example);
int deleteByExample(SysResourceLearningExample example);
int deleteByPrimaryKey(String schoolId);
int insert(SysResourceLearning record);
int insertSelective(SysResourceLearning record);
List<SysResourceLearning> selectByExample(SysResourceLearningExample example);
SysResourceLearning selectByPrimaryKey(String schoolId);
int updateByExampleSelective(@Param("record") SysResourceLearning record, @Param("example") SysResourceLearningExample example);
int updateByExample(@Param("record") SysResourceLearning record, @Param("example") SysResourceLearningExample example);
int updateByPrimaryKeySelective(SysResourceLearning record);
int updateByPrimaryKey(SysResourceLearning record);
}

@ -7,6 +7,8 @@ import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
@Mapper
public interface TeaExamManageMapper {
long countByExample(TeaExamManageExample example);
@ -38,4 +40,8 @@ public interface TeaExamManageMapper {
int updateByPrimaryKey(TeaExamManage record);
void selectByIds(List<String> ids);
@Select("select * from tea_exam_manage where user_id = #{userId}")
List<TeaExamManageWithBLOBs> selectByUserId(@Param("userId") String userId);
}

@ -2,10 +2,15 @@ package com.sztzjy.financial_bigdata.mapper;
import com.sztzjy.financial_bigdata.entity.TeaResourceCenter;
import com.sztzjy.financial_bigdata.entity.TeaResourceCenterExample;
import java.util.List;
import java.util.Map;
import io.swagger.models.auth.In;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
@Mapper
public interface TeaResourceCenterMapper {
long countByExample(TeaResourceCenterExample example);
@ -29,4 +34,10 @@ public interface TeaResourceCenterMapper {
int updateByPrimaryKeySelective(TeaResourceCenter record);
int updateByPrimaryKey(TeaResourceCenter record);
@Select("SELECT count(*) FROM tea_resource_center")
int selectResourceNum();
@Select("SELECT resource_name FROM tea_resource_center ORDER BY count DESC LIMIT 1 ")
String getMostPopularName();
}

@ -1,9 +1,11 @@
package com.sztzjy.financial_bigdata.service.stu;
import com.sztzjy.financial_bigdata.entity.stu_dto.StuTheoryIndexInfoDto;
/**
* @Author xcj
* @Date 2024/4/22
*/
public interface StuIndexService {
void learnDataCountAnalysis(String userId,String schoolId);
StuTheoryIndexInfoDto learnDataCountAnalysis(String userId, String schoolId);
}

@ -1,18 +1,13 @@
package com.sztzjy.financial_bigdata.service.stu.impl;
import com.sztzjy.financial_bigdata.entity.StuStudentExamExample;
import com.sztzjy.financial_bigdata.entity.StuStudentExamWithBLOBs;
import com.sztzjy.financial_bigdata.entity.StuTrainingExample;
import com.sztzjy.financial_bigdata.mapper.StuStudentExamMapper;
import com.sztzjy.financial_bigdata.mapper.StuTrainingMapper;
import com.sztzjy.financial_bigdata.mapper.SysCourseChapterMapper;
import com.sztzjy.financial_bigdata.mapper.TeaExamManageMapper;
import com.sztzjy.financial_bigdata.config.Constant;
import com.sztzjy.financial_bigdata.entity.*;
import com.sztzjy.financial_bigdata.entity.stu_dto.StuTheoryIndexInfoDto;
import com.sztzjy.financial_bigdata.mapper.*;
import com.sztzjy.financial_bigdata.service.stu.StuIndexService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
/**
@ -29,15 +24,40 @@ public class StuIndexServiceImpl implements StuIndexService {
StuStudentExamMapper studentExamMapper;
@Autowired
TeaExamManageMapper teaExamManageMapper;
@Autowired
StuTheoryRecordMapper stuTheoryRecordMapper;
@Autowired
TeaResourceCenterMapper teaResourceCenterMapper;
@Autowired
StuLearningTimeMapper stuLearningTimeMapper;
@Autowired
SysResourceLearningMapper sysResourceLearningMapper;
@Override
public void learnDataCountAnalysis(String userId, String schoolId) {
public StuTheoryIndexInfoDto learnDataCountAnalysis(String userId, String schoolId) {
StuTheoryIndexInfoDto stuTheoryIndexInfoDto = new StuTheoryIndexInfoDto();
//实训演练学习数据
int progressFinishNum = stuTrainingMapper.selectProgressFinish(userId); //已学任务数量
BigDecimal trainingNum = stuTrainingMapper.selectTrainingProgressFinish(userId); //已学案例数量
//TODO 学习时长
stuTheoryIndexInfoDto.setLearnedModuleTaskNum(progressFinishNum);
int trainingNum = stuTrainingMapper.selectTrainingProgressFinish(userId); //已学案例数量
stuTheoryIndexInfoDto.setLearnedTaskNumCase(trainingNum);
StuLearningTimeExample stuLearningTimeExample = new StuLearningTimeExample();
stuLearningTimeExample.createCriteria().andUserIdEqualTo(userId).andModuleNameEqualTo(Constant.TRAINING);
List<StuLearningTime> stuLearningTimes = stuLearningTimeMapper.selectByExample(stuLearningTimeExample);
if (!stuLearningTimes.isEmpty()) {
String learningTime = stuLearningTimes.get(0).getLearningTime();
stuTheoryIndexInfoDto.setLearnedDuration(learningTime); //学习时长
}
int totalChapterNum = sysCourseChapterMapper.selectChapterBySchoolId(schoolId); //总章节数量
int finalProgress = progressFinishNum / totalChapterNum; //任务进度 = 已学数量/总章节数量
if (progressFinishNum != 0 && totalChapterNum != 0) {
int finalProgress = progressFinishNum / totalChapterNum; //任务进度 = 已学数量/总章节数量
stuTheoryIndexInfoDto.setProgress(finalProgress);
}
//实战考核学习数据
StuStudentExamExample example = new StuStudentExamExample();
@ -45,10 +65,46 @@ public class StuIndexServiceImpl implements StuIndexService {
List<StuStudentExamWithBLOBs> stuStudentExamWithBLOBs = studentExamMapper.selectByExampleWithBLOBs(example);
int examSize = stuStudentExamWithBLOBs.size(); //参与考核次数
//最近一次考核正确率:
stuTheoryIndexInfoDto.setTaskNum(examSize);
//TODO 最近一次考核正确率
int lastRank = studentExamMapper.selectLastExamRank(userId); // 最近一次考核排名
stuTheoryIndexInfoDto.setLastTaskRank(lastRank);
//TODO 正确率最低的考核案例
//理论考试数据
StuTheoryIndexInfoDto theoryIndexInfoDto = stuTheoryRecordMapper.selectTheoryInfo(userId);
if (theoryIndexInfoDto != null) {
if (theoryIndexInfoDto.getTheoryNum() != null) {
stuTheoryIndexInfoDto.setTheoryNum(theoryIndexInfoDto.getTheoryNum()); //理论考试次数
}
if (theoryIndexInfoDto.getLastTaskScore() != null) {
stuTheoryIndexInfoDto.setLastTaskScore(theoryIndexInfoDto.getLastTaskScore()); //最近一次考试得分
}
if (theoryIndexInfoDto.getTheoryLastRank() != null) {
stuTheoryIndexInfoDto.setTheoryLastRank(theoryIndexInfoDto.getTheoryLastRank());//最近一次考试排名
}
if (theoryIndexInfoDto.getTheoryTotalDuration() != null) {
stuTheoryIndexInfoDto.setTheoryTotalDuration(theoryIndexInfoDto.getTheoryTotalDuration()); //历次考试总时长
}
}
//资源学习数据
int num = teaResourceCenterMapper.selectResourceNum();
stuTheoryIndexInfoDto.setAssetNum(num); //资源数量
SysResourceLearning sysResourceLearning = sysResourceLearningMapper.selectByPrimaryKey(schoolId);
if (sysResourceLearning!=null) {
Integer learningNum = sysResourceLearning.getLearningNum();
Integer learningTime = sysResourceLearning.getLearningTime();
stuTheoryIndexInfoDto.setAssetStudyNum(learningNum); //学习人数
stuTheoryIndexInfoDto.setAssetLearningTime(learningTime); //学习时长
}
int lastRank = studentExamMapper.selectLastExamRank(userId); // 最近一次考核排名:
String name = teaResourceCenterMapper.getMostPopularName();
stuTheoryIndexInfoDto.setMostPopularName(name); //最受欢迎资源名称
//正确率最低的考核案例:
return stuTheoryIndexInfoDto;
}
}

@ -62,14 +62,11 @@ public class TeaExamManageServiceImpl implements ITeaExamManageService {
}
String examManageId = IdUtil.randomUUID();
//将班级ID新增到中间表
String[] split = teaExamManagedto.getClassId().split(",");
for (String s : split) {
TeaAndStudentExam teaAndStudentExam = new TeaAndStudentExam();
teaAndStudentExam.setExamManageId(examManageId);
teaAndStudentExam.setClassId(s);
teaAndStudentExam.setId(IdUtil.randomUUID());
teaAndStudentExamMapper.insert(teaAndStudentExam);
}
TeaAndStudentExam teaAndStudentExam = new TeaAndStudentExam();
teaAndStudentExam.setExamManageId(examManageId);
teaAndStudentExam.setClassId(teaExamManagedto.getClassId());
teaAndStudentExam.setId(IdUtil.randomUUID());
teaAndStudentExamMapper.insert(teaAndStudentExam);
teaExamManageWithBLOBs.setExamManageId(examManageId);
teaExamManageMapper.insert(teaExamManageWithBLOBs);
return new ResultEntity<>(HttpStatus.OK, "添加考试成功!");

@ -0,0 +1,48 @@
package com.sztzjy.financial_bigdata.util;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.xhtmlrenderer.pdf.ITextFontResolver;
import org.xhtmlrenderer.pdf.ITextRenderer;
import java.io.FileOutputStream;
/**
* pdf
* @author hyy
*/
public class PdfUtil {
private static final Logger logger = LoggerFactory.getLogger(PdfUtil.class);
/**
* flying-saucer-pdf-itext5
* html pdf
* @param content css
* @return pdf
*/
public static String htmlStringToPdf(String content, FileOutputStream fileOutputStream) {
content = content.replace("&nbsp;","&#160;")
.replace("&ldquo;","\"")
.replace("&rdquo;","\"");
// String path = System.getProperty("user.dir") + "//" + name;
try{
ITextRenderer renderer = new ITextRenderer();
renderer.setDocumentFromString("<html><body style=\"font-family: SimSun\">" + content + "</body></html>");
//设置字符集(宋体),此处必须与模板中的<body style="font-family: SimSun">一致,区分大小写,不能写成汉字"宋体"
ITextFontResolver fontResolver = renderer.getFontResolver();
fontResolver.addFont("simsun.ttf", com.lowagie.text.pdf.BaseFont.IDENTITY_H, com.lowagie.text.pdf.BaseFont.NOT_EMBEDDED);
//展现和输出pdf
renderer.layout();
renderer.createPDF(fileOutputStream);
renderer.finishPDF();
return "success";
} catch (Exception e) {
logger.error("生成pdf发生异常",e);
return null;
}
}
}

@ -11,8 +11,7 @@ spring:
# 文件存储
file:
type: local
path: /usr/local/tianzeProject/financial_bigdata/uploadFile
path: D:/test
timer:
enable: false

@ -13,6 +13,7 @@
<property name="suppressDate" value="false"/>
<!-- 是否添加数据表中字段的注释 true false:否 -->
<property name="addRemarkComments" value="true"/>
<property name="nullCatalogMeansCurrent" value="true"/>
</commentGenerator>
<!-- 配置数据库连接信息 -->
@ -42,7 +43,7 @@
<!-- <table tableName="stu_class" domainObjectName="StuClass" />-->
<!-- <table tableName="stu_error" domainObjectName="StuError" />-->
<!-- <table tableName="stu_exam_case" domainObjectName="StuExamCase" />-->
<table tableName="stu_student_exam" domainObjectName="StuStudentExam" />
<!-- <table tableName="stu_student_exam" domainObjectName="StuStudentExam" />-->
<!-- <table tableName="stu_theory_exam" domainObjectName="StuTheoryExam" />-->
<!-- <table tableName="stu_theory_record" domainObjectName="StuTheoryRecord" />-->
<!-- <table tableName="stu_training" domainObjectName="StuTraining" />-->
@ -54,7 +55,7 @@
<!-- <table tableName="sys_objective_question" domainObjectName="SysObjectiveQuestion" />-->
<!-- <table tableName="tea_exam_manage" domainObjectName="TeaExamManage" />-->
<!-- <table tableName="tea_learning_statistics" domainObjectName="TeaLearningStatistics" />-->
<!-- <table tableName="stu_training_step_record" domainObjectName="StuTrainingStepRecord" />-->
<table tableName="tea_resource_center" domainObjectName="TeaResourceCenter" />
<!-- <table tableName="training_report" domainObjectName="TrainingReport" />-->
</context>

Binary file not shown.

@ -0,0 +1,196 @@
<?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.StuLearningTimeMapper">
<resultMap id="BaseResultMap" type="com.sztzjy.financial_bigdata.entity.StuLearningTime">
<id column="id" jdbcType="VARCHAR" property="id" />
<result column="module_name" jdbcType="VARCHAR" property="moduleName" />
<result column="user_id" jdbcType="VARCHAR" property="userId" />
<result column="learning_time" jdbcType="VARCHAR" property="learningTime" />
</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>
</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>
</where>
</sql>
<sql id="Base_Column_List">
id, module_name, user_id, learning_time
</sql>
<select id="selectByExample" parameterType="com.sztzjy.financial_bigdata.entity.StuLearningTimeExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from stu_learning_time
<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 stu_learning_time
where id = #{id,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from stu_learning_time
where id = #{id,jdbcType=VARCHAR}
</delete>
<delete id="deleteByExample" parameterType="com.sztzjy.financial_bigdata.entity.StuLearningTimeExample">
delete from stu_learning_time
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.sztzjy.financial_bigdata.entity.StuLearningTime">
insert into stu_learning_time (id, module_name, user_id,
learning_time)
values (#{id,jdbcType=VARCHAR}, #{moduleName,jdbcType=VARCHAR}, #{userId,jdbcType=VARCHAR},
#{learningTime,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.sztzjy.financial_bigdata.entity.StuLearningTime">
insert into stu_learning_time
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="moduleName != null">
module_name,
</if>
<if test="userId != null">
user_id,
</if>
<if test="learningTime != null">
learning_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=VARCHAR},
</if>
<if test="moduleName != null">
#{moduleName,jdbcType=VARCHAR},
</if>
<if test="userId != null">
#{userId,jdbcType=VARCHAR},
</if>
<if test="learningTime != null">
#{learningTime,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.sztzjy.financial_bigdata.entity.StuLearningTimeExample" resultType="java.lang.Long">
select count(*) from stu_learning_time
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update stu_learning_time
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=VARCHAR},
</if>
<if test="record.moduleName != null">
module_name = #{record.moduleName,jdbcType=VARCHAR},
</if>
<if test="record.userId != null">
user_id = #{record.userId,jdbcType=VARCHAR},
</if>
<if test="record.learningTime != null">
learning_time = #{record.learningTime,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update stu_learning_time
set id = #{record.id,jdbcType=VARCHAR},
module_name = #{record.moduleName,jdbcType=VARCHAR},
user_id = #{record.userId,jdbcType=VARCHAR},
learning_time = #{record.learningTime,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.sztzjy.financial_bigdata.entity.StuLearningTime">
update stu_learning_time
<set>
<if test="moduleName != null">
module_name = #{moduleName,jdbcType=VARCHAR},
</if>
<if test="userId != null">
user_id = #{userId,jdbcType=VARCHAR},
</if>
<if test="learningTime != null">
learning_time = #{learningTime,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="com.sztzjy.financial_bigdata.entity.StuLearningTime">
update stu_learning_time
set module_name = #{moduleName,jdbcType=VARCHAR},
user_id = #{userId,jdbcType=VARCHAR},
learning_time = #{learningTime,jdbcType=VARCHAR}
where id = #{id,jdbcType=VARCHAR}
</update>
</mapper>

@ -370,4 +370,27 @@
start_time = #{startTime,jdbcType=TIMESTAMP}
where student_exam_id = #{studentExamId,jdbcType=VARCHAR}
</update>
<select id="selectLastExamRank" parameterType="java.lang.String" resultType="java.lang.Integer">
SELECT COUNT(*) AS exam_rank
FROM stu_student_exam se
JOIN tea_exam_manage te ON se.exam_manage_id = te.exam_manage_id
WHERE se.exam_manage_id = (
SELECT exam_manage_id
FROM stu_student_exam
WHERE userid = #{userId} AND te.end_time &lt;= NOW()
ORDER BY te.end_time DESC
LIMIT 1
)
AND se.total_score IS NOT NULL
AND se.total_score >= (
SELECT total_score
FROM stu_student_exam
WHERE userid = #{userId} AND te.end_time &lt;= NOW()
ORDER BY te.end_time DESC
LIMIT 1
);
</select>
</mapper>

@ -72,7 +72,7 @@
</where>
</sql>
<sql id="Base_Column_List">
user_id, school_id, class_id, name, student_id, exam_count, highest_score, lowest_score,
user_id, school_id, class_id, name, student_id, exam_count, highest_score, lowest_score,
total_duration, average_score
</sql>
<select id="selectByExample" parameterType="com.sztzjy.financial_bigdata.entity.StuTheoryRecordExample" resultMap="BaseResultMap">
@ -90,7 +90,7 @@
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
select
select
<include refid="Base_Column_List" />
from stu_theory_record
where user_id = #{userId,jdbcType=VARCHAR}
@ -106,13 +106,13 @@
</if>
</delete>
<insert id="insert" parameterType="com.sztzjy.financial_bigdata.entity.StuTheoryRecord">
insert into stu_theory_record (user_id, school_id, class_id,
name, student_id, exam_count,
highest_score, lowest_score, total_duration,
insert into stu_theory_record (user_id, school_id, class_id,
name, student_id, exam_count,
highest_score, lowest_score, total_duration,
average_score)
values (#{userId,jdbcType=VARCHAR}, #{schoolId,jdbcType=VARCHAR}, #{classId,jdbcType=VARCHAR},
#{name,jdbcType=VARCHAR}, #{studentId,jdbcType=VARCHAR}, #{examCount,jdbcType=INTEGER},
#{highestScore,jdbcType=DECIMAL}, #{lowestScore,jdbcType=DECIMAL}, #{totalDuration,jdbcType=INTEGER},
values (#{userId,jdbcType=VARCHAR}, #{schoolId,jdbcType=VARCHAR}, #{classId,jdbcType=VARCHAR},
#{name,jdbcType=VARCHAR}, #{studentId,jdbcType=VARCHAR}, #{examCount,jdbcType=INTEGER},
#{highestScore,jdbcType=DECIMAL}, #{lowestScore,jdbcType=DECIMAL}, #{totalDuration,jdbcType=INTEGER},
#{averageScore,jdbcType=DECIMAL})
</insert>
<insert id="insertSelective" parameterType="com.sztzjy.financial_bigdata.entity.StuTheoryRecord">
@ -288,4 +288,39 @@
average_score = #{averageScore,jdbcType=DECIMAL}
where user_id = #{userId,jdbcType=VARCHAR}
</update>
<resultMap id="DtoMap" type="com.sztzjy.financial_bigdata.entity.stu_dto.StuTheoryIndexInfoDto">
<result column="score" jdbcType="DECIMAL" property="lastTaskScore" />
<result column="total_duration" jdbcType="INTEGER" property="theoryTotalDuration" />
<result column="exam_count" jdbcType="INTEGER" property="theoryNum" />
<result column="rank" jdbcType="INTEGER" property="theoryLastRank" />
</resultMap>
<select id="selectTheoryInfo" parameterType="com.sztzjy.financial_bigdata.entity.stu_dto.StuTheoryIndexInfoDto" resultMap="DtoMap">
SELECT ste.score, str.total_duration,str.exam_count, (
SELECT COUNT(*) AS `rank`
FROM stu_theory_exam
WHERE accuracy >= (
SELECT accuracy
FROM stu_theory_exam
WHERE user_id = 4
ORDER BY exam_time DESC
LIMIT 1
)
) AS `rank`
FROM stu_theory_exam ste
JOIN stu_theory_record str ON ste.user_id = str.user_id
WHERE ste.user_id = 4
AND ste.answered = 1
AND ste.accuracy >= (
SELECT accuracy
FROM stu_theory_exam
WHERE user_id = 4
ORDER BY exam_time DESC
LIMIT 1
)
ORDER BY ste.exam_time DESC
LIMIT 1;
</select>
</mapper>

@ -0,0 +1,181 @@
<?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.SysResourceLearningMapper">
<resultMap id="BaseResultMap" type="com.sztzjy.financial_bigdata.entity.SysResourceLearning">
<id column="school_id" jdbcType="VARCHAR" property="schoolId" />
<result column="learning_num" jdbcType="INTEGER" property="learningNum" />
<result column="learning_time" jdbcType="INTEGER" property="learningTime" />
</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>
</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>
</where>
</sql>
<sql id="Base_Column_List">
school_id, learning_num, learning_time
</sql>
<select id="selectByExample" parameterType="com.sztzjy.financial_bigdata.entity.SysResourceLearningExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from sys_resource_learning
<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_resource_learning
where school_id = #{schoolId,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from sys_resource_learning
where school_id = #{schoolId,jdbcType=VARCHAR}
</delete>
<delete id="deleteByExample" parameterType="com.sztzjy.financial_bigdata.entity.SysResourceLearningExample">
delete from sys_resource_learning
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.sztzjy.financial_bigdata.entity.SysResourceLearning">
insert into sys_resource_learning (school_id, learning_num, learning_time
)
values (#{schoolId,jdbcType=VARCHAR}, #{learningNum,jdbcType=INTEGER}, #{learningTime,jdbcType=INTEGER}
)
</insert>
<insert id="insertSelective" parameterType="com.sztzjy.financial_bigdata.entity.SysResourceLearning">
insert into sys_resource_learning
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="schoolId != null">
school_id,
</if>
<if test="learningNum != null">
learning_num,
</if>
<if test="learningTime != null">
learning_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="schoolId != null">
#{schoolId,jdbcType=VARCHAR},
</if>
<if test="learningNum != null">
#{learningNum,jdbcType=INTEGER},
</if>
<if test="learningTime != null">
#{learningTime,jdbcType=INTEGER},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.sztzjy.financial_bigdata.entity.SysResourceLearningExample" resultType="java.lang.Long">
select count(*) from sys_resource_learning
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update sys_resource_learning
<set>
<if test="record.schoolId != null">
school_id = #{record.schoolId,jdbcType=VARCHAR},
</if>
<if test="record.learningNum != null">
learning_num = #{record.learningNum,jdbcType=INTEGER},
</if>
<if test="record.learningTime != null">
learning_time = #{record.learningTime,jdbcType=INTEGER},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update sys_resource_learning
set school_id = #{record.schoolId,jdbcType=VARCHAR},
learning_num = #{record.learningNum,jdbcType=INTEGER},
learning_time = #{record.learningTime,jdbcType=INTEGER}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.sztzjy.financial_bigdata.entity.SysResourceLearning">
update sys_resource_learning
<set>
<if test="learningNum != null">
learning_num = #{learningNum,jdbcType=INTEGER},
</if>
<if test="learningTime != null">
learning_time = #{learningTime,jdbcType=INTEGER},
</if>
</set>
where school_id = #{schoolId,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="com.sztzjy.financial_bigdata.entity.SysResourceLearning">
update sys_resource_learning
set learning_num = #{learningNum,jdbcType=INTEGER},
learning_time = #{learningTime,jdbcType=INTEGER}
where school_id = #{schoolId,jdbcType=VARCHAR}
</update>
</mapper>

@ -9,6 +9,7 @@
<result column="resource_name" jdbcType="VARCHAR" property="resourceName" />
<result column="school_id" jdbcType="VARCHAR" property="schoolId" />
<result column="type" jdbcType="VARCHAR" property="type" />
<result column="count" jdbcType="INTEGER" property="count" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
@ -69,7 +70,8 @@
</where>
</sql>
<sql id="Base_Column_List">
resource_id, course_id, resource_url, image_url, resource_name, school_id, type
resource_id, course_id, resource_url, image_url, resource_name, school_id, type,
count
</sql>
<select id="selectByExample" parameterType="com.sztzjy.financial_bigdata.entity.TeaResourceCenterExample" resultMap="BaseResultMap">
select
@ -104,10 +106,10 @@
<insert id="insert" parameterType="com.sztzjy.financial_bigdata.entity.TeaResourceCenter">
insert into tea_resource_center (resource_id, course_id, resource_url,
image_url, resource_name, school_id,
type)
type, count)
values (#{resourceId,jdbcType=VARCHAR}, #{courseId,jdbcType=VARCHAR}, #{resourceUrl,jdbcType=VARCHAR},
#{imageUrl,jdbcType=VARCHAR}, #{resourceName,jdbcType=VARCHAR}, #{schoolId,jdbcType=VARCHAR},
#{type,jdbcType=VARCHAR})
#{type,jdbcType=VARCHAR}, #{count,jdbcType=INTEGER})
</insert>
<insert id="insertSelective" parameterType="com.sztzjy.financial_bigdata.entity.TeaResourceCenter">
insert into tea_resource_center
@ -133,6 +135,9 @@
<if test="type != null">
type,
</if>
<if test="count != null">
count,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="resourceId != null">
@ -156,6 +161,9 @@
<if test="type != null">
#{type,jdbcType=VARCHAR},
</if>
<if test="count != null">
#{count,jdbcType=INTEGER},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.sztzjy.financial_bigdata.entity.TeaResourceCenterExample" resultType="java.lang.Long">
@ -188,6 +196,9 @@
<if test="record.type != null">
type = #{record.type,jdbcType=VARCHAR},
</if>
<if test="record.count != null">
count = #{record.count,jdbcType=INTEGER},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
@ -201,7 +212,8 @@
image_url = #{record.imageUrl,jdbcType=VARCHAR},
resource_name = #{record.resourceName,jdbcType=VARCHAR},
school_id = #{record.schoolId,jdbcType=VARCHAR},
type = #{record.type,jdbcType=VARCHAR}
type = #{record.type,jdbcType=VARCHAR},
count = #{record.count,jdbcType=INTEGER}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
@ -227,6 +239,9 @@
<if test="type != null">
type = #{type,jdbcType=VARCHAR},
</if>
<if test="count != null">
count = #{count,jdbcType=INTEGER},
</if>
</set>
where resource_id = #{resourceId,jdbcType=VARCHAR}
</update>
@ -237,7 +252,8 @@
image_url = #{imageUrl,jdbcType=VARCHAR},
resource_name = #{resourceName,jdbcType=VARCHAR},
school_id = #{schoolId,jdbcType=VARCHAR},
type = #{type,jdbcType=VARCHAR}
type = #{type,jdbcType=VARCHAR},
count = #{count,jdbcType=INTEGER}
where resource_id = #{resourceId,jdbcType=VARCHAR}
</update>
</mapper>
Loading…
Cancel
Save