配置上传

master
yz 8 months ago
parent 7593f67fdf
commit 3097410907

@ -59,21 +59,21 @@ public class ExerciseExperimentalTraining {
@ApiOperation("**获取案例题步骤基础信息") @ApiOperation("**获取案例题步骤基础信息")
@AnonymousAccess @AnonymousAccess
public ResultEntity<List<TestTestSysCaseQuestionStepWithBLOBs>> getCaseStepInfo(@RequestParam String chapterId) { public ResultEntity<List<TestTestSysCaseQuestionStepWithBLOBs>> getCaseStepInfo(@RequestParam String chapterId) {
//根据chapterId查询所有的caseid // //根据chapterId查询所有的caseid
List<TestSysCaseQuestion> sysCaseQuestions = null; // List<TestSysCaseQuestion> sysCaseQuestions = null;
try { // try {
sysCaseQuestions = CaseApi.selectCaseByChapterId(chapterId); // sysCaseQuestions = CaseApi.selectCaseByChapterId(chapterId);
} catch (IOException e) { // } catch (IOException e) {
return new ResultEntity<>(HttpStatus.BAD_REQUEST, "资源中心根据三级ID查询失败"); // return new ResultEntity<>(HttpStatus.BAD_REQUEST, "资源中心根据三级ID查询失败");
} // }
List<String> caseIds = new ArrayList<>(); // List<String> caseIds = new ArrayList<>();
for (int i = 0; i < sysCaseQuestions.size(); i++) { // for (int i = 0; i < sysCaseQuestions.size(); i++) {
String caseId = sysCaseQuestions.get(i).getCaseId(); // String caseId = sysCaseQuestions.get(i).getCaseId();
caseIds.add(caseId); // caseIds.add(caseId);
} // }
List<TestTestSysCaseQuestionStepWithBLOBs> stepList = null; List<TestTestSysCaseQuestionStepWithBLOBs> stepList = null;
try { try {
stepList = CaseApi.selectCaseStepListBatchByIdListAndSort(caseIds); stepList = CaseApi.selectCaseStepListBatchByIdListAndSort(chapterId);
} catch (IOException e) { } catch (IOException e) {
return new ResultEntity<>(HttpStatus.BAD_REQUEST, "资源中心根据根据案例题IDS批量查询失败"); return new ResultEntity<>(HttpStatus.BAD_REQUEST, "资源中心根据根据案例题IDS批量查询失败");
} }

@ -568,13 +568,14 @@ public class TeaGradeManageController {
@PostMapping("/getModuleBySchoolId") @PostMapping("/getModuleBySchoolId")
@ApiOperation("***练习模式--权重页面下拉选择模块框") @ApiOperation("***练习模式--权重页面下拉选择模块框")
public ResultEntity<List<Map<String, String>>> getModuleBySchoolId(@RequestParam String schoolId, @RequestParam String systemOwner) { public ResultEntity<List<Map<String, String>>> getModuleBySchoolId(@RequestParam String schoolId, @RequestParam String systemOwner) {
List<Map<String, String>> list = null; List<Map<String, String>> list = new ArrayList<>();
try { try {
List<SysTwoCatalog> twoCatalogs = CourseAPI.selectCourseList(systemOwner, schoolId); List<SysTwoCatalog> twoCatalogs = CourseAPI.selectCourseList(systemOwner, schoolId);
for (int i = 0; i < twoCatalogs.size(); i++) { for (int i = 0; i < twoCatalogs.size(); i++) {
HashMap<String, String> hashMap = new HashMap<>(); HashMap<String, String> hashMap = new HashMap<>();
SysTwoCatalog sysTwoCatalog = twoCatalogs.get(i); SysTwoCatalog sysTwoCatalog = twoCatalogs.get(i);
hashMap.put(sysTwoCatalog.getTwoId(), sysTwoCatalog.getTwoName()); hashMap.put("course_id",sysTwoCatalog.getTwoId());
hashMap.put("course_name",sysTwoCatalog.getTwoName());
list.add(hashMap); list.add(hashMap);
} }
} catch (IOException e) { } catch (IOException e) {

@ -131,8 +131,12 @@ public class UserController {
map.put("classId", user.getClassId()); map.put("classId", user.getClassId());
map.put("userId", user.getUserid()); map.put("userId", user.getUserid());
map.put("zyuserid", user.getZyUserid()); map.put("zyuserid", user.getZyUserid());
try{
String uuid = getIPAndPlace(request, user.getName(), user.getUserid(), user.getStudentId()); String uuid = getIPAndPlace(request, user.getName(), user.getUserid(), user.getStudentId());
map.put("logId", uuid); map.put("logId", uuid);
}catch (Exception e){
}
map.put("token", token); map.put("token", token);
map.put("systemOwner", user.getSystemOnwer()); map.put("systemOwner", user.getSystemOnwer());
return new ResultEntity(HttpStatus.OK, map); return new ResultEntity(HttpStatus.OK, map);

@ -24,6 +24,27 @@ public class TestTestSysCaseQuestionStepWithBLOBs extends TestSysCaseQuestionSte
@ApiModelProperty("答案原始数据") @ApiModelProperty("答案原始数据")
private String answerOriginal; private String answerOriginal;
@ApiModelProperty("练习答案")
private String practiceAnswer;
@ApiModelProperty("练习答案原始数据")
private String practiceAnswerOriginal;
public String getPracticeAnswer() {
return practiceAnswer;
}
public void setPracticeAnswer(String practiceAnswer) {
this.practiceAnswer = practiceAnswer;
}
public String getPracticeAnswerOriginal() {
return practiceAnswerOriginal;
}
public void setPracticeAnswerOriginal(String practiceAnswerOriginal) {
this.practiceAnswerOriginal = practiceAnswerOriginal;
}
public String getTitle() { public String getTitle() {
return title; return title;
} }

@ -284,18 +284,16 @@ public class CaseApi {
} }
/** /**
* local:IDList * local:
* rsapi:IDList
*/ */
public static List<TestTestSysCaseQuestionStepWithBLOBs> selectCaseStepListBatchByIdListAndSort(List<String> caseIdList) throws IOException { public static List<TestTestSysCaseQuestionStepWithBLOBs> selectCaseStepListBatchByIdListAndSort(String chapterId) throws IOException {
String requestBody="threeId="+chapterId;
JSONObject object = HttpUtils.sendPost(
selectCaseStepListBatchByIdListAndSort,
requestBody);
Gson gson = new GsonBuilder() Gson gson = new GsonBuilder()
.registerTypeAdapter(Date.class, new DateTypeAdapter()) .registerTypeAdapter(Date.class, new DateTypeAdapter())
.create(); .create();
// 构建带有 schoolId 的 URL
String urlWithParams = selectCaseStepListBatchByIdListAndSort;
JSONObject object = HttpUtils.sendPost(
urlWithParams,
gson.toJson(caseIdList), "application/json", null);
Type listType = new TypeToken<List<TestTestSysCaseQuestionStepWithBLOBs>>() { Type listType = new TypeToken<List<TestTestSysCaseQuestionStepWithBLOBs>>() {
}.getType(); }.getType();
List<TestTestSysCaseQuestionStepWithBLOBs> list = gson.fromJson(object.get("respString").toString(), listType); List<TestTestSysCaseQuestionStepWithBLOBs> list = gson.fromJson(object.get("respString").toString(), listType);

@ -97,11 +97,11 @@ public class ResourceCenterApi {
getResourceTypeCount, getResourceTypeCount,
requestBody); requestBody);
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace();
}
if(object==null){ if(object==null){
return new HashMap<>(); return new HashMap<>();
} }
e.printStackTrace();
}
Gson gson = new GsonBuilder() Gson gson = new GsonBuilder()
.registerTypeAdapter(Date.class, new DateTypeAdapter()) .registerTypeAdapter(Date.class, new DateTypeAdapter())
.create(); .create();

@ -1,8 +1,9 @@
#天金融大数据
spring: spring:
datasource: datasource:
druid: druid:
db-type: mysql db-type: mysql
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:120.78.220.29}:${DB_PORT:3307}/${DB_NAME:financial_bigdata_total}?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
@ -12,6 +13,7 @@ spring:
file: file:
type: local type: local
path: /usr/local/tianzeProject/financial_bigdata/uploadFile path: /usr/local/tianzeProject/financial_bigdata/uploadFile
# path: D:/home
timer: timer:
enable: false enable: false

@ -3,7 +3,7 @@ spring:
datasource: datasource:
druid: druid:
db-type: mysql db-type: mysql
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:120.78.220.29}:${DB_PORT:3307}/${DB_NAME:financial_bigdata_total}?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
@ -12,7 +12,8 @@ spring:
# 文件存储 # 文件存储
file: file:
type: local type: local
path: /usr/local/tianzeProject/financial_bigdata/uploadFile path: /usr/local/tianzeProject/financial_bigdata_total/py/uploadFile
# path: D:/home
timer: timer:
enable: false enable: false

@ -1,7 +1,8 @@
server: server:
port: 9988
# port: 8838 #金融大数据 # port: 8838 #金融大数据
# port: 8848 #天择证券大数据实训平台 # port: 8848 #天择证券大数据实训平台
port: 8858 #天择银行大数据实训平台 # port: 8858 #天择银行大数据实训平台
# port: 8868 # port: 8868
# port: 8878 # port: 8878
servlet: servlet:
@ -17,7 +18,7 @@ spring:
application: application:
name: trading_system name: trading_system
profiles: profiles:
active: protwo active: pro
mvc: mvc:
pathmatch: pathmatch:
matching-strategy: ant_path_matcher matching-strategy: ant_path_matcher

@ -18,9 +18,11 @@
<!-- 配置数据库连接信息 --> <!-- 配置数据库连接信息 -->
<jdbcConnection driverClass="com.mysql.cj.jdbc.Driver" <jdbcConnection driverClass="com.mysql.cj.jdbc.Driver"
connectionURL="jdbc:mysql://118.31.7.2:3306/financial_bigdata" userId="root" connectionURL="jdbc:mysql://120.78.220.29:3307/financial_bigdata_total" userId="root"
password="sztzjy2017"> password="sztzjy2017">
<property name="useInformationSchema" value="true"/> <!--useInformationSchema 实体类上添加数据表的注释 --> <property name="useInformationSchema" value="true"/> <!--useInformationSchema 实体类上添加数据表的注释 -->
<!--解决mysql驱动升级到8.0后不生成指定数据库代码的问题-->
<property name="nullCatalogMeansCurrent" value="true" />
</jdbcConnection> </jdbcConnection>
<!-- 配置实体类的位置 --> <!-- 配置实体类的位置 -->
<javaModelGenerator targetPackage="com.sztzjy.financial_bigdata.entity" targetProject="src/main/java"> <javaModelGenerator targetPackage="com.sztzjy.financial_bigdata.entity" targetProject="src/main/java">
@ -53,11 +55,12 @@
<!-- <table tableName="sys_course_chapter" domainObjectName="SysCourseChapter" />--> <!-- <table tableName="sys_course_chapter" domainObjectName="SysCourseChapter" />-->
<!-- <table tableName="sys_log" domainObjectName="SysLog" />--> <!-- <table tableName="sys_log" domainObjectName="SysLog" />-->
<!-- <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" /> <!-- <table tableName="sys_case_question" domainObjectName="SysCaseQuestion" />-->
<!-- <table tableName="sys_case_question_step" domainObjectName="SysCaseQuestionStep" />-->
</context> </context>

Loading…
Cancel
Save