newBigdata
yz 10 months ago
parent a017a8f2ce
commit fc935e0e6a

@ -74,6 +74,7 @@ public class CourseController {
list.add(Constant.BUILT_IN_SCHOOL_ID); list.add(Constant.BUILT_IN_SCHOOL_ID);
criteria.andSchoolIdIn(list); criteria.andSchoolIdIn(list);
} }
example.setOrderByClause("sequence asc");
List<SysCourse> courseList = courseMapper.selectByExample(example); List<SysCourse> courseList = courseMapper.selectByExample(example);
return new ResultEntity(HttpStatus.OK,"展示成功",courseList); return new ResultEntity(HttpStatus.OK,"展示成功",courseList);
} }
@ -85,6 +86,7 @@ public class CourseController {
public ResultEntity<List<SysCourseChapter>> selectChapterByCourseId(@RequestParam String courseId){ public ResultEntity<List<SysCourseChapter>> selectChapterByCourseId(@RequestParam String courseId){
SysCourseChapterExample example = new SysCourseChapterExample(); SysCourseChapterExample example = new SysCourseChapterExample();
example.createCriteria().andCourseIdEqualTo(courseId); example.createCriteria().andCourseIdEqualTo(courseId);
example.setOrderByClause("sequence asc");
List<SysCourseChapter> chapterList = chapterMapper.selectByExample(example); List<SysCourseChapter> chapterList = chapterMapper.selectByExample(example);
return new ResultEntity(HttpStatus.OK, "展示成功", chapterList); return new ResultEntity(HttpStatus.OK, "展示成功", chapterList);
} }
@ -119,7 +121,7 @@ public class CourseController {
//增加章节 //增加章节
@GetMapping("insertChapter") @PostMapping("insertChapter")
@ApiOperation("增加章节") @ApiOperation("增加章节")
@AnonymousAccess @AnonymousAccess
public ResultEntity insertChapter(@ApiParam("新增课程对象") @RequestBody SysCourseChapter chapter,@RequestParam String schoolId) { public ResultEntity insertChapter(@ApiParam("新增课程对象") @RequestBody SysCourseChapter chapter,@RequestParam String schoolId) {
@ -150,7 +152,7 @@ public class CourseController {
@AnonymousAccess @AnonymousAccess
public ResultEntity deleteChapter(@ApiParam("删除章节Id") @RequestParam String chapterId, public ResultEntity deleteChapter(@ApiParam("删除章节Id") @RequestParam String chapterId,
@RequestParam String schoolId){ @RequestParam String schoolId){
if(Constant.BUILT_IN_SCHOOL_ID.equals(schoolId)){ if(!Constant.BUILT_IN_SCHOOL_ID.equals(schoolId)){
return new ResultEntity<>(HttpStatus.BAD_REQUEST,"权限不足"); return new ResultEntity<>(HttpStatus.BAD_REQUEST,"权限不足");
} }
int i = chapterMapper.deleteByPrimaryKey(chapterId); int i = chapterMapper.deleteByPrimaryKey(chapterId);

@ -115,12 +115,19 @@ public class StuIndexController {
public ResultEntity<Map<String, Integer>> getIndexResourceCenter(@RequestParam String schoolId) { public ResultEntity<Map<String, Integer>> getIndexResourceCenter(@RequestParam String schoolId) {
Map<String, Integer> map = new HashMap<>(); Map<String, Integer> map = new HashMap<>();
List<Integer> list = teaResourceCenterMapper.getSizeByType(schoolId); List<Integer> list = teaResourceCenterMapper.getSizeByType(schoolId);
Integer key = list.get(0); if(list==null || list.isEmpty()){
Integer value = list.get(1); map.put("视频数量", 0);
map.put("视频数量", key); map.put("课件数量", 0);
map.put("课件数量", value); map.put("资源总量", 0);
map.put("资源总量", key + value); return new ResultEntity<>(map);
return new ResultEntity<>(map); }else {
Integer key = list.get(0);
Integer value = list.get(0);
map.put("视频数量", key);
map.put("课件数量", value);
map.put("资源总量", key + value);
return new ResultEntity<>(map);
}
} }

@ -57,6 +57,7 @@ public class TeaResourceCenterController {
@ApiParam("课程Id") @RequestParam String courseId, @ApiParam("课程Id") @RequestParam String courseId,
@ApiParam("章节id") @RequestParam(required = false) String chapterId, @ApiParam("章节id") @RequestParam(required = false) String chapterId,
@ApiParam("上传文件类型 文件/视频") @RequestParam String type) { @ApiParam("上传文件类型 文件/视频") @RequestParam String type) {
System.out.println(file.getSize());
Boolean flag = resourceCenterService.uploadResource(file, schoolId, courseId,type,chapterId); Boolean flag = resourceCenterService.uploadResource(file, schoolId, courseId,type,chapterId);
if (flag) { if (flag) {
return new ResultEntity<>(HttpStatus.OK, "新增成功"); return new ResultEntity<>(HttpStatus.OK, "新增成功");
@ -116,10 +117,19 @@ public class TeaResourceCenterController {
if (videoFile.exists()) { if (videoFile.exists()) {
Path path = Paths.get(videoPath); Path path = Paths.get(videoPath);
FileSystemResource fileSystemResource = new FileSystemResource(videoFile); FileSystemResource fileSystemResource = new FileSystemResource(videoFile);
return ResponseEntity.ok() if(url.endsWith("pptx")){
.contentType(MediaType.parseMediaType("application/pdf")) return ResponseEntity.ok()
.body(fileSystemResource); .contentType(MediaType.parseMediaType("application/vnd.openxmlformats-officedocument.presentationml.presentation"))
.body(fileSystemResource);
}else if(url.endsWith("ppt")){
return ResponseEntity.ok()
.contentType(MediaType.parseMediaType("application/vnd.ms-powerpoint"))
.body(fileSystemResource);
}else {
return ResponseEntity.ok()
.contentType(MediaType.parseMediaType("application/pdf"))
.body(fileSystemResource);
}
} else { } else {
return ResponseEntity.notFound().build(); return ResponseEntity.notFound().build();
} }

@ -62,10 +62,13 @@ public class TheoryTestServiceImpl implements ITheoryTestService {
List<String> multipleIdList = Arrays.asList(multipleIds.substring(1, multipleIds.length() - 1).split(", ")); List<String> multipleIdList = Arrays.asList(multipleIds.substring(1, multipleIds.length() - 1).split(", "));
List<String> judgeIdList = Arrays.asList(judgeIds.substring(1, judgeIds.length() - 1).split(", ")); List<String> judgeIdList = Arrays.asList(judgeIds.substring(1, judgeIds.length() - 1).split(", "));
List<String> idlist=new ArrayList<>(); List<String> idlist=new ArrayList<>();
idlist.addAll(singleIdList); List<SysObjectiveQuestion> singleQuestionList = objectiveQuestionMapper.selectBatchByIdList(singleIdList);
idlist.addAll(multipleIdList); List<SysObjectiveQuestion> mulQuestionList = objectiveQuestionMapper.selectBatchByIdList(multipleIdList);
idlist.addAll(judgeIdList); List<SysObjectiveQuestion> judgeQuestionList = objectiveQuestionMapper.selectBatchByIdList(judgeIdList);
List<SysObjectiveQuestion> returnQuestionList = objectiveQuestionMapper.selectBatchByIdList(idlist); List<SysObjectiveQuestion> returnQuestionList = new ArrayList<>();
returnQuestionList.addAll(singleQuestionList);
returnQuestionList.addAll(mulQuestionList);
returnQuestionList.addAll(judgeQuestionList);
return returnQuestionList; return returnQuestionList;
} }
} }

@ -2,7 +2,7 @@ spring:
datasource: datasource:
druid: druid:
db-type: mysql db-type: mysql
url: jdbc:mysql://${DB_HOST:118.31.7.2}:${DB_PORT:3306}/${DB_NAME:financial_bigdata}?useSSL=false&serverTimezone=GMT%2B8&allowPublicKeyRetrieval=true url: jdbc:mysql://${DB_HOST:120.78.220.29}:${DB_PORT:3307}/${DB_NAME:financial_bigdata}?useSSL=false&serverTimezone=GMT%2B8&allowPublicKeyRetrieval=true
username: ${DB_USER:root} username: ${DB_USER:root}
password: ${DB_PWD:sztzjy2017} password: ${DB_PWD:sztzjy2017}
driver-class-name: com.mysql.cj.jdbc.Driver driver-class-name: com.mysql.cj.jdbc.Driver
@ -11,7 +11,8 @@ spring:
# 文件存储 # 文件存储
file: file:
type: local type: local
path: D:/test path: /usr/local/tianzeProject/financial_bigdata/uploadFile
timer: timer:
enable: false enable: false

@ -1,11 +1,11 @@
#天金融大数据
spring: spring:
datasource: datasource:
druid: druid:
db-type: mysql db-type: mysql
url: jdbc:mysql://${DB_HOST:211.70.163.178}:${DB_PORT:3306}/${DB_NAME:financial_bigdata}?useSSL=false&serverTimezone=GMT%2B8&allowPublicKeyRetrieval=true url: jdbc:mysql://${DB_HOST:120.78.220.29}:${DB_PORT:3307}/${DB_NAME:financial_bigdata}?useSSL=false&serverTimezone=GMT%2B8&allowPublicKeyRetrieval=true
# url: jdbc:mysql://${DB_HOST:127.0.0.1}:${DB_PORT:3306}/${DB_NAME:fund_investment}?useSSL=false&serverTimezone=GMT%2B8&allowPublicKeyRetrieval=true
username: ${DB_USER:root} username: ${DB_USER:root}
password: ${DB_PWD:WxxyDB@2023} password: ${DB_PWD:sztzjy2017}
driver-class-name: com.mysql.cj.jdbc.Driver driver-class-name: com.mysql.cj.jdbc.Driver
@ -17,9 +17,8 @@ file:
timer: timer:
enable: false enable: false
swagger: swagger:
enable: false enable: true
tokenHeader: Authorization tokenHeader: Authorization
title: 天择外汇模拟交易 • 接口文档 title: 天择外汇模拟交易 • 接口文档
description: 天择外汇模拟交易WebAPI接口文档 description: 天择外汇模拟交易WebAPI接口文档

@ -2,9 +2,9 @@ spring:
datasource: datasource:
druid: druid:
db-type: mysql db-type: mysql
url: jdbc:mysql://${DB_HOST:120.79.54.255}:${DB_PORT:3306}/${DB_NAME:financial_bigdata}?useSSL=false&serverTimezone=GMT%2B8&allowPublicKeyRetrieval=true url: jdbc:mysql://${DB_HOST:118.31.7.2}:${DB_PORT:3306}/${DB_NAME:financial_bigdata}?useSSL=false&serverTimezone=GMT%2B8&allowPublicKeyRetrieval=true
username: ${DB_USER:root} username: ${DB_USER:root}
password: ${DB_PWD:Sztzjy506} password: ${DB_PWD:sztzjy2017}
driver-class-name: com.mysql.cj.jdbc.Driver driver-class-name: com.mysql.cj.jdbc.Driver
@ -15,4 +15,13 @@ file:
timer: timer:
enable: true enable: false
swagger:
enable: true
tokenHeader: Authorization
title: 天择外汇模拟交易 • 接口文档
description: 天择外汇模拟交易WebAPI接口文档
contactName: 深圳天择教育科技有限公司
contactAddress: www.sztzjy.com
version: @project.version@

@ -1,5 +1,9 @@
server: server:
port: 8838 # port: 8838 #金融大数据
# port: 8848 #天择证券大数据实训平台
port: 8858 #天择银行大数据实训平台
# port: 8868
# port: 8878
servlet: servlet:
context-path: / context-path: /
tomcat: tomcat:
@ -13,7 +17,7 @@ spring:
application: application:
name: trading_system name: trading_system
profiles: profiles:
active: dev active: protwo
mvc: mvc:
pathmatch: pathmatch:
matching-strategy: ant_path_matcher matching-strategy: ant_path_matcher

@ -47,7 +47,7 @@
<!-- <table tableName="stu_theory_exam" domainObjectName="StuTheoryExam" />--> <!-- <table tableName="stu_theory_exam" domainObjectName="StuTheoryExam" />-->
<!-- <table tableName="stu_theory_record" domainObjectName="StuTheoryRecord" />--> <!-- <table tableName="stu_theory_record" domainObjectName="StuTheoryRecord" />-->
<!-- <table tableName="stu_training" domainObjectName="StuTraining" />--> <!-- <table tableName="stu_training" domainObjectName="StuTraining" />-->
<!-- <table tableName="stu_user" domainObjectName="StuUser" />--> <!-- <table tableName="stu_userinfo" domainObjectName="StuUser" />-->
<!-- <table tableName="sys_case_question_bank" domainObjectName="SysCaseQuestionBank" />--> <!-- <table tableName="sys_case_question_bank" domainObjectName="SysCaseQuestionBank" />-->
<!-- <table tableName="sys_course" domainObjectName="SysCourse" />--> <!-- <table tableName="sys_course" domainObjectName="SysCourse" />-->
<!-- <table tableName="sys_course_chapter" domainObjectName="SysCourseChapter" />--> <!-- <table tableName="sys_course_chapter" domainObjectName="SysCourseChapter" />-->
@ -55,8 +55,9 @@
<!-- <table tableName="sys_objective_question" domainObjectName="SysObjectiveQuestion" />--> <!-- <table tableName="sys_objective_question" domainObjectName="SysObjectiveQuestion" />-->
<!-- <table tableName="tea_exam_manage" domainObjectName="TeaExamManage" />--> <!-- <table tableName="tea_exam_manage" domainObjectName="TeaExamManage" />-->
<!-- <table tableName="tea_learning_statistics" domainObjectName="TeaLearningStatistics" />--> <!-- <table tableName="tea_learning_statistics" domainObjectName="TeaLearningStatistics" />-->
<table tableName="tea_resource_center" domainObjectName="TeaResourceCenter" /> <!-- <table tableName="tea_resource_center" domainObjectName="TeaResourceCenter" />-->
<!-- <table tableName="training_report" domainObjectName="TrainingReport" />--> <!-- <table tableName="training_report" domainObjectName="TrainingReport" />-->
<table tableName="sys_case_question" domainObjectName="SysCaseQuestion" />
</context> </context>

Loading…
Cancel
Save