diff --git a/src/main/java/com/sztzjy/financial_bigdata/controller/stu/ExerciseExperimentalTraining.java b/src/main/java/com/sztzjy/financial_bigdata/controller/stu/ExerciseExperimentalTraining.java index a985736..0dbf14d 100644 --- a/src/main/java/com/sztzjy/financial_bigdata/controller/stu/ExerciseExperimentalTraining.java +++ b/src/main/java/com/sztzjy/financial_bigdata/controller/stu/ExerciseExperimentalTraining.java @@ -59,21 +59,21 @@ public class ExerciseExperimentalTraining { @ApiOperation("**获取案例题步骤基础信息") @AnonymousAccess public ResultEntity> getCaseStepInfo(@RequestParam String chapterId) { - //根据chapterId查询所有的caseid - List sysCaseQuestions = null; - try { - sysCaseQuestions = CaseApi.selectCaseByChapterId(chapterId); - } catch (IOException e) { - return new ResultEntity<>(HttpStatus.BAD_REQUEST, "资源中心根据三级ID查询失败"); - } - List caseIds = new ArrayList<>(); - for (int i = 0; i < sysCaseQuestions.size(); i++) { - String caseId = sysCaseQuestions.get(i).getCaseId(); - caseIds.add(caseId); - } +// //根据chapterId查询所有的caseid +// List sysCaseQuestions = null; +// try { +// sysCaseQuestions = CaseApi.selectCaseByChapterId(chapterId); +// } catch (IOException e) { +// return new ResultEntity<>(HttpStatus.BAD_REQUEST, "资源中心根据三级ID查询失败"); +// } +// List caseIds = new ArrayList<>(); +// for (int i = 0; i < sysCaseQuestions.size(); i++) { +// String caseId = sysCaseQuestions.get(i).getCaseId(); +// caseIds.add(caseId); +// } List stepList = null; try { - stepList = CaseApi.selectCaseStepListBatchByIdListAndSort(caseIds); + stepList = CaseApi.selectCaseStepListBatchByIdListAndSort(chapterId); } catch (IOException e) { return new ResultEntity<>(HttpStatus.BAD_REQUEST, "资源中心根据根据案例题IDS批量查询失败"); } diff --git a/src/main/java/com/sztzjy/financial_bigdata/controller/tea/TeaGradeManageController.java b/src/main/java/com/sztzjy/financial_bigdata/controller/tea/TeaGradeManageController.java index cb708a3..8e66e43 100644 --- a/src/main/java/com/sztzjy/financial_bigdata/controller/tea/TeaGradeManageController.java +++ b/src/main/java/com/sztzjy/financial_bigdata/controller/tea/TeaGradeManageController.java @@ -568,13 +568,14 @@ public class TeaGradeManageController { @PostMapping("/getModuleBySchoolId") @ApiOperation("***练习模式--权重页面下拉选择模块框") public ResultEntity>> getModuleBySchoolId(@RequestParam String schoolId, @RequestParam String systemOwner) { - List> list = null; + List> list = new ArrayList<>(); try { List twoCatalogs = CourseAPI.selectCourseList(systemOwner, schoolId); for (int i = 0; i < twoCatalogs.size(); i++) { HashMap hashMap = new HashMap<>(); 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); } } catch (IOException e) { diff --git a/src/main/java/com/sztzjy/financial_bigdata/controller/tea/UserController.java b/src/main/java/com/sztzjy/financial_bigdata/controller/tea/UserController.java index 2d58b1d..90407e8 100644 --- a/src/main/java/com/sztzjy/financial_bigdata/controller/tea/UserController.java +++ b/src/main/java/com/sztzjy/financial_bigdata/controller/tea/UserController.java @@ -131,8 +131,12 @@ public class UserController { map.put("classId", user.getClassId()); map.put("userId", user.getUserid()); map.put("zyuserid", user.getZyUserid()); - String uuid = getIPAndPlace(request, user.getName(), user.getUserid(), user.getStudentId()); - map.put("logId", uuid); + try{ + String uuid = getIPAndPlace(request, user.getName(), user.getUserid(), user.getStudentId()); + map.put("logId", uuid); + }catch (Exception e){ + + } map.put("token", token); map.put("systemOwner", user.getSystemOnwer()); return new ResultEntity(HttpStatus.OK, map); diff --git a/src/main/java/com/sztzjy/financial_bigdata/entity/resource_entity/TestTestSysCaseQuestionStepWithBLOBs.java b/src/main/java/com/sztzjy/financial_bigdata/entity/resource_entity/TestTestSysCaseQuestionStepWithBLOBs.java index d87a8cb..6637b0a 100644 --- a/src/main/java/com/sztzjy/financial_bigdata/entity/resource_entity/TestTestSysCaseQuestionStepWithBLOBs.java +++ b/src/main/java/com/sztzjy/financial_bigdata/entity/resource_entity/TestTestSysCaseQuestionStepWithBLOBs.java @@ -24,6 +24,27 @@ public class TestTestSysCaseQuestionStepWithBLOBs extends TestSysCaseQuestionSte @ApiModelProperty("答案原始数据") 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() { return title; } diff --git a/src/main/java/com/sztzjy/financial_bigdata/resourceCenterAPI/CaseApi.java b/src/main/java/com/sztzjy/financial_bigdata/resourceCenterAPI/CaseApi.java index 3cfca0c..8901037 100644 --- a/src/main/java/com/sztzjy/financial_bigdata/resourceCenterAPI/CaseApi.java +++ b/src/main/java/com/sztzjy/financial_bigdata/resourceCenterAPI/CaseApi.java @@ -284,18 +284,16 @@ public class CaseApi { } /** - * local:根据案例题IDList 查询案例题步骤并排序 - * rsapi:根据案例题IDList 查询案例题步骤并排序 + * local:根据章节 查询案例题步骤并排序 */ - public static List selectCaseStepListBatchByIdListAndSort(List caseIdList) throws IOException { + public static List selectCaseStepListBatchByIdListAndSort(String chapterId) throws IOException { + String requestBody="threeId="+chapterId; + JSONObject object = HttpUtils.sendPost( + selectCaseStepListBatchByIdListAndSort, + requestBody); Gson gson = new GsonBuilder() .registerTypeAdapter(Date.class, new DateTypeAdapter()) .create(); - // 构建带有 schoolId 的 URL - String urlWithParams = selectCaseStepListBatchByIdListAndSort; - JSONObject object = HttpUtils.sendPost( - urlWithParams, - gson.toJson(caseIdList), "application/json", null); Type listType = new TypeToken>() { }.getType(); List list = gson.fromJson(object.get("respString").toString(), listType); diff --git a/src/main/java/com/sztzjy/financial_bigdata/resourceCenterAPI/ResourceCenterApi.java b/src/main/java/com/sztzjy/financial_bigdata/resourceCenterAPI/ResourceCenterApi.java index 47f2d6b..4a00c1c 100644 --- a/src/main/java/com/sztzjy/financial_bigdata/resourceCenterAPI/ResourceCenterApi.java +++ b/src/main/java/com/sztzjy/financial_bigdata/resourceCenterAPI/ResourceCenterApi.java @@ -97,11 +97,11 @@ public class ResourceCenterApi { getResourceTypeCount, requestBody); } catch (IOException e) { - if(object==null){ - return new HashMap<>(); - } e.printStackTrace(); } + if(object==null){ + return new HashMap<>(); + } Gson gson = new GsonBuilder() .registerTypeAdapter(Date.class, new DateTypeAdapter()) .create(); diff --git a/src/main/resources/application-dev.yml b/src/main/resources/application-dev.yml index b175d36..8942d5a 100644 --- a/src/main/resources/application-dev.yml +++ b/src/main/resources/application-dev.yml @@ -1,8 +1,9 @@ +#天金融大数据 spring: datasource: druid: 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} password: ${DB_PWD:sztzjy2017} driver-class-name: com.mysql.cj.jdbc.Driver @@ -11,7 +12,8 @@ spring: # 文件存储 file: type: local - path: /usr/local/tianzeProject/financial_bigdata/uploadFile + path: /usr/local/tianzeProject/financial_bigdata/uploadFile +# path: D:/home timer: enable: false diff --git a/src/main/resources/application-pro.yml b/src/main/resources/application-pro.yml index 50e90dc..f2abdcf 100644 --- a/src/main/resources/application-pro.yml +++ b/src/main/resources/application-pro.yml @@ -3,7 +3,7 @@ spring: datasource: druid: 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} password: ${DB_PWD:sztzjy2017} driver-class-name: com.mysql.cj.jdbc.Driver @@ -12,7 +12,8 @@ spring: # 文件存储 file: type: local - path: /usr/local/tianzeProject/financial_bigdata/uploadFile + path: /usr/local/tianzeProject/financial_bigdata_total/py/uploadFile +# path: D:/home timer: enable: false diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index c2dc44e..10cab62 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -1,7 +1,8 @@ server: + port: 9988 # port: 8838 #金融大数据 # port: 8848 #天择证券大数据实训平台 - port: 8858 #天择银行大数据实训平台 +# port: 8858 #天择银行大数据实训平台 # port: 8868 # port: 8878 servlet: @@ -17,7 +18,7 @@ spring: application: name: trading_system profiles: - active: protwo + active: pro mvc: pathmatch: matching-strategy: ant_path_matcher diff --git a/src/main/resources/generatorConfig.xml b/src/main/resources/generatorConfig.xml index d3d5046..e10bec8 100644 --- a/src/main/resources/generatorConfig.xml +++ b/src/main/resources/generatorConfig.xml @@ -18,9 +18,11 @@ + + @@ -53,11 +55,12 @@ - + -
+ +