新增部分接口
parent
3cd964188a
commit
0faa52059d
@ -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,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);
|
||||
}
|
||||
}
|
||||
}
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
@ -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;
|
||||
|
||||
|
||||
}
|
@ -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);
|
||||
}
|
@ -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);
|
||||
}
|
@ -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);
|
||||
}
|
||||
|
@ -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(" "," ")
|
||||
.replace("“","\"")
|
||||
.replace("”","\"");
|
||||
// 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;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
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>
|
@ -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>
|
Loading…
Reference in New Issue