Parcourir la source

删除aijia模块

chen il y a 6 ans
Parent
commit
21cbc2d405
100 fichiers modifiés avec 0 ajouts et 39208 suppressions
  1. 0 14
      pom.xml
  2. 0 87
      ssj-aijia-api/pom.xml
  3. 0 21
      ssj-aijia-api/src/main/java/com/ssj/AijiaApp.java
  4. 0 640
      ssj-aijia-api/src/main/java/com/ssj/aijia/award/controller/ApiAwardController.java
  5. 0 132
      ssj-aijia-api/src/main/java/com/ssj/aijia/award/controller/ApiIntegralController.java
  6. 0 90
      ssj-aijia-api/src/main/java/com/ssj/aijia/common/controller/AesCbcUtil.java
  7. 0 442
      ssj-aijia-api/src/main/java/com/ssj/aijia/common/controller/AppCommonController.java
  8. 0 512
      ssj-aijia-api/src/main/java/com/ssj/aijia/common/controller/AppUserController.java
  9. 0 1165
      ssj-aijia-api/src/main/java/com/ssj/aijia/common/controller/DevopsManagerController.java
  10. 0 36
      ssj-aijia-api/src/main/java/com/ssj/aijia/common/controller/UeditorController.java
  11. 0 97
      ssj-aijia-api/src/main/java/com/ssj/aijia/common/controller/UtilController.java
  12. 0 1011
      ssj-aijia-api/src/main/java/com/ssj/aijia/conch/controller/ConchAppController.java
  13. 0 1061
      ssj-aijia-api/src/main/java/com/ssj/aijia/conch/controller/ConchController.java
  14. 0 1132
      ssj-aijia-api/src/main/java/com/ssj/aijia/conch/controller/ConchPadController.java
  15. 0 1044
      ssj-aijia-api/src/main/java/com/ssj/aijia/conch/controller/ConchProController.java
  16. 0 716
      ssj-aijia-api/src/main/java/com/ssj/aijia/conch/controller/PdConchController.java
  17. 0 249
      ssj-aijia-api/src/main/java/com/ssj/aijia/config/DruidConfiguration.java
  18. 0 226
      ssj-aijia-api/src/main/java/com/ssj/aijia/config/RequestApiLogInterceptor.java
  19. 0 62
      ssj-aijia-api/src/main/java/com/ssj/aijia/config/SpringSwaggerConfig.java
  20. 0 1152
      ssj-aijia-api/src/main/java/com/ssj/aijia/curator/controller/v1/CuratorV1Controller.java
  21. 0 30
      ssj-aijia-api/src/main/java/com/ssj/aijia/filter/CorsFilter.java
  22. 0 64
      ssj-aijia-api/src/main/java/com/ssj/aijia/game/controller/GameController.java
  23. 0 127
      ssj-aijia-api/src/main/java/com/ssj/aijia/game/controller/GameV1Controller.java
  24. 0 205
      ssj-aijia-api/src/main/java/com/ssj/aijia/game/controller/GameV2Controller.java
  25. 0 398
      ssj-aijia-api/src/main/java/com/ssj/aijia/game/controller/VoteDataController.java
  26. 0 58
      ssj-aijia-api/src/main/java/com/ssj/aijia/game/controller/req/VoteRankReq.java
  27. 0 31
      ssj-aijia-api/src/main/java/com/ssj/aijia/game/controller/res/VoteRequest.java
  28. 0 22
      ssj-aijia-api/src/main/java/com/ssj/aijia/game/controller/res/VoteSaveRequest.java
  29. 0 315
      ssj-aijia-api/src/main/java/com/ssj/aijia/kmt/arrange/controller/KmtArrangeController.java
  30. 0 629
      ssj-aijia-api/src/main/java/com/ssj/aijia/kmt/exercise/controller/KmtExerciseController.java
  31. 0 345
      ssj-aijia-api/src/main/java/com/ssj/aijia/kmt/homeworkcorrect/controller/KmtHomeworkCorrectController.java
  32. 0 298
      ssj-aijia-api/src/main/java/com/ssj/aijia/kmt/homeworkcorrect/controller/v1/KmtHomeworkCorrectV1Controller.java
  33. 0 584
      ssj-aijia-api/src/main/java/com/ssj/aijia/kmt/homeworkcorrect/controller/v2/KmtHomeworkCorrectV2Controller.java
  34. 0 121
      ssj-aijia-api/src/main/java/com/ssj/aijia/kmt/knowledge/controller/KmtKnowledgeController.java
  35. 0 728
      ssj-aijia-api/src/main/java/com/ssj/aijia/kmt/login/controller/KmtLoginAuthController.java
  36. 0 359
      ssj-aijia-api/src/main/java/com/ssj/aijia/kmt/sys/controller/ExportSalaryController.java
  37. 0 1003
      ssj-aijia-api/src/main/java/com/ssj/aijia/kmt/sys/controller/KmtCorrectSysController.java
  38. 0 1528
      ssj-aijia-api/src/main/java/com/ssj/aijia/kmt/sys/controller/KmtExerciseSysController.java
  39. 0 130
      ssj-aijia-api/src/main/java/com/ssj/aijia/load/data/es/LoadDataController.java
  40. 0 327
      ssj-aijia-api/src/main/java/com/ssj/aijia/openapi/controller/AiDataController.java
  41. 0 73
      ssj-aijia-api/src/main/java/com/ssj/aijia/openapi/controller/EsDataController.java
  42. 0 256
      ssj-aijia-api/src/main/java/com/ssj/aijia/opentest/OpenTestController.java
  43. 0 141
      ssj-aijia-api/src/main/java/com/ssj/aijia/opentest/RecordQuestionSysController.java
  44. 0 236
      ssj-aijia-api/src/main/java/com/ssj/aijia/parents/controller/CourseController.java
  45. 0 856
      ssj-aijia-api/src/main/java/com/ssj/aijia/parents/controller/ParentsController.java
  46. 0 1618
      ssj-aijia-api/src/main/java/com/ssj/aijia/parents/controller/v1/ParentsV1Controller.java
  47. 0 3481
      ssj-aijia-api/src/main/java/com/ssj/aijia/parents/controller/v2/ParentsV2Controller.java
  48. 0 680
      ssj-aijia-api/src/main/java/com/ssj/aijia/schoolmaster/controller/SchoolController.java
  49. 0 1044
      ssj-aijia-api/src/main/java/com/ssj/aijia/schoolmaster/controller/v1/SchoolV1Controller.java
  50. 0 850
      ssj-aijia-api/src/main/java/com/ssj/aijia/student/controller/StudentAppController.java
  51. 0 972
      ssj-aijia-api/src/main/java/com/ssj/aijia/student/controller/StudentController.java
  52. 0 154
      ssj-aijia-api/src/main/java/com/ssj/aijia/task/SyncAiDataTask.java
  53. 0 115
      ssj-aijia-api/src/main/java/com/ssj/aijia/task/SyncAiExamDataTask.java
  54. 0 1071
      ssj-aijia-api/src/main/java/com/ssj/aijia/teacher/app/controller/TeacherAppController.java
  55. 0 139
      ssj-aijia-api/src/main/java/com/ssj/aijia/teacher/controller/CoachController.java
  56. 0 1184
      ssj-aijia-api/src/main/java/com/ssj/aijia/teacher/controller/MyTeacherController.java
  57. 0 1475
      ssj-aijia-api/src/main/java/com/ssj/aijia/teacher/controller/TZybController.java
  58. 0 735
      ssj-aijia-api/src/main/java/com/ssj/aijia/teacher/controller/TeacherController.java
  59. 0 389
      ssj-aijia-api/src/main/java/com/ssj/aijia/teacher/controller/TeacherOrgController.java
  60. 0 1267
      ssj-aijia-api/src/main/java/com/ssj/aijia/teacher/controller/v1/MyTeacherV1Controller.java
  61. 0 426
      ssj-aijia-api/src/main/java/com/ssj/aijia/teacher/controller/v1/TeacherOrgV1Controller.java
  62. 0 1823
      ssj-aijia-api/src/main/java/com/ssj/aijia/teacher/controller/v2/TeacherAppV2Controller.java
  63. 0 920
      ssj-aijia-api/src/main/java/com/ssj/aijia/teacher/controller/v2/TeacherLibraryV2Controller.java
  64. 0 602
      ssj-aijia-api/src/main/java/com/ssj/aijia/teacher/controller/v2/TeacherOrgV2Controller.java
  65. 0 381
      ssj-aijia-api/src/main/java/com/ssj/aijia/teacher/library/controller/TeacherLibraryController.java
  66. 0 55
      ssj-aijia-api/src/main/resources/META-INF/resources/swagger-ui.html
  67. 0 57
      ssj-aijia-api/src/main/resources/META-INF/resources/webjars/springfox-swagger-ui/lang/zh-cn.js
  68. 0 98
      ssj-aijia-api/src/main/resources/META-INF/resources/wifi/css/wifi.css
  69. BIN
      ssj-aijia-api/src/main/resources/META-INF/resources/wifi/img/12.png
  70. BIN
      ssj-aijia-api/src/main/resources/META-INF/resources/wifi/img/close_red.png
  71. BIN
      ssj-aijia-api/src/main/resources/META-INF/resources/wifi/img/logo.png
  72. BIN
      ssj-aijia-api/src/main/resources/META-INF/resources/wifi/img/pdlogo.png
  73. BIN
      ssj-aijia-api/src/main/resources/META-INF/resources/wifi/img/wifi_icon.png
  74. BIN
      ssj-aijia-api/src/main/resources/META-INF/resources/wifi/img/xuan_zhong.png
  75. 0 5
      ssj-aijia-api/src/main/resources/META-INF/resources/wifi/js/jquery.min.js
  76. 0 50
      ssj-aijia-api/src/main/resources/META-INF/resources/wifi/js/pdwifi.js
  77. 0 54
      ssj-aijia-api/src/main/resources/META-INF/resources/wifi/js/wifi.js
  78. 0 36
      ssj-aijia-api/src/main/resources/META-INF/resources/wifi/pdwifi.html
  79. 0 36
      ssj-aijia-api/src/main/resources/META-INF/resources/wifi/wifi.html
  80. 0 24
      ssj-aijia-api/src/main/resources/application.properties
  81. 0 156
      ssj-aijia-api/src/test/java/TestRAS.java
  82. 0 15
      ssj-aijia-api/src/test/java/TestVoice.java
  83. 0 79
      ssj-aijia-api/src/test/java/UserTest.java
  84. BIN
      ssj-bean/target/classes/com/ssj/bean/conch/conch/dto/KmtQuestionDto.class
  85. BIN
      ssj-common-common/target/classes/com/ssj/conch/util/AIServiceUtils.class
  86. BIN
      ssj-common-common/target/classes/com/ssj/framework/core/util/CachingConfig$1.class
  87. BIN
      ssj-common-common/target/classes/com/ssj/framework/core/util/CachingConfig$2.class
  88. BIN
      ssj-common-common/target/classes/com/ssj/framework/core/util/CachingConfig$3.class
  89. BIN
      ssj-common-common/target/classes/com/ssj/framework/core/util/CachingConfig$4.class
  90. BIN
      ssj-common-common/target/classes/com/ssj/framework/core/util/CachingConfig$5.class
  91. BIN
      ssj-common-common/target/classes/com/ssj/framework/core/util/CachingConfig$6.class
  92. BIN
      ssj-common-common/target/classes/com/ssj/framework/core/util/Constant.class
  93. 0 51
      ssj-common-xinge/pom.xml
  94. 0 175
      ssj-common-xinge/src/main/java/com/ssj/conch/push/util/xinge/api/RESTAPI.java
  95. 0 33
      ssj-common-xinge/src/main/java/com/ssj/conch/push/util/xinge/api/RESTAPI_V3.java
  96. 0 35
      ssj-common-xinge/src/main/java/com/ssj/conch/push/util/xinge/bean/AcceptTimePair.java
  97. 0 35
      ssj-common-xinge/src/main/java/com/ssj/conch/push/util/xinge/bean/AcceptTimePoint.java
  98. 0 46
      ssj-common-xinge/src/main/java/com/ssj/conch/push/util/xinge/bean/AccountType.java
  99. 0 89
      ssj-common-xinge/src/main/java/com/ssj/conch/push/util/xinge/bean/Alert.java
  100. 0 0
      ssj-common-xinge/src/main/java/com/ssj/conch/push/util/xinge/bean/Aps.java

+ 0 - 14
pom.xml

@@ -184,17 +184,6 @@
 				<artifactId>ssj-dao</artifactId>
 				<version>0.0.1-SNAPSHOT</version>
 			</dependency>
-		
-			<dependency>
-				<groupId>com.ssj</groupId>
-				<artifactId>ssj-service</artifactId>
-				<version>0.0.1-SNAPSHOT</version>
-			</dependency>
-			<dependency>
-				<groupId>com.ssj</groupId>
-				<artifactId>ssj-service-impl</artifactId>
-				<version>0.0.1-SNAPSHOT</version>
-			</dependency>
 			<dependency>
 				<groupId>com.ssj</groupId>
 				<artifactId>ssj-mybatis-service-impl</artifactId>
@@ -335,15 +324,12 @@
 
 	<modules>
 		<module>ssj-sys</module>
-		<module>ssj-service</module>
 		<module>ssj-timer-task</module>
-		<module>ssj-service-impl</module>
 		<module>ssj-dao</module>
 		<module>ssj-bean</module>
 		<module>ssj-weixin</module>
 		<module>ssj-kmt</module>
 		<module>ssj-weixin-api</module>
-		<module>ssj-aijia-api</module>
 
         <module>ssj-mybatis-service-impl</module>
 		<module>ssj-common-file</module>

+ 0 - 87
ssj-aijia-api/pom.xml

@@ -1,87 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-  <modelVersion>4.0.0</modelVersion>
-  <parent>
-    <groupId>com.ssj</groupId>
-    <artifactId>ssj</artifactId>
-    <version>0.0.1-SNAPSHOT</version>
-  </parent>
-  <groupId>ssj-aijia-api</groupId>
-  <artifactId>ssj-aijia-api</artifactId>
-  <packaging>war</packaging>
-  <name>ssj-aijia-api</name>
-  <description>爱佳</description>
-  
-  
-	<properties>
-		<java.version>1.8</java.version>
-		
-	</properties>
-<dependencies>
-	<dependency>
-		<groupId>com.ssj</groupId>
-		<artifactId>ssj-service</artifactId>
-		<version>0.0.1-SNAPSHOT</version>
-	</dependency>
-	<dependency>
-		<groupId>com.ssj</groupId>
-		<artifactId>ssj-aijia-service</artifactId>
-		<version>0.0.1-SNAPSHOT</version>
-	</dependency>
-	<dependency>
-		<groupId>com.ssj</groupId>
-		<artifactId>ssj-common-controller</artifactId>
-		<version>0.0.1-SNAPSHOT</version>
-	</dependency>
-	<dependency>
-		<groupId>org.bouncycastle</groupId>
-		<artifactId>bcprov-jdk15on</artifactId>
-		<version>1.54</version>
-	</dependency>
-	<dependency>
-		<groupId>io.springfox</groupId>
-		<artifactId>springfox-swagger-ui</artifactId>
-		<version>2.7.0</version>
-	</dependency>
-	<dependency>
-		<groupId>com.ssj</groupId>
-		<artifactId>ssj-common-rabbitmq</artifactId>
-	</dependency>
-
-	<dependency>
-		<groupId>com.ssj</groupId>
-		<artifactId>ssj-common-weixin</artifactId>
-	</dependency>
-	
-	<dependency>
-		<groupId>com.ssj</groupId>
-		<artifactId>ssj-common-weixin-pay</artifactId>
-	</dependency>
-	
-	<dependency>
-		<groupId>com.ssj</groupId>
-		<artifactId>ssj-common-ueditor</artifactId>
-	</dependency>
-	<dependency>
-		<groupId>com.ssj</groupId>
-		<artifactId>ssj-common-file</artifactId>
-	</dependency>
-	<dependency>
-		<groupId>com.ssj</groupId>
-		<artifactId>ssj-common-config</artifactId>
-	</dependency>
-	<dependency>
-		<groupId>com.ssj</groupId>
-		<artifactId>ssj-common-excel</artifactId>
-	</dependency>
-    <dependency>
-        <groupId>com.ssj</groupId>
-        <artifactId>ssj-common-mongodb</artifactId>
-        <version>0.0.1-SNAPSHOT</version>
-    </dependency>
-	<dependency>
-		<groupId>com.alibaba</groupId>
-		<artifactId>druid</artifactId>
-		<version>1.1.16</version>
-	</dependency>
-</dependencies>
-</project>

+ 0 - 21
ssj-aijia-api/src/main/java/com/ssj/AijiaApp.java

@@ -1,21 +0,0 @@
-package com.ssj;
-
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-import org.springframework.boot.builder.SpringApplicationBuilder;
-import org.springframework.boot.web.servlet.ServletComponentScan;
-import org.springframework.boot.web.support.SpringBootServletInitializer;
-import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
-@SpringBootApplication(scanBasePackages = {"com.ssj"})
-@EnableJpaRepositories
-@ServletComponentScan
-public class AijiaApp  extends SpringBootServletInitializer{
-	public static void main(String[] args) {
-        SpringApplication.run(AijiaApp.class);
-    }
-	
-	@Override
-    protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
-        return builder.sources(AijiaApp.class);
-    }
-}

+ 0 - 640
ssj-aijia-api/src/main/java/com/ssj/aijia/award/controller/ApiAwardController.java

@@ -1,640 +0,0 @@
-package com.ssj.aijia.award.controller;
-
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.UUID;
-
-import org.apache.commons.lang3.StringUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.data.domain.Page;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
-
-import com.alibaba.dubbo.config.annotation.Reference;
-import com.ssj.bean.award.dto.ActivityInfoDto;
-import com.ssj.bean.award.dto.MaterialInfoDto;
-import com.ssj.bean.award.dto.MaterialListDto;
-import com.ssj.bean.award.dto.MyAwardListDto;
-import com.ssj.bean.award.dto.SncodeInfoDto;
-import com.ssj.bean.award.vo.ActivityDrawShareVO;
-import com.ssj.bean.award.vo.MaterialExchangeSaveVO;
-import com.ssj.bean.award.vo.UrlShareVO;
-import com.ssj.bean.award.vo.VipBaseRequestVO;
-import com.ssj.bean.sys.award.domain.AwardActivity;
-import com.ssj.bean.sys.award.domain.AwardActivityLog;
-import com.ssj.bean.sys.award.domain.AwardMaterial;
-import com.ssj.bean.sys.award.domain.AwardSncode;
-import com.ssj.bean.sys.fx.domain.Merchant;
-import com.ssj.bean.weixin.libmy.domain.LibVip;
-import com.ssj.framework.basic.utils.DateHelper;
-import com.ssj.framework.core.common.controller.BaseController;
-import com.ssj.framework.core.security.annotation.IgnoreSecurity;
-import com.ssj.framework.core.security.manager.TokenManager;
-import com.ssj.framework.core.util.ResponseConstant;
-import com.ssj.framework.core.util.ResponseEntity;
-import com.ssj.framework.weixin.util.AdvancedUtil;
-import com.ssj.framework.weixin.util.SHA1Util;
-import com.ssj.framework.weixin.util.WeixinOauth2Token;
-import com.ssj.framework.weixin.util.WeixinUtil;
-import com.ssj.service.conch.conch.service.HomeworkRankingService;
-import com.ssj.service.conch.parents.request.ShareReq;
-import com.ssj.service.conch.parents.v2.service.ParentV2Service;
-import com.ssj.service.sys.award.service.AwardActivityLogService;
-import com.ssj.service.sys.award.service.AwardActivityService;
-import com.ssj.service.sys.award.service.AwardMaterialService;
-import com.ssj.service.sys.award.service.AwardSncodeService;
-import com.ssj.service.sys.fx.service.MerchantService;
-import com.ssj.service.weixin.library.service.IBookManagerService;
-import com.ssj.service.weixin.library.service.ILibVipService;
-import com.ssj.service.weixin.user.service.UserService;
-
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-
-/**
- * @author yangcan
- * 类描述: 各端公共接口
- * 创建时间:2018年12月24日 下午4:10:18
-
- */
-@Api(value = "H5抽奖活动", tags = "H5抽奖活动")
-@RestController
-@RequestMapping("/api/award")
-public class ApiAwardController extends BaseController {
-	
-	@Autowired
-    private TokenManager tokenManager;
-	
-	@Reference(version = "1.0" ,timeout = 60000)
-	private MerchantService merchantService;
-	
-	@Reference(version = "1.0" ,timeout = 60000)
-	private AwardActivityService awardActivityService;
-	
-	@Reference(version = "1.0" ,timeout = 60000)
-	private AwardSncodeService awardSncodeService;
-	
-	@Reference(version = "1.0" ,timeout = 60000)
-	private AwardMaterialService awardMaterialService;
-	
-	@Reference(version = "1.0" ,timeout = 60000)
-	private IBookManagerService  managerService;
-	
-	@Reference(version = "1.0" ,timeout = 60000)
-	private ParentV2Service  parentV2Service;
-	
-	@Reference(version = "1.0" ,timeout = 60000)
-	private HomeworkRankingService  homeworkRankingService;
-	
-	@Reference(version = "1.0" ,timeout = 60000)
-	private AwardActivityLogService  awardActivityLogService;
-	
-	@Reference(version = "1.0" ,timeout = 60000)
-	private ILibVipService  vipService;
-	
-	@Reference(version = "1.0" ,timeout = 60000)
-	private UserService userService;
-	
-	private static List<MaterialListDto> defaultMaterialList=new ArrayList<MaterialListDto>();
-	private static ActivityInfoDto defaultActivityInfoDto=new ActivityInfoDto();
-	static {
-		MaterialListDto materialListDto1=new MaterialListDto();
-		materialListDto1.setId("1");
-		materialListDto1.setName("学习文具");
-		materialListDto1.setImg("/2020/06/10/354818362028716032.jpg");
-		materialListDto1.setPrice("30");
-		materialListDto1.setIsExchange(0);
-		materialListDto1.setStockNumber(0);
-		materialListDto1.setExchangeIntegral(600);
-		materialListDto1.setLevel(3);
-		defaultMaterialList.add(materialListDto1);
-		
-		MaterialListDto materialListDto2=new MaterialListDto();
-		materialListDto2.setId("2");
-		materialListDto2.setName("护眼台灯");
-		materialListDto2.setImg("/2020/06/10/354454010146590720.jpg");
-		materialListDto2.setPrice("999");
-		materialListDto2.setIsExchange(0);
-		materialListDto2.setStockNumber(0);
-		materialListDto2.setExchangeIntegral(3000);
-		materialListDto2.setLevel(2);
-		defaultMaterialList.add(materialListDto2);
-		
-		
-		MaterialListDto materialListDto3=new MaterialListDto();
-		materialListDto3.setId("3");
-		materialListDto3.setName("小塾手表");
-		materialListDto3.setImg("/2020/06/10/354453922242367488.jpg");
-		materialListDto3.setPrice("1999");
-		materialListDto3.setIsExchange(0);
-		materialListDto3.setStockNumber(0);
-		materialListDto3.setExchangeIntegral(10000);
-		materialListDto3.setLevel(1);
-		defaultMaterialList.add(materialListDto3);
-		
-		
-		defaultActivityInfoDto.setId("1");
-		defaultActivityInfoDto.setImg("/2020/06/10/354891606622597120.png");
-		
-		List<MaterialInfoDto> materials=new ArrayList<MaterialInfoDto>();
-		MaterialInfoDto materialInfoDto1=new MaterialInfoDto();
-		materialInfoDto1.setName(materialListDto3.getName());
-		materialInfoDto1.setLevel(1);
-		materialInfoDto1.setImg(materialListDto3.getImg());
-		materials.add(materialInfoDto1);
-		
-		MaterialInfoDto materialInfoDto2=new MaterialInfoDto();
-		materialInfoDto2.setName(materialListDto2.getName());
-		materialInfoDto2.setLevel(2);
-		materialInfoDto2.setImg(materialListDto2.getImg());
-		materials.add(materialInfoDto2);
-		
-		MaterialInfoDto materialInfoDto3=new MaterialInfoDto();
-		materialInfoDto3.setName(materialListDto1.getName());
-		materialInfoDto3.setLevel(3);
-		materialInfoDto3.setImg(materialListDto1.getImg());
-		materials.add(materialInfoDto3);
-		defaultActivityInfoDto.setMaterials(materials);
-		
-	}
-	
-	
-	
-	
-	@RequestMapping(value = "/material/list", method = RequestMethod.POST)
-    @ApiOperation(value = "兑换区奖品列表接口", httpMethod = "POST",  notes = "兑换区奖品列表接口")
-    public ResponseEntity materialList(@RequestParam(name = "accessToken") String accessToken,
-    		@RequestBody VipBaseRequestVO requestVO) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        Map<String, Object> data=new HashMap<String, Object>();
-        try {
-            //String userId = tokenManager.getUserId(accessToken);
-            String vipId = requestVO.getVipId();
-            // # 查出vipId的积分
-            Integer integral=homeworkRankingService.searchIntegralByVipId(vipId);
-            
-            List<MaterialListDto> list=new ArrayList<MaterialListDto>();
-            
-            Merchant merchant=merchantService.getDefaultMerchantByVipId(vipId);
-            if(merchant!=null) {//绑定的商户
-            	
-            	Map<String,Object> awardActivity=awardActivityService.getAwardActivityMapByMerchantId(merchant.getId(), 1);
-            	if(awardActivity!=null) {//商户正在发布的活动
-            		MaterialListDto materialListDto=null;
-            		
-            		if(awardActivity.get("level1_material_id")!=null && StringUtils.isNotEmpty(awardActivity.get("level1_material_id").toString())) {
-            			materialListDto=new MaterialListDto();
-            			materialListDto.setId(awardActivity.get("level1_material_id")!=null ? awardActivity.get("level1_material_id").toString() : "");
-            			materialListDto.setName(awardActivity.get("level1_material_name")!=null ? awardActivity.get("level1_material_name").toString() : "");
-            			materialListDto.setImg(awardActivity.get("level1_material_img")!=null ? awardActivity.get("level1_material_img").toString() : "");
-            			materialListDto.setPrice(awardActivity.get("level1_material_price")!=null ? awardActivity.get("level1_material_price").toString() : "0");
-            			materialListDto.setExchangeIntegral(awardActivity.get("level1_material_exchange_integral")!=null ? (int)awardActivity.get("level1_material_exchange_integral") : 0);
-            			materialListDto.setStockNumber(awardSncodeService.findAwardSncodeByAwardMaterialId(awardActivity.get("id").toString(), awardActivity.get("level1_material_id").toString(), 0).size());
-            			materialListDto.setLevel(1);
-            			if(materialListDto.getStockNumber()>0) {
-            				materialListDto.setIsExchange(integral>=materialListDto.getExchangeIntegral()?1:0);
-            			}else {
-            				materialListDto.setIsExchange(0);
-            			}
-            			list.add(materialListDto);
-            		}
-            		
-            		
-            		if(awardActivity.get("level2_material_id")!=null && StringUtils.isNotEmpty(awardActivity.get("level2_material_id").toString())) {
-            			materialListDto=new MaterialListDto();
-            			materialListDto.setId(awardActivity.get("level2_material_id")!=null ? awardActivity.get("level2_material_id").toString() : "");
-            			materialListDto.setName(awardActivity.get("level2_material_name")!=null ? awardActivity.get("level2_material_name").toString() : "");
-            			materialListDto.setImg(awardActivity.get("level2_material_img")!=null ? awardActivity.get("level2_material_img").toString() : "");
-            			materialListDto.setPrice(awardActivity.get("level2_material_price")!=null ? awardActivity.get("level2_material_price").toString() : "0");
-            			materialListDto.setExchangeIntegral(awardActivity.get("level2_material_exchange_integral")!=null ? (int)awardActivity.get("level2_material_exchange_integral") : 0);
-            			materialListDto.setStockNumber(awardSncodeService.findAwardSncodeByAwardMaterialId(awardActivity.get("id").toString(), awardActivity.get("level2_material_id").toString(), 0).size());
-            			materialListDto.setLevel(2);
-            			if(materialListDto.getStockNumber()>0) {
-            				materialListDto.setIsExchange(integral>=materialListDto.getExchangeIntegral()?1:0);
-            			}else {
-            				materialListDto.setIsExchange(0);
-            			}
-            			list.add(materialListDto);
-            		}
-            		
-            		
-            		if(awardActivity.get("level3_material_id")!=null && StringUtils.isNotEmpty(awardActivity.get("level3_material_id").toString())) {
-            			materialListDto=new MaterialListDto();
-            			materialListDto.setId(awardActivity.get("level3_material_id")!=null ? awardActivity.get("level3_material_id").toString() : "");
-            			materialListDto.setName(awardActivity.get("level3_material_name")!=null ? awardActivity.get("level3_material_name").toString() : "");
-            			materialListDto.setImg(awardActivity.get("level3_material_img")!=null ? awardActivity.get("level3_material_img").toString() : "");
-            			materialListDto.setPrice(awardActivity.get("level3_material_price")!=null ? awardActivity.get("level3_material_price").toString() : "0");
-            			materialListDto.setExchangeIntegral(awardActivity.get("level3_material_exchange_integral")!=null ? (int)awardActivity.get("level3_material_exchange_integral") : 0);
-            			materialListDto.setStockNumber(awardSncodeService.findAwardSncodeByAwardMaterialId(awardActivity.get("id").toString(), awardActivity.get("level3_material_id").toString(), 0).size());
-            			materialListDto.setLevel(3);
-            			if(materialListDto.getStockNumber()>0) {
-            				materialListDto.setIsExchange(integral>=materialListDto.getExchangeIntegral()?1:0);
-            			}else {
-            				materialListDto.setIsExchange(0);
-            			}
-            			list.add(materialListDto);
-            		}
-            	}
-            }
-            data.put("integral", integral);
-            data.put("list", list.size()>0?list:defaultMaterialList);
-            responseEntity.success(data, "查询成功");
-        } catch (Exception e) {
-            logger.error("兑换区奖品列表接口", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-	
-	
-	
-	
-	
-	
-	@RequestMapping(value = "/material/exchange/save", method = RequestMethod.POST)
-    @ApiOperation(value = "兑换奖品提交接口", httpMethod = "POST",  notes = "兑换奖品提交接口")
-    public ResponseEntity materialExchangeSave(@RequestParam(name = "accessToken") String accessToken,
-    		@RequestBody MaterialExchangeSaveVO requestVO) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        Map<String, Object> data=new HashMap<String, Object>();
-        try {
-            String userId = tokenManager.getUserId(accessToken);
-           // String vipId = requestVO.getVipId();
-        	
-            Integer status=awardActivityService.exchangeAwardActivityByMaterialId(userId,requestVO.getVipId(), requestVO.getId());
-            
-            data.put("status", status);
-            responseEntity.success(data, "提交成功");
-        } catch (Exception e) {
-            logger.error("兑换奖品提交接口", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-	
-	
-	
-	
-	
-	
-	
-	@RequestMapping(value = "/activity/info", method = RequestMethod.POST)
-    @ApiOperation(value = "积分夺宝页面信息接口", httpMethod = "POST",  notes = "积分夺宝页面信息接口")
-    public ResponseEntity activitySave(@RequestParam(name = "accessToken") String accessToken,
-    		@RequestBody VipBaseRequestVO requestVO) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        ActivityInfoDto activityInfoDto=null;
-        try {
-            String userId = tokenManager.getUserId(accessToken);
-            String vipId = requestVO.getVipId();
-            // # 查出vipId的积分
-            Integer integral=homeworkRankingService.searchIntegralByVipId(vipId);
-
-            Merchant merchant=merchantService.getDefaultMerchantByVipId(vipId);
-            if(merchant!=null) {//绑定的商户
-            	
-            	Map<String,Object> awardActivity=awardActivityService.getAwardActivityMapByMerchantId(merchant.getId(), 1);
-            	
-            	if(awardActivity!=null) {//商户正在发布的活动
-            		
-            		activityInfoDto=new ActivityInfoDto();
-            		activityInfoDto.setId(awardActivity.get("id").toString());
-            		activityInfoDto.setImg(awardActivity.get("img").toString());
-            		
-            		List<MaterialInfoDto> materials=new ArrayList<MaterialInfoDto>();
-            		
-            		if(awardActivity.get("level1_material_id")!=null && StringUtils.isNotEmpty(awardActivity.get("level1_material_id").toString())) {
-            			MaterialInfoDto materialInfoDto=new MaterialInfoDto();
-                		materialInfoDto.setName(awardActivity.get("level1_material_name").toString());
-                		materialInfoDto.setLevel((int)awardActivity.get("level1_material_level"));
-                		materialInfoDto.setImg(awardActivity.get("level1_material_img").toString());
-                		materials.add(materialInfoDto);
-            		}
-            		
-            		
-            		if(awardActivity.get("level2_material_id")!=null && StringUtils.isNotEmpty(awardActivity.get("level2_material_id").toString())) {
-            			MaterialInfoDto materialInfoDto=new MaterialInfoDto();
-                		materialInfoDto.setName(awardActivity.get("level2_material_name").toString());
-                		materialInfoDto.setLevel((int)awardActivity.get("level2_material_level"));
-                		materialInfoDto.setImg(awardActivity.get("level2_material_img").toString());
-                		materials.add(materialInfoDto);
-            		}
-            		
-            		
-            		if(awardActivity.get("level3_material_id")!=null && StringUtils.isNotEmpty(awardActivity.get("level3_material_id").toString())) {
-            			MaterialInfoDto materialInfoDto=new MaterialInfoDto();
-                		materialInfoDto.setName(awardActivity.get("level3_material_name").toString());
-                		materialInfoDto.setLevel((int)awardActivity.get("level3_material_level"));
-                		materialInfoDto.setImg(awardActivity.get("level3_material_img").toString());
-                		materials.add(materialInfoDto);
-            		}
-            		
-					activityInfoDto.setMaterials(materials);
-            	}
-            }
-            if(activityInfoDto==null) {
-            	defaultActivityInfoDto.setIntegral(integral);
-            	responseEntity.success(defaultActivityInfoDto, "查询成功");
-            }else {
-            	activityInfoDto.setIntegral(integral);
-            	responseEntity.success(activityInfoDto, "查询成功");
-            }
-    		return responseEntity;
-        } catch (Exception e) {
-            logger.error("积分夺宝页面信息接口", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-	
-
-	@RequestMapping(value = "/activity/draw/save", method = RequestMethod.POST)
-    @ApiOperation(value = "积分夺宝抽奖提交接口", httpMethod = "POST",  notes = "积分夺宝抽奖提交接口")
-    public ResponseEntity activityDrawSave(@RequestParam(name = "accessToken") String accessToken,
-    		@RequestBody VipBaseRequestVO requestVO) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        Map<String, Object> data=new HashMap<String, Object>();
-        MaterialInfoDto material=new MaterialInfoDto();
-        
-        try {
-            String userId = tokenManager.getUserId(accessToken);
-            String vipId = requestVO.getVipId();
-            LibVip libVip=vipService.getById(vipId);
-            String imgUrl=libVip.getImgUrl();
-            Integer status=2;
-            Integer integral=homeworkRankingService.searchIntegralByVipId(vipId);
-            if(integral<200) {
-            	status=3;
-            }else {
-	            Merchant merchant=merchantService.getDefaultMerchantByVipId(vipId);
-	            if(merchant!=null) {//绑定的商户
-	            	AwardActivity awardActivity=awardActivityService.getAwardActivityByMerchantId(merchant.getId(), 1);
-	            	if(awardActivity!=null) {
-		            	AwardSncode awardSncode=awardSncodeService.awardSncodeByActivityId(userId, vipId,awardActivity.getId());
-		            	if(awardSncode!=null) {
-		            		AwardMaterial awardMaterial=awardMaterialService.getById(awardSncode.getAwardMaterialId());
-		            		material.setImg(awardMaterial.getImg());
-		            		material.setLevel(awardMaterial.getLevel());
-		            		material.setName(awardMaterial.getName());
-		            		material.setSncode(awardSncode.getSnCode());
-		            		material.setPrice(awardMaterial.getPrice());
-		            		material.setQrCodeImg(tokenManager.getString("app_code_img"));
-		            		status=1;
-		            	}
-		            	
-		            	try {
-			            	AwardActivityLog log=new AwardActivityLog();
-			            	log.setAwardActivityId(awardActivity.getId());
-			            	log.setUserId(userId);
-		            		log.setVipId(vipId);
-			            	log.setCreateTime(new Date());
-			            	if(awardSncode!=null) {
-			            		log.setAwardMaterialId(awardSncode.getAwardMaterialId());
-			            		log.setSnCode(awardSncode.getSnCode());
-			            		log.setStatus(1);
-			            	}else {
-			            		log.setStatus(0);
-			            	}
-			            	awardActivityLogService.save(log);
-		            	} catch (Exception e) {
-						}
-	            	}else {
-		            	status=4;
-		            }
-	            }else {
-	            	status=4;
-	            }
-            }
-            data.put("integral", integral);
-            data.put("imgUrl", imgUrl);
-            data.put("status", status);
-            data.put("material", material);
-            responseEntity.success(data, "查询成功");
-        } catch (Exception e) {
-            logger.error("积分夺宝抽奖提交接口", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-	
-	
-	
-	
-
-	
-	
-	
-	@RequestMapping(value = "/activity/draw/share", method = RequestMethod.POST)
-    @ApiOperation(value = "积分夺宝中奖分享接口", httpMethod = "POST",  notes = "积分夺宝中奖分享接口")
-    public ResponseEntity activityDrawShare(@RequestParam(name = "accessToken") String accessToken,
-    		@RequestBody ActivityDrawShareVO requestVO) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            //String userId = tokenManager.getUserId(accessToken);
-            String vipId = requestVO.getVipId();
-            
-            ShareReq req=new ShareReq();
-            req.setSncode(requestVO.getSncode());
-            req.setVipId(vipId);
-            req.setType(3);
-			parentV2Service.shareMsgAddIntegral(req);
-            
-            responseEntity.success("分享成功");
-        } catch (Exception e) {
-            logger.error("积分夺宝中奖分享接口", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-	
-	
-	
-
-	@RequestMapping(value = "/my/list", method = RequestMethod.POST)
-    @ApiOperation(value = "我的奖品列表接口", httpMethod = "POST",  notes = "我的奖品列表接口")
-    public ResponseEntity myList(@RequestParam(name = "accessToken") String accessToken,
-    		@RequestBody VipBaseRequestVO requestVO) {
-		Map<String, Object> data=new HashMap<String, Object>();
-        ResponseEntity responseEntity = new ResponseEntity();
-        List<MyAwardListDto> myAwardListDtos=new ArrayList<MyAwardListDto>();
-        try {
-        	//String userId = tokenManager.getUserId(accessToken);
-            //String vipId = requestVO.getVipId();
-            
-            Map<String, Object> params = new HashMap<String, Object>();
-            params.put("vipId", requestVO.getVipId());
-            Page<Map<String,Object>> page = awardSncodeService.findAwardSncodeByVipList(params, initPage(1, 10000));
-            List<Map<String, Object>> list=page.getContent();
-            for (Map<String, Object> map : list) {
-            	MyAwardListDto dto=new MyAwardListDto();
-            	dto.setId(map.get("id").toString());
-            	dto.setImg(map.get("img")!=null ? map.get("img").toString() : "");
-            	dto.setLeagueAddress(map.get("league_address")!=null ? map.get("league_address").toString() : "");
-            	dto.setLeagueName(map.get("league_name")!=null ? map.get("league_name").toString() : "");
-            	dto.setLevel((int)map.get("level"));
-            	dto.setName(map.get("name").toString());
-            	dto.setSncode(map.get("sn_code")!=null ? map.get("sn_code").toString() : "");
-            	dto.setSncodeImg(map.get("sn_img")!=null ? map.get("sn_img").toString() : "");
-            	dto.setStatus(((int)map.get("status")==2 || (int)map.get("status")==4)?2:1);
-            	dto.setType(((int)map.get("status")==1 ||(int)map.get("status")==2)?1:2);
-            	dto.setCreateTime(DateHelper.format(DateHelper.parseDate(map.get("draw_time").toString(), "yyyy-MM-dd HH:mm:ss"), "yyyy.MM.dd"));
-            	myAwardListDtos.add(dto);
-			}
-            data.put("list",myAwardListDtos);
-            responseEntity.success(data, "查询成功");
-        } catch (Exception e) {
-            logger.error("我的奖品列表接口", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-	
-	
-	
-	@IgnoreSecurity
-	@RequestMapping(value = "/sncode/info", method = RequestMethod.POST)
-    @ApiOperation(value = "奖品核销页面信息接口", httpMethod = "POST",  notes = "奖品核销页面信息接口")
-    public ResponseEntity sncodeInfo(@RequestBody ActivityDrawShareVO requestVO) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            AwardSncode awardSncode = awardSncodeService.getAwardSncodeBySnCode(requestVO.getSncode());
-            if(awardSncode==null) {
-            	 responseEntity.failure(ResponseConstant.CODE_500, "兑奖码不存在");
-            	 return responseEntity;
-            }
-            if(awardSncode.getStatus()==0 || awardSncode.getStatus()==5) {
-            	 responseEntity.failure(ResponseConstant.CODE_500, "兑奖码未开奖");
-            	 return responseEntity;
-            }
-            if(StringUtils.isEmpty(awardSncode.getVipId())) {
-	           	 responseEntity.failure(ResponseConstant.CODE_500, "兑奖码未开奖");
-	           	 return responseEntity;
-            }
-            LibVip libVip=vipService.getById(awardSncode.getVipId());
-            AwardMaterial awardMaterial= awardMaterialService.getById(awardSncode.getAwardMaterialId());
-      	  	SncodeInfoDto ancodeInfoDto=new SncodeInfoDto();
-            ancodeInfoDto.setImg(awardMaterial.getImg());
-            ancodeInfoDto.setLevel(awardMaterial.getLevel());
-            ancodeInfoDto.setName(awardMaterial.getName());
-            ancodeInfoDto.setSncode(awardSncode.getSnCode());
-            ancodeInfoDto.setSncodeImg(awardSncode.getSnImg());
-            ancodeInfoDto.setImgUrl(libVip.getImgUrl());
-            ancodeInfoDto.setStatus((awardSncode.getStatus()==2 || awardSncode.getStatus()==4)?2:1);
-            ancodeInfoDto.setType((awardSncode.getStatus()==1 || awardSncode.getStatus()==2)?1:2);
-            responseEntity.success(ancodeInfoDto, "查询成功");
-            
-        } catch (Exception e) {
-            logger.error("奖品核销页面信息接口", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-	
-	@IgnoreSecurity
-	@RequestMapping(value = "/sncode/clear/save", method = RequestMethod.POST)
-    @ApiOperation(value = "奖品核销提交接口", httpMethod = "POST",  notes = "奖品核销提交接口")
-    public ResponseEntity sncodeClearSave(@RequestBody ActivityDrawShareVO requestVO) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-        	if(StringUtils.isEmpty(requestVO.getCode())) {
-            	 responseEntity.failure(ResponseConstant.CODE_500, "用户未授权,code为空");
-            	 return responseEntity;
-            }
-        	logger.error("奖品核销提交接口,code={}",requestVO.getCode());
-        	WeixinOauth2Token token=AdvancedUtil.getOauth2AccessToken(requestVO.getCode());
-        	String openId=token.getOpenId();
-        	logger.error("奖品核销提交接口,openId={}",openId);
-        	if(StringUtils.isEmpty(openId)) {
-       		 responseEntity.failure(ResponseConstant.CODE_500, "您无权限核销此奖品");
- 	           	 return responseEntity;
-	        }
-            String userId =userService.findUserById(openId);
-        	if(StringUtils.isEmpty(userId)) {
-        		 responseEntity.failure(ResponseConstant.CODE_500, "您无权限核销此奖品");
-  	           	 return responseEntity;
-	        }
-        	logger.error("奖品核销提交接口,userId={}",userId);
-            AwardSncode awardSncode = awardSncodeService.getAwardSncodeBySnCode(requestVO.getSncode());
-            if(awardSncode==null) {
-            	 responseEntity.failure(ResponseConstant.CODE_500, "兑奖码不存在");
-            	 return responseEntity;
-            }
-            if(awardSncode.getStatus()==0 || awardSncode.getStatus()==5) {
-            	 responseEntity.failure(ResponseConstant.CODE_500, "兑奖码未开奖");
-            	 return responseEntity;
-            }
-            if(StringUtils.isEmpty(awardSncode.getVipId())) {
-	           	 responseEntity.failure(ResponseConstant.CODE_500, "兑奖码未开奖");
-	           	 return responseEntity;
-            }
-            
-            logger.error("奖品核销提交接口,VipId={}",awardSncode.getVipId());
-        	logger.error("奖品核销提交接口,LibId={}",awardSncode.getLibId());
-        	Map<String,Object> teacherMap=managerService.getLibUserInfo(userId, awardSncode.getLibId());
-        	logger.error("奖品核销提交接口,teacherMap={}",teacherMap.toString());
-        	if(teacherMap.isEmpty()) {
-        		responseEntity.failure(ResponseConstant.CODE_500, "您无权限核销此奖品");
-           	 	return responseEntity;
-        	}
-           
-            if(awardSncode.getStatus()==1) {
-            	awardSncode.setStatus(2);
-            }else  if(awardSncode.getStatus()==3) {
-            	awardSncode.setStatus(4);
-            }
-            awardSncode.setClosureUser(userId);
-            awardSncode.setClosureTime(new Date());
-            awardSncode.setUpdateTime(new Date());
-            awardSncodeService.save(awardSncode);
-            responseEntity.success("奖品核销成功");
-        } catch (Exception e) {
-            logger.error("奖品核销提交接口", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-	
-	
-	
-	@RequestMapping(value = "/ticket/info", method = RequestMethod.POST)
-    @ApiOperation(value = "公众号分享wxjssdk", httpMethod = "POST",  notes = "公众号分享wxjssdk")
-    public ResponseEntity ticketInfo(@RequestParam(name = "accessToken") String accessToken,
-    		@RequestBody UrlShareVO requestVO) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        Map<String,Object> data  =new HashMap<String, Object>();
-        logger.info("调用了公众号分享wxjssdk");
-        try {
-        	 if(StringUtils.isEmpty(requestVO.getUrl())) {
-           	  	responseEntity.failure(ResponseConstant.CODE_500, "URL不合法");
-           	  	return responseEntity;
-             }
-        	 String jsapiToken=tokenManager.getSSJJSAccessToken();
-    		 if(jsapiToken!=null){
-    			 String timestamp = Long.toString(System.currentTimeMillis()/1000);
-    			 String noncestr = UUID.randomUUID().toString();
-    			 String sortString ="jsapi_ticket=" + jsapiToken +
-    					             "&noncestr=" + noncestr +
-    					             "&timestamp=" + timestamp +
-    					             "&url=" +requestVO.getUrl();
-    			 String	signature =new  SHA1Util().sha1(sortString);
-    			 data.put("appId", WeixinUtil.APPID);
-    			 data.put("timestamp", timestamp);
-    			 data.put("noncestr", noncestr);
-    			 data.put("signature", signature);
-    		 }
-            responseEntity.success(data, "查询成功");
-        } catch (Exception e) {
-            logger.error("调用了公众号分享wxjssdk接口", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-	
-	
-}

+ 0 - 132
ssj-aijia-api/src/main/java/com/ssj/aijia/award/controller/ApiIntegralController.java

@@ -1,132 +0,0 @@
-package com.ssj.aijia.award.controller;
-
-import com.alibaba.dubbo.config.annotation.Reference;
-import com.ssj.bean.award.dto.VipIntegralDto;
-import com.ssj.bean.award.vo.VipIntegralRequestVO;
-import com.ssj.framework.core.common.controller.BaseController;
-import com.ssj.framework.core.security.annotation.IgnoreSecurity;
-import com.ssj.framework.core.security.manager.TokenManager;
-import com.ssj.framework.core.util.RedisUtil;
-import com.ssj.framework.core.util.ResponseConstant;
-import com.ssj.framework.core.util.ResponseEntity;
-import com.ssj.service.conch.conch.service.HomeworkRankingService;
-import com.ssj.service.conch.conch.service.IntegralDetailService;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.data.domain.Page;
-import org.springframework.data.domain.Pageable;
-import org.springframework.web.bind.annotation.*;
-
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * @author yangcan
- * 类描述: 各端公共接口
- * 创建时间:2018年12月24日 下午4:10:18
-
- */
-@Api(value = "积分记录", tags = "积分记录")
-@RestController
-@RequestMapping("/api/integral")
-public class ApiIntegralController extends BaseController {
-	
-	@Autowired
-    private TokenManager tokenManager;
-    @Reference(version = "1.0" ,timeout = 60000)
-    private IntegralDetailService detailService;
-    @Reference(version = "1.0" ,timeout = 60000)
-    private HomeworkRankingService rankingService;
-
-    @Autowired
-    private RedisUtil redisUtil;
-	
-	@RequestMapping(value = "/list", method = RequestMethod.POST)
-    @ApiOperation(value = "查看积分记录", httpMethod = "POST",  notes = "查看积分记录")
-    public ResponseEntity userIntegralList(@RequestParam(name = "accessToken") String accessToken,
-    		@RequestBody VipIntegralRequestVO req) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        Map<String, Object> data=new HashMap<String, Object>();
-        try {
-
-            data.put("totalIntegral",rankingService.searchIntegralByVipId(req.getVipId()));
-            Pageable pageable = initPage(req.getPageNo(), req.getPageSize());
-            Map<String,Object> params = new HashMap<>();
-            params.put("vipId",req.getVipId());
-            Page<VipIntegralDto> pages = detailService.userIntegralList(params,pageable);
-            data.put("list", pages.getContent());
-            data.put("pages",pages.getTotalElements());
-            responseEntity.success(data, "查询成功");
-        } catch (Exception e) {
-            logger.error("查看积分记录接口", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/initData", method = RequestMethod.POST)
-    @ApiOperation(value = "初始化名人名言数据", httpMethod = "POST",  notes = "初始化名人名言数据")
-    @IgnoreSecurity
-    public ResponseEntity initData() {
-        ResponseEntity responseEntity = new ResponseEntity();
-        String sayKey = "app_share_saying";
-        if(redisUtil.exists(sayKey)) {
-            return responseEntity.success("数据已经加载!");
-        }
-        String[] strArray={" 人生在勤,不索何获|张衡",
-                " 活着就要学习,学习不是为了活着|培根",
-                " 学会学习的人,是非常幸福的人|米南德",
-                " 学习知识要善于思考,思考,再思考|爱因斯坦",
-                " 学习,永远不晚|高尔基",
-                " 天赋如同自然花木,要用学习来修剪|培根",
-                " 学习,学习,再学习!学,然后知不足|列宁",
-                " 看书和学习是思想的经常营养,是思想的无穷发展|冈察洛夫",
-                " 书有自己的命运,要视读者接受的情况而定|忒伦提乌斯·摩尔",
-                " 一切教育归根结蒂都是为了培养人的良好习惯|洛克",
-                "读不在三更五鼓,功只怕一曝十寒|郭沫若",
-                "业精于勤而荒于嬉,行成于思而毁于随|韩愈",
-                "路漫漫其修道远,吾将上下而求索|屈原",
-                "学习是劳动,是充满思想的劳动|乌申斯基",
-                "知识是珍贵宝石的结晶,文化是宝石放出的光泽|泰戈尔",
-                "我们要像海绵一样吸收有用的知识|加里宁",
-                " 只要还有什么东西不知道,就永远应当学习。|小塞涅卡",
-                " 重复是学习之母|狄更斯",
-                " 青春是有限的,智慧是无穷的,趁短的青春,去学习无穷的智慧|高尔基",
-                " 劳动教养了身体,学习教养了心灵|史密斯",
-                "书籍使人们成为宇宙的主人|巴甫连柯",
-                "习惯实际上已成为天性的一部分|亚里士多德",
-                "天才就是无止境刻苦勤奋的能力|卡莱尔",
-                "读一本好书,就是和许多高尚的人谈话|歌德",
-                "读书忌死读,死读钻牛角|叶圣陶",
-                "理想的书籍是智慧的钥匙|列夫·托尔斯泰",
-                "书籍是造就灵魂的工具|雨果",
-                "聪明在于勤奋,天才在于积累|华罗庚",
-                "三人行,必有我师焉。择其善者而从之,其不善者而改之|孔子",
-                "科学的自负比起无知的自负来还只能算是谦虚。|斯宾塞",
-                "任何事物都不及习惯那么神通广大|奥维德",
-                "敏而好学,不耻下问|孔子",
-                "学习知识要善于思考,思考,再思考|爱因斯坦",
-                "聪明出于勤奋,天才在于积累|华罗庚",
-                "无限相信书籍的力量,是我的教育信仰的真谛之一|苏霍姆林斯基",
-                "美德大多存在于良好的习惯中|佩利",
-                "读过一本好书,像交了一个益友|藏克家",
-                "我们可以由读书搜集知识,但必须利用思考把糠和麦子分开|富斯德",
-                "求学的三个条件是:多观察、多吃苦、多研究|加菲劳",
-                "书籍是朋友,虽然没有热情,但是非常忠实|雨果",
-                "学习从来无捷径,循序渐进登高峰|高永祚",
-                "人的天才只是火花,要想使它成熊熊火焰,那就只有学习,学习|高尔基",
-                "智慧是不会枯竭的,思想和思想相碰,就会迸溅无数火花|马尔克林斯基",
-                "习惯是社会的巨大的飞轮和最可贵的维护者|威·詹姆斯",
-                "书籍是屹立在时间的汪洋大海中的灯塔|惠普尔",
-                "立身以立学为先,立学以读书为本|欧阳修",
-                "读书有三到,谓心到,眼到,口到|朱熹",
-                " 如果一学期养成一种好习惯,那么用不了多久你就会成为一个完美无缺的人|曹国艳",
-                " 学习必须与实干相结合|泰戈尔",
-                " 年轻只知学习营利,乃生命中最黯淡之时刻|格里尔"};
-
-        redisUtil.sadd(sayKey, strArray);
-        responseEntity.success("加载成功");
-        return responseEntity;
-    }
-}

+ 0 - 90
ssj-aijia-api/src/main/java/com/ssj/aijia/common/controller/AesCbcUtil.java

@@ -1,90 +0,0 @@
-package com.ssj.aijia.common.controller;
-
-import org.apache.commons.codec.binary.Base64;
-import org.bouncycastle.jce.provider.BouncyCastleProvider;
-
-import javax.crypto.BadPaddingException;
-import javax.crypto.Cipher;
-import javax.crypto.IllegalBlockSizeException;
-import javax.crypto.NoSuchPaddingException;
-import javax.crypto.spec.IvParameterSpec;
-import javax.crypto.spec.SecretKeySpec;
-import java.io.UnsupportedEncodingException;
-import java.security.*;
-import java.security.spec.InvalidParameterSpecException;
-
-/** 
- * Created by lsh 
- * AES-128-CBC 加密方式 
- * 注: 
- * AES-128-CBC可以自己定义“密钥”和“偏移量“。 
- * AES-128是jdk自动生成的“密钥”。 
- */
-public class AesCbcUtil { 
- 
- 
-  static { 
-    //BouncyCastle是一个开源的加解密解决方案,主页在http://www.bouncycastle.org/ 
-    Security.addProvider(new BouncyCastleProvider()); 
-  } 
- 
-  /** 
-   * AES解密 
-   * 
-   * @param data      //密文,被加密的数据 
-   * @param key      //秘钥 
-   * @param iv       //偏移量 
-   * @param encodingFormat //解密后的结果需要进行的编码 
-   * @return 
-   * @throws Exception 
-   */
-  public static String decrypt(String data, String key, String iv, String encodingFormat) throws Exception { 
-//    initialize(); 
- 
-    //被加密的数据 
-    byte[] dataByte = Base64.decodeBase64(data); 
-    //加密秘钥 
-    byte[] keyByte = Base64.decodeBase64(key); 
-    //偏移量 
-    byte[] ivByte = Base64.decodeBase64(iv); 
- 
- 
-    try { 
-      Cipher cipher = Cipher.getInstance("AES/CBC/PKCS7Padding"); 
- 
-      SecretKeySpec spec = new SecretKeySpec(keyByte, "AES"); 
- 
-      AlgorithmParameters parameters = AlgorithmParameters.getInstance("AES"); 
-      parameters.init(new IvParameterSpec(ivByte)); 
- 
-      cipher.init(Cipher.DECRYPT_MODE, spec, parameters);// 初始化 
- 
-      byte[] resultByte = cipher.doFinal(dataByte); 
-      if (null != resultByte && resultByte.length > 0) { 
-        String result = new String(resultByte, encodingFormat); 
-        return result; 
-      } 
-      return null; 
-    } catch (NoSuchAlgorithmException e) { 
-      e.printStackTrace(); 
-    } catch (NoSuchPaddingException e) { 
-      e.printStackTrace(); 
-    } catch (InvalidParameterSpecException e) { 
-      e.printStackTrace(); 
-    } catch (InvalidKeyException e) { 
-      e.printStackTrace(); 
-    } catch (InvalidAlgorithmParameterException e) { 
-      e.printStackTrace(); 
-    } catch (IllegalBlockSizeException e) { 
-      e.printStackTrace(); 
-    } catch (BadPaddingException e) { 
-      e.printStackTrace(); 
-    } catch (UnsupportedEncodingException e) { 
-      e.printStackTrace(); 
-    } 
- 
-    return null; 
-  } 
- 
-} 
-

+ 0 - 442
ssj-aijia-api/src/main/java/com/ssj/aijia/common/controller/AppCommonController.java

@@ -1,442 +0,0 @@
-package com.ssj.aijia.common.controller;
-
-import com.alibaba.dubbo.config.annotation.Reference;
-import com.ssj.bean.common.files.domain.FileInfo;
-import com.ssj.bean.weixin.problem.domain.Problem;
-import com.ssj.framework.basic.utils.DateHelper;
-import com.ssj.framework.core.common.controller.BaseController;
-import com.ssj.framework.core.security.annotation.IgnoreSecurity;
-import com.ssj.framework.core.security.manager.TokenManager;
-import com.ssj.framework.core.util.*;
-import com.ssj.framework.files.service.FileInfoService;
-import com.ssj.framework.idworker.IdWorker;
-import com.ssj.service.conch.common.request.*;
-import com.ssj.service.conch.common.service.AppCommonService;
-import com.ssj.service.conch.conch.padrequest.PadUploadHomeworkRequest;
-import com.ssj.service.conch.conch.request.ConchSystemDerverReq;
-import com.ssj.service.conch.conch.service.ConchSystemDerverService;
-import com.ssj.service.conch.parents.v1.request.VipIdReq;
-import com.ssj.service.conch.teacher.service.TeacherLibraryService;
-import com.ssj.service.conch.teacher.service.TeacherService;
-import com.ssj.service.sys.appinfo.service.AppInfoService;
-import com.ssj.service.sys.appinfo.service.dto.LastVersionAppInfoDto;
-import com.ssj.service.sys.easemob.service.EasemobService;
-import com.ssj.service.sys.push.service.SconXingeService;
-import com.ssj.service.weixin.problem.service.ProblemService;
-import com.ssj.service.weixin.push.service.PushTemplateService;
-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.data.domain.Page;
-import org.springframework.data.domain.Pageable;
-import org.springframework.data.domain.Sort.Direction;
-import org.springframework.web.bind.annotation.*;
-import org.springframework.web.multipart.MultipartFile;
-
-import java.util.*;
-
-/**
- * @author yangcan
- * 类描述: 各端公共接口
- * 创建时间:2018年12月24日 下午4:10:18
-
- */
-@Api(value = "各端公共接口", tags = "各端公共接口")
-@RestController
-@RequestMapping("/api/common/common")
-public class AppCommonController extends BaseController {
-	
-	@Reference(version = "1.0" ,timeout = 60000)
-	private AppCommonService appCommonService;
-	
-	@Reference(version = "1.0" ,timeout = 60000)
-	private PushTemplateService  pushTemplateService;
-	
-	@Reference(version = "1.0" ,timeout = 60000)
-	private SconXingeService sconXingeService;
-	
-	@Autowired
-	private TokenManager tokenManager;
-
-	@Autowired
-	private FileInfoService fileInfoService;
-
-	@Reference(version = "1.0" ,timeout = 60000)
-	private EasemobService easemobService;
-	
-	@Reference(version = "1.0" ,timeout = 60000)
-	private ProblemService problemService;
-	
-	@Reference(version = "1.0" ,timeout = 60000)
-	private TeacherService teacherService;
-
-	@Reference(version = "1.0" ,timeout = 60000)
-	private AppInfoService appInfoService;
-	@Reference(version = "1.0" ,timeout = 60000)
-	private ConchSystemDerverService conchSystemDerverService;
-
-    @Reference(version = "1.0" ,timeout = 60000)
-    private TeacherLibraryService teacherLibraryService;
-	
-	@ApiOperation(value = "环信语音推送", httpMethod = "POST")
-	@RequestMapping(value = "/easemobAPNsPush", method = RequestMethod.POST)
-	public ResponseEntity easemobAPNsPush(@RequestParam(name = "accessToken") String accessToken,@RequestBody EasemobAPNsRequest request) {
-		ResponseEntity responseEntity = new ResponseEntity();
-		try {
-			appCommonService.easemobAPNsPush(request);
-			responseEntity.success();
-		} catch (Exception e) {
-			logger.error("环信语音推送异常", e);
-			responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-		}
-		return responseEntity;
-	}
-	
-	@ApiOperation(value = "好友列表", httpMethod = "POST")
-	@RequestMapping(value = "/findFriends", method = RequestMethod.POST)
-	public ResponseEntity findFriends(@RequestParam(name = "accessToken") String accessToken) {
-		ResponseEntity responseEntity;
-		try {
-			String userId = tokenManager.getUserId(accessToken);
-			responseEntity = appCommonService.findFriends(userId);
-		} catch (Exception e) {
-			logger.error("好友列表", e);
-			responseEntity = new ResponseEntity();
-			responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-		}
-		return responseEntity;
-	}
-	
-	@ApiOperation(value = "发送消息", httpMethod = "POST")
-	@RequestMapping(value = "/onlineSendMessage", method = RequestMethod.POST)
-	public ResponseEntity onlineSendMessage(@RequestParam(name = "accessToken") String accessToken,@RequestBody OnlineSendMessageRequest request) {
-		ResponseEntity responseEntity;
-		try {
-			String userId = tokenManager.getUserId(accessToken);
-			responseEntity = appCommonService.onlineSendMessage(userId,request);
-		} catch (Exception e) {
-			logger.error("发送消息", e);
-			responseEntity = new ResponseEntity();
-			responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-		}
-		return responseEntity;
-	}
-	
-	@ApiOperation(value = "聊天消息列表", httpMethod = "POST")
-	@RequestMapping(value = "/onlineMessages", method = RequestMethod.POST)
-	public ResponseEntity onlineMessages(@RequestParam(name = "accessToken") String accessToken,@RequestBody OnlineMessagesRequest request) {
-		ResponseEntity responseEntity;
-		try {
-			String userId = tokenManager.getUserId(accessToken);
-			Map<String, Object> params = new HashMap<String, Object>();
-			params.put("sendUserId", userId);
-         	params.put("receiveUserId", request.getReceiveUserId());
-         	params.put("maxCreateTime", request.getMaxCreateTime());
-			Pageable pageable = initPage(request.getPageNo(), request.getPageSize());
-			responseEntity = appCommonService.onlineMessages(params,pageable);
-		} catch (Exception e) {
-			logger.error("聊天消息列表", e);
-			responseEntity = new ResponseEntity();
-			responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-		}
-		return responseEntity;
-	}
-	
-	@ApiOperation(value = "设置聊天消息已读", httpMethod = "POST")
-	@RequestMapping(value = "/setMessagesRead", method = RequestMethod.POST)
-	public ResponseEntity setMessagesRead(@RequestParam(name = "accessToken") String accessToken,@RequestBody SetMessagesReadRequest request) {
-		ResponseEntity responseEntity = new ResponseEntity();
-		try {
-			String userId = tokenManager.getUserId(accessToken);
-			 appCommonService.setMessagesRead(userId,request.getReceiveUserId());
-			 responseEntity.success();
-		} catch (Exception e) {
-			logger.error("设置聊天消息已读", e);
-			responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-		}
-		return responseEntity;
-	}
-	
-	@ApiOperation(value = "未读总消息数", httpMethod = "POST")
-	@RequestMapping(value = "/onlineNoReadMessageSum", method = RequestMethod.POST)
-	public ResponseEntity onlineNoReadMessageSum(@RequestParam(name = "accessToken") String accessToken) {
-		ResponseEntity responseEntity;
-		try {
-			String userId = tokenManager.getUserId(accessToken);
-			responseEntity = appCommonService.onlineNoReadMessageSum(userId);
-		} catch (Exception e) {
-			logger.error("未读总消息数", e);
-			responseEntity = new ResponseEntity();
-			responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-		}
-		return responseEntity;
-	}
-	
-	@RequestMapping(value = "/updateXinGeToken", method = RequestMethod.POST)
-	@ApiOperation(value = "贝壳登录后,保存信鸽ID", httpMethod = "POST", notes = "小塾上传信鸽Token")
-	public ResponseEntity updateXinGeToken(@RequestParam(name = "accessToken") String accessToken,
-			@RequestBody UpXinGeRequest request) {
-		ResponseEntity responseEntity = new ResponseEntity();
-		try {
-			String userId = tokenManager.getUserId(accessToken);
-			sconXingeService.saveOrUpdate(userId, request.getXingeToken(), request.getPlatform(), request.getPlatformType());
-			responseEntity.success();
-		} catch (Exception e) {
-			logger.error("小塾上传信鸽Token异常", e);
-			responseEntity.failure(ResponseConstant.CODE_500, "小塾上传信鸽Token异常");
-		}
-		return responseEntity;
-	}
-
-
-	@ApiOperation(value = "获取阿里云OSS上传securityToken", httpMethod = "POST")
-	@RequestMapping(value = "/getOssfsToken", method = RequestMethod.POST)
-	public ResponseEntity getOssfsToken(@RequestParam(name = "accessToken") String accessToken) {
-		ResponseEntity responseEntity  =new  ResponseEntity();
-		try {
-			String userId = tokenManager.getUserId(accessToken);
-			Map<String,String>  stsMap= OSSUtils.getSTSSecurityToken();
-			stsMap.put("uploadImgPath", DateHelper.formatDateByFormat(new Date(), "yyyy/MM/dd")+"/"+
-                    IdWorker.generateId()+ ImageTools.SUFF_JPG);
-
-            stsMap.put("bucket",PropertiesUtil.getValue("bucketName"));
-          //  stsMap.put("EndPoint","https://oss-cn-shenzhen.aliyuncs.com");
-
-			stsMap.put("endpoint",PropertiesUtil.getValue("img_url"));
-            stsMap.put("endpointOSS","https://"+PropertiesUtil.getValue("bucketName")+".oss-cn-shenzhen.aliyuncs.com");
-			responseEntity.success(stsMap,"成功");
-		} catch (Exception e) {
-			logger.error("获取阿里云OSS上传securityToken", e);
-			responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-		}
-		return responseEntity;
-	}
-
-
-	@ApiOperation(value = "获取阿里云OSS上传securityToken,及文件后缀", httpMethod = "POST")
-	@RequestMapping(value = "/getOssfsTokenFileExt", method = RequestMethod.POST)
-	public ResponseEntity getOssfsToken(@RequestParam(name = "accessToken") String accessToken ,	@RequestBody OssfsTokenReq req) {
-		ResponseEntity responseEntity  =new  ResponseEntity();
-		try {
-			String userId = tokenManager.getUserId(accessToken);
-			Map<String,String>  stsMap= OSSUtils.getSTSSecurityToken();
-			String preffix = "";
-			if (StringUtils.isNotBlank(req.getMiddleDir())){
-				preffix  = "/" + req.getMiddleDir();
-			}
-			stsMap.put("uploadImgPath", preffix + DateHelper.formatDateByFormat(new Date(), "yyyy/MM/dd")+"/"+
-                    IdWorker.generateId()+req.getFileExt());
-
-
-			stsMap.put("bucket",PropertiesUtil.getValue("bucketName"));
-			//  stsMap.put("EndPoint","https://oss-cn-shenzhen.aliyuncs.com");
-
-			stsMap.put("endpoint",PropertiesUtil.getValue("img_url"));
-			stsMap.put("endpointOSS","https://"+PropertiesUtil.getValue("bucketName")+".oss-cn-shenzhen.aliyuncs.com");
-			responseEntity.success(stsMap,"成功");
-		} catch (Exception e) {
-			logger.error("获取阿里云OSS上传securityToken", e);
-			responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-		}
-		return responseEntity;
-	}
-
-
-
-
-	@ApiOperation(value = "from表单图片上传,可上传多张", httpMethod = "POST")
-    @IgnoreSecurity
-    @RequestMapping(value = "/uploadForm", method = RequestMethod.POST)
-    public ResponseEntity uploadForm(@RequestParam(name = "accessToken") String accessToken, 
-    		@RequestParam(name = "files") List<MultipartFile> files) throws Exception {
-    	ResponseEntity responseEntity = new ResponseEntity();
-    	  if (files !=null && files.size() > 0) {
-              //文件信息入库
-              List<FileInfo> fileInfos = fileInfoService.uploadFilePicture(tokenManager.getUserId(accessToken),files);
-              if (files.size() == fileInfos.size()) {
-                  Map<String, Object> data = new HashMap<String, Object>();
-                  data.put("pics", fileInfos);
-                  responseEntity.success(data, "上传图片成功 ");
-              } else {
-                  responseEntity.failure(ResponseConstant.CODE_000, "上传图片失败");
-              }
-
-          } else {
-              responseEntity.failure(ResponseConstant.CODE_000, "上传图片失败");
-          }
-        return responseEntity;
-    }
-	
-	@ApiOperation(value = "常见问题列表", httpMethod = "POST")
-	@RequestMapping(value = "/list", method = RequestMethod.POST)
-	public ResponseEntity list(@RequestParam(name = "accessToken") String accessToken,@RequestBody (required=true) ProblemListReq req) {
-		ResponseEntity responseEntity = new ResponseEntity();
-		try {
-			Map<String, Object> params = new HashMap<String, Object>();
-	    	if(req.getTitle()!=null &&req.getTitle().trim().length()>0){
-	    		params.put("LIKE_title",req.getTitle());
-	    	}
-	    	if(req.getStat()!=null &&req.getStat()>0){
-	    		params.put("EQ_stat",req.getStat());
-	    	}
-	    	if(req.getType()!=null &&req.getType()>0){
-	    		params.put("EQ_type",req.getType());
-	    	}
-			Pageable pageable = initPage(req.getPageNo(), req.getPageSize(),Direction.ASC, new String[] { "num" });
-		    Page<Problem>  pageMap= problemService.findByPage(params, pageable);
-		    Map<String, Object> data = new HashMap<String, Object>();
-		    data.put("pages", pageMap.getTotalElements());
-   		    data.put("list", pageMap.getContent());
-   		    data.put("pageSize", req.getPageSize());
-   		    data.put("pageNo", req.getPageNo());
-			
-			responseEntity.success(data,"获取成功");
-		} catch (Exception e) {
-			e.printStackTrace();
-			responseEntity.failure(ResponseConstant.CODE_000, "服务器发生异常,请稍后重试");
-		}
-		return responseEntity;
-	}
-	
-	@ApiOperation(value = "下线在线老师", httpMethod = "POST")
-	@IgnoreSecurity
-	@RequestMapping(value = "/offonlineTeacherAllot", method = RequestMethod.POST)
-	public ResponseEntity offonlineTeacherAllot(@RequestParam(name = "teacherId") String teacherId) {
-		ResponseEntity responseEntity = new ResponseEntity();
-		try {
-			teacherService.offonlineTeacherAllot(teacherId);
-			responseEntity.success();
-		} catch (Exception e) {
-			responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-		}
-		return responseEntity;
-	}
-	
-	@ApiOperation(value = "同步更新年级信息", httpMethod = "POST")
-	@IgnoreSecurity
-	@RequestMapping(value = "/syncRefreshGrade", method = RequestMethod.POST)
-	public ResponseEntity syncRefreshGrade() {
-		ResponseEntity responseEntity = new ResponseEntity();
-		try {
-			//同步更新年级
-			appCommonService.syncRefreshGrade();
-			responseEntity.success();
-		} catch (Exception e) {
-			responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-		}
-		return responseEntity;
-	}
-
-	@ApiOperation(value = "获取最新的包列表", httpMethod = "POST")
-	@IgnoreSecurity
-	@RequestMapping(value = "/findLastPackageList", method = RequestMethod.POST)
-	public ResponseEntity findLastPackageList() {
-		ResponseEntity responseEntity = new ResponseEntity();
-		try {
-			List<LastVersionAppInfoDto> appInfos = appInfoService.findLastPackageByTypes(Arrays.asList(2, 5));
-			Map<String, Object> data = new HashMap<>();
-			data.put("list", appInfos);
-			responseEntity.success(data, "请求成功");
-		} catch (Exception e) {
-			logger.error("异常", e);
-			responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-		}
-		return responseEntity;
-	}
-
-	@ApiOperation(value = "获取最新的包", httpMethod = "POST")
-	@IgnoreSecurity
-	@RequestMapping(value = "/findNewLastPackage", method = RequestMethod.POST)
-	public ResponseEntity findNewLastPackage(@RequestParam(name = "type") int type) {
-		ResponseEntity responseEntity ;
-		try {
-			responseEntity=appInfoService.findNewLastNewPackageByType(type);
-		} catch (Exception e) {
-			logger.error("异常", e);
-			 responseEntity = new ResponseEntity();
-			responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-		}
-		return responseEntity;
-	}
-
-
-	@RequestMapping(value = "/upExceptionLog", method = RequestMethod.POST)
-	@IgnoreSecurity
-	@ApiOperation(value = "前端日志上传公共接口", httpMethod = "POST", notes = "前端日志上传公共接口")
-	public ResponseEntity upExceptionLog(@RequestParam(name = "files") List<MultipartFile> files,
-										 @RequestParam(name = "mobileOS") String mobileOS,
-										 @RequestParam(name = "platformType") int platformType) {
-		ResponseEntity responseEntity = new ResponseEntity();
-		try {
-			//前端日志上传公共接口
-			fileInfoService.upExceptionLog(files, mobileOS, platformType);
-			responseEntity.success();
-		} catch (Exception e) {
-			logger.error("前端日志上传公共接口异常", e);
-			responseEntity.failure(ResponseConstant.CODE_500, "前端日志上传公共接口上传异常");
-		}
-		return responseEntity;
-	}
-
-	@RequestMapping(value = "/getSystemTime", method = RequestMethod.POST)
-	@IgnoreSecurity
-	@ApiOperation(value = "获取服务器系统时间", httpMethod = "POST", notes = "获取服务器系统时间")
-	public ResponseEntity getSystemTime() {
-		ResponseEntity responseEntity = new ResponseEntity();
-		try {
-			Map<String, Object> data = new HashMap<>();
-			data.put("systemTime", new Date());
-			responseEntity.success(data, "成功");
-		} catch (Exception e) {
-			logger.error("获取服务器系统时间接口异常", e);
-			responseEntity.failure(ResponseConstant.CODE_500, "获取服务器系统时间异常");
-		}
-		return responseEntity;
-	}
-	@ApiOperation(value = "获取系统生成小塾号", httpMethod = "POST")
-	@IgnoreSecurity
-	@RequestMapping(value = "/getSystemDerver", method = RequestMethod.POST)
-	public ResponseEntity getSystemDerver(@RequestBody (required=true) ConchSystemDerverReq req ) {
-		ResponseEntity responseEntity;
-		try {
-			responseEntity = conchSystemDerverService.findByImeiAndSimcardAndSimNumbeer(req);
-		} catch (Exception e) {
-			logger.error("获取系统生成小塾号接口异常", e);
-			responseEntity = new ResponseEntity();
-			responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-		}
-		return responseEntity;
-	}
-
-	@ApiOperation(value = "注销用户角色",httpMethod = "POST")
-	@RequestMapping(value = "cancelRole",method = RequestMethod.POST)
-	public ResponseEntity cancelRole(@RequestParam(name = "accessToken") String accessToken ){
-		ResponseEntity responseEntity;
-		try {
-			 String userId= tokenManager.getUserId(accessToken);
-			responseEntity = teacherService.cancelTeacherRole(userId);
-		} catch (Exception e) {
-			logger.error("注销用户角色接口异常", e);
-			responseEntity = new ResponseEntity();
-			responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-		}
-		return responseEntity;
-
-	}
-
-	@ApiOperation(value = "获取小孩的作业服务",httpMethod = "POST")
-	@RequestMapping(value = "getChildService",method = RequestMethod.POST)
-	public ResponseEntity getChildService(@RequestParam(name = "accessToken") String accessToken, @RequestBody (required=true) VipIdReq req){
-		ResponseEntity responseEntity;
-		try {
-			responseEntity = appCommonService.getChildService(req.getVipId());
-		} catch (Exception e) {
-			logger.error("获取小孩的作业服务接口异常", e);
-			responseEntity = new ResponseEntity();
-			responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-		}
-		return responseEntity;
-
-	}
-}

+ 0 - 512
ssj-aijia-api/src/main/java/com/ssj/aijia/common/controller/AppUserController.java

@@ -1,512 +0,0 @@
-package com.ssj.aijia.common.controller;
-
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Comparator;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Objects;
-import java.util.Set;
-import java.util.TreeSet;
-
-import org.apache.commons.lang3.StringUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
-
-import com.alibaba.dubbo.config.annotation.Reference;
-import com.alibaba.fastjson.JSON;
-import com.ssj.bean.sys.appinfo.bean.AppInfo;
-import com.ssj.bean.weixin.libmy.domain.TbLibManager;
-import com.ssj.framework.basic.utils.DateHelper;
-import com.ssj.framework.core.common.controller.BaseController;
-import com.ssj.framework.core.security.annotation.IgnoreSecurity;
-import com.ssj.framework.core.security.manager.TokenManager;
-import com.ssj.framework.core.util.PropertiesUtil;
-import com.ssj.framework.core.util.ResponseConstant;
-import com.ssj.framework.core.util.ResponseEntity;
-import com.ssj.framework.core.util.StringUtil;
-import com.ssj.framework.weixin.util.CodeUserInfo;
-import com.ssj.framework.weixin.util.SessionKey;
-import com.ssj.framework.weixin.util.UserInfo;
-import com.ssj.framework.weixin.util.WxUtil;
-import com.ssj.service.sys.appinfo.service.AppInfoService;
-import com.ssj.service.weixin.library.service.IBookManagerService;
-import com.ssj.service.weixin.user.request.LoginReturn;
-import com.ssj.service.weixin.user.request.LoginRole;
-import com.ssj.service.weixin.user.request.LoginTypeParam;
-import com.ssj.service.weixin.user.request.LoginVersionParam;
-import com.ssj.service.weixin.user.request.WeiXinCode;
-import com.ssj.service.weixin.user.service.UserService;
-
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-
-
-@Api(value = "各端用户登录相关公共接口", tags = "各端用户登录相关公共接口")
-@RestController
-@RequestMapping("/api/user")
-public class AppUserController extends BaseController {
-
-    @Autowired
-    private TokenManager tokenManager;
-    
-    @Reference(version = "1.0" ,timeout = 60000)
-    private UserService userService;
-	
-    @Reference(version = "1.0" ,timeout = 60000)
-	private IBookManagerService managerService; 
-
-
-    
-    @Reference(version = "1.0" ,timeout = 60000)
-    private AppInfoService appInfoService;
-	
-	@ApiOperation(value = "验证accessToken是否有效")  
-	@IgnoreSecurity
-	@RequestMapping(value = "/checkToken", method = RequestMethod.POST)
-	public ResponseEntity checkToken(@ApiParam(required = true, name = "accessToken", value = "验证accessToken是否有效")
-	                    @RequestParam(name = "accessToken",required = true) String accessToken) {
-		ResponseEntity responseEntity = new ResponseEntity();
-		if(accessToken ==null || !tokenManager.checkToken(accessToken)){
-			responseEntity.failure("accessToken无效");
-			return responseEntity;
-		}
-		responseEntity.success("accessToken有效");
-		return responseEntity;
-	}
-
-	@ApiOperation(value = "根据code获取accessToken")
-	@IgnoreSecurity
-	@RequestMapping(value = "/tlogin", method = RequestMethod.POST)
-	public ResponseEntity tlogin(@RequestBody(required = true) WeiXinCode req) {
-		ResponseEntity responseEntity = new ResponseEntity();
-		try {
-			long beginTime = System.currentTimeMillis();
-			long endTime = 0L;
-			logger.info("开始时间={}", beginTime);
-			if (StringUtils.isBlank(req.getCode())) {
-				responseEntity.failure("用户code为空");
-				return responseEntity;
-			}
-			String appId = WxUtil.map.get("tloveAppId");//默认为爱微孝appId
-			Integer appType = req.getAppType();
-			if (appType != null && appType == 3) {//时光合影appId
-				appId = WxUtil.map.get("tPhotoAppId");
-			} else if (appType != null && appType == 4) {//古诗词appid
-				appId = WxUtil.map.get("gsAppId");
-			} else if (appType != null && appType == 5) {//课后管理的小程序
-				appId = WxUtil.map.get("courseAppId");
-			} else if (appType != null && appType == 6) {//家长端小程序小程序
-				appId = WxUtil.map.get("jzdAppId");
-			} else if (appType != null && appType == 7) {//老师端小程序小程序(校长端和老师端是同一个)
-				appId = WxUtil.map.get("lsdAppId");
-			} else if (appType != null && appType == 14) {//馆长端小程序
-				appId = WxUtil.map.get("curatorAppId");
-			} else if (appType != null && appType == 20) {//小程序游戏
-				appId = WxUtil.map.get("gameAppId");
-			} else if (appType != null && appType == 21) {//机构老师端小程序
-				appId = WxUtil.map.get("jglsdAppId");
-			} else if (appType != null && appType == 22) {
-				//智力测试小程序
-				appId = WxUtil.map.get("intelligenceTestAppId");
-			} else if (appType != null && appType == 23) {
-				//小塾测评小程序
-				appId = WxUtil.map.get("openTestAppId");
-			}
-			endTime = System.currentTimeMillis();
-			logger.info("用时1={}", endTime - beginTime);
-			SessionKey key = WxUtil.getSeesionAndOpendId(req.getCode(), appId);
-			endTime = System.currentTimeMillis();
-			logger.info("用时2={}", endTime - beginTime);
-
-
-			if (StringUtil.isEmpty(key.getOpenId())) {
-				if (Objects.equals(appType, 22)) {
-					key.setOpenId("openid123456");
-				} else {
-					responseEntity.failure(ResponseConstant.CODE_888, "获取用户openId失败");
-					return responseEntity;
-				}
-			}
-			if (StringUtil.isEmpty(key.getUnionid())) {
-				if (Objects.equals(appType, 22)) {
-					key.setUnionid("unionid123456");
-				} else {
-					responseEntity.failure(ResponseConstant.CODE_888, "系统读取不到您的信息,请稍后再试");
-					return responseEntity;
-				}
-			}
-
-			String rdsession = WxUtil.get3rdSession();
-			Map<String, Object> data = new HashMap<String, Object>();
-			String userId = userService.insertXCXuser(key.getOpenId(), key.getUnionid(), appId, appType);
-			endTime = System.currentTimeMillis();
-			logger.info("用时3={}", endTime - beginTime);
-			/**
-			 * 保存用户的openId
-			 */
-			if (appType >= 6) {
-				/**
-				 * 保存用户的openId
-				 */
-				logger.info("家长端(老师端)小程序根据code获取accessToken--getOpenId=" + key.getOpenId());
-				logger.info("家长端(老师端)小程序根据code获取accessToken--getSessionKey=" + key.getSessionKey());
-				String accessToken = tokenManager.createToken(rdsession, userId, key.getOpenId(), 4, key.getSessionKey(), "WX");
-				data.put("accessToken", accessToken);
-				logger.info("家长端(老师端)小程序根据code获取accessToken-redisOpenId=" + tokenManager.getOpenId(accessToken));
-				logger.info("家长端(老师端)小程序根据code获取accessToken-redisSessionKey=" + tokenManager.getSessionKey(accessToken));
-
-
-			} else {
-
-				logger.info("课后管理的小程序根据code获取accessToken--getOpenId=" + key.getOpenId());
-				logger.info("课后管理的小程序根据code获取accessToken--getSessionKey=" + key.getSessionKey());
-				String accessToken = tokenManager.createToken(rdsession, userId, key.getOpenId(), 5, key.getSessionKey(), "WX");
-				data.put("accessToken", accessToken);
-				logger.info("课后管理的小程序根据code获取accessToken-redisOpenId=" + tokenManager.getOpenId(accessToken));
-				logger.info("课后管理的小程序根据code获取accessToken-redisSessionKey=" + tokenManager.getSessionKey(accessToken));
-			}
-
-			if (appType == 7) {
-
-
-				List<LoginReturn> list = new ArrayList<LoginReturn>();
-				Set<Integer> arrayList = new HashSet<Integer>();
-				String tokenkey = "teacher" + userId;
-				//这里就是老师端 (线上,线下)
-				tokenManager.delString(tokenkey);
-				//查询是不是校长
-				List<TbLibManager> managerList = managerService.getByUserId(userId);
-				for (TbLibManager tbLibManager : managerList) {
-					int type = tbLibManager.getType();
-					String courseName = tbLibManager.getCourseName();
-					if (6 == type) {
-						arrayList.add(type);
-						list.add(new LoginReturn(type, "校长", tbLibManager.getLibId()));
-						//是校长生成二维码
-						userService.generateQrcode(userId);
-					} else if (2 == type) {
-						arrayList.add(type);
-						list.add(new LoginReturn(type, "线下老师(在馆老师)", tbLibManager.getLibId()));
-					} else if (7 == type && courseName != null && courseName.trim().length() > 0) {
-						arrayList.add(type);
-						list.add(new LoginReturn(type, "一对一老师"));
-					} else if (8 == type && courseName != null && courseName.trim().length() > 0) {
-						arrayList.add(type);
-						list.add(new LoginReturn(type, "线上老师(作业批改)"));
-					}
-				}
-				tokenManager.set(tokenkey, arrayList);
-				if (list.size() > 0) {
-					Set<LoginReturn> s = new TreeSet<LoginReturn>(new Comparator<LoginReturn>() {
-						@Override
-						public int compare(LoginReturn o1, LoginReturn o2) {
-							return o1.getType().compareTo(o2.getType());
-						}
-					});
-					s.addAll(list);
-					List<LoginRole> roleList = new ArrayList<LoginRole>();
-					List<LoginReturn> slist = new ArrayList<LoginReturn>(s);
-					List<LoginReturn> xzlist = new ArrayList<LoginReturn>();
-					List<LoginReturn> lslist = new ArrayList<LoginReturn>();
-					for (LoginReturn loginReturn : slist) {
-						if (loginReturn.getType() == 6) {
-							xzlist.add(loginReturn);
-						} else {
-							lslist.add(loginReturn);
-						}
-					}
-
-					if (xzlist.size() > 0) {
-						roleList.add(new LoginRole(1, "校长", xzlist));
-					}
-					if (lslist.size() > 0) {
-						roleList.add(new LoginRole(2, "老师", lslist));
-
-					}
-					data.put("list", roleList);
-				} else {
-
-					List<LoginRole> roleList = new ArrayList<LoginRole>();
-					List<LoginReturn> jzlist = new ArrayList<LoginReturn>();
-					jzlist.add(new LoginReturn(0, "家长"));
-					roleList.add(new LoginRole(0, "家长", jzlist));
-					data.put("list", roleList);
-				}
-
-			}
-			endTime = System.currentTimeMillis();
-			logger.info("用时4={}", endTime - beginTime);
-			responseEntity.success(data, "获取accessToken成功");
-		} catch (Exception e) {
-			logger.error("老师端APP微信登陆异常", e);
-
-			responseEntity.failure(ResponseConstant.CODE_000, "服务器发生异常,请稍后重试");
-		}
-
-		return responseEntity;
-	}
-
-	@ApiOperation(value = "根据code,userInfo获取accessToken")
-	@IgnoreSecurity
-	@RequestMapping(value = "/newlogin", method = RequestMethod.POST)
-	public ResponseEntity newlogin(@RequestBody(required = true) CodeUserInfo info) {
-		ResponseEntity responseEntity = new ResponseEntity();
-		try {
-			long beginTime = System.currentTimeMillis();
-			long endTime = 0L;
-			logger.info("开始时间={}", beginTime);
-			if (StringUtil.isEmpty(info.getCode())) {
-				responseEntity.failure("用户code为空");
-				return responseEntity;
-			}
-			if (StringUtil.isEmpty(info.getEncryptedData())) {
-				responseEntity.failure("用户信息为空");
-				return responseEntity;
-			}
-			if (StringUtil.isEmpty(info.getIv())) {
-				responseEntity.failure("用户信息iv为空");
-				return responseEntity;
-			}
-			String appId = WxUtil.map.get("tloveAppId");//默认为爱微孝appId
-			Integer appType = info.getAppType();
-			if (appType != null && appType == 3) {//时光合影appId
-				appId = WxUtil.map.get("tPhotoAppId");
-			} else if (appType != null && appType == 4) {//古诗词appid
-				appId = WxUtil.map.get("gsAppId");
-			} else if (appType != null && appType == 5) {//课后管理的小程序
-				appId = WxUtil.map.get("courseAppId");
-			} else if (appType != null && appType == 6) {//家长端小程序小程序
-				appId = WxUtil.map.get("jzdAppId");
-			} else if (appType != null && appType == 7) {//老师端小程序小程序(校长端和老师端是同一个)
-				appId = WxUtil.map.get("lsdAppId");
-			} else if (appType != null && appType == 14) {//馆长端小程序
-				appId = WxUtil.map.get("curatorAppId");
-			} else if (appType != null && appType == 20) {//小程序游戏
-				appId = WxUtil.map.get("gameAppId");
-			} else if (appType != null && appType == 21) {//机构老师端小程序
-				appId = WxUtil.map.get("jglsdAppId");
-			} else if (appType != null && appType == 22) {
-				//智力测试小程序
-				appId = WxUtil.map.get("intelligenceTestAppId");
-			} else if (appType != null && appType == 23) {
-				//小塾测评小程序
-				appId = WxUtil.map.get("openTestAppId");
-			}
-			endTime = System.currentTimeMillis();
-			logger.info("用时1={}", endTime - beginTime);
-			SessionKey key = WxUtil.getSeesionAndOpendId(info.getCode(), appId);
-			endTime = System.currentTimeMillis();
-			logger.info("用时2={}", endTime - beginTime);
-			if (null == key || key.getOpenId() == null) {
-				responseEntity.failure("获取用户openId失败");
-				return responseEntity;
-			}
-			String rdsession = WxUtil.get3rdSession();
-			Map<String, Object> data = new HashMap<String, Object>();
-
-			logger.info("userInfo——" + info);
-			logger.info("getEncryptedData->" + info.getEncryptedData());
-			String sessionKey = key.getSessionKey();
-			logger.info("sessionKey-)" + sessionKey);
-			logger.info("info.getIv()-)" + info.getIv());
-			String result = AesCbcUtil.decrypt(info.getEncryptedData(), sessionKey, info.getIv(), "UTF-8");
-			logger.info("result——" + result);
-			if (StringUtil.isEmpty(result)) {
-				responseEntity.failure("系统读取不到您的信息,请稍后再试");
-				return responseEntity;
-			}
-			UserInfo userInfo = JSON.parseObject(result, UserInfo.class);
-			if (StringUtil.isBlank(userInfo.getOpenId()) || StringUtil.isBlank(userInfo.getUnionId())) {
-				responseEntity.failure(ResponseConstant.CODE_888, "系统读取不到您的信息,请稍后再试");
-				return responseEntity;
-			}
-
-			String userId = userService.newInsertXCXuser(key.getOpenId(), key.getUnionid(), appId, appType, userInfo);
-			endTime = System.currentTimeMillis();
-			logger.info("用时3={}", endTime - beginTime);
-			/**
-			 * 保存用户的openId
-			 */
-			if (appType >= 6) {
-				/**
-				 * 保存用户的openId
-				 */
-				logger.info("家长端(老师端)小程序根据code获取accessToken--getOpenId=" + key.getOpenId());
-				logger.info("家长端(老师端)小程序根据code获取accessToken--getSessionKey=" + key.getSessionKey());
-				String accessToken = tokenManager.createToken(rdsession, userId, key.getOpenId(), 4, key.getSessionKey(), "WX");
-				data.put("accessToken", accessToken);
-				logger.info("家长端(老师端)小程序根据code获取accessToken-redisOpenId=" + tokenManager.getOpenId(accessToken));
-				logger.info("家长端(老师端)小程序根据code获取accessToken-redisSessionKey=" + tokenManager.getSessionKey(accessToken));
-
-
-			} else {
-
-				logger.info("课后管理的小程序根据code获取accessToken--getOpenId=" + key.getOpenId());
-				logger.info("课后管理的小程序根据code获取accessToken--getSessionKey=" + key.getSessionKey());
-				String accessToken = tokenManager.createToken(rdsession, userId, key.getOpenId(), 5, key.getSessionKey(), "WX");
-				data.put("accessToken", accessToken);
-				logger.info("课后管理的小程序根据code获取accessToken-redisOpenId=" + tokenManager.getOpenId(accessToken));
-				logger.info("课后管理的小程序根据code获取accessToken-redisSessionKey=" + tokenManager.getSessionKey(accessToken));
-			}
-
-			if (appType == 7) {
-
-
-				List<LoginReturn> list = new ArrayList<LoginReturn>();
-				Set<Integer> arrayList = new HashSet<Integer>();
-				String tokenkey = "teacher" + userId;
-				//这里就是老师端 (线上,线下)
-				tokenManager.delString(tokenkey);
-				//查询是不是校长
-				List<TbLibManager> managerList = managerService.getByUserId(userId);
-				for (TbLibManager tbLibManager : managerList) {
-					int type = tbLibManager.getType();
-					String courseName = tbLibManager.getCourseName();
-					if (6 == type) {
-						arrayList.add(type);
-						list.add(new LoginReturn(type, "校长", tbLibManager.getLibId()));
-						//是校长生成二维码
-						userService.generateQrcode(userId);
-					} else if (2 == type) {
-						arrayList.add(type);
-						list.add(new LoginReturn(type, "线下老师(在馆老师)", tbLibManager.getLibId()));
-					} else if (7 == type && courseName != null && courseName.trim().length() > 0) {
-						arrayList.add(type);
-						list.add(new LoginReturn(type, "一对一老师"));
-					} else if (8 == type && courseName != null && courseName.trim().length() > 0) {
-						arrayList.add(type);
-						list.add(new LoginReturn(type, "线上老师(作业批改)"));
-					}
-				}
-				tokenManager.set(tokenkey, arrayList);
-				if (list.size() > 0) {
-					Set<LoginReturn> s = new TreeSet<LoginReturn>(new Comparator<LoginReturn>() {
-						@Override
-						public int compare(LoginReturn o1, LoginReturn o2) {
-							return o1.getType().compareTo(o2.getType());
-						}
-					});
-					s.addAll(list);
-					List<LoginRole> roleList = new ArrayList<LoginRole>();
-					List<LoginReturn> slist = new ArrayList<LoginReturn>(s);
-					List<LoginReturn> xzlist = new ArrayList<LoginReturn>();
-					List<LoginReturn> lslist = new ArrayList<LoginReturn>();
-					for (LoginReturn loginReturn : slist) {
-						if (loginReturn.getType() == 6) {
-							xzlist.add(loginReturn);
-						} else {
-							lslist.add(loginReturn);
-						}
-					}
-
-					if (xzlist.size() > 0) {
-						roleList.add(new LoginRole(1, "校长", xzlist));
-					}
-					if (lslist.size() > 0) {
-						roleList.add(new LoginRole(2, "老师", lslist));
-
-					}
-					data.put("list", roleList);
-				} else {
-
-					List<LoginRole> roleList = new ArrayList<LoginRole>();
-					List<LoginReturn> jzlist = new ArrayList<LoginReturn>();
-					jzlist.add(new LoginReturn(0, "家长"));
-					roleList.add(new LoginRole(0, "家长", jzlist));
-					data.put("list", roleList);
-				}
-
-			}
-			endTime = System.currentTimeMillis();
-			logger.info("用时4={}", endTime - beginTime);
-			responseEntity.success(data, "获取accessToken成功");
-		} catch (Exception e) {
-			e.printStackTrace();
-			responseEntity.failure(ResponseConstant.CODE_000, "系统繁忙,请稍后重试");
-		}
-		return responseEntity;
-	}
-	
-   
-	 /**
-      * 退出登录
-      * @param accessToken
-      * @return
-      */
-     @IgnoreSecurity
-     @ApiOperation(value = "退出登录")
-     @RequestMapping(value = "/logout", method = RequestMethod.POST)
-     public ResponseEntity logout(@RequestParam(name = "accessToken") String accessToken) {
-         tokenManager.removeToken(accessToken);
-         return new ResponseEntity().success();
-     }
-     
-     /**
-      * 返回登录方式,便于Ios调过校验。如果是0则表示是ios微信授权登录页面,1则表示是ios正常登录注册界面
-      *
-      * @return
-      */
-     @ApiOperation(value = "返回登录方式",httpMethod = "POST")
-     @IgnoreSecurity
-     @RequestMapping(value = "/getLoginType",method = RequestMethod.POST)
-     public ResponseEntity getLoginType(@RequestBody (required=true) LoginTypeParam param) {
-         ResponseEntity responseEntity = new ResponseEntity();
-         //判断传入的审核时间和服务器当前时间对比是否小于7天
-         try {
-        	 String loginType = PropertiesUtil.getValue("IOS_LOGIN_TYPE");
-        	 
-        	 Map<String, Object> data = new HashMap<String,Object>();
-             
-        	 SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
-     		 int days = DateHelper.daysBetween(sdf.parse(param.getValidateTime()),new Date());
-        	 if(days <= 7 && loginType.equals("1")) {
-        		//如果小于7天那么就是账号密码登录 并且 数据库中返回登录方式是账号密码方式 则返回账号密码的方式登录
-        		 data.put("loginType", "1");
-        		 responseEntity.success(data,"成功");
-                 return responseEntity;
-        	 }
-    		 data.put("loginType", "0");
-    		 responseEntity.success(data,"成功");
-		 } catch (ParseException e) {
-			responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-		 }
-         return responseEntity;
-     }
-     
-     /**
-      * 返回登录方式,便于Ios调过校验。如果是0则表示是ios微信授权登录页面,1则表示是ios正常登录注册界面
-      *
-      * @return
-      */
-     @ApiOperation(value = "ios根据版本返回登录方式",httpMethod = "POST")
-     @IgnoreSecurity
-     @RequestMapping(value = "/getVersionLoginType",method = RequestMethod.POST)
-     public ResponseEntity getVersionLoginType(@RequestBody (required=true) LoginVersionParam param) {
-         ResponseEntity responseEntity = new ResponseEntity();
-         try {
-        	 AppInfo appInfo = appInfoService.findTopByVersionAndType(param.getVersion(), param.getType());
-        	 Map<String, Object> data = new HashMap<String,Object>();
-        	 if(appInfo != null) {
-        		 //如果数据库存在ios版本记录信息,则返回微信授权登录方式
-        		 data.put("loginType", "0");
-        	 }else {
-        		 data.put("loginType", "1");
-        	 }
-    		 responseEntity.success(data,"成功");
-		 } catch (Exception e) {
-			responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-		 }
-         return responseEntity;
-     }
-     
-}

Fichier diff supprimé car celui-ci est trop grand
+ 0 - 1165
ssj-aijia-api/src/main/java/com/ssj/aijia/common/controller/DevopsManagerController.java


+ 0 - 36
ssj-aijia-api/src/main/java/com/ssj/aijia/common/controller/UeditorController.java

@@ -1,36 +0,0 @@
-package com.ssj.aijia.common.controller;
-
-import com.alibaba.fastjson.JSON;
-import com.alibaba.fastjson.JSONObject;
-import com.ssj.framework.core.security.annotation.IgnoreSecurity;
-import com.ssj.ueditor.ActionEnter;
-import org.json.JSONException;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.ResponseBody;
-import org.springframework.web.bind.annotation.RestController;
-
-import javax.servlet.http.HttpServletRequest;
-import java.io.UnsupportedEncodingException;
-
-/**
- * 用于处理关于ueditor插件相关的请求
- * @author chchen
- * @date 2019-11-11
- *
- */
-@RestController
-@RequestMapping("/api/common/ueditor")
-public class UeditorController {
-
-	@RequestMapping(value = "/exec")
-	@IgnoreSecurity
-	@ResponseBody
-	public JSONObject exec(HttpServletRequest request) throws UnsupportedEncodingException, JSONException {
-		request.setCharacterEncoding("utf-8");
-		String rootPath = request.getRealPath("/");
-		String result = new ActionEnter( request, rootPath ).exec();
-		return JSON.parseObject(result);
-//		return result;
-	}
-	
-}

+ 0 - 97
ssj-aijia-api/src/main/java/com/ssj/aijia/common/controller/UtilController.java

@@ -1,97 +0,0 @@
-package com.ssj.aijia.common.controller;
-
-import java.util.Arrays;
-import java.util.Date;
-import java.util.List;
-
-import org.apache.commons.lang3.StringUtils;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
-
-import com.alibaba.dubbo.config.annotation.Reference;
-import com.alibaba.fastjson.JSONObject;
-import com.ssj.bean.weixin.libmy.domain.LibVipBind;
-import com.ssj.bean.weixin.problem.domain.CnArea;
-import com.ssj.framework.core.common.controller.BaseController;
-import com.ssj.framework.core.security.annotation.IgnoreSecurity;
-import com.ssj.framework.core.util.ResponseConstant;
-import com.ssj.framework.core.util.ResponseEntity;
-import com.ssj.service.conch.utils.MapUtils;
-import com.ssj.service.weixin.library.service.LibVipBindService;
-import com.ssj.service.weixin.problem.service.CnAreaService;
-
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-
-/**
- * @author Mount Liu
- * @date 2019/4/9
- */
-@Api(value = "工具类相关公共接口", tags = "工具类相关公共接口")
-@RestController
-@RequestMapping("/api/util")
-public class UtilController extends BaseController {
-
-    @Reference(version = "1.0", timeout = 60000)
-    private CnAreaService cnAreaService;
-    @Reference(version = "1.0", timeout = 60000)
-    private LibVipBindService libVipBindService;
-
-    @ApiOperation(value = "更新sys_cn_area的经纬度信息", httpMethod = "POST")
-    @IgnoreSecurity
-    @RequestMapping(value = "/updateLonAndLatOfCnArea", method = RequestMethod.POST)
-    public ResponseEntity updateLonAndLatOfCnArea(@RequestParam(name = "createTime") String createTime) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            List<CnArea> list = cnAreaService.findListByCreateTime(createTime);
-            for (CnArea cnArea : list) {
-                if (StringUtils.isNotBlank(cnArea.getSchoolAddress())) {
-                    JSONObject location = MapUtils.getLngAndLat(cnArea.getSchoolAddress());
-                    Thread.sleep(500);
-                    if (location != null) {
-                        cnArea.setSchoolLng(location.getString("lng"));
-                        cnArea.setSchoolLat(location.getString("lat"));
-                        cnAreaService.save(cnArea);
-                    }
-                }
-            }
-            responseEntity.success("成功");
-        } catch (Exception e) {
-            responseEntity.failure(ResponseConstant.CODE_500, e.getMessage());
-        }
-        return responseEntity;
-    }
-
-    @ApiOperation(value = "绑定老师和学生(问老师端)", httpMethod = "POST")
-    @IgnoreSecurity
-    @RequestMapping(value = "/bindTeacherAndVip", method = RequestMethod.POST)
-    public ResponseEntity bindTeacherAndVip(@RequestParam(name = "vipIds") String vipIds,
-                                            @RequestParam(name = "teacherId") String teacherId,
-                                            @RequestParam(name = "subject") String subject) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            List<String> vipIdList = Arrays.asList(vipIds.split(","));
-            int i = 0;
-            for (String vipId : vipIdList) {
-                LibVipBind libVipBind = libVipBindService.findByVipIdAndSubject(vipId, subject);
-                if (libVipBind == null) {
-                    libVipBind = new LibVipBind();
-                    libVipBind.setCreateTime(new Date());
-                    libVipBind.setVipId(vipId);
-                    libVipBind.setSubject(subject);
-                    libVipBind.setTeacherId(teacherId);
-                } else {
-                    libVipBind.setTeacherId(teacherId);
-                }
-                libVipBindService.save(libVipBind);
-            }
-            responseEntity.success("成功");
-        } catch (Exception e) {
-            responseEntity.failure(ResponseConstant.CODE_500, e.getMessage());
-        }
-        return responseEntity;
-    }
-
-}

Fichier diff supprimé car celui-ci est trop grand
+ 0 - 1011
ssj-aijia-api/src/main/java/com/ssj/aijia/conch/controller/ConchAppController.java


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 1061
ssj-aijia-api/src/main/java/com/ssj/aijia/conch/controller/ConchController.java


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 1132
ssj-aijia-api/src/main/java/com/ssj/aijia/conch/controller/ConchPadController.java


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 1044
ssj-aijia-api/src/main/java/com/ssj/aijia/conch/controller/ConchProController.java


+ 0 - 716
ssj-aijia-api/src/main/java/com/ssj/aijia/conch/controller/PdConchController.java

@@ -1,716 +0,0 @@
-package com.ssj.aijia.conch.controller;
-
-import com.alibaba.dubbo.config.annotation.Reference;
-import com.alibaba.fastjson.JSON;
-import com.alibaba.fastjson.JSONObject;
-import com.aliyun.oss.OSSClient;
-import com.aliyun.oss.common.auth.DefaultCredentialProvider;
-import com.ssj.bean.conch.conch.domain.ConchDerver;
-import com.ssj.bean.sys.appinfo.bean.AppInfo;
-import com.ssj.conch.constant.ConchConstants;
-import com.ssj.conch.push.util.PushConstants;
-import com.ssj.conch.util.ConchVerify;
-import com.ssj.framework.basic.utils.DateHelper;
-import com.ssj.framework.basic.utils.StringUtils;
-import com.ssj.framework.core.common.controller.BaseController;
-import com.ssj.framework.core.security.annotation.IgnoreSecurity;
-import com.ssj.framework.core.security.exception.ConchException;
-import com.ssj.framework.core.security.manager.TokenManager;
-import com.ssj.framework.core.util.*;
-import com.ssj.framework.weixin.util.DateUtil;
-import com.ssj.framework.weixin.util.WeixinUtil;
-import com.ssj.service.conch.conch.pdrequest.EvaluateReq;
-import com.ssj.service.conch.conch.pdrequest.PointlistReq;
-import com.ssj.service.conch.conch.pdrequest.RecordList;
-import com.ssj.service.conch.conch.request.*;
-import com.ssj.service.conch.conch.service.ConchDerverService;
-import com.ssj.service.conch.parents.v1.request.WifiReq;
-import com.ssj.service.sys.easemob.service.EasemobService;
-import com.ssj.service.sys.push.service.SconPushMessageService;
-import com.ssj.service.sys.push.service.SconXingeService;
-import com.ssj.service.weixin.user.service.UserService;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
-
-import java.io.FileInputStream;
-import java.util.*;
-
-/**
- * @author  ZhangCaibao
- * @version 2018年12月11日 下午2:28:30 
- * 类说明  跟上海联调
- */
-@Api(value = "培典晓方块硬件端相关的接口", tags = "培典晓方块硬件端相关的接口")
-@RestController
-@RequestMapping("/api/pdconch/conch")
-public class PdConchController extends BaseController {
-
-	@Reference(version = "1.0" ,timeout = 60000)
-	private ConchDerverService conchDerverService;
-
-	@Autowired
-	private TokenManager tokenManager;
-
-	@Reference(version = "1.0" ,timeout = 60000)
-	private UserService userService;
-	@Reference(version = "1.0" ,timeout = 60000)
-	private SconPushMessageService sconPushMessageService;
-	@Reference(version = "1.0" ,timeout = 60000)
-	private SconXingeService sconXingeService;
-	@Reference(version = "1.0" ,timeout = 60000)
-	private EasemobService easemobService;
-
-
-	@ApiOperation(value = "获取注册二维码", httpMethod = "POST")
-	@IgnoreSecurity
-	@RequestMapping(value = "/bindQr", method = RequestMethod.POST)
-	public ResponseEntity bindQr(@RequestBody QrRequest qrequest) {
-		ResponseEntity responseEntity = new ResponseEntity();
-		try {
-			ConchVerify.verifyTime(qrequest.getCurrentTime());
-			if( StringUtils.isEmpty(qrequest.getDerver())){
-				responseEntity.failure("设备为空");
-				return responseEntity;
-			}
-			logger.info("qrequest.getDerver()="+qrequest.getDerver());
-			StringBuffer dataStr = new StringBuffer();
-			dataStr.append(qrequest.getCurrentTime()).append(qrequest.getDerver()).append(qrequest.getNonceStr());
-			ConchVerify.verify(qrequest.getDerver(), qrequest.getSign(), dataStr);
-
-			String key ="req"+qrequest.getDerver();
-			String requestsNum = tokenManager.getString(key);
-			if(requestsNum!=null){
-				logger.error(String.format("获取二维码请求太频繁 [%s] 请稍后", qrequest.getDerver()));
-				responseEntity.failure(ResponseConstant.CODE_503,"获取二维码请求太频繁");
-				return responseEntity;
-			}
-			tokenManager.setString(key, "1",2);
-
-			ConchDerver  conchDerver=  conchDerverService.getConchQrCode(qrequest.getDerver(),2);
-
-			//判断是否生成环信账号
-			if(StringUtils.isBlank(conchDerver.getEasemobName())) {
-				//生成环信账号
-				String easemobName = userService.createUniqueEasemobName();
-				//创建小孩环信账号
-				easemobService.createUserSingle(easemobName, conchDerver.getDerver());
-				conchDerver.setEasemobName(easemobName);
-				tokenManager.setEasemob(conchDerver.getDerver(), easemobName);
-				conchDerverService.save(conchDerver);
-			}
-
-			logger.info("上海调用接口返回="+conchDerver);
-			Map<String, Object> data = new HashMap<String, Object>();
-			data.put("type", conchDerver.getType());
-			Map<String,Object>  map = new  HashMap<String,Object>();
-			map.put("deviceNo", qrequest.getDerver());
-			String  result=HttpRemote.GETMethod(WeixinUtil.url+"/ctq/getCtqQR", map);
-			logger.info("获取注册二维码--返回"+result);
-			//使用FastJson将Json字符串解析成Json对象
-			JSONObject json = JSON.parseObject(result);
-			Integer status= json.getInteger("status");
-
-			String message = json.getString("message");
-			if(status ==-2 || status==0 || status ==-3){
-				int stat=0;
-				if("DEVICE_ALREADY_BIND".equals(message)){
-					stat=1;
-				}
-				data.put("stat", stat);// 1已绑定设备。0未绑定
-				data.put("easemobName", conchDerver.getEasemobName());
-				data.put("userName", "");
-				data.put("imgUrl", "");
-				data.put("qrCode", json.getString("qrCode"));
-				data.put("qrCodeImg","");
-				data.put("accessToken", tokenManager.createToken(CodecUtil.createUUID(),qrequest.getDerver(),"APP"));
-			}else{
-				responseEntity.failure(ResponseConstant.CODE_500, message);
-				return responseEntity;
-			}
-			responseEntity.success(data, "获取二维码成功");
-
-		} catch (ConchException e) {
-			logger.error("获取注册二维码权异常", e);
-			responseEntity.failure(ResponseConstant.CODE_500, e.getMessage());
-		} catch (Exception e) {
-			logger.error("获取注册二维码异常", e);
-			responseEntity.failure(ResponseConstant.CODE_500, "获取注册二维码权异常");
-		}
-		return responseEntity;
-	}
-
-
-	@ApiOperation(value = "晓时光获取accessToken", httpMethod = "POST")
-	@IgnoreSecurity
-	@RequestMapping(value = "/getAccessToken", method = RequestMethod.POST)
-	public ResponseEntity getAccessToken(@RequestBody QrRequest qrequest) {
-		ResponseEntity responseEntity = new ResponseEntity();
-		try {
-			ConchVerify.verifyTime(qrequest.getCurrentTime());
-			StringBuffer dataStr = new StringBuffer();
-			dataStr.append(qrequest.getCurrentTime().toString()).append(qrequest.getDerver())
-					.append(qrequest.getNonceStr());
-			ConchVerify.verify(qrequest.getDerver(), qrequest.getSign(), dataStr);
-			logger.info("qrequest.getDerver()="+qrequest.getDerver());
-
-			ConchDerver conchDerver = conchDerverService.findByDerver(qrequest.getDerver());
-			if (conchDerver != null) {
-				Map<String,Object>  map = new  HashMap<String,Object>();
-				map.put("deviceNo", qrequest.getDerver());
-				String  result=HttpRemote.GETMethod(WeixinUtil.url+"/ctq/getCtqQR", map);
-				logger.info("晓时光获取注册二维码--返回"+result);
-				//使用FastJson将Json字符串解析成Json对象
-				JSONObject json = JSON.parseObject(result);
-				Integer status= json.getInteger("status");
-
-				String message = json.getString("message");
-				if(status ==-2 || status==0 || status ==-3){
-
-					Map<String, Object> data = new HashMap<String, Object>();
-					data.put("easemobName", conchDerver.getEasemobName());
-					data.put("accessToken", tokenManager.createToken(CodecUtil.createUUID(),qrequest.getDerver(),"APP"));
-					responseEntity.success(data, "获取accessToken成功");
-				}else{
-					responseEntity.failure(ResponseConstant.CODE_500, message);
-
-				}
-
-			} else {
-				responseEntity.failure(ResponseConstant.CODE_000, "该设备不存在!");
-			}
-
-
-
-
-		} catch (ConchException e) {
-			logger.error("晓时光获取accessToken异常", e);
-			responseEntity.failure(ResponseConstant.CODE_500, e.getMessage());
-		} catch (Exception e) {
-			logger.error("晓时光获取accessToken异常", e);
-			responseEntity.failure(ResponseConstant.CODE_500, "获取accessToken异常");
-		}
-		return responseEntity;
-	}
-
-
-
-
-	@RequestMapping(value = "/uploadPicture", method = RequestMethod.POST)
-	@ApiOperation(value = "上传图片", httpMethod = "POST", notes = "上传图片")
-	public ResponseEntity uploadPicture(@RequestParam(name = "accessToken") String accessToken,
-										@RequestBody UploadPictureRequest request) {
-		logger.info("accessToken:{} ,derver:{} ", accessToken, request.getDerver());
-		logger.info(request.toString());
-		ResponseEntity responseEntity = new ResponseEntity();
-		try {
-			if( StringUtil.isEmpty(request.getDerver())){
-				responseEntity.failure("设备为空");
-				return responseEntity;
-			}
-			if( StringUtil.isEmpty(request.getDerverFileId())){
-				responseEntity.failure("DerverFileId为空");
-				return responseEntity;
-			}
-			if( StringUtil.isEmpty(request.getFileKeys())){
-				responseEntity.failure("图片路径为空");
-				return responseEntity;
-			}
-			Map<String,Object>  map = new  HashMap<String,Object>();
-			map.put("deviceNo", request.getDerver());
-			String  result=HttpRemote.GETMethod(WeixinUtil.url+"/ctq/getOssfsToken", map);
-			logger.info("获取获取阿里云OSS上传Token--返回"+result);
-			//使用FastJson将Json字符串解析成Json对象
-			JSONObject json = JSON.parseObject(result);
-			Integer status= json.getInteger("status");
-			//String message= json.getString("message");
-			Map<String, Object> data = new HashMap<String, Object>();
-			if(status ==0){
-				String accessKeyId = json.getString("accessKeyId");
-				String secretKeyId = json.getString("secretKeyId");
-				String securityToken = json.getString("securityToken");
-				String uploadPath = json.getString("uploadPath");
-				// Endpoint以杭州为例,其它Region请按实际情况填写。
-				String endpoint = "https://oss-cn-shanghai.aliyuncs.com";
-				// 阿里云主账号AccessKey拥有所有API的访问权限,风险很高。强烈建议您创建并使用RAM账号进行API访问或日常运维,请登录 https://ram.console.aliyun.com 创建RAM账号。
-				// 创建OSSClient实例。
-				// 得到去除路径的文件名
-				String path =request.getFileKeys();
-
-				String file_name= path.substring(path.lastIndexOf("/") + 1);
-				OSSClient ossClient = new OSSClient(endpoint, new DefaultCredentialProvider(accessKeyId, secretKeyId, securityToken),null);
-
-				try {
-					ossClient.putObject(WeixinUtil.bucketName, uploadPath+file_name,
-							new FileInputStream(PropertiesUtil.getValue("file_save_path")+request.getFileKeys()));
-				} catch (Exception e) {
-					logger.error("培典OSS上传异常..."+e);
-				}finally{
-					ossClient.shutdown();
-				}
-
-				logger.error("培典上传oss图片--返回"+uploadPath+file_name);
-
-				logger.error("accessKeyId:{} ,secretKeyId:{} ", accessKeyId,secretKeyId);
-				Map<String, Object> map1= new HashMap<String,Object>();
-				map1.put("deviceFileId",  request.getDerverFileId());
-				map1.put("deviceNo",request.getDerver());
-				map1.put("picUrl", uploadPath+file_name);
-				result=HttpRemote.POSTMethod(WeixinUtil.url+"/ctq/savePictureInfo", JSONObject.toJSONString(map1));
-				logger.info("上传培典保存图片--返回"+result);
-				status= json.getInteger("status");
-				if(0==status){
-					data.put("point", json.getInteger("point"));
-				}
-				data.put("bizId", "");
-				responseEntity.success(data, "成功");
-			}else{
-				responseEntity.failure(status+"", json.getString("message"));
-			}
-
-
-		} catch (ConchException e) {
-			logger.error("上传图片异常", e);
-			responseEntity.failure(ResponseConstant.CODE_500, e.getMessage());
-		} catch (Exception e) {
-			logger.error("上传图片异常", e);
-			responseEntity.failure(ResponseConstant.CODE_500, e.getMessage());
-		}
-		return responseEntity;
-	}
-
-	@RequestMapping(value = "/updateSimcard", method = RequestMethod.POST)
-	@IgnoreSecurity
-	@ApiOperation(value = "小塾上传sim卡号", httpMethod = "POST", notes = "小塾上传sim卡号")
-	public ResponseEntity updateSimcard(@RequestBody SimcardRequest request) {
-		ResponseEntity responseEntity = new ResponseEntity();
-		try {
-			if( StringUtil.isEmpty(request.getDerver())){
-				responseEntity.failure("设备为空");
-				return responseEntity;
-			}
-			if( StringUtil.isEmpty(request.getSimcard())){
-				responseEntity.failure("sim卡为空");
-				return responseEntity;
-			}
-			//绑定设备号和sim卡关系便于后台查找
-			conchDerverService.bindDerverSimcard(request.getDerver(), request.getSimcard());
-			responseEntity.success();
-		} catch (Exception e) {
-			logger.error("小塾上传sim卡号异常", e);
-			responseEntity.failure(ResponseConstant.CODE_500, "小塾上传sim卡号异常");
-		}
-		return responseEntity;
-	}
-	@RequestMapping(value = "/version", method = RequestMethod.POST)
-	@IgnoreSecurity
-	@ApiOperation(value = "获取当前版本", httpMethod = "POST", notes = "获取当前版本")
-	public ResponseEntity version() {
-		ResponseEntity responseEntity = new ResponseEntity();
-		try {
-			AppInfo appInfo = conchDerverService.getVersion(4);
-			Map<String,Object> map = new HashMap<>(16);
-			if(appInfo != null) {
-				map.put("id", appInfo.getId());
-				map.put("version", appInfo.getVersion());
-				map.put("fileKey", appInfo.getFileKey());
-				map.put("versionType", appInfo.getVersionType());
-				map.put("issueNum", appInfo.getIssueNum());
-				map.put("createTime", appInfo.getCreateTime());
-				map.put("isDelete", appInfo.getIsDelete());
-				map.put("needUpdate",appInfo.getNeedUpdate());
-			}
-			responseEntity.success(map, "成功");
-		} catch (ConchException e) {
-			logger.error("获取当前版本异常", e);
-			responseEntity.failure(ResponseConstant.CODE_500, e.getMessage());
-		} catch (Exception e) {
-			logger.error("获取当前版本异常", e);
-			responseEntity.failure(ResponseConstant.CODE_500, e.getMessage());
-		}
-		logger.info("version end");
-		return responseEntity;
-	}
-	@RequestMapping(value = "/updateVersion", method = RequestMethod.POST)
-	@ApiOperation(value = "修改设备版本", httpMethod = "POST", notes = "修改设备版本")
-	public ResponseEntity updateVersion(@RequestParam(name = "accessToken") String accessToken,
-										@RequestBody VersionRequest request) {
-		logger.info("updateVersion start");
-		logger.info("derver:" + request.getDerver());
-		ResponseEntity responseEntity = new ResponseEntity();
-		try {
-			if( StringUtil.isEmpty(request.getDerver())){
-				responseEntity.failure("设备为空");
-				return responseEntity;
-			}
-			ConchVerify.verifyTime(request.getCurrentTime());
-			conchDerverService.updateVersion(request.getDerver(), request.getVersion(), request.getVersionType(),
-					request.getIssueNum());
-			responseEntity.success();
-		}catch (Exception e) {
-			logger.error("修改设备版本异常", e);
-			responseEntity.failure(ResponseConstant.CODE_500, e.getMessage());
-		}
-		logger.info("updateVersion end");
-		return responseEntity;
-	}
-	@RequestMapping(value = "/updateXinGeToken", method = RequestMethod.POST)
-	@IgnoreSecurity
-	@ApiOperation(value = "贝壳登录后,保存信鸽ID", httpMethod = "POST", notes = "小塾上传信鸽Token")
-	public ResponseEntity updateXinGeToken(@RequestParam(name = "accessToken") String accessToken,
-										   @RequestBody XinGeRequest request) {
-		ResponseEntity responseEntity = new ResponseEntity();
-		try {
-			if( StringUtil.isEmpty(request.getDerver())){
-				responseEntity.failure("设备为空");
-				return responseEntity;
-			}
-			sconXingeService.saveOrUpdate(request.getDerver(), request.getXingeToken(), PushConstants.PUSH_ANDROID, 1);
-			responseEntity.success();
-		} catch (Exception e) {
-			logger.error("小塾上传信鸽Token异常", e);
-			responseEntity.failure(ResponseConstant.CODE_500, "小塾上传信鸽Token异常");
-		}
-		return responseEntity;
-	}
-	@RequestMapping(value = "/bindSendDerver", method = RequestMethod.POST)
-	@IgnoreSecurity
-	@ApiOperation(value = "微信绑定后,推送给小塾", httpMethod = "POST", notes = "微信绑定后,推送给小塾")
-	public ResponseEntity bindSendDerver(@RequestParam(name = "derver",required = true)String derver) {
-		ResponseEntity responseEntity = new ResponseEntity();
-		try {
-			//推送绑定成功消息给小塾
-			Map<String,Object> map = new HashMap<String,Object>();
-			map.put("type", "BIND");
-			map.put("time", new Date());
-			map.put("data", "{}");
-			String content = JSON.toJSONString(map);
-			sconXingeService.asynPushPdThreadTask(derver, content);
-			responseEntity.success();
-		} catch (Exception e) {
-			logger.error("微信绑定后,推送给小塾异常", e);
-			responseEntity.failure(ResponseConstant.CODE_500, "微信绑定后,推送给小塾异常");
-		}
-		return responseEntity;
-	}
-	@RequestMapping(value = "/unbindSendDerver", method = RequestMethod.POST)
-	@IgnoreSecurity
-	@ApiOperation(value = "微信解除绑定后,推送给小塾", httpMethod = "POST", notes = "微信解除绑定后,推送给小塾")
-	public ResponseEntity unbindSendDerver(@RequestParam(name = "derver",required = true)String derver) {
-		ResponseEntity responseEntity = new ResponseEntity();
-		try {
-			//推送绑定成功消息给小塾
-			Map<String,Object> map = new HashMap<String,Object>();
-			map.put("type", "BIND");
-			map.put("time", new Date());
-			map.put("data", "{}");
-			String content = JSON.toJSONString(map);
-			sconXingeService.asynPushPdThreadTask(derver, content);
-			//删除 token 无效
-			tokenManager.delToken(derver);
-			responseEntity.success();
-		} catch (Exception e) {
-			logger.error("微信绑定后,推送给小塾异常", e);
-			responseEntity.failure(ResponseConstant.CODE_500, "微信绑定后,推送给小塾异常");
-		}
-		return responseEntity;
-	}
-	@RequestMapping(value = "/sendFeedback", method = RequestMethod.POST)
-	@IgnoreSecurity
-	@ApiOperation(value = "推送反馈消息给小塾", httpMethod = "POST", notes = "推送反馈消息给小塾")
-	public ResponseEntity sendFeedback( @RequestBody SendFeedbackReq req) {
-		ResponseEntity responseEntity = new ResponseEntity();
-		try {
-			logger.info(JSON.toJSONString(req));
-			if( StringUtil.isEmpty(req.getDerver())){
-				responseEntity.failure("设备为空");
-				return responseEntity;
-			}
-			if( StringUtil.isEmpty(req.getDeviceFileId())){
-				responseEntity.failure("deviceFileId为空");
-				return responseEntity;
-			}
-			ConchDerver conchDerver=conchDerverService.findByDerver(req.getDerver());
-			if( StringUtil.isEmpty(conchDerver)){
-				responseEntity.failure("设备为空");
-				return responseEntity;
-			}
-			//推送绑定成功消息给小塾
-			MessageData map = new  MessageData();
-			map.setType("PARENTS_SAY");
-			map.setTime(req.getMsgDatetime());
-			MessageDataMap map2 = new MessageDataMap();
-
-			if ("textContent".equals(req.getMsgType())) {
-				map2.setSayType(ConchConstants.SAY_TEXT);
-				map2.setContent(req.getMsgContent());
-				map2.setDuration("");
-			} else if ("voiceUrl".equals(req.getMsgType())) {
-
-				map2.setSayType(ConchConstants.SAY_VOICE);
-				map2.setContent("");
-				map2.setDuration(req.getDuration().toString());
-				map2.setDeviceFileSource(req.getMsgContent());
-
-			} else if ("photoUrl".equals(req.getMsgType())) {
-				map2.setSayType("IMAGE");
-				map2.setContent("");
-				map2.setDeviceFileSource(req.getMsgContent());
-
-			}
-
-			map2.setDeviceFileId(req.getDeviceFileId());
-			map2.setParentsSayId(req.getId());
-			map2.setTime(req.getMsgDatetime());
-			map2.setImgUrl(req.getUserAvatar());
-			map2.setUserType("T".equals(req.getUserType())?("0".equals(req.getCommentSource())?req.getUserType():req.getUserType()+req.getCommentSource()):req.getUserType());
-
-			map2.setUserNickname(req.getUserNickname());
-
-			map.setData(map2);
-			//推送爸妈说到小塾
-			sconXingeService.asynPushPdThreadTask(req.getDerver(), JSON.toJSONString(map));
-			responseEntity.success();
-		} catch (Exception e) {
-			logger.error("推送反馈消息给小塾异常", e);
-			responseEntity.failure(ResponseConstant.CODE_500, "推送反馈消息给小塾异常");
-		}
-		return responseEntity;
-	}
-	@RequestMapping(value = "/delFeedback", method = RequestMethod.POST)
-	@IgnoreSecurity
-	@ApiOperation(value = "删除反馈消息给晓时光", httpMethod = "POST", notes = "删除反馈消息给晓时光")
-	public ResponseEntity delFeedback( @RequestBody DelFeedbackReq req) {
-		ResponseEntity responseEntity = new ResponseEntity();
-		try {
-			logger.info("删除反馈消息给晓时光"+JSON.toJSONString(req));
-			if( StringUtil.isEmpty(req.getDerver())){
-				responseEntity.failure("设备为空");
-				return responseEntity;
-			}
-			if( StringUtil.isEmpty(req.getId())){
-				responseEntity.failure("消息唯一编号为空");
-				return responseEntity;
-			}
-			ConchDerver conchDerver=conchDerverService.findByDerver(req.getDerver());
-			if( StringUtil.isEmpty(conchDerver)){
-				responseEntity.failure("设备为空");
-				return responseEntity;
-			}
-			//推送绑定成功消息给小塾
-			MessageData map = new  MessageData();
-			map.setType("MESSAGE_DELETE");
-			map.setTime(DateHelper.format(new Date(),"yyyy-MM-dd HH:mm"));
-			MessageDataMap map2 = new MessageDataMap();
-			map2.setParentsSayId(req.getId());
-			map.setData(map2);
-			//推送爸妈说到小塾
-			sconXingeService.asynPushPdThreadTask(req.getDerver(), JSON.toJSONString(map));
-
-			sconPushMessageService.deleteByLikeContent(req.getDerver(),"\"parentsSayId\":\""+req.getId()+"\"");
-			responseEntity.success();
-		} catch (Exception e) {
-			logger.error("推送删除反馈消息给晓时光异常", e);
-			responseEntity.failure(ResponseConstant.CODE_500, "推送删除反馈消息给晓时光异常");
-		}
-		return responseEntity;
-	}
-
-	@RequestMapping(value = "/getPushList", method = RequestMethod.POST)
-	@ApiOperation(value = "获取贝壳推送记录", httpMethod = "POST", notes = "获取贝壳推送记录")
-	public ResponseEntity getPushList(@RequestParam(name = "accessToken") String accessToken,
-									  @RequestBody GetPushListRequest request) {
-		ResponseEntity responseEntity = new ResponseEntity();
-		try {
-			if( StringUtil.isEmpty(request.getDeviceFileId())){
-				responseEntity.failure("本地图片fileId为空");
-				return responseEntity;
-			}
-			Map<String, Object> data = new HashMap<String, Object>();
-			List<String> list =sconPushMessageService.findByLikeContent(tokenManager.getUserId(accessToken), request.getDeviceFileId(), request.getPageSize());
-			List<MessageData> datalist =new ArrayList<MessageData>();
-			for (String string : list) {
-				MessageData weibo = JSON.parseObject(string, MessageData.class);
-				datalist.add(weibo);
-			}
-			data.put("list", datalist);
-			responseEntity.success(data, "成功");
-		}catch (Exception e) {
-			logger.error("修改设备版本异常", e);
-			responseEntity.failure(ResponseConstant.CODE_500, e.getMessage());
-		}
-		return responseEntity;
-	}
-
-	@RequestMapping(value = "/connectWifi", method = RequestMethod.POST)
-	@IgnoreSecurity
-	@ApiOperation(value = "wifi连接", httpMethod = "POST", notes = "wifi连接")
-	public ResponseEntity connectWifi(@RequestBody WifiReq req) {
-		ResponseEntity responseEntity   = new ResponseEntity();
-		try {
-			ConchDerver conchDerver = conchDerverService.findByDerver(req.getDerver());
-			if (conchDerver != null) {
-				//推送密码信息给小塾
-				Map<String,Object> map = new HashMap<>(16);
-				map.put("type", "WIFI_INFO");
-				map.put("time", DateUtil.format_yyyyMMddHHmmss(new Date()));
-				Map<String,Object> data = new HashMap<>(16);
-				data.put("wifiName", req.getWifiName());
-				data.put("password", req.getPassword());
-				data.put("type", req.getType());
-				map.put("data", data);
-				String content = JSON.toJSONString(map);
-				sconXingeService.asynPushPdThreadTask(req.getDerver(), content);
-				responseEntity.success("推送成功");
-			}else{
-				responseEntity.failure("未找到相机");
-			}
-		} catch (Exception e) {
-
-			logger.error("异常信息", e);
-			responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-		}
-		return responseEntity;
-	}
-
-	@RequestMapping(value = "/uploadConchInitInfo", method = RequestMethod.POST)
-	@IgnoreSecurity
-	@ApiOperation(value = "小塾上传初始化信息", httpMethod = "POST", notes = "小塾上传初始化信息")
-	public ResponseEntity uploadConchInitInfo(@RequestBody ConchInitInfoRequest request) {
-		ResponseEntity responseEntity = new ResponseEntity();
-		try {
-			conchDerverService.uploadConchInitInfo(request,2);
-			responseEntity.success();
-		} catch (Exception e) {
-			logger.error("上传初始化信息异常", e);
-			responseEntity.failure(ResponseConstant.CODE_500, "上传初始化信息异常");
-		}
-		return responseEntity;
-	}
-
-
-	@RequestMapping(value = "/evaluate", method = RequestMethod.POST)
-	@ApiOperation(value = "评价老师反馈", httpMethod = "POST", notes = "评价老师反馈")
-	public ResponseEntity evaluate(@RequestParam(name = "accessToken") String accessToken,@RequestBody EvaluateReq req) {
-		ResponseEntity responseEntity = new ResponseEntity();
-		try {
-			if( StringUtil.isEmpty(req.getDerver())){
-				responseEntity.failure("设备号为空");
-				return responseEntity;
-			}
-			if( StringUtil.isEmpty(req.getFeedId())){
-				responseEntity.failure("反馈id为空");
-				return responseEntity;
-			}
-			if( StringUtil.isEmpty(req.getIsLike())){
-				responseEntity.failure("满意度为空");
-				return responseEntity;
-			}
-
-			Map<String, Object> map1= new HashMap<String,Object>();
-			map1.put("deviceNo",  req.getDerver());
-			map1.put("feedId",req.getFeedId());
-			map1.put("isLike", req.getIsLike());
-			String result=HttpRemote.POSTMethod(WeixinUtil.url+"/ctq/feed/evaluate", JSONObject.toJSONString(map1));
-			logger.info("上传培典评价老师反馈--返回"+result);
-			JSONObject json = JSON.parseObject(result);
-			Integer status= json.getInteger("status");
-			if(0==status){
-				Map<String, Object> data = new HashMap<String, Object>();
-				data.put("point",json.getString("point"));
-				responseEntity.success(data,"获取成功");
-			}else{
-				responseEntity.failure(json.getString("message"));
-			}
-
-		} catch (Exception e) {
-			logger.error("评价老师反馈异常", e);
-			responseEntity.failure(ResponseConstant.CODE_500, "评价老师反馈异常");
-		}
-		return responseEntity;
-	}
-
-	@RequestMapping(value = "/pointlist", method = RequestMethod.POST)
-	@ApiOperation(value = "积晓币明细", httpMethod = "POST", notes = "积晓币明细")
-	public ResponseEntity pointlist(@RequestParam(name = "accessToken") String accessToken,@RequestBody PointlistReq req) {
-		ResponseEntity responseEntity = new ResponseEntity();
-		try {
-			if( StringUtil.isEmpty(req.getDerver())){
-				responseEntity.failure("设备号为空");
-				return responseEntity;
-			}
-
-
-			Map<String, Object> map1= new HashMap<String,Object>();
-			map1.put("deviceNo",  req.getDerver());
-			map1.put("pageNo",req.getPageNo());
-			map1.put("pageSize", req.getPageSize());
-			String result=HttpRemote.POSTMethod(WeixinUtil.url+"/ctq/point/details", JSONObject.toJSONString(map1));
-			logger.info("积晓币明细--返回"+result);
-			//使用FastJson将Json字符串解析成Json对象
-			JSONObject json = JSON.parseObject(result);
-			Integer status= json.getInteger("status");
-
-			if(0==status){
-				String recordList=json.getString("pointList");
-				Integer total = json.getInteger("total");
-				List<RecordList> list = JSONObject.parseArray(recordList, RecordList.class);
-				Map<String, Object> data = new HashMap<String, Object>();
-				data.put("total",total);
-				data.put("pointList",list);
-				responseEntity.success(data,"获取成功");
-			}else{
-				responseEntity.failure(json.getString("message"));
-			}
-
-
-		} catch (Exception e) {
-			logger.error("积晓币明细异常", e);
-			responseEntity.failure(ResponseConstant.CODE_500, "积晓币明细异常");
-		}
-		return responseEntity;
-	}
-	@RequestMapping(value = "/userpoint", method = RequestMethod.POST)
-	@ApiOperation(value = "我的晓币信息", httpMethod = "POST", notes = "我的晓币信息")
-	public ResponseEntity userpoint(@RequestParam(name = "accessToken") String accessToken,@RequestBody DerverRequest req) {
-		ResponseEntity responseEntity = new ResponseEntity();
-		try {
-			if( StringUtil.isEmpty(req.getDerver())){
-				responseEntity.failure("设备号为空");
-				return responseEntity;
-			}
-
-
-
-
-			String result=HttpRemote.POSTMethod(WeixinUtil.url+"/ctq/point/"+req.getDerver(),"");
-			logger.info("我的晓币信息--返回"+result);
-			//使用FastJson将Json字符串解析成Json对象
-			JSONObject json = JSON.parseObject(result);
-			Integer status= json.getInteger("status");
-
-			if(0==status){
-
-				Integer totalPoint = json.getInteger("totalPoint");
-
-				String rankDesc = json.getString("rankDesc");
-
-				Map<String, Object> data = new HashMap<String, Object>();
-				data.put("totalPoint",totalPoint);
-
-				data.put("rankDesc",rankDesc);
-				responseEntity.success(data,"获取成功");
-			}else{
-				responseEntity.failure(json.getString("message"));
-			}
-
-
-		} catch (Exception e) {
-			logger.error("我的晓币信息异常", e);
-			responseEntity.failure(ResponseConstant.CODE_500, "我的晓币信息异常");
-		}
-		return responseEntity;
-	}
-
-}

+ 0 - 249
ssj-aijia-api/src/main/java/com/ssj/aijia/config/DruidConfiguration.java

@@ -1,249 +0,0 @@
-package com.ssj.aijia.config;
-
-import java.sql.SQLException;
-
-import javax.sql.DataSource;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.boot.context.properties.ConfigurationProperties;
-import org.springframework.boot.web.servlet.FilterRegistrationBean;
-import org.springframework.boot.web.servlet.ServletRegistrationBean;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-
-import com.alibaba.druid.pool.DruidDataSource;
-import com.alibaba.druid.support.http.StatViewServlet;
-import com.alibaba.druid.support.http.WebStatFilter;
-
-/**
- * @author yangcan
- * 类描述:阿里数据库连接池 Druid配置http://localhost/druid/index.html druid管理平台
- * 创建时间:2019年5月15日 下午3:41:27
-
- */
-@Configuration
-public class DruidConfiguration {
-	private static final Logger logger = LoggerFactory.getLogger(DruidConfiguration.class);
-	private static final String DB_PREFIX = "spring.datasource";
-
-	@Bean
-	public ServletRegistrationBean druidServlet() {
-		logger.info("init Druid Servlet Configuration ");
-		ServletRegistrationBean servletRegistrationBean = new ServletRegistrationBean(new StatViewServlet(),
-				"/druid/*");
-		// IP白名单 (没有配置或者为空,则允许所有访问)
-		servletRegistrationBean.addInitParameter("allow", "");
-		// IP黑名单(共同存在时,deny优先于allow)
-		// servletRegistrationBean.addInitParameter("deny", "192.168.1.100");
-		// 控制台管理用户
-		servletRegistrationBean.addInitParameter("loginUsername", "admin");
-		servletRegistrationBean.addInitParameter("loginPassword", "aijia123456");
-		// 是否能够重置数据 禁用HTML页面上的“Reset All”功能
-		servletRegistrationBean.addInitParameter("resetEnable", "false");
-		return servletRegistrationBean;
-	}
-
-	@Bean
-	public FilterRegistrationBean filterRegistrationBean() {
-		FilterRegistrationBean filterRegistrationBean = new FilterRegistrationBean(new WebStatFilter());
-		filterRegistrationBean.addUrlPatterns("/*");
-		filterRegistrationBean.addInitParameter("exclusions", "*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*");
-		return filterRegistrationBean;
-	}
-
-	@ConfigurationProperties(prefix = DB_PREFIX)
-	class IDataSourceProperties {
-		private String url;
-		private String username;
-		private String password;
-		private String driverClassName;
-		private int initialSize;
-		private int minIdle;
-		private int maxActive;
-		private int maxWait;
-		private int timeBetweenEvictionRunsMillis;
-		private int minEvictableIdleTimeMillis;
-		private String validationQuery;
-		private boolean testWhileIdle;
-		private boolean testOnBorrow;
-		private boolean testOnReturn;
-		private boolean poolPreparedStatements;
-		private int maxPoolPreparedStatementPerConnectionSize;
-		private String filters;
-		private String connectionProperties;
-
-		@Bean
-		public DataSource dataSource() {
-			DruidDataSource datasource = new DruidDataSource();
-			datasource.setUrl(url);
-			datasource.setUsername(username);
-			datasource.setPassword(password);
-			datasource.setDriverClassName(driverClassName);
-			// configuration
-			datasource.setInitialSize(initialSize);
-			datasource.setMinIdle(minIdle);
-			datasource.setMaxActive(maxActive);
-			datasource.setMaxWait(maxWait);
-			datasource.setTimeBetweenEvictionRunsMillis(timeBetweenEvictionRunsMillis);
-			datasource.setMinEvictableIdleTimeMillis(minEvictableIdleTimeMillis);
-			datasource.setValidationQuery(validationQuery);
-			datasource.setTestWhileIdle(testWhileIdle);
-			datasource.setTestOnBorrow(testOnBorrow);
-			datasource.setTestOnReturn(testOnReturn);
-			datasource.setPoolPreparedStatements(poolPreparedStatements);
-			datasource.setMaxPoolPreparedStatementPerConnectionSize(maxPoolPreparedStatementPerConnectionSize);
-			try {
-				datasource.setFilters(filters);
-			} catch (SQLException e) {
-				System.err.println("druid configuration initialization filter: " + e);
-			}
-			datasource.setConnectionProperties(connectionProperties);
-			return datasource;
-		}
-
-		public String getUrl() {
-			return url;
-		}
-
-		public void setUrl(String url) {
-			this.url = url;
-		}
-
-		public String getUsername() {
-			return username;
-		}
-
-		public void setUsername(String username) {
-			this.username = username;
-		}
-
-		public String getPassword() {
-			return password;
-		}
-
-		public void setPassword(String password) {
-			this.password = password;
-		}
-
-		public String getDriverClassName() {
-			return driverClassName;
-		}
-
-		public void setDriverClassName(String driverClassName) {
-			this.driverClassName = driverClassName;
-		}
-
-		public int getInitialSize() {
-			return initialSize;
-		}
-
-		public void setInitialSize(int initialSize) {
-			this.initialSize = initialSize;
-		}
-
-		public int getMinIdle() {
-			return minIdle;
-		}
-
-		public void setMinIdle(int minIdle) {
-			this.minIdle = minIdle;
-		}
-
-		public int getMaxActive() {
-			return maxActive;
-		}
-
-		public void setMaxActive(int maxActive) {
-			this.maxActive = maxActive;
-		}
-
-		public int getMaxWait() {
-			return maxWait;
-		}
-
-		public void setMaxWait(int maxWait) {
-			this.maxWait = maxWait;
-		}
-
-		public int getTimeBetweenEvictionRunsMillis() {
-			return timeBetweenEvictionRunsMillis;
-		}
-
-		public void setTimeBetweenEvictionRunsMillis(int timeBetweenEvictionRunsMillis) {
-			this.timeBetweenEvictionRunsMillis = timeBetweenEvictionRunsMillis;
-		}
-
-		public int getMinEvictableIdleTimeMillis() {
-			return minEvictableIdleTimeMillis;
-		}
-
-		public void setMinEvictableIdleTimeMillis(int minEvictableIdleTimeMillis) {
-			this.minEvictableIdleTimeMillis = minEvictableIdleTimeMillis;
-		}
-
-		public String getValidationQuery() {
-			return validationQuery;
-		}
-
-		public void setValidationQuery(String validationQuery) {
-			this.validationQuery = validationQuery;
-		}
-
-		public boolean isTestWhileIdle() {
-			return testWhileIdle;
-		}
-
-		public void setTestWhileIdle(boolean testWhileIdle) {
-			this.testWhileIdle = testWhileIdle;
-		}
-
-		public boolean isTestOnBorrow() {
-			return testOnBorrow;
-		}
-
-		public void setTestOnBorrow(boolean testOnBorrow) {
-			this.testOnBorrow = testOnBorrow;
-		}
-
-		public boolean isTestOnReturn() {
-			return testOnReturn;
-		}
-
-		public void setTestOnReturn(boolean testOnReturn) {
-			this.testOnReturn = testOnReturn;
-		}
-
-		public boolean isPoolPreparedStatements() {
-			return poolPreparedStatements;
-		}
-
-		public void setPoolPreparedStatements(boolean poolPreparedStatements) {
-			this.poolPreparedStatements = poolPreparedStatements;
-		}
-
-		public int getMaxPoolPreparedStatementPerConnectionSize() {
-			return maxPoolPreparedStatementPerConnectionSize;
-		}
-
-		public void setMaxPoolPreparedStatementPerConnectionSize(int maxPoolPreparedStatementPerConnectionSize) {
-			this.maxPoolPreparedStatementPerConnectionSize = maxPoolPreparedStatementPerConnectionSize;
-		}
-
-		public String getFilters() {
-			return filters;
-		}
-
-		public void setFilters(String filters) {
-			this.filters = filters;
-		}
-
-		public String getConnectionProperties() {
-			return connectionProperties;
-		}
-
-		public void setConnectionProperties(String connectionProperties) {
-			this.connectionProperties = connectionProperties;
-		}
-	}
-}

+ 0 - 226
ssj-aijia-api/src/main/java/com/ssj/aijia/config/RequestApiLogInterceptor.java

@@ -1,226 +0,0 @@
-
-package com.ssj.aijia.config;
-
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.List;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.apache.commons.lang3.StringUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.slf4j.MDC;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.context.request.ServletWebRequest;
-import org.springframework.web.method.HandlerMethod;
-import org.springframework.web.servlet.ModelAndView;
-import org.springframework.web.servlet.handler.HandlerInterceptorAdapter;
-
-import com.alibaba.dubbo.config.annotation.Reference;
-import com.alibaba.fastjson.JSON;
-import com.alibaba.fastjson.JSONObject;
-import com.ssj.bean.conch.conch.domain.ConchDerver;
-import com.ssj.bean.sys.homework.domain.Homework;
-import com.ssj.bean.sys.homework.domain.HomeworkPicture;
-import com.ssj.framework.core.security.manager.TokenManager;
-import com.ssj.framework.core.util.StringUtil;
-import com.ssj.framework.core.util.WebUtil;
-import com.ssj.request.config.HttpHelper;
-import com.ssj.service.conch.conch.service.ConchDerverService;
-import com.ssj.service.sys.analysis.service.AnalysisService;
-import com.ssj.service.sys.homework.request.CorrectionRequest;
-import com.ssj.service.sys.homework.service.HomeworkPictureService;
-import com.ssj.service.sys.homework.service.HomeworkService;
-
-import io.swagger.annotations.ApiOperation;
-
-
-/**
- *
- * 类名称:ApiAccessVerifyInterceptor<br>
- * 类描述:API访问权限验证<br>
- * @version v1.0
- *
- */
-@Component
-public class RequestApiLogInterceptor extends HandlerInterceptorAdapter {
-    private static final Logger logger = LoggerFactory.getLogger(RequestApiLogInterceptor.class);
-    @Autowired
-    private TokenManager tokenManager;
-    @Reference(version = "1.0" ,timeout = 5000)
-    private ConchDerverService conchDerverService;
-    @Reference(version = "1.0" ,timeout = 5000)
-    private AnalysisService analysisService;
-    @Reference(version = "1.0" ,timeout = 5000)
-    private HomeworkService homeworkService;
-    @Reference(version = "1.0" ,timeout = 5000)
-    private HomeworkPictureService homeworkPictureService;
-
-
-    @Override
-    public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler, ModelAndView modelAndView) throws Exception {
-        ServletWebRequest webRequest = new ServletWebRequest(request, response);
-        try {
-            if (!(handler instanceof HandlerMethod)) {
-                return;
-            }
-            HandlerMethod method = (HandlerMethod) handler;
-            String methodName = method.getMethod().getName();
-            if (!"error".equals(methodName)) {
-                //获取请求api的设备信息
-                MDC.clear();
-                MDC.put("phoneimei",webRequest.getHeader("Phoneimei"));
-                MDC.put("phonesys",webRequest.getHeader("phonesys"));
-                MDC.put("phonetype",webRequest.getHeader("phonetype"));
-                MDC.put("version",webRequest.getHeader("version"));
-                MDC.put("platform",webRequest.getHeader("platform"));
-                MDC.put("build",webRequest.getHeader("build"));
-                MDC.put("apiUrl",request.getRequestURI().replaceAll(request.getContextPath(), ""));
-                MDC.put("methodName",methodName);
-                MDC.put("ipAddress",WebUtil.getRemoteAddr(request));
-                String accessToken =webRequest.getParameter("accessToken");
-                MDC.put("accessToken",accessToken);
-                String userId ="";
-                if(StringUtil.isNotEmpty(accessToken)){
-                    userId=tokenManager.getUserId(accessToken);
-                }
-                MDC.put("userId",userId);
-                MDC.put("requestMap",JSON.toJSONString(request.getParameterMap()));
-
-                try {
-                    ApiOperation apiOperation = method.getMethod().getAnnotation(ApiOperation.class);
-                    MDC.put("apiName",apiOperation.value());
-
-                    String postBody = "";
-                    RequestMapping requestMapping = method.getMethod().getAnnotation(RequestMapping.class);
-                    if (requestMapping != null && Arrays.asList(requestMapping.method()).contains(RequestMethod.POST)) {
-                        postBody = HttpHelper.getBodyString(request);
-                    }
-                    MDC.put("postBody", postBody);
-                    String apiUrl =  MDC.get("apiUrl");
-                    if(urlMap.containsKey(apiUrl)){
-                        saveAnalysis(apiUrl,userId,postBody);
-                    }
-                } catch (Exception ignored) {
-
-                }
-                logger.error(MDC.getCopyOfContextMap().toString());
-
-            }
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-    }
-
-    private void saveAnalysis( String url, String userId,String postBody) throws Exception{
-
-        JSONObject join = JSON.parseObject(postBody);
-        String vipId = "";
-        int sourceType = urlMap.get(url);
-        //1:学生端 2:家长端 3:教师端
-        int source = sourceType<5?1:sourceType<12?3:2;
-        if(sourceType == 5){
-            if(join.containsKey("vipIdList")) {
-                List<String> vipIds = join.getJSONArray("vipIdList").toJavaList(String.class);
-                vipIds.forEach(temp -> analysisService.save("", userId, temp, source, sourceType));
-            }
-        }else if(sourceType == 6){
-            if(join.containsKey("corrects")){
-                //批改结果
-                List<CorrectionRequest> correctionRequestList = join.getJSONArray("corrects").toJavaList(CorrectionRequest.class);
-                CorrectionRequest correctionRequest = correctionRequestList.get(0);
-                HomeworkPicture homeworkPicture = homeworkPictureService.getById(correctionRequest.getHomeworkPictureId());
-                vipId = homeworkPicture.getVipId();
-            }
-        }else{
-            if(join.containsKey("vipId")){
-                vipId = join.getString("vipId");
-            }else if(join.containsKey("derver")){
-                //通过小塾号查询会员信息
-                ConchDerver conchDerver = conchDerverService.findByDerver(join.getString("derver"));
-                vipId=conchDerver.getVipId();
-            }else if(join.containsKey("homeworkId")){
-                Homework homework = homeworkService.getById(join.getString("homeworkId"));
-                vipId = homework.getVipId();
-            }
-        }
-
-        if(StringUtils.isNotEmpty(vipId)){
-            analysisService.save("",userId,vipId,source,sourceType);
-        }
-    }
-
-    private static HashMap<String, Integer> urlMap = new HashMap<String, Integer>() {
-        /**
-         * 家长端 =1:作业登记本 2:计时 3:上传作业 4:查看批改结果
-         * 老师端= 5:签到签离 6:作业标注 7:作业反馈编辑 8:查看错题 9:定制练习 10:学情回顾  11:学习成长报告
-         * 家长端= 12:作业任务 13:错题本 14:成长报告  15:成长报告.周报  16:成长报告.月报   17:成长报告.学期  18:定制练习
-         */
-        {
-        	
-        	//-----------------家长端--------------
-            put("/api/conch/conch/newHomeworkCheckIn", 1);
-            put("/api/conchpro/conchpro/newHomeworkCheckIn", 1);
-            put("/api/conchapp/conchapp/homeworkCheckIn", 1);
-            put("/api/student/student/homeworkCheckIn", 1);
-            put("/api/pad/pad/homeworkCheckIn", 1);
-            put("/api/conchapp/conchapp/multipleHomeworkCheckIn", 1);
-            put("/api/pad/pad/multipleHomeworkCheckIn", 1);
-            put("/api/teacher/library/V2/homeworkCheckIn", 1);
-            put("/api/conch/conch/startHomework", 2);
-            put("/api/conchpro/conchpro/startHomework", 2);
-            put("/api/conchapp/conchapp/startHomework", 2);
-            put("/api/pad/pad/startHomework", 2);
-            put("/api/student/student/startHomework", 2);
-            put("/api/teacher/library/V2/startHomework", 2);
-            put("/api/student/app/startHomework", 2);
-            put("/api/conchapp/conchapp/noNetworkUploadHomework", 3);
-            put("/api/conch/conch/noNetworkUploadHomework", 3);
-            put("/api/pad/pad/noNetworkUploadHomework", 3);
-            put("/api/conchpro/conchpro/noNetworkUploadHomework", 3);
-            put("/api/conch/conch/uploadPicture", 3);
-            put("/api/conchapp/conchapp/uploadPicture", 3);
-            put("/api/conchpro/conchpro/uploadPicture", 3);
-            put("/api/pad/pad/uploadPicture", 3);
-            put("/api/student/app/uploadPicture", 3);
-            put("/api/student/student/uploadPicture", 3);
-            put("/api/teacher/library/V2/uploadPicture", 3);
-            put("/api/conch/conch/homeworkDetails5", 4);
-            put("/api/conchpro/conchpro/homeworkDetails5", 4);
-            
-            
-            
-        	//-----------------老师端--------------
-            put("/api/teacher/library/V2/sign", 5);
-            put("/api/parents/parents/V2/submitCorrectHomework", 6);
-            put("/api/teacher/teacherapp/V2/submitCorrectHomework", 6);
-            put("/api/teacher/library/V2/sumbitStudentHomework", 7);
-            put("/api/parents/parents/V2/wrongBookQuestionListV4", 8);
-            put("/api/teacher/library/V2/wrongBookQuestionListV4", 8);
-            put("/api/parents/parents/V2/getPeiyouBookVersion", 9);
-            put("/api/teacher/library/V2/getPeiyouBookVersion", 9);
-            put("/api/teacher/library/V2/semesterReviewKnowledgeListV2", 10);
-            put("/api/teacher/organization/V2/weeklyReportV2", 11);
-            put("/api/teacher/organization/V2/monthlyReportV2", 11);
-            
-            
-            //-----------------家长端--------------
-            put("/api/parents/parents/V2/homeworkHistoryTask", 12);
-            put("/api/parents/parents/V2/wrongBookQuestionListV6", 13);
-            put("/api/parents/parents/V2/learningGrowthReportV2", 14);
-            put("/api/parents/parents/V2/learningGrowthReportForMonthV2", 14);
-            
-            put("/api/parents/parents/V2/learningGrowthReportV2", 15);
-            put("/api/parents/parents/V2/learningGrowthReportForMonthV2", 16);
-            put("/api/parents/parents/V2/learningSituationDetailNew", 17);
-            put("/api/parents/parents/V2/getCustomizedSprintPaper", 18);
-            put("/api/parents/parents/V2/weeklySynchronousTrainQuestionList", 18);
-            
-        }
-    };
-}

+ 0 - 62
ssj-aijia-api/src/main/java/com/ssj/aijia/config/SpringSwaggerConfig.java

@@ -1,62 +0,0 @@
-package com.ssj.aijia.config;
-
-import io.swagger.annotations.ApiOperation;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-
-import org.springframework.web.servlet.config.annotation.InterceptorRegistration;
-import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
-import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
-import springfox.documentation.builders.ApiInfoBuilder;
-import springfox.documentation.builders.PathSelectors;
-import springfox.documentation.builders.RequestHandlerSelectors;
-import springfox.documentation.service.ApiInfo;
-import springfox.documentation.spi.DocumentationType;
-import springfox.documentation.spring.web.plugins.Docket;
-import springfox.documentation.swagger2.annotations.EnableSwagger2;
-
-/**
- * 
- * 类名称:SpringSwaggerConfig<br>
- * 类描述:Swagger配置<br>
- * @version v1.0
- *
- */
-@EnableSwagger2
-@Configuration
-public class SpringSwaggerConfig  extends WebMvcConfigurerAdapter {
-    @Autowired
-    private  RequestApiLogInterceptor   requestApiLogInterceptor;
-    @Bean
-    public Docket customDocket() {
-        return new Docket(DocumentationType.SWAGGER_2)
-        .apiInfo(apiInfo())
-        .select()
-        //为controller包路径
-        .apis(RequestHandlerSelectors.basePackage("com.ssj"))
-        .apis(RequestHandlerSelectors.withMethodAnnotation(ApiOperation.class))
-        .paths(PathSelectors.any())
-        .build();
-    }
-    
-    private ApiInfo apiInfo() {
-        return new ApiInfoBuilder()
-        .title("爱加APP接口文档")//swagger的title
-        .description("爱加 Restful接口文档")//自己定义
-        .termsOfServiceUrl("https://www.sharingschool.com/")//自己定义
-        .version("2.0")
-        .build(); 
-        
-    }
-
-
-    @Override
-    public void addInterceptors(InterceptorRegistry registry) {
-        InterceptorRegistration addInterceptor = registry.addInterceptor(requestApiLogInterceptor);
-
-    }
-   
-    
-}

Fichier diff supprimé car celui-ci est trop grand
+ 0 - 1152
ssj-aijia-api/src/main/java/com/ssj/aijia/curator/controller/v1/CuratorV1Controller.java


+ 0 - 30
ssj-aijia-api/src/main/java/com/ssj/aijia/filter/CorsFilter.java

@@ -1,30 +0,0 @@
-package com.ssj.aijia.filter;
-
-import org.springframework.stereotype.Component;
-
-import javax.servlet.*;
-import javax.servlet.annotation.WebFilter;
-import javax.servlet.http.HttpServletResponse;
-import java.io.IOException;
-@Component
-@WebFilter(urlPatterns = "/*", filterName = "corsFilter")  //这里的“/*” 表示的是需要拦截的请求路径
-public class CorsFilter implements Filter {
-
-    @Override
-    public void init(FilterConfig filterConfig) throws ServletException {
-    }
-
-    @Override
-    public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
-        HttpServletResponse httpResponse = (HttpServletResponse)servletResponse;
-        httpResponse.setHeader("Access-Control-Allow-Headers","DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,x_requested_with,If-Modified-Since,Cache-Control,Content-Type,Authorization");
-        httpResponse.setHeader("Access-Control-Allow-Credentials", "true");
-        httpResponse.setHeader("Access-Control-Allow-Methods", "GET, POST, OPTIONS");
-        httpResponse.addHeader("Access-Control-Allow-Origin", "*");
-        filterChain.doFilter(servletRequest, httpResponse);
-    }
-
-    @Override
-    public void destroy() {
-    }
-}

+ 0 - 64
ssj-aijia-api/src/main/java/com/ssj/aijia/game/controller/GameController.java

@@ -1,64 +0,0 @@
-package com.ssj.aijia.game.controller;
-
-import com.alibaba.dubbo.config.annotation.Reference;
-import com.ssj.framework.core.common.controller.BaseController;
-import com.ssj.framework.core.security.manager.TokenManager;
-import com.ssj.framework.core.util.ResponseConstant;
-import com.ssj.framework.core.util.ResponseEntity;
-import com.ssj.service.conch.game.request.RanklistReq;
-import com.ssj.service.conch.game.request.SaveReq;
-import com.ssj.service.conch.game.service.RanklistService;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.data.domain.Pageable;
-import org.springframework.data.domain.Sort.Direction;
-import org.springframework.web.bind.annotation.*;
-
-/**
- * @author Mount Liu
- * @date 2018/1/22
- */
-@Api(value = "小程序游戏相关的接口", tags = "小程序游戏相关的接口")
-@RestController
-@RequestMapping("/api/game")
-public class GameController extends BaseController {
-
-	@Reference(version = "1.0" ,timeout = 60000)
-    private RanklistService ranklistService;
-
-    @Autowired
-    private TokenManager tokenManager;
-
-    @RequestMapping(value = "/save", method = RequestMethod.POST)
-    @ApiOperation(value = "保存游戏结果", httpMethod = "POST", notes = "作业记录列表")
-    public ResponseEntity save(@RequestParam(name = "accessToken") String accessToken,
-                               @RequestBody SaveReq req) {
-        ResponseEntity responseEntity;
-        try {
-            String userId = tokenManager.getUserId(accessToken);
-            responseEntity = ranklistService.saveResult(userId, req.getScore());
-        } catch (Exception e) {
-            logger.error("保存游戏结果失败", e);
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "服务器发生异常,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/rankingList", method = RequestMethod.POST)
-    @ApiOperation(value = "排行榜列表", httpMethod = "POST", notes = "排行榜列表")
-    public ResponseEntity rankingList(@RequestParam(name = "accessToken") String accessToken, @RequestBody RanklistReq req) {
-        ResponseEntity responseEntity;
-        try {
-            Pageable pageable = initPage(req.getPageNo(), req.getPageSize(), Direction.DESC, "score", "name");
-            responseEntity = ranklistService.rankingList(req, pageable);
-        } catch (Exception e) {
-            logger.error("查看排行榜失败", e);
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "服务器发生异常,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-}

+ 0 - 127
ssj-aijia-api/src/main/java/com/ssj/aijia/game/controller/GameV1Controller.java

@@ -1,127 +0,0 @@
-package com.ssj.aijia.game.controller;
-
-import com.alibaba.dubbo.config.annotation.Reference;
-import com.ssj.framework.core.common.controller.BaseController;
-import com.ssj.framework.core.security.manager.TokenManager;
-import com.ssj.framework.core.util.ResponseConstant;
-import com.ssj.framework.core.util.ResponseEntity;
-import com.ssj.service.conch.game.request.QuestionReq;
-import com.ssj.service.conch.game.request.RanklistReq;
-import com.ssj.service.conch.game.request.SavePersonInfoReq;
-import com.ssj.service.conch.game.request.SaveV1Req;
-import com.ssj.service.conch.game.service.GameService;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.data.domain.Pageable;
-import org.springframework.data.domain.Sort.Direction;
-import org.springframework.web.bind.annotation.*;
-
-/**
- * @author Mount Liu
- * @date 2018/1/22
- */
-@Api(value = "小程序游戏相关的接口", tags = "小程序游戏相关的接口")
-@RestController
-@RequestMapping("/api/game/V1")
-public class GameV1Controller extends BaseController {
-
-	@Reference(version = "1.0" ,timeout = 50000)
-    private GameService gameService;
-
-    @Autowired
-    private TokenManager tokenManager;
-
-    @RequestMapping(value = "/homepageInfo", method = RequestMethod.POST)
-    @ApiOperation(value = "查询首页信息", httpMethod = "POST", notes = "作业记录列表")
-    public ResponseEntity homepageInfo(@RequestParam(name = "accessToken") String accessToken) {
-        ResponseEntity responseEntity;
-        try {
-            String userId = tokenManager.getUserId(accessToken);
-            responseEntity = gameService.homepageInfo(userId);
-        } catch (Exception e) {
-            logger.error("查询首页信息失败", e);
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "服务器发生异常,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/save", method = RequestMethod.POST)
-    @ApiOperation(value = "保存游戏结果", httpMethod = "POST", notes = "作业记录列表")
-    public ResponseEntity save(@RequestParam(name = "accessToken") String accessToken,
-                               @RequestBody SaveV1Req req) {
-        ResponseEntity responseEntity;
-        try {
-            String userId = tokenManager.getUserId(accessToken);
-            responseEntity = gameService.saveResult(userId, req);
-        } catch (Exception e) {
-            logger.error("保存游戏结果失败", e);
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "服务器发生异常,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/rankingList", method = RequestMethod.POST)
-    @ApiOperation(value = "排行榜列表", httpMethod = "POST", notes = "排行榜列表")
-    public ResponseEntity rankingList(@RequestParam(name = "accessToken") String accessToken, @RequestBody RanklistReq req) {
-        ResponseEntity responseEntity;
-        try {
-            Pageable pageable = initPage(req.getPageNo(), req.getPageSize(), Direction.DESC, "score", "name");
-            responseEntity = gameService.rankingList(req, pageable);
-        } catch (Exception e) {
-            logger.error("查看排行榜失败", e);
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "服务器发生异常,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/savePersonInfo", method = RequestMethod.POST)
-    @ApiOperation(value = "保存游戏结果", httpMethod = "POST", notes = "作业记录列表")
-    public ResponseEntity savePersonInfo(@RequestParam(name = "accessToken") String accessToken,
-                                         @RequestBody SavePersonInfoReq req) {
-        ResponseEntity responseEntity;
-        try {
-            String userId = tokenManager.getUserId(accessToken);
-            responseEntity = gameService.savePersonInfo(userId, req);
-        } catch (Exception e) {
-            logger.error("保存游戏结果失败", e);
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "服务器发生异常,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/findResult", method = RequestMethod.POST)
-    @ApiOperation(value = "查看测试结果", httpMethod = "POST", notes = "作业记录列表")
-    public ResponseEntity findResult(@RequestParam(name = "accessToken") String accessToken) {
-        ResponseEntity responseEntity;
-        try {
-            String userId = tokenManager.getUserId(accessToken);
-            responseEntity = gameService.findResult(userId);
-        } catch (Exception e) {
-            logger.error("查看测试结果失败", e);
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "服务器发生异常,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/findQuestion", method = RequestMethod.POST)
-    @ApiOperation(value = "获取关卡题目", httpMethod = "POST", notes = "作业记录列表")
-    public ResponseEntity findQuestion(@RequestParam(name = "accessToken") String accessToken, QuestionReq req) {
-        ResponseEntity responseEntity;
-        try {
-            String userId = tokenManager.getUserId(accessToken);
-            responseEntity = gameService.findQuestion(userId, req.getSelection());
-        } catch (Exception e) {
-            logger.error("查看测试结果失败", e);
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "服务器发生异常,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-}

+ 0 - 205
ssj-aijia-api/src/main/java/com/ssj/aijia/game/controller/GameV2Controller.java

@@ -1,205 +0,0 @@
-package com.ssj.aijia.game.controller;
-
-import com.alibaba.dubbo.config.annotation.Reference;
-import com.ssj.framework.core.common.controller.BaseController;
-import com.ssj.framework.core.security.annotation.ModifySecurity;
-import com.ssj.framework.core.security.manager.TokenManager;
-import com.ssj.framework.core.util.ResponseConstant;
-import com.ssj.framework.core.util.ResponseEntity;
-import com.ssj.service.conch.game.request.*;
-import com.ssj.service.conch.game.service.GameV2Service;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
-
-import javax.validation.Valid;
-
-/**
- * @description 脑力测试小程序
- * @author yrf
- * @time 2019/10/10 11:14
- */
-@Api(value = "脑力测试小程序相关的接口", tags = "脑力测试小程序相关的接口")
-@RestController
-@RequestMapping("/api/game/v2")
-public class GameV2Controller extends BaseController {
-
-	@Reference(version = "1.0" ,timeout = 50000)
-    private GameV2Service gameV2Service;
-
-    @Autowired
-    private TokenManager tokenManager;
-
-    @RequestMapping(value = "/homepageInfo", method = RequestMethod.POST)
-    @ApiOperation(value = "查询首页信息", httpMethod = "POST", notes = "查询首页信息")
-    public ResponseEntity homepageInfo(@RequestParam(name = "accessToken") String accessToken) {
-        ResponseEntity responseEntity;
-        try {
-            String userId = tokenManager.getUserId(accessToken);
-            responseEntity = gameV2Service.homepageInfo(userId);
-        } catch (Exception e) {
-            logger.error("查询首页信息异常", e);
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "服务器发生异常,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @ApiOperation(value = "答题情况保存", httpMethod = "POST", notes = "答题情况保存")
-    @RequestMapping(value = "answerInfoSave", method = RequestMethod.POST)
-    public ResponseEntity answerInfoSave(@RequestParam(name = "accessToken") String accessToken,
-                                         @RequestBody @Valid AnswerInfoSaveReq req) {
-
-        ResponseEntity responseEntity;
-        try {
-            String userId = tokenManager.getUserId(accessToken);
-            responseEntity = gameV2Service.answerInfoSave(userId, req);
-        } catch (Exception e) {
-            logger.error("req={}", req);
-            logger.error("答题情况保存异常", e);
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "服务器发生异常,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/save", method = RequestMethod.POST)
-    @ApiOperation(value = "保存游戏结果", httpMethod = "POST", notes = "保存游戏结果")
-    public ResponseEntity save(@RequestParam(name = "accessToken") String accessToken,
-                               @RequestBody @Valid SaveV2Req req) {
-        ResponseEntity responseEntity;
-        try {
-            String userId = tokenManager.getUserId(accessToken);
-            responseEntity = gameV2Service.saveResult(userId, req);
-        } catch (Exception e) {
-            logger.error("req={}", req);
-            logger.error("保存游戏结果异常", e);
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "服务器发生异常,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/saveV2", method = RequestMethod.POST)
-    @ApiOperation(value = "保存游戏结果v2", httpMethod = "POST", notes = "保存游戏结果v2")
-    @ModifySecurity
-    public ResponseEntity saveV2(@RequestParam(name = "accessToken") String accessToken,
-                                 @RequestBody @Valid SaveV2Req req) {
-
-        ResponseEntity responseEntity;
-        try {
-            String userId = tokenManager.getUserId(accessToken);
-            responseEntity = gameV2Service.saveResultV2(userId, req);
-        } catch (Exception e) {
-            logger.error("保存游戏结果v2异常", e);
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "服务器发生异常,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @ApiOperation(value = "历史记录", httpMethod = "POST", notes = "历史记录")
-    @RequestMapping(value = "/history", method = RequestMethod.POST)
-    public ResponseEntity findHistory(@RequestParam(name = "accessToken") String accessToken,
-                                      @RequestBody @Valid RanklistReq req) {
-
-        ResponseEntity responseEntity;
-        try {
-            String userId = tokenManager.getUserId(accessToken);
-            responseEntity = gameV2Service.findHistory(userId, req);
-        } catch (Exception e) {
-            logger.error("req={}", req);
-            logger.error("查看历史记录异常", e);
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/rankingList", method = RequestMethod.POST)
-    @ApiOperation(value = "排行榜列表", httpMethod = "POST", notes = "排行榜列表")
-    public ResponseEntity rankingList(@RequestParam(name = "accessToken") String accessToken,
-                                      @RequestBody @Valid RanklistReq req) {
-
-        ResponseEntity responseEntity;
-        try {
-            responseEntity = gameV2Service.rankingList(req);
-        } catch (Exception e) {
-            logger.error("查看排行榜异常", e);
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "服务器发生异常,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/savePersonInfo", method = RequestMethod.POST)
-    @ApiOperation(value = "保存个人基本信息", httpMethod = "POST", notes = "保存个人基本信息")
-    public ResponseEntity savePersonInfo(@RequestParam(name = "accessToken") String accessToken,
-                                         @RequestBody SavePersonInfoReq req) {
-        ResponseEntity responseEntity;
-        try {
-            String userId = tokenManager.getUserId(accessToken);
-            responseEntity = gameV2Service.savePersonInfo(userId, req);
-        } catch (Exception e) {
-            logger.error("保存游戏结果异常", e);
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "服务器发生异常,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/saveRespondentInfo", method = RequestMethod.POST)
-    @ApiOperation(value = "保存答题人信息", httpMethod = "POST", notes = "保存答题人信息")
-    @ModifySecurity
-    public ResponseEntity saveRespondentInfo(@RequestParam(name = "accessToken") String accessToken,
-                                             @RequestBody @Valid SaveRespondentInfoReq req) {
-
-        ResponseEntity responseEntity;
-        try {
-            String userId = tokenManager.getUserId(accessToken);
-            responseEntity = gameV2Service.saveRespondentInfo(userId, req);
-        } catch (Exception e) {
-            logger.error("req={}", req);
-            logger.error("保存答题人信息异常", e);
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/findResult", method = RequestMethod.POST)
-    @ApiOperation(value = "查看测试结果", httpMethod = "POST", notes = "查看测试结果")
-    public ResponseEntity findResult(@RequestParam(name = "accessToken") String accessToken,
-                                     @RequestBody @Valid TestResultReq req) {
-
-        ResponseEntity responseEntity;
-        String userId = null;
-        try {
-            userId = tokenManager.getUserId(accessToken);
-            responseEntity = gameV2Service.findResult(userId, req);
-        } catch (Exception e) {
-            logger.error("userId={}, req={}", userId, req);
-            logger.error("查看测试结果异常", e);
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/reset", method = RequestMethod.POST)
-    @ApiOperation(value = "重置", httpMethod = "POST", notes = "重置")
-    public ResponseEntity reset(@RequestParam(name = "accessToken") String accessToken) {
-        ResponseEntity responseEntity;
-        try {
-            String userId = tokenManager.getUserId(accessToken);
-            responseEntity = gameV2Service.reset(userId);
-        } catch (Exception e) {
-            logger.error("重置测试数据异常", e);
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "服务器繁忙,请稍后再试");
-        }
-        return responseEntity;
-    }
-
-}

+ 0 - 398
ssj-aijia-api/src/main/java/com/ssj/aijia/game/controller/VoteDataController.java

@@ -1,398 +0,0 @@
-/*
-package com.ssj.aijia.game.controller;
-
-
-import java.util.ArrayList;
-import java.util.Calendar;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.UUID;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.apache.commons.lang3.StringUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.ui.Model;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.ResponseBody;
-import org.springframework.web.bind.annotation.RestController;
-
-import com.alibaba.dubbo.config.annotation.Reference;
-import com.alibaba.fastjson.JSONObject;
-import com.google.common.base.Objects;
-import com.ssj.aijia.game.controller.req.VoteRankReq;
-import com.ssj.aijia.game.controller.res.VoteRequest;
-import com.ssj.aijia.game.controller.res.VoteSaveRequest;
-import com.ssj.bean.weixin.user.domain.User;
-import com.ssj.framework.core.security.annotation.IgnoreSecurity;
-import com.ssj.framework.core.security.manager.TokenManager;
-import com.ssj.framework.core.util.RedisUtil;
-import com.ssj.framework.core.util.ResponseConstant;
-import com.ssj.framework.core.util.ResponseEntity;
-import com.ssj.framework.weixin.util.AdvancedUtil;
-import com.ssj.framework.weixin.util.WeixinOauth2Token;
-import com.ssj.framework.weixin.util.WxUtil;
-import com.ssj.service.weixin.user.service.UserService;
-
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-
-
-
-*/
-/**
- * @author  wuwen 
- * @version 2019年12月30日10:41:50
- * 类说明  2020年会投票
- *//*
-
-@Api(value = "2020年会投票", tags = "2020年会投票")
-@RestController
-@RequestMapping("/api/vote")
-public class VoteDataController {
-	
-	private static Logger log = LoggerFactory.getLogger(VoteDataController.class);
-	
-	@Autowired
-	private RedisUtil redisUtil;
-	
-	@Reference(version = "1.0" ,timeout = 60000)
-	private UserService userService;
-	
-	@Autowired
-	private TokenManager tokenManager;
-	
-	//Redis_indexdb
-	private Integer indexdb=15;
-	
-	//开始时间的Key
-	private static String startTime="vote:startTime";
-	
-	//结束时间的Key
-	private static String endTime="vote:endTime";
-	
-	//投票的对象列表Key
-	private static String voteData="vote:voteData:";
-	
-	//投过票的userId集合
-	private static String voteUser="vote:voteUser";
-	
-
-	
-	*/
-/**
-	  * 初始化节目数据
-	  * @return
-	  *//*
-
-	@IgnoreSecurity
-	@RequestMapping(value="/init")
-	@ResponseBody
-	public ResponseEntity init(Model model,HttpServletRequest request, HttpServletResponse response)throws Exception {
-		ResponseEntity responseEntity = new ResponseEntity();
-		
-		VoteRankReq voteRankReq_1=new VoteRankReq();
-		voteRankReq_1.setId("1");
-		voteRankReq_1.setTitle("《哪吒之小塾降世》");
-		voteRankReq_1.setDesc("深圳爱加 情景剧");
-		voteRankReq_1.setScore(0);
-		voteRankReq_1.setRecords(new ArrayList<String>());
-		
-		
-		VoteRankReq voteRankReq_2=new VoteRankReq();
-		voteRankReq_2.setId("2");
-		voteRankReq_2.setTitle("《小塾 Family》");
-		voteRankReq_2.setDesc("社区合作中心 歌舞剧");
-		voteRankReq_2.setScore(0);
-		voteRankReq_2.setRecords(new ArrayList<String>());
-		
-		
-		VoteRankReq voteRankReq_3=new VoteRankReq();
-		voteRankReq_3.setId("3");
-		voteRankReq_3.setTitle("《王牌对王牌》");
-		voteRankReq_3.setDesc("课程师资中心 情景剧");
-		voteRankReq_3.setScore(0);
-		voteRankReq_3.setRecords(new ArrayList<String>());
-		
-		VoteRankReq voteRankReq_4=new VoteRankReq();
-		voteRankReq_4.setId("4");
-		voteRankReq_4.setTitle("《1313国际科技晚会》");
-		voteRankReq_4.setDesc("深圳爱加 情景剧");
-		voteRankReq_4.setScore(0);
-		voteRankReq_4.setRecords(new ArrayList<String>());
-		
-		
-		VoteRankReq voteRankReq_5=new VoteRankReq();
-		voteRankReq_5.setId("5");
-		voteRankReq_5.setTitle("《作业里有什么》");
-		voteRankReq_5.setDesc("课程师资中心 大合唱");
-		voteRankReq_5.setScore(0);
-		voteRankReq_5.setRecords(new ArrayList<String>());
-		
-		
-		
-		if(!redisUtil.exists(voteData+voteRankReq_1.getId())) {
-			redisUtil.set(voteData+voteRankReq_1.getId(), JSONObject.toJSONString(voteRankReq_1), indexdb);
-		}
-		if(!redisUtil.exists(voteData+voteRankReq_2.getId())) {
-			redisUtil.set(voteData+voteRankReq_2.getId(), JSONObject.toJSONString(voteRankReq_2), indexdb);
-		}
-		if(!redisUtil.exists(voteData+voteRankReq_3.getId())) {
-			redisUtil.set(voteData+voteRankReq_3.getId(), JSONObject.toJSONString(voteRankReq_3), indexdb);
-		}
-		if(!redisUtil.exists(voteData+voteRankReq_4.getId())) {
-			redisUtil.set(voteData+voteRankReq_4.getId(), JSONObject.toJSONString(voteRankReq_4), indexdb);
-		}
-		if(!redisUtil.exists(voteData+voteRankReq_5.getId())) {
-			redisUtil.set(voteData+voteRankReq_5.getId(), JSONObject.toJSONString(voteRankReq_5), indexdb);
-		}
-		responseEntity.success("操作成功");
-		return responseEntity;
-	}
-	
-	
-	
-	*/
-/**
-	  * 登录,返回是否投过,活动状态
-	  * @return
-	  *//*
-
-	@IgnoreSecurity
-	@RequestMapping(value="/login",method=RequestMethod.POST)
-	@ResponseBody
-	public ResponseEntity login(@RequestParam String code)throws Exception {
-		ResponseEntity responseEntity = new ResponseEntity();
-		Map<String, Object> data = new HashMap<String, Object>();
-		data.put("accessToken", "");
-		data.put("userId", "");
-		data.put("status", getVoteStatus(redisUtil.get(startTime,indexdb), redisUtil.get(endTime,indexdb)));//活动状态
-		data.put("isVote", 1);//用户是否已投票
-		data.put("startTime", redisUtil.get(startTime,indexdb));//活动开始时间
-		data.put("endTime", redisUtil.get(endTime,indexdb));//活动结束时间
-		
-   		WeixinOauth2Token token=AdvancedUtil.getOauth2AccessToken(code);
-   		if(token!=null && StringUtils.isNotEmpty(token.getOpenId())) {
-   			User user=userService.findByAccount(token.getOpenId());
-   			if(user==null){
-   				user=new User();
-   				user.setId(UUID.randomUUID().toString());
-   				user.setAccount(token.getOpenId());
-   				user.setUnionid(token.getUnionId());
-   				userService.save(user);
-   			}
-   			String rdsession = WxUtil.get3rdSession();
-   			String accessToken = tokenManager.createToken(rdsession, user.getId(),user.getAccount(), 8, "sessionKey", "WX");
-   			data.put("accessToken", accessToken);
-   			data.put("userId", user.getId());
-   			data.put("isVote", getIsVote(user.getId()));
-   			log.info("【年会投票】登录接口:{}",JSONObject.toJSONString(data));
-   			responseEntity.success(data,"查询成功");
-   		}else {
-   			log.info("【年会投票】登录接口:{}",JSONObject.toJSONString(data));
-   			responseEntity.failure(ResponseConstant.CODE_401, "请先登录再使用此功能");
-   		}
-		return responseEntity;
-	}
-		
-	
-	
-	*/
-/**
-	  * 节目排名列表。
-	  * @return
-	  *//*
-
-	@RequestMapping(value = "/rankingList", method = RequestMethod.POST)
-    @ApiOperation(value = "节目排名列表", httpMethod = "POST", notes = "节目排名列表")
-	public ResponseEntity ranking(@RequestParam(name = "accessToken") String accessToken)throws Exception {
-		ResponseEntity responseEntity = new ResponseEntity();
-		Map<String, Object> data = new HashMap<String, Object>();
-		
-		List<VoteRankReq> voteRankReqs=new ArrayList<VoteRankReq>();
-		Set<String> voteDataKeys=redisUtil.keys(voteData+"*", indexdb);
-		for (String key : voteDataKeys) {
-			VoteRankReq voteRankReq=JSONObject.parseObject(redisUtil.get(key, indexdb), VoteRankReq.class);
-			voteRankReqs.add(voteRankReq);
-		}
-		Collections.sort(voteRankReqs, new Comparator<VoteRankReq>(){
-            public int compare(VoteRankReq o1, VoteRankReq o2) {
-                if(o1.getScore() < o2.getScore()){
-                    return 1;
-                }
-                if(o1.getScore() == o2.getScore()){
-                    return 0;
-                }
-                return -1;
-            }
-        });
-		for (VoteRankReq voteRankReq : voteRankReqs) {
-			voteRankReq.setRecords(new ArrayList<String>());
-		}
-		data.put("list", voteRankReqs);
-		
-		responseEntity.success(data,"查询成功");
-		return responseEntity;
-	}
-	
-	
-	
-	*/
-/**
-	  * 节目状态查询
-	  * @return
-	  *//*
-
-	@RequestMapping(value = "/status", method = RequestMethod.POST)
-    @ApiOperation(value = "节目状态查询", httpMethod = "POST", notes = "节目状态查询")
-	public ResponseEntity status(@RequestParam(name = "accessToken") String accessToken)throws Exception {
-		ResponseEntity responseEntity = new ResponseEntity();
-		String userId=tokenManager.getUserId(accessToken);
-		if (StringUtils.isBlank(userId)) {
-			return responseEntity.failure(ResponseConstant.CODE_401, "请先登录再使用此功能");
-		}
-		Map<String, Object> data = new HashMap<String, Object>();
-		data.put("status", getVoteStatus(redisUtil.get(startTime,indexdb), redisUtil.get(endTime,indexdb)));//活动状态
-		data.put("isVote", getIsVote(userId));//用户是否已投票
-		data.put("startTime", redisUtil.get(startTime,indexdb));//活动开始时间
-		data.put("endTime", redisUtil.get(endTime,indexdb));//活动结束时间
-		
-		log.info("【年会投票】节目状态接口:{}",JSONObject.toJSONString(data));
-		responseEntity.success(data,"查询成功");
-		return responseEntity;
-	}
-	
-	
-
-	
-	*/
-/**
-	  * 节目投票保存
-	  * data : [{"id":"1","level":"1"},{"id":"2","level":"3"},{"id":"3","level":"2"}]
-	  * @return
-	  *//*
-
-	@RequestMapping(value = "/save", method = RequestMethod.POST)
-    @ApiOperation(value = "节目投票保存", httpMethod = "POST", notes = "节目投票保存")
-	public ResponseEntity save(@RequestParam(name = "accessToken") String accessToken,@RequestBody VoteSaveRequest request)throws Exception {
-		ResponseEntity responseEntity = new ResponseEntity();
-		String userId=tokenManager.getUserId(accessToken);
-		if (StringUtils.isBlank(userId)) {
-			return responseEntity.failure(ResponseConstant.CODE_401, "请先登录再使用此功能");
-		}
-		
-		Integer status=getVoteStatus(redisUtil.get(startTime,indexdb), redisUtil.get(endTime,indexdb));
-		if(Objects.equal(status, 0)) {
-			responseEntity.success("活动暂未开始");
-			return responseEntity;
-		}
-		if(Objects.equal(status, 2)) {
-			responseEntity.success("活动已结束");
-			return responseEntity;
-		}
-		Integer isVote=getIsVote(userId);
-		if(Objects.equal(isVote, 1)) {
-			responseEntity.success("您已投票,不可重复投票");
-			return responseEntity;
-		}
-		
-		List<VoteRequest> voteRequests=request.getVoteDatas();
-		for (VoteRequest voteRequest : voteRequests) {
-			synchronized (this) {
-				String id=voteRequest.getId();
-				Integer level=voteRequest.getLevel();
-				
-				String vdstr=redisUtil.get(voteData+id,indexdb);
-				
-				if(StringUtils.isNotEmpty(vdstr)) {
-					VoteRankReq voteRankReq=JSONObject.parseObject(vdstr, VoteRankReq.class);
-					if(Objects.equal(level, 1)) {
-						voteRankReq.setScore(voteRankReq.getScore()+10);
-					}else if(Objects.equal(level, 2)) {
-						voteRankReq.setScore(voteRankReq.getScore()+20);
-					}else if(Objects.equal(level, 3)) {
-						voteRankReq.setScore(voteRankReq.getScore()+30);
-					}
-					voteRankReq.getRecords().add(userId+":"+level);
-					redisUtil.set(voteData+voteRankReq.getId(), JSONObject.toJSONString(voteRankReq), indexdb);
-				}
-				//有一条刻录就算投了,保存已投票记录
-				redisUtil.sadd(indexdb, voteUser, userId);
-			}
-		}
-		
-		log.info("【年会投票】节目投票保存接口:{}",JSONObject.toJSONString(voteData));
-		responseEntity.success("保存成功");
-		return responseEntity;
-	}
-	
-	
-	*/
-/**
-	 * 0:未投票
-	 * 1:已投票
-	 * @return
-	 *//*
-
-	private Integer getIsVote(String userId) {
-		try {
-			Boolean is=redisUtil.sismember(indexdb, voteUser, userId);
-			if(is) {
-				return 1;
-			}
-		} catch (Exception e) {
-			e.printStackTrace();
-		}
-		return 0;
-	}
-	
-	
-	*/
-/**
-	 * 0:未开始
-	 * 1:进行中
-	 * 2:已结束
-	 * @param startTime
-	 * @param endTime
-	 * @return
-	 *//*
-
-	private static Integer getVoteStatus(String start,String end) {
-		//没有开始时间,返回未开始
-		if(StringUtils.isEmpty(start)) {
-			return 0;
-		}
-		Date startTime=new Date(Long.valueOf(start));  
-		if(startTime.getTime()>new Date().getTime()) {
-			return 0;
-		}
-		Date endTime=null;
-		if(StringUtils.isEmpty(end)) {
-			Calendar cal = Calendar.getInstance();
-	        cal.setTime(startTime);
-	        cal.add(Calendar.MINUTE, 15);
-	        endTime=cal.getTime();
-		}else {
-			 endTime=new Date(Long.valueOf(end));  
-		}
-		if(endTime.getTime()<new Date().getTime()) {
-			return 2;
-		}
-		return 1;
-	}
-	
-	
-
-}
-*/

+ 0 - 58
ssj-aijia-api/src/main/java/com/ssj/aijia/game/controller/req/VoteRankReq.java

@@ -1,58 +0,0 @@
-package com.ssj.aijia.game.controller.req;
-
-import java.util.List;
-
-public class VoteRankReq {
-	
-	private String id;
-	
-	private String title;
-	
-	private String desc;
-	
-	private Integer score;
-	
-	private List<String> records;
-
-	public String getId() {
-		return id;
-	}
-
-	public void setId(String id) {
-		this.id = id;
-	}
-
-	public String getTitle() {
-		return title;
-	}
-
-	public void setTitle(String title) {
-		this.title = title;
-	}
-
-	public String getDesc() {
-		return desc;
-	}
-
-	public void setDesc(String desc) {
-		this.desc = desc;
-	}
-
-	public Integer getScore() {
-		return score;
-	}
-
-	public void setScore(Integer score) {
-		this.score = score;
-	}
-
-	public List<String> getRecords() {
-		return records;
-	}
-
-	public void setRecords(List<String> records) {
-		this.records = records;
-	}
-
-
-}

+ 0 - 31
ssj-aijia-api/src/main/java/com/ssj/aijia/game/controller/res/VoteRequest.java

@@ -1,31 +0,0 @@
-package com.ssj.aijia.game.controller.res;
-
-import com.ssj.bean.common.framework.core.domain.BaseRequest;
-
-public class VoteRequest extends BaseRequest {
-	
-    private static final long serialVersionUID = 1L;
-
-    private String id;
-    
-    private Integer level;
-
-	public String getId() {
-		return id;
-	}
-
-	public void setId(String id) {
-		this.id = id;
-	}
-
-	public Integer getLevel() {
-		return level;
-	}
-
-	public void setLevel(Integer level) {
-		this.level = level;
-	}
-
-	
-
-}

+ 0 - 22
ssj-aijia-api/src/main/java/com/ssj/aijia/game/controller/res/VoteSaveRequest.java

@@ -1,22 +0,0 @@
-package com.ssj.aijia.game.controller.res;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import com.ssj.bean.common.framework.core.domain.BaseRequest;
-
-public class VoteSaveRequest  extends BaseRequest {
-	
-    private static final long serialVersionUID = 1L;
-
-    private List<VoteRequest> voteDatas = new ArrayList<>();
-
-	public List<VoteRequest> getVoteDatas() {
-		return voteDatas;
-	}
-
-	public void setVoteDatas(List<VoteRequest> voteDatas) {
-		this.voteDatas = voteDatas;
-	}
-
-}

+ 0 - 315
ssj-aijia-api/src/main/java/com/ssj/aijia/kmt/arrange/controller/KmtArrangeController.java

@@ -1,315 +0,0 @@
-package com.ssj.aijia.kmt.arrange.controller;
-
-
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-
-import java.util.Date;
-import java.util.HashMap;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.commons.lang3.StringUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.data.domain.Pageable;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
-
-import com.alibaba.dubbo.config.annotation.Reference;
-import com.ssj.bean.kmt.arrange.dto.DutyTemplate;
-import com.ssj.bean.kmt.arrange.dto.TeacherArrangeVO;
-import com.ssj.bean.kmt.arrange.dto.TeacherNextArrangeVO;
-import com.ssj.bean.kmt.arrange.vo.DutyRequestVO;
-import com.ssj.bean.kmt.arrange.vo.DutySysRequestVO;
-import com.ssj.bean.kmt.arrange.vo.TeacherDutyRequestVO;
-import com.ssj.bean.weixin.libmy.domain.TbLibManager;
-import com.ssj.framework.basic.utils.DateHelper;
-import com.ssj.framework.core.common.controller.BaseController;
-import com.ssj.framework.core.security.manager.TokenManager;
-import com.ssj.framework.core.util.Constant;
-import com.ssj.framework.core.util.ResponseConstant;
-import com.ssj.framework.core.util.ResponseEntity;
-import com.ssj.service.kmt.arrange.dto.ArrangeCalendarDto;
-import com.ssj.service.kmt.arrange.dto.ArrangeTeacherDto;
-import com.ssj.service.kmt.arrange.dto.ArrangeTeamTeacherDto;
-import com.ssj.service.kmt.arrange.dto.CurCalendarDto;
-import com.ssj.service.kmt.arrange.request.ArrangeByAddReq;
-import com.ssj.service.kmt.arrange.request.ArrangeByDeleteReq;
-import com.ssj.service.kmt.arrange.request.ArrangeCalendarListReq;
-import com.ssj.service.kmt.arrange.request.ArrangeTeacherListReq;
-import com.ssj.service.kmt.arrange.request.ArrangeTeamTeacherListReq;
-import com.ssj.service.kmt.arrange.service.KmtArrangeAllotService;
-import com.ssj.service.kmt.arrange.service.KmtArrangeDetailService;
-import com.ssj.service.kmt.arrange.service.KmtArrangeTemplateService;
-import com.ssj.service.weixin.library.service.IBookManagerService;
-
-
-@RestController
-@RequestMapping("/api/kmt/arrange")
-@Api(value = "kmt排班接口", tags = "kmt排班接口")
-public class KmtArrangeController extends BaseController {
-
-    @Autowired
-    private TokenManager tokenManager;
-    
-    @Reference(version = "1.0" ,timeout = 60000)
-    private IBookManagerService managerService;
-    
-    @Reference(version = "1.0" ,timeout = 60000)
-    private KmtArrangeAllotService kmtArrangeAllotService;
-    
-    @Reference(version = "1.0" ,timeout = 60000)
-    private KmtArrangeDetailService kmtArrangeDetailService;
-
-    @Reference(version = "1.0" ,timeout = 60000)
-    private KmtArrangeTemplateService kmtArrangeTemplateService;
-
-    @RequestMapping(value = "/teacherThisMonthDutyList", method = RequestMethod.POST)
-    @ApiOperation(value = "本月排班情况接口", httpMethod = "POST",  notes = "本月排班情况接口")
-    public ResponseEntity teacherThisMonthDutyList(@RequestParam(name = "accessToken") String accessToken,@RequestBody TeacherDutyRequestVO requestVO) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            String teacherUserId = "";
-            if(requestVO ==null || requestVO.getTeacherId()==null || requestVO.getTeacherId().equals("")){
-                teacherUserId = tokenManager.getUserId(accessToken);
-            }else {
-                teacherUserId = requestVO.getTeacherId();
-            }
-
-            TeacherArrangeVO vo = kmtArrangeAllotService.teacherMonthDutyList(teacherUserId);
-            responseEntity.success(vo, "查询成功");
-        } catch (Exception e) {
-            logger.error("本月排班情况接口", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/teacherNextMonthDutyList", method = RequestMethod.POST)
-    @ApiOperation(value = "下月排班情况接口", httpMethod = "POST",  notes = "本月排班情况接口")
-    public ResponseEntity teacherNextMonthDutyList(@RequestParam(name = "accessToken") String accessToken) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            String teacherUserId = tokenManager.getUserId(accessToken);
-            TeacherNextArrangeVO vo = kmtArrangeAllotService.teacherNextMonthDutyList(teacherUserId);
-            responseEntity.success(vo, "查询成功");
-        } catch (Exception e) {
-            logger.error("下月排班情况接口", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-
-
-    @RequestMapping(value = "/findCalendarList", method = RequestMethod.POST)
-    @ApiOperation(value = "排班日历表(校区管理员)", httpMethod = "POST", notes = "排班日历表(校区管理员)")
-    public ResponseEntity findCalendarList(@RequestParam(name = "accessToken") String accessToken, @RequestBody ArrangeCalendarListReq req) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-        	ArrangeCalendarDto arrangeCalendarDto=kmtArrangeDetailService.findCalendarList(req.getMonth(),req.getType(), req.getSubject());
-            responseEntity.success(arrangeCalendarDto, "成功");
-        } catch (Exception e) {
-            logger.error("异常", e);
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-
-    @RequestMapping(value = "/findHaveTeacherList", method = RequestMethod.POST)
-    @ApiOperation(value = "已选时段老师列表", httpMethod = "POST", notes = "已选时段老师列表")
-    public ResponseEntity findHaveTeacherList(@RequestParam(name = "accessToken") String accessToken, @RequestBody ArrangeTeacherListReq req) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-        	String parentTeacherId = tokenManager.getUserId(accessToken);
-        	TbLibManager libManager=managerService.findAllByUserIdAndType(parentTeacherId, Constant.CORRECT_SUPER_MANAGER);
-        	if(libManager!=null){
-        		parentTeacherId=null;
-        	}
-        	ArrangeTeacherDto arrangeTeacherDto=kmtArrangeDetailService.findHaveTeacherList(parentTeacherId, req.getId(),req.getTeacherName());
-            responseEntity.success(arrangeTeacherDto, "成功");
-        } catch (Exception e) {
-            logger.error("异常", e);
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-
-    @RequestMapping(value = "/findNoHaveTeacherList", method = RequestMethod.POST)
-    @ApiOperation(value = "未选时段老师列表(添加老师)", httpMethod = "POST", notes = "未选时段老师列表(添加老师)")
-    public ResponseEntity findNoHaveTeacherList(@RequestParam(name = "accessToken") String accessToken, @RequestBody ArrangeTeacherListReq req) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-        	String parentTeacherId = tokenManager.getUserId(accessToken);
-        	TbLibManager libManager=managerService.findAllByUserIdAndType(parentTeacherId, Constant.CORRECT_SUPER_MANAGER);
-        	if(libManager!=null){
-        		parentTeacherId=null;
-        	}
-        	ArrangeTeacherDto arrangeTeacherDto=kmtArrangeDetailService.findNoHaveTeacherList(parentTeacherId,  req.getId(), req.getTeacherName());
-            responseEntity.success(arrangeTeacherDto, "成功");
-        } catch (Exception e) {
-            logger.error("异常", e);
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-
-
-    @RequestMapping(value = "/deleteArrangeByTeacher", method = RequestMethod.POST)
-    @ApiOperation(value = "时段移除老师", httpMethod = "POST", notes = "时段移除老师")
-    public ResponseEntity deleteArrangeByTeacher(@RequestParam(name = "accessToken") String accessToken, @RequestBody ArrangeByDeleteReq req) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-        	kmtArrangeDetailService.deleteArrangeByTeacher(req.getId(),req.getTeacherId());
-            responseEntity.success("成功");
-        } catch (Exception e) {
-            logger.error("异常", e);
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-
-    @RequestMapping(value = "/addArrangeByTeacher", method = RequestMethod.POST)
-    @ApiOperation(value = "时段添加老师", httpMethod = "POST", notes = "时段添加老师")
-    public ResponseEntity addArrangeByTeacher(@RequestParam(name = "accessToken") String accessToken, @RequestBody ArrangeByAddReq req) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-        	Integer reqCode=kmtArrangeDetailService.addArrangeByTeacher(req.getId(), req.getTeacherIds());
-        	if(1==reqCode){
-        		responseEntity.success("成功");
-        	}else if(2==reqCode){
-        		responseEntity.failure("必须提前于排班时段前 4 个小时进行");
-        	}else if(3==reqCode){
-        		responseEntity.failure("此时段添加老师量已超出饱和量");
-        	}else if(4==reqCode){
-        		responseEntity.failure("此时段数据不存在");
-        	}else if(500==reqCode){
-        		responseEntity.failure("数据处理异常,请刷新后重试");
-        	}
-        } catch (Exception e) {
-            logger.error("异常", e);
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-
-
-
-    @RequestMapping(value = "/findTeamTeacherList", method = RequestMethod.POST)
-    @ApiOperation(value = "组内排班老师列表", httpMethod = "POST", notes = "组内排班老师列表")
-    public ResponseEntity findTeamTeacherList(@RequestParam(name = "accessToken") String accessToken, @RequestBody ArrangeTeamTeacherListReq req) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-        	String parentTeacherId = tokenManager.getUserId(accessToken);
-        	Pageable pageable = initPage(
-        			req.getPageNo()!=null ? req.getPageNo() : 1 ,
-        					req.getPageSize()!=null ? req.getPageSize() : 10);
-        	if(StringUtils.isNotEmpty(req.getManagerId())){
-        		parentTeacherId=req.getManagerId();
-        	}
-        	ArrangeTeamTeacherDto arrangeTeamTeacherDto=kmtArrangeDetailService.findTeamTeacherList(parentTeacherId, req.getType(),req.getId(),req.getTeacherName(),pageable);
-            responseEntity.success(arrangeTeamTeacherDto,"成功");
-        } catch (Exception e) {
-            logger.error("异常", e);
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-
-
-
-
-
-    @RequestMapping(value = "/saveTeacherDuty", method = RequestMethod.POST)
-    @ApiOperation(value = "老师保存排班设置", httpMethod = "POST",  notes = "老师保存排班设置")
-    public ResponseEntity saveTeacherDuty(@RequestParam(name = "accessToken") String accessToken,@RequestBody DutyRequestVO requestVO) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            String teacherUserId = tokenManager.getUserId(accessToken);
-            responseEntity = kmtArrangeAllotService.saveTeacherDuty(requestVO,teacherUserId);
-           // responseEntity.success("保存成功");
-        } catch (Exception e) {
-            logger.error("老师保存排班设置接口", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/dutyTemplateList", method = RequestMethod.POST)
-    @ApiOperation(value = "排班设置列表", httpMethod = "POST",  notes = "老师保存排班设置")
-    public ResponseEntity dutyTemplateList(@RequestParam(name = "accessToken") String accessToken) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            String teacherUserId = tokenManager.getUserId(accessToken);
-            Map<String,Object> data = new HashMap<>();
-            List<DutyTemplate> list = kmtArrangeAllotService.dutyTemplateList(teacherUserId);
-            data.put("dayList",list);
-            data.put("month", DateHelper.format(DateHelper.getNextMonthFirstDay(new Date()),"MM"));
-            responseEntity.success(data, "查询成功");
-        } catch (Exception e) {
-            logger.error("排班设置列表接口", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/saveSysTeacherDuty", method = RequestMethod.POST)
-    @ApiOperation(value = "保存排班设置", httpMethod = "POST",  notes = "老师保存排班设置")
-    public ResponseEntity saveSysTeacherDuty(@RequestParam(name = "accessToken") String accessToken,@RequestBody DutySysRequestVO vo1) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-           // String teacherUserId = tokenManager.getUserId(accessToken);
-            kmtArrangeAllotService.saveSysTeacherDuty(vo1);
-            responseEntity.success("保存成功");
-        } catch (Exception e) {
-            logger.error("保存排班设置接口", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "teacherDayAttendance",method = RequestMethod.POST)
-    @ApiOperation(value = "老师当日出勤记录",httpMethod = "POST",notes ="老师当月出勤记录" )
-    public void getTeacherDayAttendance(@RequestParam(name="accessToken")String accessToken,@RequestParam String time){
-
-
-
-    }
-    
-    
-    
-    @RequestMapping(value = "/findArrangeTemplateIntervalList", method = RequestMethod.POST)
-    @ApiOperation(value = "查询当月日历时间列表", httpMethod = "POST", notes = "查询当月日历时间列表")
-    public ResponseEntity findArrangeIntervalList(@RequestParam(name = "accessToken") String accessToken) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-        	List<CurCalendarDto> curCalendarDtos=kmtArrangeTemplateService.findArrangeTemplateIntervalList();
-            Map<String,Object> data=new LinkedHashMap<String, Object>();
-            data.put("list", curCalendarDtos);
-			responseEntity.success(data,"成功");
-        } catch (Exception e) {
-            logger.error("异常", e);
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-    
-    
-}

+ 0 - 629
ssj-aijia-api/src/main/java/com/ssj/aijia/kmt/exercise/controller/KmtExerciseController.java

@@ -1,629 +0,0 @@
-package com.ssj.aijia.kmt.exercise.controller;
-
-
-import com.alibaba.dubbo.config.annotation.Reference;
-import com.alibaba.fastjson.JSON;
-import com.ssj.bean.kmt.kmt.request.exercise.KmtHandlingQuestionRequest;
-import com.ssj.bean.kmt.kmtsys.domain.KmtSysUser;
-import com.ssj.framework.core.common.controller.BaseController;
-import com.ssj.framework.core.security.annotation.IgnoreSecurity;
-import com.ssj.framework.core.security.annotation.ModifySecurity;
-import com.ssj.framework.core.security.exception.CommonException;
-import com.ssj.framework.core.security.manager.TokenManager;
-import com.ssj.framework.core.util.ResponseConstant;
-import com.ssj.framework.core.util.ResponseEntity;
-import com.ssj.service.conch.common.request.PageReq;
-import com.ssj.service.conch.parents.request.exercise.KmtExerciseQuestionRequest;
-import com.ssj.service.kmt.dto.ExerciseBookCourseClassDto;
-import com.ssj.service.kmt.dto.ExerciseBookCourseDTO;
-import com.ssj.service.kmt.dto.ExerciseBookDto;
-import com.ssj.service.kmt.dto.KmtSysUserDTO;
-import com.ssj.service.kmt.dto.exercise.ExerciseQuestionRollbacks;
-import com.ssj.service.kmt.exercise.request.SubmitAnswerProofreadResultReq;
-import com.ssj.service.kmt.request.*;
-import com.ssj.service.kmt.service.*;
-import com.ssj.service.sys.homework.service.HomeworkService;
-import com.ssj.service.sys.picturepredeal.service.PicturePreDealService;
-import com.ssj.service.sys.picturepredeal.service.ProblemSimilarPreDealService;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import org.apache.commons.collections.CollectionUtils;
-import org.apache.commons.lang3.StringUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
-
-import javax.validation.Valid;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Objects;
-
-/**
- *
- * kmt练习册
- * @author chchen
- * 2019-01-14
- */
-@RestController
-@RequestMapping("/api/kmt/exercise")
-@Api(value = "kmt练习册接口", tags = "kmt练习册接口")
-public class KmtExerciseController extends BaseController {
-
-    @Autowired
-    private TokenManager tokenManager;
-
-    @Reference(version = "1.0" ,timeout = 60000)
-    private KmtExerciseService kmtExerciseService;
-
-    @Reference(version = "1.0" ,timeout = 60000)
-    private KmtQualityQuestionsService kmtQualityQuestionsService;
-    
-    @Reference(version = "1.0" ,timeout = 60000)
-    private KmtSysUserService kmtSysUserService;
-
-    @Reference(version = "1.0" ,timeout = 60000)
-    private KmtExerciseBookCourseService kmtExerciseBookCourseService;
-
-    @Reference(version = "1.0" ,timeout = 60000)
-    private KmtExerciseQuestionService kmtExerciseQuestionService;
-    @Reference(version = "1.0" ,timeout = 60000)
-    private HomeworkService homeworkService;
-
-    @Reference(version = "1.0" ,timeout = 60000)
-    private KmtExerciseMapperService kmtExerciseMapperService;
-
-    @Reference(version = "1.0" ,timeout = 60000)
-    private PicturePreDealService picturePreDealService;
-
-    @Reference(version = "1.0" ,timeout = 60000)
-    private ProblemSimilarPreDealService problemSimilarPreDealService;
-
-    @Reference(version = "1.0", timeout = 60000)
-    private KmtExerciseSubmitService kmtExerciseSubmitService;
-
-    /**
-     * 废弃
-     * @param accessToken
-     * @param request
-     * @return
-     */
-    @RequestMapping(value = "/getExerciseCondition", method = RequestMethod.POST)
-    @ApiOperation(value = "获取分配练习册列表", httpMethod = "POST",  notes = "获取分配练习册列表")
-    public ResponseEntity getExerciseCondition(@RequestParam(name = "accessToken") String accessToken,
-                                          @RequestBody ExerciseConditionRequest request) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            String userId = tokenManager.getUserId(accessToken);
-            List<ExerciseBookDto> list = kmtExerciseBookCourseService.getExerciseCondition(request, userId);
-            Map<String, Object> data = new HashMap<>();
-            data.put("books", list);
-            responseEntity.success(data, "保存成功");
-        } catch (Exception e) {
-            logger.error("入参={}", request);
-            logger.error("练习册筛选条件异常", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @ModifySecurity
-    @RequestMapping(value = "/questionRollback", method = RequestMethod.POST)
-    @ApiOperation(value = "题目打回", httpMethod = "POST",  notes = "题目打回")
-    public ResponseEntity questionRollback(@RequestParam(name = "accessToken") String accessToken,
-                                           @RequestBody QuestionRollbackRequest request) {
-
-        ResponseEntity responseEntity = new ResponseEntity();
-        try{
-            List<String> questionIdList = request.getQuestionIds();
-            if (CollectionUtils.isEmpty(questionIdList)) {
-                responseEntity.failure(ResponseConstant.CODE_000, "请先选择题目");
-            } else {
-                String userId = tokenManager.getUserId(accessToken);
-                responseEntity = kmtExerciseService.questionRollback(userId, request);
-            }
-        } catch (Exception e){
-            logger.error("入参={}", request);
-            logger.error("打回异常", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/getHandlingQuestions", method = RequestMethod.POST)
-    @ApiOperation(value = "待加工/待审核题目", httpMethod = "POST",  notes = "待加工/待审核题目")
-    public ResponseEntity getHandlingQuestions(@RequestParam(name = "accessToken") String accessToken,
-                                               @RequestBody ExerciseQuestionsRequest request) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            String userId = tokenManager.getUserId(accessToken);
-            responseEntity = kmtExerciseQuestionService.findExerciseQuestions(userId, request);
-        } catch (Exception e) {
-            logger.error("入参={}", request);
-            logger.error("待加工/待审核题目", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/V1/submit2Auditing", method = RequestMethod.POST)
-    @ModifySecurity
-    @ApiOperation(value = "提交审核/发布", httpMethod = "POST",  notes = "提交审核/发布")
-    public ResponseEntity submit2AuditingV1(@RequestParam(name = "accessToken") String accessToken,
-                                            @RequestBody AuditingV1Request request) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            String userId = tokenManager.getUserId(accessToken);
-            responseEntity = kmtExerciseService.submit2AuditingV1(request, userId);
-        } catch (CommonException e) {
-            return responseEntity.failure(ResponseConstant.CODE_500, e.getMessage());
-        } catch (Exception e){
-            logger.error("入参={}", request);
-            logger.error("异常", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-
-
-        return responseEntity;
-    }
-    @ModifySecurity
-    @RequestMapping(value = "/publishQuestion", method = RequestMethod.POST)
-    @ApiOperation(value = "发布题目", httpMethod = "POST",  notes = "修改题目")
-    public ResponseEntity publishQuestion(@RequestParam(name = "accessToken") String accessToken,
-                                          @RequestBody QuestionPublishRequest request) {
-
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            List<String> questionIdList = request.getQuestionIds();
-            if (CollectionUtils.isEmpty(questionIdList)) {
-                responseEntity.failure("请先选择题目");
-                return responseEntity;
-            }
-            String userId = tokenManager.getUserId(accessToken);
-            responseEntity = kmtExerciseService.publishQuestion(request, userId);
-        } catch (CommonException e) {
-            throw e;
-        } catch (Exception e){
-            logger.error("入参={}", request);
-            logger.error("异常", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-
-    @RequestMapping(value = "/getDistributeCondition", method = RequestMethod.POST)
-    @ApiOperation(value = "分配筛选条件筛选", httpMethod = "POST",  notes = "修改题目")
-    public ResponseEntity getDistributeCondition(@RequestParam(name = "accessToken") String accessToken,
-                                          @RequestBody DistributionConditionRequest request) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            int dealType = request.getDealType();
-            if (dealType != 1 && dealType != 2) {
-                responseEntity.failure("操作类型错误");
-                return responseEntity;
-            }
-
-            List<KmtSysUserDTO> kmtSysUserDTOList = kmtSysUserService.getDistributeCondition(dealType);
-            Map<String, Object> resultMap = new HashMap<>();
-            resultMap.put("users", kmtSysUserDTOList);
-            responseEntity.success(resultMap, "查询成功");
-        } catch (Exception e) {
-            logger.error("入参={}", request);
-            logger.error("分配筛选条件筛选", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/distributeQuestions", method = RequestMethod.POST)
-    @ApiOperation(value = "分配题目", httpMethod = "POST",  notes = "分配题目")
-    public ResponseEntity distributeQuestions(@RequestParam(name = "accessToken") String accessToken,
-                                              @RequestBody QuestionDistributeRequest request) {
-
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            logger.info("分配题目请求参数={}", JSON.toJSON(request));
-            int dealType = request.getDealType();
-            if (dealType != 1 && dealType != 2) {
-                responseEntity.failure("操作类型错误");
-                return responseEntity;
-            }
-
-            String userId = request.getUserId();
-            if (StringUtils.isBlank(userId)) {
-                responseEntity.failure("请选择用户");
-                return responseEntity;
-            }
-
-            KmtSysUser selectedUser = kmtSysUserService.getById(userId);
-            String selectedUserType = selectedUser.getType();
-            if ((dealType == 1 && !Objects.equals("QPM", selectedUserType)) || (dealType == 2 && !Objects.equals("SYS", selectedUserType))) {
-                logger.warn(String.format("dealType=%s, userId=%s", dealType, userId));
-                responseEntity.failure("所选用户与操作类型不匹配");
-                return responseEntity;
-            }
-
-            if (request.getPeriodId() == null && request.getUnitId() == null && request.getBookId() == null) {
-                responseEntity.failure("请选择课时id或单元id或练习册id");
-                return responseEntity;
-            }
-
-            kmtExerciseService.distributeQuestions(request);
-            responseEntity.success(ResponseConstant.CODE_999, "保存成功");
-        } catch (Exception e) {
-            logger.error("入参={}", request);
-            logger.error("分配题目", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/getBookExerciseList", method = RequestMethod.POST)
-    @ApiOperation(value = "练习册课时列表", httpMethod = "POST",  notes = "分配题目")
-    public ResponseEntity getBookExerciseList(@RequestParam(name = "accessToken") String accessToken,
-                                              @RequestBody QuestionDistributeRequest request) {
-
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            if (StringUtils.isBlank(request.getGrade())) {
-                responseEntity.failure("请选择年级");
-                return responseEntity;
-            }
-
-            if (StringUtils.isBlank(request.getSubject())) {
-                responseEntity.failure("请选择科目");
-                return responseEntity;
-            }
-
-            if (!Objects.equals(1, request.getSemester()) && !Objects.equals(2, request.getSemester())) {
-                responseEntity.failure("请选择上下册");
-                return responseEntity;
-            }
-
-            List<ExerciseBookCourseDTO> exerciseBookCourseDTOList = kmtExerciseService.getBookExerciseList(request);
-            Map<String, Object> resultMap = new HashMap<>();
-            resultMap.put("list", exerciseBookCourseDTOList);
-            responseEntity.success(resultMap, "查询成功");
-        } catch (Exception e) {
-            logger.error("入参={}", request);
-            logger.error("练习册课时列表", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/getBookExerciseDetail", method = RequestMethod.POST)
-    @ApiOperation(value = "练习册课时详情", httpMethod = "POST",  notes = "分配题目")
-    public ResponseEntity getBookExerciseDetail(@RequestParam(name = "accessToken") String accessToken,
-                                              @RequestBody ExerciseDetailRequest request) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            List<ExerciseBookCourseClassDto> list = kmtExerciseQuestionService.findQusetionsByCourseId(request.getCourseId());
-            Map<String, Object> data = new HashMap<>();
-            data.put("list", list);
-            responseEntity.success(data, "保存成功");
-        } catch (Exception e) {
-            logger.error("入参={}", request);
-            logger.error("练习册课时详情", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-
-    @RequestMapping(value = "/findQuestionRollbackRecord", method = RequestMethod.POST)
-    @ApiOperation(value = "查询打回理由记录", httpMethod = "POST",  notes = "查询打回理由记录")
-    public ResponseEntity findQuestionRollbackRecord(@RequestParam(name = "accessToken") String accessToken,
-                                                @RequestBody KmtExerciseQuestionRequest request) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            List<ExerciseQuestionRollbacks> list = kmtExerciseService.findQuestionRollbackRecord(request.getQuestionId());
-            Map<String, Object> data = new HashMap<>();
-            data.put("list", list);
-            responseEntity.success(data, "保存成功");
-        } catch (Exception e) {
-            logger.error("入参={}", request);
-            logger.error("查询打回理由", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/findQuestionAttributeFilter", method = RequestMethod.POST)
-    @ApiOperation(value = "查询题目类型筛选项", httpMethod = "POST",  notes = "查询题目类型筛选项")
-    public ResponseEntity findQuestionAttributeFilter(@RequestParam(name = "accessToken") String accessToken) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            Map<String, Object> data = new HashMap<>();
-            data.put("list", kmtExerciseQuestionService.findQuestionAttributeFilter());
-            responseEntity.success(data, "成功");
-        } catch (Exception e) {
-            logger.error("练习册筛选条件异常", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/findExerciseBooks", method = RequestMethod.POST)
-    @ApiOperation(value = "查询练习册", httpMethod = "POST",  notes = "查询练习册")
-    public ResponseEntity findExerciseBooks(@RequestParam(name = "accessToken") String accessToken, @RequestBody ExerciseConditionRequest request) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            Map<String, Object> data = new HashMap<>();
-            data.put("list", kmtExerciseMapperService.findExerciseBooks(request, tokenManager.getUserId(accessToken)));
-            responseEntity.success(data, "成功");
-        } catch (Exception e) {
-            logger.error("查询练习册", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/findExerciseBookDetail", method = RequestMethod.POST)
-    @ApiOperation(value = "查询题目单元课时", httpMethod = "POST",  notes = "查询题目单元课时")
-    public ResponseEntity findExerciseBookDetail(@RequestParam(name = "accessToken") String accessToken, @RequestBody ExerciseBookIdDealTypeRequest request) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            Map<String, Object> data = new HashMap<>();
-            String userId = tokenManager.getUserId(accessToken);
-            data.put("units", kmtExerciseMapperService.findExerciseBookDetail(request, userId));
-            responseEntity.success(data, "成功");
-        } catch (Exception e) {
-            logger.error("练习册筛选条件异常", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/unitAndPeriodList", method = RequestMethod.POST)
-    @ApiOperation(value = "查询题目单元课时2(答案报错)", httpMethod = "POST",  notes = "查询题目单元课时2(答案报错)")
-    public ResponseEntity findUnitAndPeriodList(@RequestParam(name = "accessToken") String accessToken,
-                                                @RequestBody @Valid UnitAndPeriodListRequest request) {
-
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            Map<String, Object> data = new HashMap<>();
-            data.put("units", kmtExerciseMapperService.findUnitAndPeriodList(request));
-            responseEntity.success(data, "成功");
-        } catch (Exception e) {
-            logger.error("request={}", request);
-            logger.error("查询题目单元课时2(答案报错)异常", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/getKmtHandlingQuestions", method = RequestMethod.POST)
-    @ApiOperation(value = "kmt题库查询待加工/待审核的题目", httpMethod = "POST",  notes = "kmt题库查询待加工/待审核的题目")
-    public ResponseEntity getKmtHandlingQuestions(@RequestParam(name = "accessToken") String accessToken, @RequestBody KmtHandlingQuestionRequest request) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            responseEntity.success(kmtQualityQuestionsService.getKmtHandlingQuestions(request, tokenManager.getUserId(accessToken)), "成功");
-        } catch (Exception e) {
-            logger.error("练习册筛选条件异常", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/submitKmtQuestions2Auditing", method = RequestMethod.POST)
-    @ApiOperation(value = "kmt题目提交审核", httpMethod = "POST",  notes = "kmt题目提交审核")
-    public ResponseEntity submitKmtQuestions2Auditing(@RequestParam(name = "accessToken") String accessToken, @RequestBody AuditingRequest request) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            logger.info(JSON.toJSONString(request));
-            String userId = tokenManager.getUserId(accessToken);
-            responseEntity = kmtQualityQuestionsService.submitKmtQuestions2Auditing(request, userId);
-        } catch (Exception e) {
-            logger.error("练习册筛选条件异常", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/deleteKmtQuestion", method = RequestMethod.POST)
-    @ApiOperation(value = "删除题目", httpMethod = "POST",  notes = "删除题目")
-    public ResponseEntity deleteKmtQuestion(@RequestParam(name = "accessToken") String accessToken, @RequestBody QuestionIdRequest request) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            logger.warn("用户{}删除了题目{}", tokenManager.getUserId(accessToken), request.getQuestionId());
-            String userId = tokenManager.getUserId(accessToken);
-            kmtQualityQuestionsService.deleteKmtQuestion(request.getQuestionId(), userId);
-            responseEntity.success(ResponseConstant.CODE_999, "成功");
-        } catch (Exception e) {
-            logger.error("练习册筛选条件异常", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/findQuestionListByParentId", method = RequestMethod.POST)
-    @ApiOperation(value = "查询大小题目", httpMethod = "POST",  notes = "删除题目")
-    public ResponseEntity findQuestionListByParentId(@RequestParam(name = "accessToken") String accessToken, @RequestBody ParentIdListRequest request) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            responseEntity = kmtQualityQuestionsService.findQuestionListByParentId(request.getParentIdList());
-        } catch (Exception e) {
-            logger.error("练习册筛选条件异常", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @ModifySecurity
-    @RequestMapping(value = "/kmtQuestionRollback", method = RequestMethod.POST)
-    @ApiOperation(value = "kmt题目打回", httpMethod = "POST",  notes = "题目打回")
-    public ResponseEntity kmtQuestionRollback(@RequestParam(name = "accessToken") String accessToken,
-                                           @RequestBody KmtQuestionRollbackRequest request) {
-
-        ResponseEntity responseEntity = new ResponseEntity();
-        try{
-            List<String> questionIdList = request.getParentIds();
-            if (CollectionUtils.isEmpty(questionIdList)) {
-                responseEntity.failure(ResponseConstant.CODE_000, "请先选择题目");
-            } else {
-                String userId = tokenManager.getUserId(accessToken);
-                responseEntity = kmtQualityQuestionsService.kmtQuestionRollback(userId, request);
-            }
-        } catch (Exception e){
-            logger.error("入参={}", request);
-            logger.error("打回异常", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/publishKmtQuestion", method = RequestMethod.POST)
-    @ApiOperation(value = "发布kmt题目", httpMethod = "POST",  notes = "修改题目")
-    public ResponseEntity publishKmtQuestion(@RequestParam(name = "accessToken") String accessToken,
-                                          @RequestBody KmtQuestionPublishRequest request) {
-
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            List<String> questionIdList = request.getParentIds();
-            if (CollectionUtils.isEmpty(questionIdList)) {
-                responseEntity.failure("请先选择题目");
-                return responseEntity;
-            }
-
-            String userId = tokenManager.getUserId(accessToken);
-            responseEntity = kmtQualityQuestionsService.publishKmtQuestion(request, userId);
-        } catch (CommonException e) {
-            System.out.println(e.getMessage());
-            responseEntity.failure(ResponseConstant.CODE_000, e.getMessage());
-        } catch (Exception e){
-            logger.error("入参={}", request);
-            logger.error("异常", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/submitAnswerProofreadResult", method = RequestMethod.POST)
-    @ApiOperation(value = "提交答案校对结果", httpMethod = "POST",  notes = "提交答案校对结果")
-    public ResponseEntity submitAnswerProofreadResult(@RequestParam(name = "accessToken") String accessToken,
-                                             @RequestBody SubmitAnswerProofreadResultReq request) {
-
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            String userId = tokenManager.getUserId(accessToken);
-            responseEntity = kmtExerciseService.submitAnswerProofreadResult(request);
-        } catch (Exception e){
-            logger.error("入参={}", request);
-            logger.error("异常", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/answerProofreadSubmitAnswer", method = RequestMethod.POST)
-    @ModifySecurity
-    @ApiOperation(value = "答案校对提交答案", httpMethod = "POST",  notes = "答案校对提交答案")
-    public ResponseEntity answerProofreadSubmitAnswer(@RequestParam(name = "accessToken") String accessToken,
-                                                      @RequestBody @Valid AnswerProofreadSubmitAnswerRequest request) {
-
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            responseEntity = kmtExerciseService.answerProofreadSubmitAnswer(request);
-        } catch (Exception e){
-            logger.error("入参={}", request);
-            logger.error("答案校对提交答案异常", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/teacherAnswerProofreadDetail", method = RequestMethod.POST)
-    @ApiOperation(value = "查询答案校对本数", httpMethod = "POST", notes = "查询答案校对本数")
-    public ResponseEntity teacherAnswerProofreadDetail(@RequestParam(name = "accessToken") String accessToken) {
-        ResponseEntity responseEntity;
-        try {
-            String userId = tokenManager.getUserId(accessToken);
-            responseEntity = kmtExerciseService.teacherAnswerProofreadDetail(userId);
-        } catch (Exception e) {
-            logger.error("查询答案校对本数异常", e);
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/questionErrors", method = RequestMethod.POST)
-    @ApiOperation(value = "题目报错", httpMethod = "POST", notes = "题目报错")
-    public ResponseEntity questionErrors(@RequestParam(name = "accessToken") String accessToken,
-                                         @RequestBody @Valid QuestionRollbackRequest request) {
-        ResponseEntity responseEntity;
-        try {
-            String userId = tokenManager.getUserId(accessToken);
-            responseEntity = kmtExerciseService.questionsError(userId, request);
-        } catch (Exception e) {
-            logger.error("题目报错", e);
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/findExerciseErrorQuestions", method = RequestMethod.POST)
-    @ApiOperation(value = "报错明细", httpMethod = "POST", notes = "报错明细")
-    public ResponseEntity findExerciseErrorQuestions(@RequestParam(name = "accessToken") String accessToken,
-                                         @RequestBody PageReq request) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            String userId = tokenManager.getUserId(accessToken);
-            responseEntity.success(kmtExerciseService.findExerciseErrorQuestions(request, userId), "成功");
-        } catch (Exception e) {
-            logger.error("报错明细", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @IgnoreSecurity
-    @RequestMapping(value = "updateRollbackUserId",method = RequestMethod.POST)
-    @ApiOperation(value = "更新打回数据",httpMethod = "POST",notes = "更新打回数据")
-    public ResponseEntity updateRollbackUserId(@RequestParam(name = "accessToken") String accessToken){
-        ResponseEntity responseEntity;
-        try {
-            responseEntity=kmtExerciseService.updateRollbackUserId();
-        }catch (Exception e){
-            logger.error("更新打回数据失败", e);
-            responseEntity=new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-
-    }
-
-    @RequestMapping(value = "/submitQueryViaOssResult", method = RequestMethod.POST)
-    @IgnoreSecurity
-    @ApiOperation(value = "以题搜题回调接口", httpMethod = "POST", notes = "以题搜题回调接口")
-    public ResponseEntity submitQueryViaOssResult(@RequestBody @Valid SubmitQueryViaOssResultRequest request) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            return picturePreDealService.submitQueryViaOssResult(request);
-        } catch (Exception e) {
-            logger.error("以题搜题回调接口", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/submitQuerySimilarQuestionResult", method = RequestMethod.POST)
-    @IgnoreSecurity
-    @ApiOperation(value = "推荐题回调接口", httpMethod = "POST", notes = "推荐题回调接口")
-    public ResponseEntity submitQuerySimilarQuestionResult(@RequestBody @Valid SubmitQueryViaOssResultRequest request) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            return problemSimilarPreDealService.submitQuerySimilarQuestionResult(request);
-        } catch (Exception e) {
-            logger.error("推荐题回调接口", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-}

+ 0 - 345
ssj-aijia-api/src/main/java/com/ssj/aijia/kmt/homeworkcorrect/controller/KmtHomeworkCorrectController.java

@@ -1,345 +0,0 @@
-//package com.ssj.aijia.kmt.homeworkcorrect.controller;
-//
-//import com.alibaba.dubbo.config.annotation.Reference;
-//import com.ssj.bean.common.files.domain.FileInfo;
-//import com.ssj.bean.sys.homework.domain.HomeworkPicture;
-//import com.ssj.bean.weixin.libmy.domain.LibVip;
-//import com.ssj.bean.weixin.libmy.domain.LibVipBook;
-//
-//import com.ssj.framework.core.common.controller.BaseController;
-//import com.ssj.framework.core.security.annotation.ModifySecurity;
-//import com.ssj.framework.core.security.manager.TokenManager;
-//import com.ssj.framework.core.util.ImageTools;
-//import com.ssj.framework.core.util.PropertiesUtil;
-//import com.ssj.framework.core.util.ResponseConstant;
-//import com.ssj.framework.core.util.ResponseEntity;
-//import com.ssj.framework.files.service.FileInfoService;
-//import com.ssj.service.conch.teacher.service.TeacherService;
-//import com.ssj.service.kmt.dto.*;
-//import com.ssj.service.kmt.request.*;
-//import com.ssj.service.kmt.service.*;
-//import com.ssj.service.sys.homework.service.HomeworkPictureService;
-//import com.ssj.service.sys.homework.service.HomeworkService;
-//import com.ssj.service.weixin.library.service.IBookManagerService;
-//import com.ssj.service.weixin.library.service.ILibVipService;
-//import com.ssj.service.weixin.library.service.LibVipBookService;
-//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.web.bind.annotation.*;
-//
-//import java.util.ArrayList;
-//import java.util.HashMap;
-//import java.util.List;
-//import java.util.Map;
-//
-///**
-// * kmt作业批改功能
-// */
-//@RestController
-//@Api(value = "kmt作业批改相关的接口", tags = "kmt作业批改相关的接口")
-//@RequestMapping("/api/kmt/homeworkCorrect")
-//public class KmtHomeworkCorrectController extends BaseController {
-//
-//	@Reference(version = "1.0" ,timeout = 60000)
-//    private IBookManagerService managerService;
-//	@Reference(version = "1.0" ,timeout = 60000)
-//    private KmtConchQueryService kmtConchQueryService;
-//	@Reference(version = "1.0" ,timeout = 60000)
-//    private HomeworkService homeworkService;
-//	@Reference(version = "1.0" ,timeout = 60000)
-//    private HomeworkPictureService homeworkPictureService;
-//	@Reference(version = "1.0" ,timeout = 60000)
-//    private KmtKnowledgeService kmtKnowledgeService;
-//	@Reference(version = "1.0" ,timeout = 60000)
-//    private KmtCorrectHomeworkService kmtCorrectHomeworkService;
-//    @Reference(version = "1.0" ,timeout = 60000)
-//    private KmtExerciseQuestionService kmtExerciseQuestionService;
-//    @Reference(version = "1.0" ,timeout = 60000)
-//    private KmtExerciseBookCourseService kmtExerciseBookCourseService;
-//    @Reference(version = "1.0" ,timeout = 60000)
-//    private ILibVipService vipService;
-//    @Reference(version = "1.0" ,timeout = 60000)
-//    private TeacherService teacherService;
-//    @Reference(version = "1.0" ,timeout = 60000)
-//    private LibVipBookService libVipBookService;
-//    @Autowired
-//    private TokenManager tokenManager;
-//    @Autowired
-//    private FileInfoService fileInfoService;
-//    @Autowired
-//	private ConfigService configService;
-//
-//    @ApiOperation(value = "查询作业列表")
-//    @RequestMapping(value = "/findHomeworkCorrectPageInit", method = RequestMethod.POST)
-//    public ResponseEntity findHomeworkCorrectPageInit (@RequestParam(name = "accessToken") String accessToken){
-//        ResponseEntity responseEntity = new ResponseEntity();
-//        try {
-//            String teacherId = tokenManager.getUserId(accessToken);
-//            Map<String, Object> data = kmtCorrectHomeworkService.findHomeworkCorrectPageInit(teacherId);
-//            responseEntity.success(data, "查询成功");
-//        } catch (Exception e) {
-//            logger.error("服务异常", e);
-//            responseEntity.failure("查询异常");
-//        }
-//        return responseEntity;
-//    }
-//
-//    /**
-//     * 查询作业列表
-//     */
-//    @ApiOperation(value = "查询作业列表")
-//    @RequestMapping(value = "/homeworkList", method = RequestMethod.POST)
-//    public ResponseEntity findHomeworkList(@RequestParam(name = "accessToken") String accessToken) {
-//        ResponseEntity responseEntity = new ResponseEntity();
-//        try {
-//            String teacherId = tokenManager.getUserId(accessToken);
-//            List<SubjectStudentDto> resultList = kmtConchQueryService.findHomeworkPictureByList(teacherId);
-//            Map<String, Object> map = new HashMap<>();
-//            map.put("list", resultList);
-//            map.put("totalNotFeedback",  homeworkPictureService.getNotFeedbackCount(teacherId));
-//            responseEntity.success(map, "查询成功");
-//        } catch (Exception e) {
-//            logger.error("服务异常", e);
-//            responseEntity.failure("查询异常");
-//        }
-//        return responseEntity;
-//    }
-//
-//    /**
-//     * 查询教辅/单元/课时筛选条件,用于查询答案
-//     */
-//    @RequestMapping(value = "answerFilterCondition", method = RequestMethod.POST)
-//    @ApiOperation(value = "查询教辅/单元/课时筛选条件", httpMethod = "POST",  notes = "查询教辅/单元/课时筛选条件")
-//    public ResponseEntity getAnswerFilterCondition(@RequestParam(name = "accessToken") String accessToken,
-//            @RequestBody BookFilterRequest req) {
-//        ResponseEntity responseEntity = new ResponseEntity();
-//        try {
-//            LibVip vip = vipService.getById(req.getVipId());
-//            int semester = Integer.parseInt(PropertiesUtil.getValue("semester"));
-//            ExerciseConditionRequest request = new ExerciseConditionRequest();
-//            request.setGrade(vip.getGrade());
-//            request.setSemester(semester);
-//            request.setSubject(req.getSubject());
-//            request.setVersionType(0);
-//            //userId只用于加工审核那里查询待加工待审核的练习册,此处无用
-//            List<ExerciseBookDto> list = kmtExerciseBookCourseService.getExerciseCondition(request, null);
-//            List<LibVipBook> studentBooks = libVipBookService.findLibVipBookByVipId(req.getVipId(), req.getSubject());
-//            list = kmtCorrectHomeworkService.bookListDefaultCelling(list, studentBooks);
-//            Map<String, Object> data = new HashMap<>();
-//            data.put("books", list);
-//            responseEntity.success(data, "查询成功");
-//        } catch (Exception e){
-//            logger.error("查询异常", e);
-//            responseEntity.failure(ResponseConstant.CODE_500, "查询异常");
-//        }
-//
-//
-//        return responseEntity;
-//    }
-//
-//    /**
-//     * 查询知识点列表
-//     */
-//    @ApiOperation(value = "查询知识点列表")
-//    @RequestMapping(value = "knowledgeList", method = RequestMethod.POST)
-//    public ResponseEntity findKnowledgeList(@RequestParam(name = "accessToken") String accessToken, @RequestParam String questionId) {
-//        List<KnowHowDetailsDTO> knowHowDetailsDTOList = kmtKnowledgeService.findByQuestionId(questionId);
-//        Map<String, Object> map = new HashMap<>();
-//        map.put("list", knowHowDetailsDTOList);
-//        ResponseEntity responseEntity = new ResponseEntity();
-//        responseEntity.success(map, "查询成功");
-//        return responseEntity;
-//    }
-//
-//    /**
-//     * 记录开始批改的时间,并锁定作业图片
-//     */
-//    @RequestMapping(value = "startCorrectTiming", method = RequestMethod.POST)
-//    public ResponseEntity startCorrectTiming(@RequestParam(name = "accessToken") String accessToken, @RequestParam String homeworkPictureId) {
-//        ResponseEntity responseEntity = new ResponseEntity();
-//        HomeworkPicture homeworkPicture = homeworkPictureService.getById(homeworkPictureId);
-////        List<HomeworkPicture> hpList = homeworkPictureService.findTodayNotFeedbackHomeworkPicture(homeworkPicture.getTeacherId());
-//        if (homeworkPicture.getIsFeedback() == 0){
-//            homeworkPictureService.recordBeginTime(homeworkPictureId);
-//        } else {
-//            logger.warn("作业已批改,不再记录开始批改时间");
-//        }
-//        //把其他图片解锁
-////        if (hpList != null){
-////            for (HomeworkPicture hp : hpList){
-////                if (hp.getLocking() != null && hp.getLocking() == 1){
-////                    hp.setLocking(0);
-////                    homeworkPictureService.save(hp);
-////                }
-////            }
-////        }
-//        homeworkPicture.setLocking(1);
-//        homeworkPictureService.save(homeworkPicture);
-//        responseEntity.success(ResponseConstant.CODE_999, "开始计时成功");
-//        return responseEntity;
-//    }
-//
-//    /**
-//     * 根据课时的id查询所有已审核题目的答案
-//     */
-//    @ApiOperation(value = "查询答案v2")
-//    @RequestMapping(value = "answerList/V2", method = RequestMethod.POST)
-//    public ResponseEntity findAnswerListV2(@RequestParam(name = "accessToken") String accessToken,
-//                                         @RequestBody AnswerSearchV1Request request) {
-//
-//        ResponseEntity responseEntity = new ResponseEntity();
-//        try {
-//            List<ExerciseQuestionAnswer4CorrectDTO> exerciseQuestionAnswer4CorrectDTOList = kmtExerciseQuestionService.findByExerciseBookCourseIdV3(request);
-//            responseEntity.success(exerciseQuestionAnswer4CorrectDTOList, "查询成功");
-//        } catch (Exception e) {
-//            logger.error("查询答案异常", e);
-//            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-//        }
-//        return responseEntity;
-//    }
-//
-//    /**
-//     * 根据课时的id查询所有已审核题目的答案
-//     */
-//    @ApiOperation(value = "查询答案")
-//    @RequestMapping(value = "answerList", method = RequestMethod.POST)
-//    public ResponseEntity findAnswerList(@RequestParam(name = "accessToken") String accessToken,
-//                                         @RequestBody AnswerSearchRequest request) {
-//
-//        ResponseEntity responseEntity = new ResponseEntity();
-//        try {
-//            Map<String, List<ExerciseQuestionDto>> exerciseQuestionDtoMap = kmtExerciseQuestionService.findByExerciseBookCourseId(request);
-//            responseEntity.success(exerciseQuestionDtoMap, "查询成功");
-//        } catch (Exception e) {
-//            logger.error("查询答案异常", e);
-//            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-//        }
-//        return responseEntity;
-//    }
-//
-//    /**
-//     * 多张图片上传
-//     */
-//    @ResponseBody
-//    @RequestMapping(value = "/upload", method = RequestMethod.POST)
-//    public ResponseEntity upload(@RequestParam(name = "accessToken") String accessToken, @RequestParam(name = "pic") String pic){
-//        ResponseEntity responseEntity = new ResponseEntity();
-//        try {
-//            List<FileInfo> pathpics = new ArrayList<FileInfo>();
-//            Map<String, Object> data = new HashMap<String, Object>();
-//            if (StringUtils.isBlank(pic)) {
-//                logger.info("上传图片失败, pic为空");
-//                responseEntity.failure(ResponseConstant.CODE_000, "上传图片失败, pic为空");
-//            } else {
-//                String savePath = ImageTools.savePic4Base64(pic);
-//                if (StringUtils.isNotBlank(savePath)) {
-//                    String kmtUserId =request.getSession().getAttribute("kmtUserId")!=null? request.getSession().getAttribute("kmtUserId").toString():"";
-//                    FileInfo fileInfo = fileInfoService.saveFileInfo(kmtUserId,savePath, savePath.substring(savePath.lastIndexOf("/")+1, savePath.length()));
-//                    if (fileInfo != null && StringUtils.isNotBlank(fileInfo.getId())) {
-//                        pathpics.add(fileInfo);
-//                    }
-//                    logger.info("添加图片成功, 图片路径: "  + savePath);
-//                } else {
-//                    logger.error("添加图片失败,savePath为空");
-//                }
-//                data.put("pics", pathpics);
-//                responseEntity.success(data, "上传图片成功 ");
-//            }
-//        } catch (Exception e) {
-//            logger.info("上传图片异常", e);
-//            responseEntity.failure(ResponseConstant.CODE_500, "上传图片异常");
-//        }
-//        return responseEntity;
-//    }
-//
-//    /**
-//     * 批改作业
-//     */
-//    @ApiOperation(value = "批改作业")
-//    @ModifySecurity
-//    @RequestMapping(value = "correct", method = RequestMethod.POST)
-//    public ResponseEntity correct(@RequestParam(name = "accessToken") String accessToken, @RequestBody CorrectRequest request) {
-//        ResponseEntity responseEntity = new ResponseEntity();
-//        if (StringUtils.isBlank(request.getHomeworkPictureId())) {
-//            responseEntity.failure("请选择作业图片");
-//            return responseEntity;
-//        }
-//        try {
-//            String teacherId = tokenManager.getUserId(accessToken);
-//            kmtCorrectHomeworkService.correct(request, teacherId);
-//            responseEntity.success(request, "批改成功");
-//        } catch (Exception e){
-//            logger.error("提交异常", e);
-//            responseEntity.failure(ResponseConstant.CODE_500, "提交异常");
-//        }
-//        return responseEntity;
-//    }
-//
-//    /**
-//     * 修改科目
-//     */
-//    @ModifySecurity
-//    @ApiOperation(value = "修改科目")
-//    @RequestMapping(value = "/updateSubject", method = RequestMethod.POST)
-//    public ResponseEntity updateSubject(@RequestParam(name = "accessToken") String accessToken,
-//                                        @RequestParam String homeworkPictureId,
-//                                        @RequestParam String subject) {
-//        ResponseEntity responseEntity;
-//        logger.info("修改科目名称,pid:" + homeworkPictureId + ", 修改后学科:" + subject);
-//        try {
-//            if (StringUtils.isNotEmpty(homeworkPictureId) && StringUtils.isNotEmpty(subject)){
-//                responseEntity = kmtCorrectHomeworkService.updateSubject(homeworkPictureId, subject);
-//                logger.info("纠正学科成功:homeworkPictureId={}, subject={}", homeworkPictureId, subject);
-//            } else {
-//            	responseEntity = new ResponseEntity();
-//                responseEntity.success("id为空或者科目没有选择");
-//            }
-//        } catch (Exception e) {
-//            logger.error("纠正学科异常", e);
-//            responseEntity = new ResponseEntity();
-//            responseEntity.failure("查询异常");
-//        }
-//        return responseEntity;
-//    }
-//
-//    @ModifySecurity
-//    @ApiOperation(value = "非学科作业")
-//    @RequestMapping(value = "/homeworkPicture2SmartTimePicture", method = RequestMethod.POST)
-//    public ResponseEntity homeworkPicture2SmartTimePicture(@RequestParam(name = "accessToken") String accessToken,
-//                                                           @RequestParam String homeworkPictureId) {
-//        ResponseEntity responseEntity = new ResponseEntity();
-//        if (StringUtils.isBlank(homeworkPictureId)) {
-//            return responseEntity.failure("请先选择作业图片");
-//        }
-//
-//        return kmtCorrectHomeworkService.homeworkPicture2SmartTimePicture(homeworkPictureId);
-//    }
-//
-//
-//    @ApiOperation(value = "查询关联的知识点")
-//    @RequestMapping(value = "/findAllKnowDetails", method = RequestMethod.POST)
-//    public ResponseEntity findAllKnowDetails(@RequestParam(name = "accessToken") String accessToken,
-//                                             @RequestBody StudentKnowDetailRequest request) {
-//        ResponseEntity responseEntity = new ResponseEntity();
-//        try {
-//            KnowledgeRequest knowReq =  new KnowledgeRequest();
-//            knowReq.setSubject(request.getSubject());
-//            knowReq.setGrade(request.getGrade());
-//            knowReq.setSemester(Integer.parseInt(PropertiesUtil.getValue("semester")));
-//            knowReq.setVersionType(request.getBookVersion());
-//            //需要所有的知识点:专题+同步
-//            knowReq.setModuleType(null);
-//            List<KnowHowDTO> knowHowDTOList = kmtKnowledgeService.getKnowledge(knowReq);
-//            knowHowDTOList = kmtCorrectHomeworkService.findPictureRelateKnowledge(knowHowDTOList, request.getHomeworkPictureId());
-//            Map<String, Object> resultMap = new HashMap<>();
-//            resultMap.put("list", knowHowDTOList);
-//            responseEntity.success(resultMap, "查询成功");
-//        } catch (Exception e){
-//            logger.error("查询知识点异常", e);
-//            responseEntity.failure(ResponseConstant.CODE_500, "查询异常");
-//        }
-//        return responseEntity;
-//    }
-//}

+ 0 - 298
ssj-aijia-api/src/main/java/com/ssj/aijia/kmt/homeworkcorrect/controller/v1/KmtHomeworkCorrectV1Controller.java

@@ -1,298 +0,0 @@
-package com.ssj.aijia.kmt.homeworkcorrect.controller.v1;
-
-import com.alibaba.dubbo.config.annotation.Reference;
-import com.ssj.bean.common.files.domain.FileInfo;
-import com.ssj.bean.sys.homework.domain.HomeworkPicture;
-import com.ssj.bean.weixin.libmy.domain.LibVip;
-
-import com.ssj.framework.core.common.controller.BaseController;
-import com.ssj.framework.core.security.annotation.IgnoreSecurity;
-import com.ssj.framework.core.security.annotation.ModifySecurity;
-import com.ssj.framework.core.security.manager.TokenManager;
-import com.ssj.framework.core.util.ImageTools;
-import com.ssj.framework.core.util.PropertiesUtil;
-import com.ssj.framework.core.util.ResponseConstant;
-import com.ssj.framework.core.util.ResponseEntity;
-import com.ssj.framework.files.service.FileInfoService;
-import com.ssj.service.conch.teacher.service.TeacherService;
-import com.ssj.service.kmt.dto.*;
-import com.ssj.service.kmt.request.*;
-import com.ssj.service.kmt.service.*;
-import com.ssj.service.sys.homework.service.HomeworkPictureService;
-import com.ssj.service.sys.homework.service.HomeworkService;
-import com.ssj.service.sys.picturepredeal.service.PicturePreDealService;
-import com.ssj.service.weixin.library.service.IBookManagerService;
-import com.ssj.service.weixin.library.service.ILibVipService;
-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.web.bind.annotation.*;
-
-import java.util.*;
-
-/**
- * kmt作业批改功能
- */
-@RestController
-@Api(value = "kmt作业批改相关的接口V1", tags = "kmt作业批改相关的接口V1")
-@RequestMapping("/api/kmt/homeworkCorrect/V1")
-public class KmtHomeworkCorrectV1Controller extends BaseController {
-
-    @Reference(version = "1.0" ,timeout = 60000)
-    private IBookManagerService managerService;
-    @Reference(version = "1.0" ,timeout = 60000)
-    private KmtConchQueryService kmtConchQueryService;
-    @Reference(version = "1.0" ,timeout = 60000)
-    private HomeworkService homeworkService;
-    @Reference(version = "1.0" ,timeout = 60000)
-    private HomeworkPictureService homeworkPictureService;
-    @Reference(version = "1.0" ,timeout = 60000)
-    private KmtKnowledgeService kmtKnowledgeService;
-    @Reference(version = "1.0" ,timeout = 60000)
-    private KmtCorrectHomeworkService kmtCorrectHomeworkService;
-    @Reference(version = "1.0" ,timeout = 60000)
-    private KmtExerciseQuestionService kmtExerciseQuestionService;
-    @Reference(version = "1.0" ,timeout = 60000)
-    private KmtExerciseBookCourseService kmtExerciseBookCourseService;
-    @Reference(version = "1.0" ,timeout = 60000)
-    private ILibVipService vipService;
-    @Reference(version = "1.0" ,timeout = 60000)
-    private TeacherService teacherService;
-    @Autowired
-    private TokenManager tokenManager;
-    @Autowired
-    private FileInfoService fileInfoService;
-
-    @Reference(version = "1.0" ,timeout = 60000)
-    private PicturePreDealService picturePreDealService;
-
-    /**
-     * 查询作业列表
-     */
-    @ApiOperation(value = "查询作业列表")
-    @RequestMapping(value = "/homeworkList", method = RequestMethod.POST)
-    public ResponseEntity findHomeworkList(@RequestParam(name = "accessToken") String accessToken) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            String teacherId = tokenManager.getUserId(accessToken);
-            List<SubjectStudentDto> resultList = kmtConchQueryService.findHomeworkPictureByList(teacherId);
-            Map<String, Object> map = new HashMap<>();
-            map.put("list", resultList);
-            responseEntity.success(map, "查询成功");
-        } catch (Exception e) {
-            logger.error("服务异常", e);
-            responseEntity.failure("查询异常");
-        }
-        return responseEntity;
-    }
-
-
-    @ApiOperation(value = "图片保存编辑")
-    @RequestMapping(value = "/upload", method = RequestMethod.POST)
-    public ResponseEntity upload(@RequestParam(name = "accessToken") String accessToken, @RequestParam(name = "pic") String pic){
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            List<FileInfo> pathpics = new ArrayList<FileInfo>();
-            Map<String, Object> data = new HashMap<String, Object>();
-            if (StringUtils.isBlank(pic)) {
-                logger.info("上传图片失败, pic为空");
-                responseEntity.failure(ResponseConstant.CODE_000, "上传图片失败, pic为空");
-            } else {
-                String savePath = ImageTools.savePic4Base64(pic);
-                if (StringUtils.isNotBlank(savePath)) {
-                    String kmtUserId =request.getSession().getAttribute("kmtUserId")!=null? request.getSession().getAttribute("kmtUserId").toString():"";
-                    FileInfo fileInfo = fileInfoService.saveFileInfo(kmtUserId,savePath, savePath.substring(savePath.lastIndexOf("/")+1, savePath.length()));
-                    if (fileInfo != null && StringUtils.isNotBlank(fileInfo.getId())) {
-                        pathpics.add(fileInfo);
-                    }
-                    logger.info("添加图片成功, 图片路径: "  + savePath);
-                } else {
-                    logger.error("添加图片失败,savePath为空");
-                }
-                data.put("pics", pathpics);
-                responseEntity.success(data, "上传图片成功 ");
-            }
-        } catch (Exception e) {
-            logger.info("上传图片异常", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "上传图片异常");
-        }
-        return responseEntity;
-    }
-
-
-    @RequestMapping(value = "filterCondition", method = RequestMethod.POST)
-    @ApiOperation(value = "查询教辅、知识点筛选条件", httpMethod = "POST",  notes = "查询教辅/单元/课时筛选条件")
-    public ResponseEntity getAnswerFilterCondition(@RequestParam(name = "accessToken") String accessToken,
-                                                   @RequestBody BookFilterRequest req) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        LibVip vip = vipService.getById(req.getVipId());
-        int semester = Integer.parseInt(PropertiesUtil.getValue("semester"));
-        ExerciseConditionRequest request = new ExerciseConditionRequest();
-        request.setGrade(vip.getGrade());
-        request.setSemester(semester);
-        request.setSubject(req.getSubject());
-        request.setVersionType(0);
-        //userId只用于加工审核那里查询待加工待审核的练习册,此处无用
-        List<ExerciseBookDto> list = kmtExerciseBookCourseService.getExerciseCondition(request, null);
-        Map<String, Object> data = new HashMap<>();
-        data.put("books", list);
-
-        String teacherId = tokenManager.getUserId(accessToken);
-        Object versionData = kmtCorrectHomeworkService.findHomeworkCorrectPageInit(teacherId).get(req.getSubject());
-        data.put("versions", versionData);
-        List<Map<String, String>> grades = new ArrayList<>();
-        List<String> gradeTmp = Arrays.asList("一年级", "二年级", "三年级", "四年级", "五年级", "六年级");
-        for (String grade : gradeTmp){
-            Map<String, String> obj = new HashMap<>();
-            obj.put("name", grade);
-            grades.add(obj);
-        }
-        data.put("grades", grades);
-
-        return responseEntity.success(data, "查询成功");
-    }
-
-    /**
-     * 根据课时的id查询所有已审核题目的答案
-     */
-    @ApiOperation(value = "查询答案v2")
-    @RequestMapping(value = "answerList/V2", method = RequestMethod.POST)
-    public ResponseEntity findAnswerListV2(@RequestParam(name = "accessToken") String accessToken,
-                                           @RequestBody AnswerSearchV1Request request) {
-
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            List<ExerciseQuestionAnswer4CorrectDTO> exerciseQuestionAnswer4CorrectDTOList = kmtExerciseQuestionService.findByExerciseBookCourseIdV3(request);
-            responseEntity.success(exerciseQuestionAnswer4CorrectDTOList, "查询成功");
-        } catch (Exception e) {
-            logger.error("查询答案异常", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-
-    /**
-     * 批改作业
-     */
-    @ApiOperation(value = "批改作业")
-    @RequestMapping(value = "correct", method = RequestMethod.POST)
-    public ResponseEntity correct(@RequestParam(name = "accessToken") String accessToken, @RequestBody CorrectRequest request) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            HomeworkPicture homeworkPicture = homeworkPictureService.getById(request.getHomeworkPictureId());
-            if (homeworkPicture == null) {
-                responseEntity.failure(ResponseConstant.CODE_000,"作业图片已被删除");
-                return responseEntity;
-            }
-            String teacherId = tokenManager.getUserId(accessToken);
-            responseEntity = kmtCorrectHomeworkService.correctV1(request, teacherId);
-        } catch (Exception e){
-            logger.error("提交异常", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "提交异常");
-        }
-        return responseEntity;
-    }
-
-    /**
-     * 修改科目
-     */
-    @ModifySecurity
-    @ApiOperation(value = "修改科目")
-    @RequestMapping(value = "/updateSubject", method = RequestMethod.POST)
-    public ResponseEntity updateSubject(@RequestParam(name = "accessToken") String accessToken,
-                                        @RequestParam String homeworkPictureId,
-                                        @RequestParam String subject) {
-        ResponseEntity responseEntity;
-        logger.info("修改科目名称,pid:" + homeworkPictureId + ", 修改后学科:" + subject);
-        try {
-            if (StringUtils.isNotEmpty(homeworkPictureId) && StringUtils.isNotEmpty(subject)){
-                responseEntity = kmtCorrectHomeworkService.updateSubject(homeworkPictureId, subject);
-                logger.info("纠正学科成功:homeworkPictureId={}, subject={}", homeworkPictureId, subject);
-            } else {
-                responseEntity = new ResponseEntity();
-                responseEntity.success("id为空或者科目没有选择");
-            }
-        } catch (Exception e) {
-            logger.error("纠正学科异常", e);
-            responseEntity = new ResponseEntity();
-            responseEntity.failure("查询异常");
-        }
-        return responseEntity;
-    }
-
-    @ModifySecurity
-    @ApiOperation(value = "非学科作业")
-    @RequestMapping(value = "/homeworkPicture2SmartTimePicture", method = RequestMethod.POST)
-    public ResponseEntity homeworkPicture2SmartTimePicture(@RequestParam(name = "accessToken") String accessToken,
-                                                           @RequestParam String homeworkPictureId) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        if (StringUtils.isBlank(homeworkPictureId)) {
-            return responseEntity.failure("请选择作业图片");
-        }
-
-        return kmtCorrectHomeworkService.homeworkPicture2SmartTimePicture(homeworkPictureId);
-    }
-
-
-    @ApiOperation(value = "查询关联的知识点")
-    @RequestMapping(value = "/findAllKnowDetails", method = RequestMethod.POST)
-    public ResponseEntity findAllKnowDetails(@RequestParam(name = "accessToken") String accessToken,
-                                             @RequestBody StudentKnowDetailRequest request) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            KnowledgeRequest knowReq =  new KnowledgeRequest();
-            knowReq.setSubject(request.getSubject());
-            knowReq.setGrade(request.getGrade());
-            knowReq.setSemester(Integer.parseInt(PropertiesUtil.getValue("semester")));
-            knowReq.setVersionType(request.getBookVersion());
-            //需要所有的知识点:专题+同步
-            knowReq.setModuleType(null);
-            List<KnowHowDTO> knowHowDTOList = kmtKnowledgeService.getKnowledge(knowReq);
-            knowHowDTOList = kmtCorrectHomeworkService.findPictureRelateKnowledge(knowHowDTOList, request.getHomeworkPictureId());
-            Map<String, Object> resultMap = new HashMap<>();
-            resultMap.put("list", knowHowDTOList);
-            responseEntity.success(resultMap, "查询成功");
-        } catch (Exception e){
-            logger.error("查询知识点异常", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "查询异常");
-        }
-        return responseEntity;
-    }
-
-    @ApiOperation(value = "模糊更替")
-    @RequestMapping(value = "/replaceVagueImg", method = RequestMethod.POST)
-    public ResponseEntity replaceVagueImg(@RequestParam(name = "accessToken") String accessToken,
-                                          @RequestParam String homeworkPictureId) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            responseEntity = homeworkPictureService.vagueHomeworkPicture(homeworkPictureId,1,accessToken);
-        } catch (Exception e) {
-            logger.error("模糊替换失败", e);
-            responseEntity.failure("模糊替换失败");
-        }
-
-        return responseEntity;
-    }
-
-    @ApiOperation(value = "ai识别调用测试接口")
-    @IgnoreSecurity
-    @RequestMapping(value = "/postAIRequestTest", method = RequestMethod.POST)
-    public ResponseEntity postAIRequestTest(@RequestParam(name = "accessToken") String accessToken,
-                                          @RequestParam String homeworkPictureId) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            HomeworkPicture homeworkPicture = homeworkPictureService.getById(homeworkPictureId);
-            picturePreDealService.asyncPostRequest2AI(homeworkPicture);
-            responseEntity.success(ResponseConstant.CODE_999, "成功");
-        } catch (Exception e) {
-            logger.error("模糊替换失败", e);
-            responseEntity.failure("模糊替换失败");
-        }
-
-        return responseEntity;
-    }
-
-
-}

+ 0 - 584
ssj-aijia-api/src/main/java/com/ssj/aijia/kmt/homeworkcorrect/controller/v2/KmtHomeworkCorrectV2Controller.java

@@ -1,584 +0,0 @@
-package com.ssj.aijia.kmt.homeworkcorrect.controller.v2;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.validation.Valid;
-
-import com.ssj.service.ai.model.ProblemPicturePreDeal;
-import com.ssj.service.conch.teacher.service.TeacherAppService;
-import com.ssj.service.kmt.request.*;
-import org.apache.commons.lang3.StringUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
-
-import com.alibaba.dubbo.config.annotation.Reference;
-import com.ssj.bean.common.files.domain.FileInfo;
-import com.ssj.bean.sys.picturepredeal.domain.ProblemSimilarPredeal;
-import com.ssj.bean.sys.problem.domain.ProblemPicture;
-import com.ssj.framework.core.common.controller.BaseController;
-import com.ssj.framework.core.security.annotation.IgnoreSecurity;
-import com.ssj.framework.core.security.annotation.ModifySecurity;
-import com.ssj.framework.core.security.exception.CommonException;
-import com.ssj.framework.core.security.manager.TokenManager;
-import com.ssj.framework.core.util.ImageTools;
-import com.ssj.framework.core.util.ResponseConstant;
-import com.ssj.framework.core.util.ResponseEntity;
-import com.ssj.framework.core.util.StringUtil;
-import com.ssj.framework.files.service.FileInfoService;
-import com.ssj.service.conch.teacher.service.TeacherService;
-import com.ssj.service.kmt.dto.AnswerFilterConditionDTO;
-import com.ssj.service.kmt.dto.CompositionCommentTypeDto;
-import com.ssj.service.kmt.dto.ExerciseQuestionAnswer4CorrectDTO;
-import com.ssj.service.kmt.dto.SubjectStudentHomeworkDto;
-import com.ssj.service.kmt.service.KmtConchQueryService;
-import com.ssj.service.kmt.service.KmtCorrectHomeworkService;
-import com.ssj.service.kmt.service.KmtExerciseBookCourseService;
-import com.ssj.service.kmt.service.KmtExerciseQuestionService;
-import com.ssj.service.kmt.service.KmtKnowledgeService;
-import com.ssj.service.sys.homework.request.CorrectionsRequest;
-import com.ssj.service.sys.homework.request.ImageUploadRequest;
-import com.ssj.service.sys.homework.request.KnowledgeSearchRequest;
-import com.ssj.service.sys.homework.service.HomeworkPictureService;
-import com.ssj.service.sys.homework.service.HomeworkService;
-import com.ssj.service.sys.homework.vo.KnowledgeHowDto;
-import com.ssj.service.sys.picturepredeal.request.RecognitionResultReq;
-import com.ssj.service.sys.picturepredeal.service.PicturePreDealService;
-import com.ssj.service.sys.picturepredeal.service.ProblemSimilarPreDealService;
-import com.ssj.service.sys.problem.service.ProblemPictureService;
-import com.ssj.service.sys.template.CommentTemplateService;
-import com.ssj.service.weixin.library.service.IBookManagerService;
-import com.ssj.service.weixin.library.service.ILibVipService;
-
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-
-/**
- * kmt作业批改功能
- */
-@RestController
-@Api(value = "kmt作业批改相关的接口V2", tags = "kmt作业批改相关的接口V2")
-@RequestMapping("/api/kmt/homeworkCorrect/V2")
-public class KmtHomeworkCorrectV2Controller extends BaseController {
-
-    @Reference(version = "1.0" ,timeout = 60000)
-    private IBookManagerService managerService;
-    @Reference(version = "1.0" ,timeout = 60000)
-    private KmtConchQueryService kmtConchQueryService;
-    @Reference(version = "1.0" ,timeout = 60000)
-    private HomeworkService homeworkService;
-    @Reference(version = "1.0" ,timeout = 60000)
-    private HomeworkPictureService homeworkPictureService;
-    @Reference(version = "1.0" ,timeout = 60000)
-    private KmtKnowledgeService kmtKnowledgeService;
-    @Reference(version = "1.0" ,timeout = 60000)
-    private KmtCorrectHomeworkService kmtCorrectHomeworkService;
-    @Reference(version = "1.0" ,timeout = 60000)
-    private KmtExerciseQuestionService kmtExerciseQuestionService;
-    @Reference(version = "1.0" ,timeout = 60000)
-    private KmtExerciseBookCourseService kmtExerciseBookCourseService;
-    @Reference(version = "1.0" ,timeout = 60000)
-    private ILibVipService vipService;
-    @Reference(version = "1.0" ,timeout = 60000)
-    private TeacherService teacherService;
-    @Autowired
-    private TokenManager tokenManager;
-    @Autowired
-    private FileInfoService fileInfoService;
-
-    @Reference(version = "1.0" ,timeout = 60000)
-    private PicturePreDealService picturePreDealService;
-    @Reference(version = "1.0" ,timeout = 60000)
-    private CommentTemplateService commentTemplateService;
-
-    @Reference(version = "1.0" ,timeout = 60000)
-    private ProblemSimilarPreDealService problemSimilarPreDealService;
-
-    @Reference(version = "1.0" ,timeout = 60000)
-    private ProblemPictureService problemPictureService;
-
-    @Reference(version = "1.0" ,timeout = 60000)
-    private TeacherAppService teacherAppService;
-    /**
-     * 查询作业列表
-     */
-    @ApiOperation(value = "查询未批改作业数量")
-    @RequestMapping(value = "/findTotalUnfeedbackCount", method = RequestMethod.POST)
-    public ResponseEntity findTotalUnfeedbackCount(@RequestParam(name = "accessToken") String accessToken) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            String teacherId = tokenManager.getUserId(accessToken);
-            Map<String, Object> map = new HashMap<>();
-            int total = kmtCorrectHomeworkService.findTotalUnfeedbackCount(teacherId, 1);
-            map.put("total", total);
-            responseEntity.success(map, "查询成功");
-        } catch (Exception e) {
-            logger.error("服务异常", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    /**
-     * 查询作业列表
-     */
-    @ApiOperation(value = "查询作业列表")
-    @RequestMapping(value = "/homeworkList", method = RequestMethod.POST)
-    public ResponseEntity findHomeworkList(@RequestParam(name = "accessToken") String accessToken) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            String teacherId = tokenManager.getUserId(accessToken);
-            List<SubjectStudentHomeworkDto> resultList = kmtCorrectHomeworkService.findHomeworkListByTeacherId(teacherId);
-            Map<String, Object> map = new HashMap<>();
-            map.put("list", resultList);
-            responseEntity.success(map, "查询成功");
-        } catch (Exception e) {
-            logger.error("服务异常", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-
-    @ApiOperation(value = "图片保存编辑")
-    @RequestMapping(value = "/upload", method = RequestMethod.POST)
-    public ResponseEntity upload(@RequestParam(name = "accessToken") String accessToken, @RequestBody ImageUploadRequest request){
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            List<FileInfo> pathpics = new ArrayList<FileInfo>();
-            Map<String, Object> data = new HashMap<String, Object>();
-            if (StringUtils.isBlank(request.getBase64File())) {
-                logger.info("上传图片失败, 入参为空{}", request.getBase64File());
-                responseEntity.failure(ResponseConstant.CODE_000, "上传图片失败");
-            } else {
-                String savePath = ImageTools.savePic4Base64(request.getBase64File());
-                if (StringUtils.isNotBlank(savePath)) {
-                    String teacherId = tokenManager.getUserId(accessToken);
-                    FileInfo fileInfo = fileInfoService.saveFileInfo(teacherId, savePath, savePath.substring(savePath.lastIndexOf("/")+1, savePath.length()));
-                    if (fileInfo != null && StringUtils.isNotBlank(fileInfo.getId())) {
-                        pathpics.add(fileInfo);
-                    }
-                    logger.info("添加图片成功, 图片路径: "  + savePath);
-                } else {
-                    logger.error("添加图片失败,savePath为空");
-                }
-                data.put("pics", pathpics);
-                responseEntity.success(data, "上传图片成功 ");
-            }
-        } catch (Exception e) {
-            logger.info("上传图片异常", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-
-    @RequestMapping(value = "filterCondition", method = RequestMethod.POST)
-    @ApiOperation(value = "查询教辅、知识点筛选条件", httpMethod = "POST",  notes = "查询教辅/单元/课时筛选条件")
-    public ResponseEntity getAnswerFilterCondition(@RequestParam(name = "accessToken") String accessToken,
-                                                   @RequestBody BookFilterRequest req) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            AnswerFilterConditionDTO answerFilterConditionDTO = kmtCorrectHomeworkService.getAnswerFilterCondition(req);
-            responseEntity.success(answerFilterConditionDTO, "查询成功");
-        } catch (Exception e){
-            logger.info("查询筛选条件异常", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-
-        return responseEntity;
-    }
-
-    /**
-     * 根据课时的id查询所有已审核题目的答案
-     */
-    @ApiOperation(value = "查询答案")
-    @RequestMapping(value = "answerList", method = RequestMethod.POST)
-    public ResponseEntity findAnswerListV2(@RequestParam(name = "accessToken") String accessToken,
-                                           @RequestBody @Valid AnswerSearchV2Request request) {
-
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            logger.info("查询答案开始------");
-            responseEntity.success(kmtExerciseQuestionService.findByExerciseBookCourseIdV4(request), "查询成功");
-            logger.info("查询答案结束------");
-        } catch (Exception e) {
-            logger.error("查询答案异常", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @ApiOperation(value = "查询关联的知识点")
-    @RequestMapping(value = "/findKnowledgeDetails", method = RequestMethod.POST)
-    public ResponseEntity findAllKnowDetails(@RequestParam(name = "accessToken") String accessToken,
-                                             @RequestBody KnowledgeSearchRequest request) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            List<KnowledgeHowDto> list = kmtCorrectHomeworkService.findKnowledgeHowList(request);
-            Map<String, Object> resultMap = new HashMap<>();
-            resultMap.put("list", list);
-            responseEntity.success(resultMap, "查询成功");
-        } catch (Exception e){
-            logger.error("查询知识点异常", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    /**
-     * 批改作业
-     */
-    @ApiOperation(value = "批改作业")
-    @ModifySecurity
-    @RequestMapping(value = "correct", method = RequestMethod.POST)
-    public ResponseEntity correct(@RequestParam(name = "accessToken") String accessToken, @RequestBody CorrectionsRequest request) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            String teacherId = tokenManager.getUserId(accessToken);
-            responseEntity = kmtCorrectHomeworkService.correctV2(request, teacherId);
-        } catch (CommonException e) {
-            responseEntity.failure(ResponseConstant.CODE_500, e.getMessage());
-        } catch (Exception e){
-            logger.error("提交异常", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    /**
-     * 修改科目
-     */
-    @ModifySecurity
-    @ApiOperation(value = "修改科目")
-    @RequestMapping(value = "/updateSubject", method = RequestMethod.POST)
-    public ResponseEntity updateSubject(@RequestParam(name = "accessToken") String accessToken,
-                                        @RequestBody StudentKnowDetailRequest request) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        logger.info("修改科目名称,pid:" + request.getHomeworkPictureId() + ", 修改后学科:" + request.getSubject());
-        try {
-            if (StringUtils.isNotEmpty(request.getHomeworkPictureId()) && StringUtils.isNotEmpty(request.getSubject())){
-                responseEntity = kmtCorrectHomeworkService.updateSubject(request.getHomeworkPictureId(), request.getSubject());
-                logger.info("纠正学科成功:homeworkPictureId={}, subject={}", request.getHomeworkPictureId(), request.getSubject());
-            } else {
-                responseEntity.success(ResponseConstant.CODE_999, "id为空或者科目没有选择");
-            }
-        } catch (Exception e) {
-            logger.error("纠正学科异常", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @ModifySecurity
-    @ApiOperation(value = "非学科作业")
-    @RequestMapping(value = "/homeworkPicture2SmartTimePicture", method = RequestMethod.POST)
-    public ResponseEntity homeworkPicture2SmartTimePicture(@RequestParam(name = "accessToken") String accessToken,
-                                                           @RequestBody StudentKnowDetailRequest request) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            responseEntity = kmtCorrectHomeworkService.homeworkPicture2SmartTimePicture(request.getHomeworkPictureId());
-        } catch (Exception e){
-            logger.error("异常", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-
-        return  responseEntity;
-    }
-
-    @ApiOperation(value = "模糊更替")
-    @RequestMapping(value = "/replaceVagueImg", method = RequestMethod.POST)
-    public ResponseEntity replaceVagueImg(@RequestParam(name = "accessToken") String accessToken,
-                                          @RequestBody StudentKnowDetailRequest request) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            responseEntity = homeworkPictureService.vagueHomeworkPicture(request.getHomeworkPictureId(),request.getType(),accessToken);
-        } catch (Exception e) {
-            logger.error("模糊替换失败", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-
-        return responseEntity;
-    }
-
-    @ApiOperation(value = "开始批改")
-    @RequestMapping(value = "/beginCorrection", method = RequestMethod.POST)
-    public ResponseEntity beginCorrection(@RequestParam(name = "accessToken") String accessToken,
-                                          @RequestBody StudentHomeworkRequest request) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            homeworkService.beginHomeworkCorrection(request.getHomeworkId());
-            responseEntity.success(ResponseConstant.CODE_999, "开始记录成功");
-        } catch (Exception e) {
-            logger.error("开始批改", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-
-        return responseEntity;
-    }
-
-    @ApiOperation(value = "开始批改作业图片")
-    @RequestMapping(value = "/beginPictureCorrection", method = RequestMethod.POST)
-    public ResponseEntity beginPictureCorrection(@RequestParam(name = "accessToken") String accessToken,
-                                          @RequestBody StudentHomeworkPictureRequest request) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            String userId = tokenManager.getUserId(accessToken);
-            responseEntity = homeworkPictureService.beginHomeworkPictureCorrection(userId, request.getHomeworkPictureId());
-        } catch (Exception e) {
-            logger.error("开始批改", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-
-        return responseEntity;
-    }
-
-    @ApiOperation(value = "口算识别")
-    @RequestMapping(value = "/calculateAI", method = RequestMethod.POST)
-    public ResponseEntity calculateAI(@RequestParam(name = "accessToken") String accessToken,
-                                          @RequestBody StudentKnowDetailRequest request) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            String path = kmtCorrectHomeworkService.calculateAI(request.getHomeworkPictureId());
-            if (StringUtil.isNotBlank(path)){
-                Map<String, Object> data = new HashMap<>();
-                data.put("homeworkPictureEditPath", path);
-                responseEntity.success(data, "口算识别成功");
-            } else {
-                responseEntity.failure(ResponseConstant.CODE_000, "口算识别失败");
-            }
-        } catch (Exception e) {
-            logger.error("口算识别", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-
-        return responseEntity;
-    }
-
-    @ApiOperation(value = "ai识别调用测试接口")
-    @IgnoreSecurity
-    @RequestMapping(value = "/test", method = RequestMethod.POST)
-    public ResponseEntity postAIRequestTest(@RequestParam(name = "accessToken") String accessToken,
-                                            @RequestParam String homeworkPictureId) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-//            HomeworkPicture homeworkPicture = homeworkPictureService.getById(homeworkPictureId);
-////            homeworkPictureService.pushTodayFinishHomework(homeworkPicture);
-//            HomeworkPicturePreDeal homeworkPicturePreDeal = new HomeworkPicturePreDeal();
-//            homeworkPicturePreDeal.setHomeworkPicture(homeworkPicture);
-//            picturePreDealService.postRequest2AI(homeworkPicturePreDeal);
-//            String test = XunFeiTTSUtils.textToVoice(homeworkPictureId, "test111111111");
-            ProblemPicture hp = problemPictureService.getById(homeworkPictureId);
-            ProblemSimilarPredeal predeal = problemSimilarPreDealService.findPreDealByProblemPictureId(homeworkPictureId);
-            ProblemPicturePreDeal pp = new ProblemPicturePreDeal();
-            pp.setProblemPicture(hp);
-            pp.setProblemSimilarPredeal(predeal);
-            problemSimilarPreDealService.postRequest2AI(pp);
-//            problemSimilarPreDealService.recordCourseName(hp, predeal);
-            responseEntity.success(ResponseConstant.CODE_999, "成功");
-        } catch (Exception e) {
-            logger.error("模糊替换失败", e);
-            responseEntity.failure("模糊替换失败");
-        }
-
-        return responseEntity;
-    }
-
-    /**
-     * 匹配知识点老师
-     */
-
-    @ApiOperation(value = "查询未匹配作业数量")
-    @RequestMapping(value = "/findKnowTotalUnfeedbackCount", method = RequestMethod.POST)
-    public ResponseEntity findKnowTotalUnfeedbackCount(@RequestParam(name = "accessToken") String accessToken) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            String teacherId = tokenManager.getUserId(accessToken);
-            Map<String, Object> map = new HashMap<>();
-            int total = kmtCorrectHomeworkService.findTotalUnfeedbackCount(teacherId, 2);
-            map.put("total", total);
-            responseEntity.success(map, "查询成功");
-        } catch (Exception e) {
-            logger.error("服务异常", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @ApiOperation(value = "查询匹配作业列表")
-    @RequestMapping(value = "/knowHomeworkList", method = RequestMethod.POST)
-    public ResponseEntity knowHomeworkList(@RequestParam(name = "accessToken") String accessToken) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            String teacherId = tokenManager.getUserId(accessToken);
-            List<SubjectStudentHomeworkDto> resultList = kmtCorrectHomeworkService.findKnowHomeworkListByTeacherId(teacherId);
-            Map<String, Object> map = new HashMap<>();
-            map.put("list", resultList);
-            responseEntity.success(map, "查询成功");
-        } catch (Exception e) {
-            logger.error("服务异常", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-
-    @RequestMapping(value = "knowFilterCondition", method = RequestMethod.POST)
-    @ApiOperation(value = "查询知识点筛选条件", httpMethod = "POST",  notes = "查询筛选条件")
-    public ResponseEntity getKnowFilterCondition(@RequestParam(name = "accessToken") String accessToken,
-                                                   @RequestBody BookFilterRequest req) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            AnswerFilterConditionDTO answerFilterConditionDTO = kmtCorrectHomeworkService.getKnowConditionFilter(req);
-            responseEntity.success(answerFilterConditionDTO, "查询成功");
-        } catch (Exception e){
-            logger.info("查询筛选条件异常", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-
-        return responseEntity;
-    }
-
-    @ApiOperation(value = "匹配知识点批改作业")
-    @ModifySecurity
-    @RequestMapping(value = "knowCorrect", method = RequestMethod.POST)
-    public ResponseEntity knowCorrect(@RequestParam(name = "accessToken") String accessToken, @RequestBody CorrectionsRequest request) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            String teacherId = tokenManager.getUserId(accessToken);
-            responseEntity = kmtCorrectHomeworkService.knowCorrect(request, teacherId);
-        } catch (Exception e){
-            logger.error("提交异常", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-
-    @ApiOperation(value = "标识作业不批改")
-    @RequestMapping(value = "/markHomeworkPictureStatus", method = RequestMethod.POST)
-    public ResponseEntity markHomeworkPictureStatus(@RequestParam(name = "accessToken") String accessToken,
-                                          @RequestBody StudentKnowDetailRequest request) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            String teacherId = tokenManager.getUserId(accessToken);
-            responseEntity = kmtCorrectHomeworkService.markHomeworkPictureStatus(request.getHomeworkPictureId(),request.getType(), teacherId);
-        } catch (Exception e) {
-            logger.error("作业不批改异常", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-
-        return responseEntity;
-    }
-
-    @ApiOperation(value = "查询作文模板",  httpMethod = "POST",  notes = "查询作文模板")
-    @RequestMapping(value = "/findCompositionContent", method = RequestMethod.POST)
-    public  ResponseEntity findCompositionContent (@RequestParam(name = "accessToken") String accessToken,
-                                                   @RequestBody BookFilterRequest req) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try{
-            List<CompositionCommentTypeDto> list = kmtCorrectHomeworkService.findCommentTemplateGroup(req);
-            Map<String, Object> data = new HashMap<>();
-            data.put("compositionCommentTypeList", list);
-            responseEntity.success(data, "成功");
-        }catch (Exception e){
-            logger.error("作业不批改异常", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @ApiOperation(value = "查询作文批改维度")
-    @RequestMapping(value = "findCompositionContentModule", method = RequestMethod.POST)
-    public ResponseEntity findCompositionContentModule(@RequestParam(name = "accessToken") String accessToken,
-                                                       @RequestBody CompositionModuleRequest req) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            Map<String, Object> data = new HashMap<>();
-            data.put("compositionCommentTypeList", teacherAppService.findCompositionContentModule(req));
-            responseEntity.success(data, "成功");
-        } catch (Exception e) {
-            logger.error("查询作文批改维度异常", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @ApiOperation(value = "查询作文批改维度评语列表")
-    @RequestMapping(value = "findCompositionContentDetail", method = RequestMethod.POST)
-    public ResponseEntity findCompositionContentDetail(@RequestParam(name = "accessToken") String accessToken,
-                                                       @RequestBody CompositionDetailRequest req) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            Map<String, Object> data = new HashMap<>();
-            data.put("compositionCommentLevelList", teacherAppService.findCompositionContentDetail(req));
-            responseEntity.success(data, "成功");
-        } catch (Exception e) {
-            logger.error("查询作文批改维度评语列表异常", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @ApiOperation(value = "查询作业图片识别结果")
-    @RequestMapping(value = "recognitionResult", method = RequestMethod.POST)
-    public ResponseEntity recognitionResult(@RequestParam(name = "accessToken") String accessToken,
-                                            @RequestBody @Valid RecognitionResultReq req) {
-
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            return picturePreDealService.findRecognitionResult(req);
-        } catch (Exception e) {
-            logger.error("查询作业图片识别结果异常", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-
-    /**
-     * 查询作业列表
-     */
-    @ApiOperation(value = "查询作业列表")
-    @RequestMapping(value = "/homeworkCheckCorrectList", method = RequestMethod.POST)
-    public ResponseEntity homeworkCheckCorrectList(@RequestParam(name = "accessToken") String accessToken, @RequestBody StudentKnowDetailRequest request) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            List<SubjectStudentHomeworkDto> resultList = kmtCorrectHomeworkService.findHomeworkCheckCorrectList(request.getHomeworkPictureId());
-            Map<String, Object> map = new HashMap<>();
-            map.put("list", resultList);
-            responseEntity.success(map, "查询成功");
-        } catch (Exception e) {
-            logger.error("服务异常", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    /**
-     * 质检员批改作业
-     */
-    @ApiOperation(value = "批改作业")
-    @ModifySecurity
-    @RequestMapping(value = "checkerCorrect", method = RequestMethod.POST)
-    public ResponseEntity checkerCorrect(@RequestParam(name = "accessToken") String accessToken, @RequestBody CorrectionsRequest request) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            String teacherId = tokenManager.getUserId(accessToken);
-            responseEntity = kmtCorrectHomeworkService.checkCorrect(request, teacherId);
-        } catch (CommonException e) {
-            responseEntity.failure(ResponseConstant.CODE_500, e.getMessage());
-        } catch (Exception e){
-            logger.error("提交异常", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-}

+ 0 - 121
ssj-aijia-api/src/main/java/com/ssj/aijia/kmt/knowledge/controller/KmtKnowledgeController.java

@@ -1,121 +0,0 @@
-package com.ssj.aijia.kmt.knowledge.controller;
-
-
-import com.alibaba.dubbo.config.annotation.Reference;
-import com.alibaba.fastjson.JSON;
-import com.alibaba.fastjson.JSONArray;
-import com.alibaba.fastjson.JSONObject;
-import com.ssj.framework.core.common.controller.BaseController;
-import com.ssj.framework.core.util.ResponseConstant;
-import com.ssj.framework.core.util.ResponseEntity;
-import com.ssj.service.kmt.dto.KnowHowDTO;
-import com.ssj.service.kmt.dto.KnowHowDetailsDTO;
-import com.ssj.service.kmt.dto.KnowledgeGradeDto;
-import com.ssj.service.kmt.request.KnowledgeRequest;
-import com.ssj.service.kmt.request.TestPointRequest;
-import com.ssj.service.kmt.service.KmtKnowledgeService;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import org.apache.commons.collections.CollectionUtils;
-import org.apache.commons.lang3.StringUtils;
-import org.springframework.web.bind.annotation.*;
-
-import java.util.*;
-
-/**
- *
- * kmt知识点功能
- * @author chchen
- * 2019-01-14
- */
-@Api(value = "kmt练习册知识点相关的接口", tags = "kmt练习册知识点相关的接口")
-@RestController
-@RequestMapping("/api/kmt/knowledge")
-public class KmtKnowledgeController extends BaseController {
-
-    @Reference(version = "1.0" ,timeout = 60000)
-    private KmtKnowledgeService kmtKnowledgeService;
-
-    @ApiOperation(value = "请求知识点筛选条件")
-    @RequestMapping(value = "getKnowledgeFilter", method = RequestMethod.POST)
-    public ResponseEntity getKnowledgeFilter(@RequestParam String accessToken) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            List<KnowledgeGradeDto> data = new ArrayList<>();
-            data.add(new KnowledgeGradeDto("一年级"));
-            data.add(new KnowledgeGradeDto("二年级"));
-            data.add(new KnowledgeGradeDto("三年级"));
-            data.add(new KnowledgeGradeDto("四年级"));
-            data.add(new KnowledgeGradeDto("五年级"));
-            data.add(new KnowledgeGradeDto("六年级"));
-            Map<String, Object> resultMap = new HashMap<>(16);
-            resultMap.put("list", data);
-
-            List<Map<String, String>> yearList = new LinkedList<>();
-            String[] arrays = {"2016-2017", "2017-2018", "2018-2019", "2019-2020", "2020-2021"};
-            for (String item : arrays){
-                Map<String, String> yearItem = new HashMap<>();
-                yearItem.put("yearName", item);
-                yearList.add(yearItem);
-            }
-            resultMap.put("yearList", yearList);
-
-            String progressListString="[{\"progress\":\"已录入\"},{\"progress\":\"已购买\"},{\"progress\":\"已对接\"},{\"progress\":\"已接收\"},{\"progress\":\"已上后台\"},{\"progress\":\"已发布\"}]";
-            JSONArray progressList = JSONObject.parseArray(progressListString);
-            resultMap.put("progressList", progressList);
-            String semesterListString="[{\"name\":\"上册\",\"type\":1},{\"name\":\"下册\",\"type\":2}]";
-            JSONArray semesterList = JSONObject.parseArray(semesterListString);
-            resultMap.put("semesterList", semesterList);
-            String bookTypeListString="[{\"name\":\"整本\",\"type\":0},{\"name\":\"上半本\",\"type\":1},{\"name\":\"下半本\",\"type\":2},{\"name\":\"不同\",\"type\":3}]";
-            JSONArray bookTypeList = JSONObject.parseArray(bookTypeListString);
-            resultMap.put("bookTypeList", bookTypeList);
-            String bookYearListString="[{\"bookYear\":2019},{\"bookYear\":2020},{\"bookYear\":2021}]";
-            JSONArray bookYearList = JSONObject.parseArray(bookYearListString);
-            resultMap.put("bookYearList", bookYearList);
-
-            responseEntity.success(resultMap, "查询成功");
-        } catch (Exception e) {
-            logger.error("请求知识点筛选条件异常:", e);
-            responseEntity.failure(ResponseConstant.CODE_500,"服务器繁忙,请稍后重试");
-        }
-        return responseEntity;
-
-    }
-
-    @ApiOperation(value = "查询知识点")
-    @RequestMapping(value = "getKnowledge", method = RequestMethod.POST)
-    public ResponseEntity getKnowledge(@RequestParam String accessToken, @RequestBody KnowledgeRequest request) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            List<KnowHowDTO> knowHowDTOList = new ArrayList<>();
-            if (StringUtils.isNotBlank(request.getGrade()) && request.getVersionType() != null
-                    && request.getSemester() != null  && StringUtils.isNotBlank(request.getSubject())){
-                knowHowDTOList = kmtKnowledgeService.findSortKnowledgeByCondition(request);
-            }
-            Map<String, Object> resultMap = new HashMap<>();
-            resultMap.put("list", knowHowDTOList);
-            responseEntity.success(resultMap, "查询成功");
-        } catch (Exception e) {
-            logger.error("查询知识点异常:", e);
-            responseEntity.failure(ResponseConstant.CODE_500,"服务器繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-
-    @ApiOperation(value = "查询知识点列表的考点")
-    @RequestMapping(value = "getTestingPoint", method = RequestMethod.POST)
-    public ResponseEntity getTestPoint(@RequestParam String accessToken, @RequestBody TestPointRequest request) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            Map<String, Object> resultMap = new HashMap<>();
-            resultMap.put("list", kmtKnowledgeService.findDetailsListWithKd(request.getDetailIds()));
-            responseEntity.success(resultMap, "查询成功");
-        } catch (Exception e) {
-            logger.error("查询知识点列表的考点异常:", e);
-            responseEntity.failure(ResponseConstant.CODE_500,"服务器繁忙,请稍后重试");
-        }
-        return responseEntity;
-
-    }
-}

+ 0 - 728
ssj-aijia-api/src/main/java/com/ssj/aijia/kmt/login/controller/KmtLoginAuthController.java

@@ -1,728 +0,0 @@
-package com.ssj.aijia.kmt.login.controller;
-
-import com.alibaba.dubbo.config.annotation.Reference;
-import com.ssj.bean.kmt.kmt.request.exercise.KmtQuestionOperaterRequest;
-import com.ssj.bean.kmt.kmtsys.domain.KmtSysUser;
-import com.ssj.bean.sys.attendance.Attendance;
-import com.ssj.bean.weixin.libmy.domain.TbLibLoginInfo;
-import com.ssj.bean.weixin.libmy.domain.TbLibManager;
-import com.ssj.bean.weixin.libmy.domain.TbLibManagerAudit;
-import com.ssj.bean.weixin.user.domain.User;
-import com.ssj.framework.basic.utils.DateHelper;
-import com.ssj.framework.basic.utils.MD5;
-import com.ssj.framework.core.common.controller.BaseController;
-import com.ssj.framework.core.security.annotation.IgnoreSecurity;
-import com.ssj.framework.core.security.manager.TokenManager;
-import com.ssj.framework.core.util.*;
-import com.ssj.framework.weixin.util.WeixinOauth2Token;
-import com.ssj.service.conch.parents.service.ParentService;
-import com.ssj.service.conch.teacher.service.TeacherService;
-import com.ssj.service.kmt.dto.exercise.ExerciseUserInfoDto;
-import com.ssj.service.kmt.service.KmtLoginAuthService;
-import com.ssj.service.kmt.service.KmtQuestionService;
-import com.ssj.service.kmt.service.KmtSysUserService;
-import com.ssj.service.sys.attendance.AttendanceService;
-import com.ssj.service.sys.role.service.AdminService;
-import com.ssj.service.weixin.library.service.IBookManagerService;
-import com.ssj.service.weixin.library.service.LibManagerAuditService;
-import com.ssj.service.weixin.library.service.TbLibLoginInfoService;
-import com.ssj.service.weixin.user.service.UserService;
-import com.ssj.weixin.utils.LoginWxUtil;
-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.web.bind.annotation.*;
-
-import java.text.SimpleDateFormat;
-import java.util.*;
-
-
-@RestController
-@Api(value = "kmt登录的接口", tags = "kmt登录的接口")
-@RequestMapping("/api/kmt/login")
-public class KmtLoginAuthController extends BaseController {
-
-    @Autowired
-    private TokenManager tokenManager;
-
-
-    @Reference(version = "1.0" ,timeout = 60000)
-    private KmtSysUserService kmtSysUserService;
-    @Reference(version = "1.0" ,timeout = 60000)
-    private UserService userService;
-    @Reference(version = "1.0" ,timeout = 60000)
-    private IBookManagerService managerService;
-    @Reference(version = "1.0" ,timeout = 60000)
-    private TeacherService teacherService;
-    @Reference(version = "1.0" ,timeout = 60000)
-    private AttendanceService attendanceService;
-    @Reference(version = "1.0" ,timeout = 60000)
-    private KmtQuestionService kmtQuestionService;
-    @Reference(version = "1.0" ,timeout = 60000)
-    private TbLibLoginInfoService tbLibLoginInfoService;
-    @Reference(version = "1.0" ,timeout = 60000)
-    private LibManagerAuditService libManagerAuditService;
-    @Reference(version = "1.0" ,timeout = 60000)
-    private ParentService parentService;
-    @Reference(version = "1.0" ,timeout = 60000)
-    private KmtLoginAuthService kmtLoginAuthService;
-    @Reference(version = "1.0", timeout = 60000)
-    private AdminService adminService;
-
-    @Autowired
-    private RedisUtil redisUtil;
-    /**
-     /**
-     * kmt扫码登录回调处理
-     */
-    @RequestMapping(value = "/wxlogin/scanlogin", method = RequestMethod.POST)
-    @ApiOperation(value = "用户扫码登录成功后调用接口", httpMethod = "POST",  notes = "用户扫码登录")
-    @IgnoreSecurity
-    public ResponseEntity wxlogin(@RequestParam String code) {
-        logger.info("从KMT扫码login网页进来code={}", code);
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            if(code !=null) {
-                WeixinOauth2Token token = LoginWxUtil.getOauth2AccessToken(code);
-                logger.info("从KMT---WeixinOauth2Token获取  ---openid----)" + token.getOpenId());
-                logger.info("从KMT---WeixinOauth2Token获取  ---uunion----)" + token.getUnionId());
-                if(StringUtil.isNotBlank(token.getUnionId())){
-                    User user= userService.getUserByUnionid(token.getUnionId());
-                    //没有用户信息,不让login
-                    if(user==null){
-                        responseEntity.failure(ResponseConstant.CODE_000, "用户中心无该用户,请先关注公众号");
-                    }else{//login成功...
-                        this.loginPublic(responseEntity, user);
-                    }
-                }else{
-                    responseEntity.failure(ResponseConstant.CODE_000, "没有权限");
-                }
-            }
-        } catch (Exception e) {
-            logger.error("用户扫码登录异常", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-    /**
-     /** aikmt域名回调调用该接口
-     * kmt扫码登录回调处理
-     */
-    @RequestMapping(value = "/wxlogin/newscanlogin", method = RequestMethod.POST)
-    @ApiOperation(value = "用户扫码登录成功后调用接口", httpMethod = "POST",  notes = "用户扫码登录")
-    @IgnoreSecurity
-    public ResponseEntity newwxlogin(@RequestParam String code, @RequestParam(required = false, defaultValue = "0") int type) {
-        logger.info("从KMT扫码login网页进来code={}", code);
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            if(code !=null) {
-                WeixinOauth2Token token = null;
-                if(0==type){
-                    token = LoginWxUtil.getOauth2AccessToken(code);
-                }else{
-                    token = LoginWxUtil.getOauth2AccessToken(code,PropertiesUtil.getValue("weixin_aipc_appId"),
-                            PropertiesUtil.getValue("weixin_aipc_appSecret"));
-                }
-
-                logger.info("从KMT---WeixinOauth2Token获取  ---openid----)" + token.getOpenId());
-                logger.info("从KMT---WeixinOauth2Token获取  ---uunion----)" + token.getUnionId());
-                if(StringUtil.isNotBlank(token.getUnionId())){
-                    User user= userService.getUserByUnionid(token.getUnionId());
-                    //没有用户信息,不让login
-                    if(user==null){
-                        responseEntity.failure(ResponseConstant.CODE_000, "用户中心无该用户,请先关注公众号");
-                    }else{//login成功...
-                        this.loginPublic(responseEntity, user);
-                    }
-                }else{
-                    responseEntity.failure(ResponseConstant.CODE_000, "没有权限");
-                }
-            }
-        } catch (Exception e) {
-            logger.error("用户扫码登录异常", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-    /**
-     /**
-     * kmt扫码登录回调处理
-     */
-    @RequestMapping(value = "/unionidlogin", method = RequestMethod.POST)
-    @ApiOperation(value = "用户unionid登录", httpMethod = "POST",  notes = "用户unionid登录")
-    @IgnoreSecurity
-    public ResponseEntity unionidlogin(@RequestParam String unionid) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            if (StringUtil.isNotBlank(unionid)) {
-                User user = userService.getUserByUnionid(unionid);
-                //没有用户信息,不让login
-                if (user == null) {
-                    responseEntity.failure(ResponseConstant.CODE_000, "用户中心无该用户,请先关注公众号");
-                } else {
-                    //login成功...
-                   this.loginPublic(responseEntity, user);
-                }
-            } else {
-                responseEntity.failure(ResponseConstant.CODE_000, "没有权限");
-            }
-        } catch (Exception e) {
-            logger.error("用户unionid登录", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    private void loginPublic(ResponseEntity responseEntity, User user) {
-        Date now = new Date();
-        TbLibManager kmtUser = null;
-        //角色
-        int type = 0;
-        List<TbLibManager> kmtUsers = managerService.findByUserIdAndTypeIn(user.getId(), new int[]{Constant.KMT_122_TEACHER_TYPE, Constant.CORRECT_MANAGER, Constant.CORRECT_SUPER_MANAGER, 13,14,15});
-        String userLoginToken = tokenManager.getToken(user.getId(), "PC");
-        if (kmtUsers.size() > 0) {
-            kmtUser = kmtUsers.get(0);
-            type = kmtUser.getType();
-        }
-        //是否只允许一个人登陆
-        String onlyOneLogin = PropertiesUtil.getValue("ONLY_ONE_LOGIN");
-        if (type == 12 && "Y".equals(onlyOneLogin)) {
-            //超级管理员只允许一个人同时登录
-            if (StringUtils.isNotBlank(userLoginToken)) {
-                //如果有人在线则踢下线
-                tokenManager.removeToken(userLoginToken, "PC");
-                //标识为被挤下线
-                tokenManager.setString("invalid_reason_" + userLoginToken, "2");
-            }
-            //每次都重新生成token
-            userLoginToken = tokenManager.createToken(null, user.getId(), "PC");
-        } else {
-            if (StringUtils.isBlank(userLoginToken)) {
-                userLoginToken = tokenManager.createToken(null, user.getId(), "PC");
-            }
-        }
-        Map<String, Object> data = new HashMap<>(18);
-        data.put("accessToken", userLoginToken);
-        data.put("user", user);
-        responseEntity.success(data, "登录成功");
-        if (kmtUser != null) {
-            //被封号,不记录在线和出勤
-            if (kmtUser.getIsBanned() == 1) {
-                return;
-            }
-            boolean ifContinue = true;
-            //批改老师和匹配知识点老师只有审核通过才记录在线状态
-            
-            
-// 			  批改老师完善资料后  如果,1: 审批通过,2:审批拒绝   都要要记录在线时间
-            if (kmtUser.getType() == 8 || kmtUser.getType() == 13) {
-                TbLibManagerAudit audit = libManagerAuditService.findByUserIdAndType(kmtUser.getUserId(), kmtUser.getType());
-                if (audit != null && audit.getStatus() != 1 && audit.getStatus() !=2 ) {
-                    ifContinue = false;
-                }
-            }
-            if(ifContinue){
-                kmtUser.setLoginTime(now);
-                kmtUser.setIsOnline(1);
-                managerService.save(kmtUser);
-                TbLibLoginInfo tbLibLoginInfo=new TbLibLoginInfo();
-                String today=new SimpleDateFormat("yyyy-MM-dd").format(now);
-                String teacherId=kmtUser.getUserId();
-                tbLibLoginInfo.setId(UUID.randomUUID().toString());
-                tbLibLoginInfo.setArrangeDate(today);
-                tbLibLoginInfo.setTeacherId(teacherId);
-                tbLibLoginInfo.setType(kmtUser.getType());
-                tbLibLoginInfo.setLoginTime(now);
-                tbLibLoginInfoService.save(tbLibLoginInfo);
-                //只记录老师应该出勤当天的记录,其余时间登录不记录到出勤里面
-                String period = kmtUser.getPeriod();
-                if (StringUtil.isNotBlank(period) && period.contains(DateHelper.getWeekOfDate(now,1))) {
-                    //以下为记录出勤信息
-                    Attendance attendance = attendanceService.findByUserIdAndDate(kmtUser.getUserId(), now);
-                    if (attendance == null) {
-                        attendance = new Attendance();
-                        attendance.setCreateTime(now);
-                        attendance.setUserId(kmtUser.getUserId());
-                        attendance.setType(kmtUser.getType());
-                        attendance.setLoginTime(now);
-                    }
-                    if (attendance.getLoginTime() == null) {
-                        attendance.setLoginTime(now);
-                    }
-                    attendance.setIsAttendance(1);
-                    attendance.setLastLoginTime(now);
-                    attendanceService.save(attendance);
-                }
-            }
-        }
-    }
-
-    @RequestMapping(value = "/getUserInfo", method = RequestMethod.POST)
-    @ApiOperation(value = "获取用户信息", httpMethod = "POST",  notes = "获取用户信息")
-    public ResponseEntity login(@RequestParam(name = "accessToken") String accessToken) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            String userId = tokenManager.getUserId(accessToken);
-            KmtSysUser user = kmtSysUserService.findKmtSysUserById(userId);
-            responseEntity.success(user, "查询成功");
-        } catch (Exception e) {
-            logger.error("获取用户信息", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/getUserInfoV1", method = RequestMethod.POST)
-    @ApiOperation(value = "获取用户信息", httpMethod = "POST",  notes = "获取用户信息")
-    public ResponseEntity getUserInfoV1(@RequestParam(name = "accessToken") String accessToken) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            String userId = tokenManager.getUserId(accessToken);
-            KmtSysUser user = kmtSysUserService.getById(userId);
-            if (user == null){
-                responseEntity.failure(ResponseConstant.CODE_000, "用户不存在");
-            } else {
-                responseEntity.success(new ExerciseUserInfoDto(user), "查询成功");
-            }
-        } catch (Exception e) {
-            logger.error("获取用户信息", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/getQuestionOperateType", method = RequestMethod.POST)
-    @ApiOperation(value = "获取注册权限列表", httpMethod = "POST",  notes = "获取注册权限列表")
-    public ResponseEntity getQuestionOperateType(@RequestParam(name = "accessToken") String accessToken) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            Map<String, Object> data = new HashMap<>();
-            data.put("list", kmtLoginAuthService.getQuestionOperateType());
-            responseEntity.success(data, "成功");
-        } catch (Exception e) {
-            logger.error("获取用户信息", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/registQuestonOperater", method = RequestMethod.POST)
-    @ApiOperation(value = "注册添加加工审核员", httpMethod = "POST",  notes = "注册添加加工审核员")
-    public ResponseEntity registQuestonOperater(@RequestParam(name = "accessToken") String accessToken, @RequestBody KmtQuestionOperaterRequest request) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            responseEntity = kmtLoginAuthService.registQuestonOperater(request);
-        } catch (Exception e) {
-            logger.error("获取用户信息", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-
-
-    @RequestMapping(value = "/accountLogin", method = RequestMethod.POST)
-    @IgnoreSecurity
-    @ApiOperation(value = "账号密码登录", httpMethod = "POST",  notes = "账号密码登录")
-    public ResponseEntity accountLogin(@RequestParam(name = "accessToken") String accessToken,
-                               @RequestParam(name = "loginName") String loginName,
-                               @RequestParam(name = "password") String password) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try{
-            Map<String, Object> user= kmtQuestionService.loginImport(loginName, password);
-            if(user==null){
-                password = MD5.getMD5(password.getBytes());
-                user = kmtQuestionService.loginImport(loginName, password);
-            }
-            if(user==null){//没有用户信息,不让login
-                responseEntity.failure(ResponseConstant.CODE_000, "没有权限");
-            }else{//login成功...
-                String userLoginToken = tokenManager.getToken((String)user.get("id"),"PC");
-                if (StringUtils.isBlank(userLoginToken)){
-                    userLoginToken = tokenManager.createToken(null, (String)user.get("id"), 7 * 24 * 3600,"PC");
-                }
-                Map<String, Object> data = new HashMap<>();
-                data.put("accessToken", userLoginToken);
-                responseEntity.success(data, "登录成功");
-            }
-        }catch (Exception e) {
-            logger.error("账号密码登录", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/phoneLogin", method = RequestMethod.POST)
-    @IgnoreSecurity
-    @ApiOperation(value = "手机验证码登录", httpMethod = "POST", notes = "手机验证码登录")
-    public ResponseEntity phoneLogin(@RequestParam(name = "phone") String phone,
-                                     @RequestParam(name = "vcode") String vcode) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            if (adminService.loginLocking(phone, "KMT")) {
-                return responseEntity.failure("您的账号已被锁定,请30分钟后重试");
-            }
-
-            String redisVcode = redisUtil.get("vcode_" + phone);
-            if (redisVcode == null) {
-                return responseEntity.failure("验证码不正确,请重新获取验证码");
-            }
-
-            if (!Objects.equals(vcode, redisVcode)) {
-                int wrongCount = tokenManager.recordPasswordWrong(phone, "KMT");
-                if (wrongCount >= 5) {
-                    responseEntity.failure("验证码不正确,您的账号已被锁定,请30分钟后重试");
-                } else if (wrongCount >= 2) {
-                    responseEntity.failure(String.format("您再输错%s次账号将会锁定", 5 - wrongCount));
-                } else {
-                    responseEntity.failure("验证码不正确,请重新输入");
-                }
-            }
-
-            // 获取用户信息
-            TbLibManager manager = managerService.findUserInfoByPhone(phone);
-            if (manager == null) {
-                // 没有用户信息,不让login
-                responseEntity.failure("用户名或密码错误");
-            } else {
-                // login成功...
-                User user = userService.getById(manager.getUserId());
-                this.loginPublic(responseEntity, user);
-                tokenManager.clearPasswordWrongRecord(phone);
-            }
-        } catch (Exception e) {
-            logger.error("手机验证码登录", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
- 
-
-    @RequestMapping(value = "/logout", method = RequestMethod.POST)
-    @ApiOperation(value = "登出", httpMethod = "POST",  notes = "登出")
-    public ResponseEntity logout(@RequestParam(name = "accessToken") String accessToken) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            String userId = tokenManager.getUserId(accessToken);
-            logger.info("老师{}自己下线", userId);
-            teacherService.offonlineTeacherAllot(userId);
-            responseEntity.success(ResponseConstant.CODE_999, "查询成功");
-        } catch (Exception e) {
-            logger.error("登出", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-
-        return responseEntity;
-    }
-    
-    
-    
-    
-    
-    
-    @RequestMapping(value = "/getVerificationCode", method = RequestMethod.POST)
-    @IgnoreSecurity
-    @ApiOperation(value = "获取手机验证码", httpMethod = "POST",  notes = "获取手机验证码")
-    public ResponseEntity getVerificationCode(
-    		@RequestParam(name = "phone") String phone, Integer type,@RequestParam(name = "accessToken") String accessToken) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try{
-            User phoneUser=userService.findByMobile(phone);
-            String userId = tokenManager.getUserId(accessToken);
-            if(type==null || type==1){ //忘记密码
-            	if(phoneUser==null && StringUtil.isNotEmpty(userId)){//没有用户信息,不让login
-            		responseEntity.failure(ResponseConstant.CODE_000, "用户名或密码错误");
-            		return  responseEntity;
-            	}
-            }
-            if(type!=null && type==2){ //换绑、绑定 都已获取到token
-                User user = userService.getById(userId);
-                if(StringUtils.isEmpty(user.getMobile())||StringUtils.isEmpty(user.getPassword())){ //绑定
-                    //查看phoneUser 是否已经绑定
-                    if(phoneUser!=null && StringUtils.isNotEmpty(phoneUser.getUnionid())){
-                        responseEntity.failure(ResponseConstant.CODE_000, "此手机号码已被绑定,请更换别的手机号");
-                        return  responseEntity;
-                    }
-                }else{ //换绑
-                    if(phoneUser!=null){
-                        responseEntity.failure(ResponseConstant.CODE_000, "此手机号码已被绑定,请更换别的手机号");
-                        return  responseEntity;
-                    }
-                }
-
-            }
-            parentService.sendSms(phone, 1);
-           // managerService.getVerificationCode(user==null?userId:user.getUserId(),phone);
-            responseEntity.success("验证码发送成功,请注意接收短信!");
-        }catch (Exception e) {
-            logger.error("获取手机验证码异常", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-    
-    
-    
-    
-    @RequestMapping(value = "/phoneandpassword/isbind", method = RequestMethod.POST)
-    @ApiOperation(value = "查询是否已绑定手机号与密码", httpMethod = "POST",  notes = "查询是否已绑定手机号与密码")
-    public ResponseEntity isbindphoneandpassword(@RequestParam(name = "accessToken") String accessToken) {
-    	  ResponseEntity responseEntity = new ResponseEntity();
-          try{
-        	  String userId = tokenManager.getUserId(accessToken);
-        	  User user=userService.getById(userId);
-//        	  //查询是否超级管理员
-//              TbLibManager manager = managerService.findByUserIdAndType(userId,12);
-//              if(manager!=null){
-//                  responseEntity.success("已绑定");
-//                  return  responseEntity;
-//              }
-    		  if(StringUtils.isNotEmpty(user.getMobile()) && StringUtils.isNotEmpty(user.getPassword())){
-    			  responseEntity.success("已绑定");
-    		  }else{
-    			  responseEntity.failure(ResponseConstant.CODE_000, "未绑定");
-    		  }
-          }catch (Exception e) {
-              logger.error("查询是否已绑定手机号与密码", e);
-              responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-          }
-          return responseEntity;
-    }
-    
-    
-    @RequestMapping(value = "/verification/code", method = RequestMethod.POST)
-    @ApiOperation(value = "验证验证码", httpMethod = "POST",  notes = "验证验证码")
-    @IgnoreSecurity
-    public ResponseEntity codeverification(
-    		@RequestParam(name = "accessToken") String accessToken,
-    		@RequestParam(name = "phone") String phone,
-            @RequestParam(name = "vcode") String vcode) {
-    	 ResponseEntity responseEntity = new ResponseEntity();
-         try{
-             responseEntity = parentService.confirmSms(phone,vcode);
-             if(responseEntity.getCode().equals("999")) {
-                 User user = userService.findByMobile(phone);
-                 Map<String, Object> data = new HashMap<String, Object>();
-                 if (user != null && StringUtils.isNotEmpty(user.getPassword())) {
-                     data.put("hasReg", 1);
-                 } else {
-                     data.put("hasReg", 2);
-                 }
-                 userService.towInOneUser(accessToken, user, phone);
-                 //清除验证码
-                 tokenManager.delString(phone);
-                 responseEntity.success(data, "手机验证码验证通过!");
-             }
-         }catch (Exception e) {
-             logger.error("验证验证码", e);
-             responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-         }
-         return responseEntity;
-    }
-    
-    
-    
-    
-    @RequestMapping(value = "/phoneandpassword/bind", method = RequestMethod.POST)
-    @ApiOperation(value = "绑定手机号和设置密码", httpMethod = "POST",  notes = "绑定手机号和设置密码")
-    public ResponseEntity bindphoneandpassword(@RequestParam(name = "accessToken") String accessToken,
-    		@RequestParam(name = "phone") String phone,
-            @RequestParam(name = "vcode") String vcode,
-            @RequestParam(name = "password") String password) {
-    	 ResponseEntity responseEntity = new ResponseEntity();
-         try{
-             responseEntity = parentService.confirmSms(phone,vcode);
-             if(responseEntity.getCode().equals("999")){
-                 String userId = tokenManager.getUserId(accessToken);
-                 User user=userService.getById(userId);
-                 if(StringUtils.isNotEmpty(user.getMobile()) && StringUtils.isNotEmpty(user.getPassword())){
-                     responseEntity.failure(ResponseConstant.CODE_000, "此用户已绑定手机号");
-                 }else{
-                     User bindUser=userService.findByMobile(phone);
-                     if(bindUser==null || bindUser.getId().equals(userId)){
-                         if (!PasswordUtil.checkRule(password)) {
-                             return responseEntity.failure(PasswordUtil.CHECK_FAIL_MESSAGE);
-                         }
-                         User binduser= userService.updatePasswordBindPhone(userId, password, phone);
-                         if(binduser!=null){
-                             //清除验证码
-                             tokenManager.delString(phone);
-                             responseEntity.success("成功");
-                         }else{
-                             responseEntity.failure(ResponseConstant.CODE_000, "绑定失败");
-                         }
-                     }else{
-                         responseEntity.failure(ResponseConstant.CODE_000, "绑定失败");
-                     }
-                 }
-             }else{
-                 responseEntity.failure(ResponseConstant.CODE_000, "验证码错误,请重新输入!");
-             }
-
-         }catch (Exception e) {
-             logger.error("绑定手机号和设置密码", e);
-             responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-         }
-         return responseEntity;
-    }
-    
-    
-    
-    
-    
-    @RequestMapping(value = "/passwordLogin", method = RequestMethod.POST)
-    @IgnoreSecurity
-    @ApiOperation(value = "手机号/密码登录", httpMethod = "POST",  notes = "手机号/密码登录")
-    public ResponseEntity passwordLogin(
-    							@RequestParam(name = "phone") String phone,
-                                @RequestParam(name = "password") String password) {
-    	  ResponseEntity responseEntity = new ResponseEntity();
-          try{
-              if (adminService.loginLocking(phone, "KMT")) {
-                  return responseEntity.failure("您的账号已被锁定,请30分钟后重试");
-              }
-              if(StringUtils.isEmpty(phone)){
-                  responseEntity.failure(ResponseConstant.CODE_000, "手机号码不能为空");
-                  return responseEntity;
-              }
-              if(StringUtils.isEmpty(password)){
-                  responseEntity.failure(ResponseConstant.CODE_000, "密码不能为空");
-                  return responseEntity;
-              } 
-              User user = userService.findByMobile(phone);
-              if(user==null){
-            	  responseEntity.failure(ResponseConstant.CODE_000, "用户名或密码错误");
-                  return responseEntity;
-              }else{
-            	  User loginUser = userService.getUserByPassword(phone, password);
-            	  if(loginUser!=null){
-                      // 验证密码是否符合规范(历史数据中可能存在密码格式不符合规定的记录)
-                      if (!PasswordUtil.checkRule(password)) {
-                          return responseEntity.failure(ResponseConstant.CODE_011, "你的登录密码过于简单,请重置");
-                      }
-
-            		  this.loginPublic(responseEntity, loginUser);
-                      tokenManager.clearPasswordWrongRecord(phone);
-                  }else{
-            		  int wrongCount = tokenManager.recordPasswordWrong(phone, "KMT");
-                      if (wrongCount >= 5) {
-                          responseEntity.failure("用户名或密码错误,您的账号已被锁定,请30分钟后重试");
-                      } else if (wrongCount >= 2) {
-                          responseEntity.failure(String.format("您再输错%s次账号将会锁定", 5 - wrongCount));
-                      } else {
-                          responseEntity.failure("用户名或密码错误");
-                      }
-            	  }
-              } 
-          }catch (Exception e) {
-              logger.error("账号密码登录", e);
-              responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-          }
-          return responseEntity;
-    }
-    
-    
- 
-    @RequestMapping(value = "/reset/password", method = RequestMethod.POST)
-    @ApiOperation(value = "重置登录密码", httpMethod = "POST",  notes = "重置登录密码")
-    @IgnoreSecurity
-    public ResponseEntity resetpassword(@RequestParam(name = "accessToken") String accessToken,
-    							@RequestParam(name = "phone") String phone,
-    							@RequestParam(name = "vcode") String vcode,
-                                @RequestParam(name = "password") String password) {
-    	  ResponseEntity responseEntity = new ResponseEntity();
-          try{
-              responseEntity = parentService.confirmSms(phone,vcode);
-              if(responseEntity.getCode().equals("999")){
-                  User user= userService.findByMobile(phone);
-                  if(user==null){//没有用户信息,不让login
-                      responseEntity.failure(ResponseConstant.CODE_000, "用户名或密码错误");
-                  }else{
-                      if (!PasswordUtil.checkRule(password)) {
-                          return responseEntity.failure(PasswordUtil.CHECK_FAIL_MESSAGE);
-                      }
-                      userService.updateByResetPassword(user.getId(), password);
-                      //清除验证码
-                      tokenManager.delString(phone);
-                      responseEntity.success("重置成功");
-                  }
-              }else{
-                  responseEntity.failure(ResponseConstant.CODE_000, "验证码不正确,请重新输入");
-              }
-          }catch (Exception e) {
-              logger.error("重置登录密码", e);
-              responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-          }
-          return responseEntity;
-    }
-    
-    
-
-    @RequestMapping(value = "/update/password", method = RequestMethod.POST)
-    @ApiOperation(value = "修改登录密码", httpMethod = "POST",  notes = "修改登录密码")
-    public ResponseEntity updatepassword(@RequestParam(name = "accessToken") String accessToken,
-    							@RequestParam(name = "oldPassword") String oldPassword,
-    							@RequestParam(name = "newPassword") String newPassword) {
-    	  ResponseEntity responseEntity = new ResponseEntity();
-          try{
-              if (!PasswordUtil.checkRule(newPassword)) {
-                  return responseEntity.failure(PasswordUtil.CHECK_FAIL_MESSAGE);
-              }
-        	  String userId = tokenManager.getUserId(accessToken);
-        	  User user=userService.updateByPassword(userId, oldPassword, newPassword);
-        	  if(user!=null){
-        		  responseEntity.success("修改成功");
-        	  }else{
-        		  responseEntity.failure(ResponseConstant.CODE_000, "用户名或密码错误");
-        	  }
-          }catch (Exception e) {
-              logger.error("修改登录密码", e);
-              responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-          }
-          return responseEntity;
-    }
-    
-    
-    
-    @RequestMapping(value = "/updatebind/phone", method = RequestMethod.POST)
-    @ApiOperation(value = "换绑手机号", httpMethod = "POST",  notes = "换绑手机号")
-    public ResponseEntity phoneupdatebind(@RequestParam(name = "accessToken") String accessToken,
-    							@RequestParam(name = "phone") String phone,
-    							@RequestParam(name = "vcode") String vcode,
-    							@RequestParam(name = "password") String password) {
-    	  ResponseEntity responseEntity = new ResponseEntity();
-          try{
-        	  String userId = tokenManager.getUserId(accessToken);
-              responseEntity = parentService.confirmSms(phone,vcode);
-              if(responseEntity.getCode().equals("999")){
-                  //校验换的手机号是否有人使用
-                  User mobileUser = userService.findByMobile(phone);
-                  if(mobileUser!=null){
-                      responseEntity.failure(ResponseConstant.CODE_000, "此手机号码已被绑定,请更换别的手机号!");
-                      return  responseEntity;
-                  }
-                  User user=userService.updateBindPhone(userId, password, phone);
-                  if(user!=null){
-                      //清除验证码
-                      tokenManager.delString(phone);
-                      responseEntity.success("修改成功");
-                  }else{
-                      responseEntity.failure(ResponseConstant.CODE_000, "用户名或密码错误");
-                  }
-              }else{
-                  responseEntity.failure(ResponseConstant.CODE_000, "短信验证码不正确,请输入正确的验证码!");
-                  return  responseEntity;
-              }
-          }catch (Exception e) {
-              logger.error("换绑手机号", e);
-              responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-          }
-          return responseEntity;
-    }
-    
-    
-
-}

+ 0 - 359
ssj-aijia-api/src/main/java/com/ssj/aijia/kmt/sys/controller/ExportSalaryController.java

@@ -1,359 +0,0 @@
-package com.ssj.aijia.kmt.sys.controller;
-
-import com.alibaba.dubbo.config.annotation.Reference;
-import com.ssj.framework.core.common.controller.BaseController;
-import com.ssj.framework.core.security.manager.TokenManager;
-import com.ssj.framework.weixin.util.DateUtil;
-import com.ssj.service.kmt.correctsys.service.KmtCorrectSysService;
-import com.ssj.service.kmt.dto.ExportCorrectSalaryDto;
-import com.ssj.service.kmt.dto.ExportMatchSalaryDto;
-import com.ssj.service.kmt.dto.ExportTeacherInfo;
-import com.ssj.service.kmt.exercisesys.dto.ExerciseTeachersDTo;
-import com.ssj.service.kmt.exercisesys.service.KmtExerciseSysService;
-import com.ssj.sys.util.thirdparty.excel.CustomizeToExcel;
-import com.ssj.sys.util.thirdparty.excel.ExcelColumn;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.data.domain.Pageable;
-import org.springframework.stereotype.Controller;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.ResponseBody;
-
-import javax.servlet.ServletOutputStream;
-import javax.servlet.http.HttpServletResponse;
-import java.util.*;
-
-/**
- * @author yanghuan
- * @title: ExportSalaryController
- * @projectName ssj
- * @description: TODO
- * @date 2019/12/16 15:20
- */
-@Controller
-@RequestMapping("/sys/salary")
-public class ExportSalaryController extends BaseController {
-
-    @Reference(version = "1.0", timeout = 60000)
-    private KmtCorrectSysService kmtCorrectSysService;
-
-    @Autowired
-    private TokenManager tokenManager;
-
-    @Reference(version = "1.0", timeout = 60000)
-    private KmtExerciseSysService kmtExerciseSysService;
-
-    @ResponseBody
-    @RequestMapping(value = "/exportCorrectSalary")
-    public void exportCorrectSalary(
-            @RequestParam(name = "accessToken") String accessToken,
-            @RequestParam(name = "pageNo") Integer pageNo,
-            @RequestParam(name = "pageSize") Integer pageSize,
-            @RequestParam(name = "month") String month,
-            HttpServletResponse response) throws Exception {
-        if(accessToken ==null || !tokenManager.checkToken(accessToken)){
-            throw new Exception("accessToken无效");
-        }
-        Pageable pageable = initPage(pageNo, pageSize);
-        ServletOutputStream os = null;
-        try {
-            String name = DateUtil.format_yyyyMMdd(new Date());
-            os = response.getOutputStream(); //获得输出流
-            response.reset();   //清空输出流
-            response.setHeader("Access-Control-Allow-Headers", "DNT,X-Mx-ReqToken,Keep-Alive,User-Agent," +
-                    "X-Requested-With,x_requested_with,If-Modified-Since,Cache-Control,Content-Type,Authorization");
-            response.setHeader("Access-Control-Allow-Credentials", "true");
-            response.setHeader("Access-Control-Allow-Methods", "GET, POST, OPTIONS");
-            response.addHeader("Access-Control-Allow-Origin", "*");
-            String fileName = new String(name.getBytes("gb2312"), "UTF-8") + ".xlsx";
-            response.setHeader("Content-disposition", "attachment; filename=" + fileName); //设定输出文件头
-            response.setContentType("application/vnd.ms-excel;charset=UTF-8");
-            response.setCharacterEncoding("utf-8");
-            List<ExportCorrectSalaryDto> list = kmtCorrectSysService.exportCorrectExcle(pageable, month);
-            List<Map<String, Object>> mapList = new ArrayList<Map<String, Object>>();
-            for (ExportCorrectSalaryDto exportCorrectSalaryDto : list) {
-                Map<String, Object> hashMap = new HashMap<>();
-                hashMap.put("name", exportCorrectSalaryDto.getName());
-                hashMap.put("identity", exportCorrectSalaryDto.getIdentity());
-                hashMap.put("manager", exportCorrectSalaryDto.getManager());
-                hashMap.put("subject", exportCorrectSalaryDto.getSubject());
-                hashMap.put("actualAttendCount", exportCorrectSalaryDto.getActualAttendCount());
-                hashMap.put("shouldAttendCount", exportCorrectSalaryDto.getShouldAttendCount());
-                hashMap.put("attendanceRate", exportCorrectSalaryDto.getAttendanceRate());
-                hashMap.put("accuracy", exportCorrectSalaryDto.getAccuracy());
-                hashMap.put("totalCount", exportCorrectSalaryDto.getTotalCount());
-                hashMap.put("totalAutoCount", exportCorrectSalaryDto.getTotalAutoCount());
-                hashMap.put("manualLowGradeCount", exportCorrectSalaryDto.getManualLowGradeCount());
-                hashMap.put("manualMiddleGradeCount", exportCorrectSalaryDto.getManualMiddleGradeCount());
-                hashMap.put("manualHighGradeCount", exportCorrectSalaryDto.getManualHighGradeCount());
-                hashMap.put("basicSalary", exportCorrectSalaryDto.getBasicSalary());
-                hashMap.put("correctDecution", exportCorrectSalaryDto.getCorrectDecution());
-                hashMap.put("total", exportCorrectSalaryDto.getTotal());
-                mapList.add(hashMap);
-            }
-            List<ExcelColumn> myColumns3 = new ArrayList<ExcelColumn>();
-            myColumns3.add(new ExcelColumn("姓名", "name", 20));
-            myColumns3.add(new ExcelColumn("身份", "identity", 20));
-            myColumns3.add(new ExcelColumn("管理员", "manager", 20));
-            myColumns3.add(new ExcelColumn("科目", "subject", 20));
-            myColumns3.add(new ExcelColumn("实际出勤段数", "actualAttendCount", 20));
-            myColumns3.add(new ExcelColumn("应该出勤段数", "shouldAttendCount", 20));
-            myColumns3.add(new ExcelColumn("出勤率", "attendanceRate", 20));
-            myColumns3.add(new ExcelColumn("正确率", "accuracy", 20));
-            myColumns3.add(new ExcelColumn("批改总张数", "totalCount", 20));
-            myColumns3.add(new ExcelColumn("自动批改张数", "totalAutoCount", 20));
-            myColumns3.add(new ExcelColumn("1-2年级批改张数", "manualLowGradeCount", 20));
-            myColumns3.add(new ExcelColumn("3-4年级批改张数", "manualMiddleGradeCount", 20));
-            myColumns3.add(new ExcelColumn("5-6年级批改张数", "manualHighGradeCount", 20));
-            myColumns3.add(new ExcelColumn("底薪", "basicSalary", 20));
-            myColumns3.add(new ExcelColumn("提纯", "correctDecution", 20));
-            myColumns3.add(new ExcelColumn("总金额", "total", 20));
-
-            try {
-                CustomizeToExcel.downFile(myColumns3, mapList, os);
-            } catch (Exception e) {
-                logger.error("下载文件异常", e);
-            }
-        } catch (Exception e) {
-            logger.error("批改薪资导出失败", e);
-
-        }
-
-    }
-
-    @ResponseBody
-    @RequestMapping(value = "/exportMatchSalary")
-    public void exportMatchSalary(@RequestParam(name = "accessToken") String accessToken,
-                                  @RequestParam(name = "pageNo") Integer pageNo,
-                                  @RequestParam(name = "pageSize") Integer pageSize,
-                                  @RequestParam(name = "month") String month,
-                                  HttpServletResponse response) throws Exception {
-        if(accessToken ==null || !tokenManager.checkToken(accessToken)){
-            throw new Exception("accessToken无效");
-        }
-        Pageable pageable = initPage(pageNo, pageSize);
-        ServletOutputStream os = null;
-        try {
-            String name = DateUtil.format_yyyyMMdd(new Date());
-            os = response.getOutputStream(); //获得输出流
-            response.reset();   //清空输出流
-            response.setHeader("Access-Control-Allow-Headers", "DNT,X-Mx-ReqToken,Keep-Alive,User-Agent," +
-                    "X-Requested-With,x_requested_with,If-Modified-Since,Cache-Control,Content-Type,Authorization");
-            response.setHeader("Access-Control-Allow-Credentials", "true");
-            response.setHeader("Access-Control-Allow-Methods", "GET, POST, OPTIONS");
-            response.addHeader("Access-Control-Allow-Origin", "*");
-            String fileName = new String(name.getBytes("gb2312"), "UTF-8") + ".xlsx";
-            response.setHeader("Content-disposition", "attachment; filename=" + fileName); //设定输出文件头
-            response.setContentType("application/vnd.ms-excel;charset=UTF-8");
-            response.setCharacterEncoding("utf-8");
-            List<ExportMatchSalaryDto> list = kmtCorrectSysService.exportMatchExcle(pageable, month);
-            List<Map<String, Object>> mapList = new ArrayList<Map<String, Object>>();
-            for (ExportMatchSalaryDto exportMatchSalaryDto : list) {
-                Map<String, Object> hashMap = new HashMap<>();
-                hashMap.put("name", exportMatchSalaryDto.getName());
-                hashMap.put("identity", exportMatchSalaryDto.getIdentity());
-                hashMap.put("manager", exportMatchSalaryDto.getManager());
-                hashMap.put("subject", exportMatchSalaryDto.getSubject());
-                hashMap.put("actualAttendCount", exportMatchSalaryDto.getActualAttendCount());
-                hashMap.put("shouldAttendCount", exportMatchSalaryDto.getShouldAttendCount());
-                hashMap.put("attendanceRate", exportMatchSalaryDto.getAttendanceRate());
-                hashMap.put("accuracy", exportMatchSalaryDto.getAccuracy());
-                hashMap.put("totalCount", exportMatchSalaryDto.getTotalCount());
-                hashMap.put("basicSalary", exportMatchSalaryDto.getBasicSalary());
-                hashMap.put("correctDecution", exportMatchSalaryDto.getCorrectDecution());
-                hashMap.put("total", exportMatchSalaryDto.getTotal());
-                mapList.add(hashMap);
-            }
-            List<ExcelColumn> myColumns3 = new ArrayList<ExcelColumn>();
-            myColumns3.add(new ExcelColumn("姓名", "name", 20));
-            myColumns3.add(new ExcelColumn("身份", "identity", 20));
-            myColumns3.add(new ExcelColumn("管理员", "manager", 20));
-            myColumns3.add(new ExcelColumn("科目", "subject", 20));
-            myColumns3.add(new ExcelColumn("实际出勤段数", "actualAttendCount", 20));
-            myColumns3.add(new ExcelColumn("应该出勤段数", "shouldAttendCount", 20));
-            myColumns3.add(new ExcelColumn("出勤率", "attendanceRate", 20));
-            myColumns3.add(new ExcelColumn("正确率", "accuracy", 20));
-            myColumns3.add(new ExcelColumn("批改总张数", "totalCount", 20));
-            myColumns3.add(new ExcelColumn("底薪", "basicSalary", 20));
-            myColumns3.add(new ExcelColumn("提纯", "correctDecution", 20));
-            myColumns3.add(new ExcelColumn("总金额", "total", 20));
-            try {
-                CustomizeToExcel.downFile(myColumns3, mapList, os);
-            } catch (Exception e) {
-                logger.error("下载文件异常", e);
-            }
-        } catch (Exception e) {
-            logger.error("匹配薪资导出失败", e);
-
-        }
-
-    }
-
-    @ResponseBody
-    @RequestMapping(value = "/exportTeacherInfo")
-    public void exportTeacherInfo(@RequestParam(name = "accessToken") String accessToken,
-                                  @RequestParam(name = "pageNo") Integer pageNo,
-                                  @RequestParam(name = "pageSize") Integer pageSize,
-                                  @RequestParam(name = "month") String month,
-                                  HttpServletResponse response) throws Exception {
-        if(accessToken ==null || !tokenManager.checkToken(accessToken)){
-            throw new Exception("accessToken无效");
-        }
-        Pageable pageable =  initPage(pageNo, pageSize);
-        ServletOutputStream os = null;
-        try {
-            String name = DateUtil.format_yyyyMMdd(new Date());
-            os = response.getOutputStream(); //获得输出流
-            response.reset();   //清空输出流
-            response.setHeader("Access-Control-Allow-Headers", "DNT,X-Mx-ReqToken,Keep-Alive,User-Agent," +
-                    "X-Requested-With,x_requested_with,If-Modified-Since,Cache-Control,Content-Type,Authorization");
-            response.setHeader("Access-Control-Allow-Credentials", "true");
-            response.setHeader("Access-Control-Allow-Methods", "GET, POST, OPTIONS");
-            response.addHeader("Access-Control-Allow-Origin", "*");
-            String fileName = new String(name.getBytes("gb2312"), "UTF-8") + ".xlsx";
-            response.setHeader("Content-disposition", "attachment; filename=" + fileName); //设定输出文件头
-            response.setContentType("application/vnd.ms-excel;charset=UTF-8");
-            response.setCharacterEncoding("utf-8");
-            List<ExportTeacherInfo> list = kmtCorrectSysService.exportTeacherInfo(pageable, month);
-            List<Map<String, Object>> mapList = new ArrayList<Map<String, Object>>();
-            for (ExportTeacherInfo exportTeacherInfo : list) {
-                Map<String, Object> hashMap = new HashMap<>();
-                hashMap.put("name", exportTeacherInfo.getName());
-                hashMap.put("subject", exportTeacherInfo.getSubject());
-                hashMap.put("regisTime", exportTeacherInfo.getRegisTime());
-                hashMap.put("status", exportTeacherInfo.getStatus());
-                hashMap.put("telephone", exportTeacherInfo.getTelephone());
-                hashMap.put("idNumber", exportTeacherInfo.getIdNumber());
-                hashMap.put("bankName", exportTeacherInfo.getBankName());
-                hashMap.put("bankBranch", exportTeacherInfo.getBankBranch());
-                hashMap.put("cardholder", exportTeacherInfo.getCardholder());
-                hashMap.put("cardNumber", exportTeacherInfo.getCardNumber());
-                mapList.add(hashMap);
-            }
-         /*   String keyValue = "注册老师:name, 科目:subject, 注册时间:regisTime,状态:status,手机号码:telephone, 身份证号码:idNumber,
-         开户行:bankName,开户支行:bankBranch," +
-                    "开户人姓名:cardholder,银行卡号:cardNumber";*/
-            List<ExcelColumn> myColumns3 = new ArrayList<ExcelColumn>();
-            myColumns3.add(new ExcelColumn("注册老师", "name", 20));
-            myColumns3.add(new ExcelColumn("科目", "subject", 20));
-            myColumns3.add(new ExcelColumn("注册时间", "regisTime", 20));
-            myColumns3.add(new ExcelColumn("状态", "status", 20));
-            myColumns3.add(new ExcelColumn("手机号码", "telephone", 20));
-            myColumns3.add(new ExcelColumn("身份证号码", "idNumber", 20));
-            myColumns3.add(new ExcelColumn("开户行", "bankName", 20));
-            myColumns3.add(new ExcelColumn("开户支行", "bankBranch", 20));
-            myColumns3.add(new ExcelColumn("开户人姓名", "cardholder", 20));
-            myColumns3.add(new ExcelColumn("银行卡号", "cardNumber", 20));
-            try {
-                CustomizeToExcel.downFile(myColumns3, mapList, os);
-            } catch (Exception e) {
-                logger.error("异常", e);
-            }
-        } catch (Exception e) {
-            logger.error("老师信息导出失败", e);
-
-        }
-
-    }
-
-
-    @ResponseBody
-    @RequestMapping(value = "/exportExerciseTeacherInfo")
-    public void exportExerciseTeacherInfo(@RequestParam(name = "accessToken") String accessToken,
-                                  @RequestParam(name = "pageNo") Integer pageNo,
-                                  @RequestParam(name = "pageSize") Integer pageSize,
-                                  @RequestParam(name = "month") String month,
-                                  HttpServletResponse response) throws Exception {
-        if(accessToken ==null || !tokenManager.checkToken(accessToken)){
-            throw new Exception("accessToken无效");
-        }
-        Pageable pageable =  initPage(pageNo, pageSize);
-        ServletOutputStream os = null;
-        try {
-            String name = DateUtil.format_yyyyMMdd(new Date());
-            os = response.getOutputStream(); //获得输出流
-            response.reset();   //清空输出流
-            response.setHeader("Access-Control-Allow-Headers", "DNT,X-Mx-ReqToken,Keep-Alive,User-Agent," +
-                    "X-Requested-With,x_requested_with,If-Modified-Since,Cache-Control,Content-Type,Authorization");
-            response.setHeader("Access-Control-Allow-Credentials", "true");
-            response.setHeader("Access-Control-Allow-Methods", "GET, POST, OPTIONS");
-            response.addHeader("Access-Control-Allow-Origin", "*");
-            String fileName = new String(name.getBytes("gb2312"), "UTF-8") + ".xlsx";
-            response.setHeader("Content-disposition", "attachment; filename=" + fileName); //设定输出文件头
-            response.setContentType("application/vnd.ms-excel;charset=UTF-8");
-            response.setCharacterEncoding("utf-8");
-            List<ExerciseTeachersDTo> list = kmtExerciseSysService.findAllExerciseTeachersDto(month, pageable);
-            List<Map<String, Object>> mapList = new ArrayList<Map<String, Object>>();
-            for (ExerciseTeachersDTo exerciseTeachersDTo : list) {
-                String authority=exerciseTeachersDTo.getType();
-                String [] type=authority.split(",");
-                List<String> typeList=Arrays.asList(type);
-              StringBuilder str=new StringBuilder();
-                if(typeList.contains("1")){
-                    str.append("练习册加工 ");
-                }
-                if(typeList.contains("2")){
-                    str.append("练习册审核 ");
-                }
-                if(typeList.contains("3")){
-                    str.append("练习册解析 ");
-                }
-                if(typeList.contains("4")){
-                    str.append("练习册解审 ");
-                }
-                if(typeList.contains("5")){
-                    str.append("kmt加工 ");
-                }
-                if(typeList.contains("6")){
-                    str.append("kmt审核 ");
-                }
-                int sexing=exerciseTeachersDTo.getSex();
-                String sex=null;
-                if(1==sexing){
-                    sex="男";
-                }else if(2==sexing){
-                    sex="女";
-                }else {
-                    sex="无";
-                }
-                Map<String, Object> hashMap = new HashMap<>();
-                hashMap.put("name", exerciseTeachersDTo.getName());
-                hashMap.put("sex", sex);
-                hashMap.put("school", exerciseTeachersDTo.getSchool());
-                hashMap.put("major", exerciseTeachersDTo.getProfession());
-                hashMap.put("telephone", exerciseTeachersDTo.getTelephone());
-                hashMap.put("type", str);
-                hashMap.put("idNumber", exerciseTeachersDTo.getIdNumber());
-                hashMap.put("bankBranch", exerciseTeachersDTo.getBankBranch());
-                hashMap.put("cardHolder", exerciseTeachersDTo.getCardHolder());
-                hashMap.put("cardNumber", exerciseTeachersDTo.getCardNumber());
-                hashMap.put("regisTime", exerciseTeachersDTo.getRegisTime());
-                hashMap.put("bankName", exerciseTeachersDTo.getBankName());
-                mapList.add(hashMap);
-            }
-            List<ExcelColumn> myColumns3 = new ArrayList<ExcelColumn>();
-            myColumns3.add(new ExcelColumn("老师", "name", 20));
-            myColumns3.add(new ExcelColumn("性别", "sex", 20));
-            myColumns3.add(new ExcelColumn("学校", "school", 20));
-            myColumns3.add(new ExcelColumn("所读专业", "major", 20));
-            myColumns3.add(new ExcelColumn("联系方式", "telephone", 20));
-            myColumns3.add(new ExcelColumn("老师类型", "type", 20));
-            myColumns3.add(new ExcelColumn("身份证号", "idNumber", 20));
-            myColumns3.add(new ExcelColumn("银行卡号", "cardNumber", 20));
-            myColumns3.add(new ExcelColumn("开户行", "bankName", 20));
-            myColumns3.add(new ExcelColumn("开户支行", "bankBranch", 20));
-            myColumns3.add(new ExcelColumn("开户人姓名", "cardHolder", 20));
-            myColumns3.add(new ExcelColumn("注册时间", "regisTime", 20));
-            try {
-                CustomizeToExcel.downFile(myColumns3, mapList, os);
-            } catch (Exception e) {
-                logger.error("异常", e);
-            }
-        } catch (Exception e) {
-            logger.error("录题老师信息导出失败", e);
-
-        }
-
-    }
-
-}

Fichier diff supprimé car celui-ci est trop grand
+ 0 - 1003
ssj-aijia-api/src/main/java/com/ssj/aijia/kmt/sys/controller/KmtCorrectSysController.java


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 1528
ssj-aijia-api/src/main/java/com/ssj/aijia/kmt/sys/controller/KmtExerciseSysController.java


+ 0 - 130
ssj-aijia-api/src/main/java/com/ssj/aijia/load/data/es/LoadDataController.java

@@ -1,130 +0,0 @@
-package com.ssj.aijia.load.data.es;
-
-
-import com.alibaba.dubbo.config.annotation.Reference;
-import com.ssj.framework.core.common.controller.BaseController;
-import com.ssj.framework.core.security.manager.TokenManager;
-import com.ssj.framework.core.util.ResponseConstant;
-import com.ssj.framework.core.util.ResponseEntity;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
-
-@Api(value = "后台加载数据至ES", tags = "后台加载数据至ES")
-@RestController
-@RequestMapping("/api/load/data")
-public class LoadDataController extends BaseController {
-
-    private  final  static String beginDate ="2017-03-01";
-
-    private  final  static String endDate ="2020-04-01";
-
-    @Autowired
-    private TokenManager tokenManager;
-
-    @Reference(version = "1.0" ,timeout = 60000)
-    private com.ssj.service.load.data.LoadDataService loadDataService;
-
-
-    @ApiOperation(value = "学生往期反馈记录列表")
-    @RequestMapping(value = "feedbackHistory", method = RequestMethod.POST)
-    public ResponseEntity feedbackHistory(@RequestParam(name = "accessToken") String accessToken,
-                                          @RequestParam(required = false, defaultValue = "1000") int count ) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            responseEntity= loadDataService.loadfeedbackHistoryES(beginDate,endDate,
-                    "feedbackhistory","学生往期反馈记录列表",count);
-        } catch (Exception e) {
-            logger.error("查询学生往期反馈记录列表异常", e);
-            responseEntity.failure(ResponseConstant.CODE_000, "系统繁忙,请稍后重试");
-        }
-
-        return responseEntity;
-    }
-
-
-
-    @ApiOperation(value = "学习成长报告(周)v2")
-    @RequestMapping(value = "findweeklyreport", method = RequestMethod.POST)
-    public ResponseEntity findweeklyreport(@RequestParam(name = "accessToken") String accessToken,
-    @RequestParam(required = false, defaultValue = "1000") int count) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            responseEntity= loadDataService.findWeeklyReportBeginDateAndEndDateES(beginDate,endDate,
-                    "findweeklyreport","学习成长报告(周)v2",count);
-        } catch (Exception e) {
-            logger.error("学习成长报告(周)v2异常", e);
-            responseEntity.failure(ResponseConstant.CODE_000, "系统繁忙,请稍后重试");
-        }
-
-        return responseEntity;
-    }
-
-
-    @ApiOperation(value = "加载表scon_homework_count")
-    @RequestMapping(value = "scon_homework_count", method = RequestMethod.POST)
-    public ResponseEntity sconHomeworkCount(@RequestParam(name = "accessToken") String accessToken,
-                                            @RequestParam(required = false, defaultValue = "1000") int count) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            responseEntity= loadDataService.sconHomeworkCount(beginDate,endDate,
-                    "scon_homework_count","加载表scon_homework_count",count);
-        } catch (Exception e) {
-            logger.error("加载表scon_homework_count异常", e);
-            responseEntity.failure(ResponseConstant.CODE_000, "系统繁忙,请稍后重试");
-        }
-
-        return responseEntity;
-    }
-
-    @ApiOperation(value = "周报历史记录")
-    @RequestMapping(value = "esWeeklyReportHistory", method = RequestMethod.POST)
-    public ResponseEntity esWeeklyReportHistory(@RequestParam(name = "accessToken") String accessToken,
-                                            @RequestParam(required = false, defaultValue = "1000") int count) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            responseEntity= loadDataService.loadWeeklyReportHisToES(beginDate,endDate,
-                    "weeklyreporthistory","周报历史记录",count);
-        } catch (Exception e) {
-            logger.error("加载周报历史记录异常", e);
-            responseEntity.failure(ResponseConstant.CODE_000, "系统繁忙,请稍后重试");
-        }
-
-        return responseEntity;
-    }
-
-    @ApiOperation(value = "月报历史记录")
-    @RequestMapping(value = "esMonthlyReportHistory", method = RequestMethod.POST)
-    public ResponseEntity esMonthlyReportHistory(@RequestParam(name = "accessToken") String accessToken,
-                                                @RequestParam(required = false, defaultValue = "1000") int count) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            responseEntity= loadDataService.loadMonthlyReportHistoryToES(beginDate,endDate,
-                    "monthlyreporthistory","月报历史记录",count);
-        } catch (Exception e) {
-            logger.error("加载月报历史记录异常", e);
-            responseEntity.failure(ResponseConstant.CODE_000, "系统繁忙,请稍后重试");
-        }
-
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/esLearningSituationAbstract", method = RequestMethod.POST)
-    @ApiOperation(value = "学情整体情况", httpMethod = "POST", notes = "学情整体情况")
-    public ResponseEntity esLearningSituationAbstract(@RequestParam(name = "accessToken") String accessToken, @RequestParam(required = false, defaultValue = "1000") int count) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            responseEntity= loadDataService.loadLearningSituationAbstractToES(beginDate,endDate,
-                    "learningsituationabstract","学情整体情况",count);
-        } catch (Exception e) {
-            logger.error("加载学情整体情况异常", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-}

+ 0 - 327
ssj-aijia-api/src/main/java/com/ssj/aijia/openapi/controller/AiDataController.java

@@ -1,327 +0,0 @@
-package com.ssj.aijia.openapi.controller;
-
-
-import com.alibaba.dubbo.config.annotation.Reference;
-import com.ssj.aijia.task.SyncAiDataTask;
-import com.ssj.aijia.task.SyncAiExamDataTask;
-import com.ssj.bean.common.files.domain.FileInfo;
-import com.ssj.bean.kmt.kmt.domain.KmtQuestionTemp;
-import com.ssj.framework.basic.utils.DateHelper;
-import com.ssj.framework.core.security.annotation.IgnoreSecurity;
-import com.ssj.framework.core.util.ResponseConstant;
-import com.ssj.framework.core.util.ResponseEntity;
-import com.ssj.framework.files.service.FileInfoService;
-import com.ssj.service.ai.model.AiVipIdsModel;
-import com.ssj.service.kmt.service.KmtQuestionService;
-import com.ssj.service.kmt.service.KmtQuestionTempService;
-import com.ssj.service.sys.homework.service.HomeworkPictureService;
-import com.ssj.sys.util.thirdparty.excel.CustomizeToExcel;
-import com.ssj.sys.util.thirdparty.excel.ExcelColumn;
-import com.ssj.taskthread.ThreadPool;
-import org.apache.commons.lang3.StringUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Controller;
-import org.springframework.ui.Model;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.ResponseBody;
-import org.springframework.web.multipart.MultipartFile;
-import org.springframework.web.multipart.MultipartHttpServletRequest;
-import springfox.documentation.annotations.ApiIgnore;
-
-import javax.servlet.ServletOutputStream;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.io.IOException;
-import java.util.*;
-
-
-
-/** 
- * @author  wuwen 
- * @version 2018年9月20日15:12:08
- * 类说明 Ai数据
- */
-@ApiIgnore
-@Controller
-@RequestMapping("/api/ai")
-public class AiDataController {
-	
-	private static Logger logger = LoggerFactory.getLogger(AiDataController.class);
-
-	@Autowired
-	private FileInfoService fileInfoService;
-
-	@Reference(version = "1.0" ,timeout = 60000)
-	private KmtQuestionService kmtQuestionService;
-
-	@Reference(version = "1.0" ,timeout = 60000)
-	private KmtQuestionTempService kmtQuestionTempService;
-
-	@Reference(version = "1.0" ,timeout = 60000)
-	private HomeworkPictureService homeworkPictureService;
-	
-
-	
-	/*
-	 * 试卷识别的题目上传
-	 */
-	@IgnoreSecurity
-    @RequestMapping(value="/examImport",method=RequestMethod.POST)
-	@ResponseBody
-	public ResponseEntity examImport(Model model, HttpServletRequest request, HttpServletResponse response, String fileName)throws Exception {
-		ResponseEntity responseEntity = new ResponseEntity();
-    	MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
-    	Map<String, MultipartFile> fileList = multipartRequest.getFileMap();
-    	if (fileList !=null && fileList.size() > 0) {
-            //文件信息入库
-            List<FileInfo> fileInfos = fileInfoService.uploadFilePicture("AI-Import-Exam",fileList);
-            if (fileList.size() == fileInfos.size()) {
-                responseEntity.success(fileName+":AI试卷文件上传成功 时间:"+ DateHelper.format(new Date(), "yyyy-MM-dd HH:mm:ss SSS"));
-                logger.info(fileName+":AI试卷文件上传成功 时间:"+DateHelper.format(new Date(), "yyyy-MM-dd HH:mm:ss SSS"));
-                
-            	//开始处理数据
-				ThreadPool.getInstance().addTask(new SyncAiExamDataTask(fileInfos,fileName));
-                
-            } else {
-                responseEntity.failure(ResponseConstant.CODE_000, "上传失败");
-                logger.error(fileName+":AI试卷上传失败...,保存fileInfos异常");
-            }
-        } else {
-            responseEntity.failure(ResponseConstant.CODE_000, "上传失败");
-            logger.error(fileName+":AI试卷上传失败...,无文件数据");
-        }
-        return responseEntity;
-	}
-  
-	
-	/*
-	 * 生成的题目上传
-	 */
-	@IgnoreSecurity
-    @RequestMapping(value="/import",method=RequestMethod.POST)
-	@ResponseBody
-	public ResponseEntity aiDataImport(Model model,HttpServletRequest request, HttpServletResponse response,String fileName)throws Exception {
-		ResponseEntity responseEntity = new ResponseEntity();
-    	MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
-    	Map<String, MultipartFile> fileList = multipartRequest.getFileMap();
-        if (fileList !=null && fileList.size() > 0) {
-            //文件信息入库
-            List<FileInfo> fileInfos = fileInfoService.uploadFilePicture("AI-Import",fileList);
-            if (fileList.size() == fileInfos.size()) {
-                responseEntity.success(fileName+":AI文件上传成功 时间:"+DateHelper.format(new Date(), "yyyy-MM-dd HH:mm:ss SSS"));
-                logger.info(fileName+":AI文件上传成功 时间:"+DateHelper.format(new Date(), "yyyy-MM-dd HH:mm:ss SSS"));
-                
-            	//开始处理数据
-				ThreadPool.getInstance().addTask(new SyncAiDataTask(fileInfos,fileName));
-                
-            } else {
-                responseEntity.failure(ResponseConstant.CODE_000, "上传失败");
-                logger.error(fileName+":AI上传失败...,保存fileInfos异常");
-            }
-        } else {
-            responseEntity.failure(ResponseConstant.CODE_000, "上传失败");
-            logger.error(fileName+":AI上传失败...,无文件数据");
-        }
-        return responseEntity;
-	}
-
-    
-    
-	/*
-	 * 状态为8的题目导出
-	 */
-    @IgnoreSecurity
-    @RequestMapping(value="/export")
-	@ResponseBody
-	public void aiDataExport(Model model,HttpServletRequest request, HttpServletResponse response)throws Exception {
-    	ServletOutputStream os = null;
-     	try {  
-     		os = response.getOutputStream(); //获得输出流  
-     		response.reset();   //清空输出流  
-     		String fileName = new String("AI_Question_NotPass".getBytes("gb2312"), "ISO8859-1") +".xlsx";  
-     		response.setHeader("Content-disposition", "attachment; filename="+ fileName); //设定输出文件头  
-     		response.setContentType("application/vnd.ms-excel;charset=UTF-8");
-     		response.setCharacterEncoding("utf-8");
-     		List<Map<String, Object>> list = kmtQuestionService.findAIExport(8);
-     		List<ExcelColumn> myColumns3 = new ArrayList<ExcelColumn>();
-     		
-     		myColumns3.add(new ExcelColumn("科目", "course_name", 20));
-     		myColumns3.add(new ExcelColumn("单元id", "how_id", 20));
-     		myColumns3.add(new ExcelColumn("知识点id", "how_details_id", 20));
-     		myColumns3.add(new ExcelColumn("考点id", "how_details_kd_id", 20));
-     		myColumns3.add(new ExcelColumn("题目", "question", 20));
-     		myColumns3.add(new ExcelColumn("选项内容", "option_content", 20));
-     		myColumns3.add(new ExcelColumn("正确答案", "option_answer", 20));
-     		myColumns3.add(new ExcelColumn("题型", "option_type", 20));
-     		myColumns3.add(new ExcelColumn("难度级别", "easy", 20));
-     		myColumns3.add(new ExcelColumn("技能", "skill", 20));
-     		myColumns3.add(new ExcelColumn("题目ID", "id", 20));
-     		myColumns3.add(new ExcelColumn("标注", "remarks", 20));
-     		myColumns3.add(new ExcelColumn("来源", "source", 20));
-     		myColumns3.add(new ExcelColumn("标注", "tags", 20));
-     		myColumns3.add(new ExcelColumn("parentId", "parent_id", 20));
-     		
-     		
-     		CustomizeToExcel.downFile(myColumns3, list, os);
-     	}catch (IOException e) {
-			logger.error("异常", e);
-     	}catch (Exception e1){
-			logger.error("异常", e1);
-     	}finally{
-     		if(os != null){
-     			try {
-     				os.flush();
-     				os.close(); 
-     			} catch (IOException e) {
-					logger.error("异常", e);
-     			}  
-     		}
-     		
-     	}
-	}
-    
-    @IgnoreSecurity
-    @RequestMapping(value="/examExport")
-	@ResponseBody
-	public void examExport(Model model,HttpServletRequest request, HttpServletResponse response)throws Exception {
-    	ServletOutputStream os = null;
-     	try {  
-     		os = response.getOutputStream(); //获得输出流  
-     		response.reset();   //清空输出流  
-     		String fileName = new String("AI_Exam_NotPass".getBytes("gb2312"), "UTF-8") +".xlsx";  
-     		response.setHeader("Content-disposition", "attachment; filename="+ fileName); //设定输出文件头  
-     		response.setContentType("application/vnd.ms-excel;charset=UTF-8");
-     		response.setCharacterEncoding("utf-8");
-     		List<KmtQuestionTemp> list = kmtQuestionTempService.findQuByStateList(3);
-     		List<Map<String,Object>> mapList=new ArrayList<Map<String,Object>>();
-     		for (KmtQuestionTemp kmtQuestionTemp : list) {
-     			Map<String,Object> map=new HashMap<String, Object>();
-     			map.put("course_name", kmtQuestionTemp.getCourseName());
-     			map.put("question", kmtQuestionTemp.getQuestion());
-     			map.put("option_content", kmtQuestionTemp.getOptionContent());
-     			map.put("degree", kmtQuestionTemp.getDegree());
-     			map.put("explain_text", kmtQuestionTemp.getExplainText());
-     			map.put("source", kmtQuestionTemp.getSource());
-     			map.put("id", kmtQuestionTemp.getId());
-     			map.put("suggest", kmtQuestionTemp.getSuggest());
-     			mapList.add(map);
-			}
-     		List<ExcelColumn> myColumns3 = new ArrayList<ExcelColumn>();
-     		myColumns3.add(new ExcelColumn("科目", "course_name", 20));
-     		myColumns3.add(new ExcelColumn("题目", "question", 20));
-     		myColumns3.add(new ExcelColumn("选项内容", "option_content", 20));
-     		myColumns3.add(new ExcelColumn("识别度", "degree", 20));
-     		myColumns3.add(new ExcelColumn("来源", "source", 20));
-     		myColumns3.add(new ExcelColumn("原图", "explain_text", 20));
-     		myColumns3.add(new ExcelColumn("题目ID", "id", 20));
-     		myColumns3.add(new ExcelColumn("备注", "suggest", 20));
-     		CustomizeToExcel.downFile(myColumns3, mapList, os);
-     	}catch (IOException e) {
-			logger.error("异常", e);
-     	}catch (Exception e1){
-			logger.error("异常", e1);
-     	}finally{
-     		if(os != null){
-     			try {
-     				os.flush();
-     				os.close(); 
-     			} catch (IOException e) {
-					logger.error("异常", e);
-     			}  
-     		}
-     		
-     	}
-	}
-    
-    
-    
-    
-    /**
-     * 得到vipId的作业图片
-     * @param vipIds   ---vipId,多个用;号分隔,如:121213213;3244354
-     * @param date     ---时间,如:2018-11-15
-     * 
-     *
-     * @return
-     */
-	@IgnoreSecurity
-    @RequestMapping(value="/findVips",method=RequestMethod.POST)
-	@ResponseBody
-	public ResponseEntity findVips(Model model,HttpServletRequest request, HttpServletResponse response,
-			String vipIds,String date)throws Exception {
-		ResponseEntity responseEntity = new ResponseEntity();
-		Map<String,List<AiVipIdsModel>> data=new HashMap<String, List<AiVipIdsModel>>();
-		if(StringUtils.isEmpty(vipIds) || StringUtils.isEmpty(date)){
-			 responseEntity.failure(ResponseConstant.CODE_000, "( vipIds / date )参数都不能为空");
-		}else{
-			List<AiVipIdsModel> aiVipIdsModels= homeworkPictureService.findHomeworkPictureByVipIds(vipIds.split(";"), date);
-			for (AiVipIdsModel aiVipIdsModel : aiVipIdsModels) {
-				if(data.containsKey(aiVipIdsModel.getVipId())){
-					data.get(aiVipIdsModel.getVipId()).add(aiVipIdsModel);
-				}else{
-					List<AiVipIdsModel> tmps=new ArrayList<AiVipIdsModel>();
-					tmps.add(aiVipIdsModel);
-					data.put(aiVipIdsModel.getVipId(),tmps);
-				}
-			}
-			responseEntity.success(data, "查询成功");
-		}
-        return responseEntity;
-	}
-
-    
-
-	 /**
-     * 小程序拍照识别作业图片
-     * @param    ---vipId,多个用;号分隔,如:121213213;3244354
-     * @param date     ---时间,如:2018-11-15
-     * 
-     *
-     * @return
-     */
-	@IgnoreSecurity
-    @RequestMapping(value="/workImgs",method=RequestMethod.POST)
-	@ResponseBody
-	public ResponseEntity workImgs(Model model,HttpServletRequest request, HttpServletResponse response,String date)throws Exception {
-		ResponseEntity responseEntity = new ResponseEntity();
-		if(StringUtils.isEmpty(date)){
-			 responseEntity.failure(ResponseConstant.CODE_000, "(  date )参数都不能为空");
-		}else{
-			List<AiVipIdsModel> aiVipIdsModels=new ArrayList<AiVipIdsModel>();
-			List<FileInfo> fileInfos= fileInfoService.findFileInfoByDate(date);
-			for (FileInfo fileInfo : fileInfos) {
-				AiVipIdsModel aiVipIdsModel=new AiVipIdsModel();
-				aiVipIdsModel.setCourseName("");
-				aiVipIdsModel.setCreateTime(fileInfo.getCreatedDate());
-				aiVipIdsModel.setFileUrl(fileInfo.getFileThumPath());
-				aiVipIdsModel.setImgId(fileInfo.getId());
-				aiVipIdsModel.setVipId(fileInfo.getUserId());
-				aiVipIdsModels.add(aiVipIdsModel);
-			}
-			responseEntity.success(aiVipIdsModels, "查询成功");
-		}
-        return responseEntity;
-	}
-	
-
-	
-	
-
-	
-	
-	
-
-
-    
-
-	
-	
-    
-    
-	
-	
-
-}

+ 0 - 73
ssj-aijia-api/src/main/java/com/ssj/aijia/openapi/controller/EsDataController.java

@@ -1,73 +0,0 @@
-package com.ssj.aijia.openapi.controller;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.apache.commons.lang3.StringUtils;
-import org.springframework.stereotype.Controller;
-import org.springframework.ui.Model;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.ResponseBody;
-
-import com.alibaba.dubbo.config.annotation.Reference;
-import com.ssj.bean.kmt.kmt.domain.KmtExerciseQuestion;
-import com.ssj.framework.core.security.annotation.IgnoreSecurity;
-import com.ssj.framework.core.util.ResponseConstant;
-import com.ssj.framework.core.util.ResponseEntity;
-import com.ssj.service.kmt.service.KmtExerciseQuestionService;
-
-import springfox.documentation.annotations.ApiIgnore;
-
-@ApiIgnore
-@Controller
-@RequestMapping("/api/es")
-public class EsDataController {
-	
-	@Reference(version = "1.0" ,timeout = 60000)
-	private KmtExerciseQuestionService kmtExerciseQuestionService;
-
-	/*
-	 * python新增的练习册题目回调同步到ES中
-	 * 参数:ids  id列表,用;号相隔
-	 * 
-	 */
-	@IgnoreSecurity
-    @RequestMapping(value="/save")
-	@ResponseBody
-	public ResponseEntity aiDataImport(Model model,HttpServletRequest request, HttpServletResponse response,String ids)throws Exception {
-		ResponseEntity responseEntity = new ResponseEntity();
-        if (StringUtils.isNotEmpty(ids)) {
-        	String[] ids_=ids.split(";");
-        	KmtExerciseQuestion kmtExerciseQuestion=null;
-        	for (String id : ids_) {
-        		try {
-	        		kmtExerciseQuestion=kmtExerciseQuestionService.getById(id);
-	        		if(kmtExerciseQuestion!=null) {
-	        			kmtExerciseQuestionService.saveToEs(kmtExerciseQuestion);
-	        		}
-        		} catch (Exception e) {
-        			e.printStackTrace();
-				}
-			}
-			responseEntity.success(ResponseConstant.CODE_999, "成功");
-		} else {
-            responseEntity.failure(ResponseConstant.CODE_000, "ids不能为空,失败");
-        }
-        return responseEntity;
-	}
-
-
-	/*
-	 * 全量练习册题目同步到ES中
-	 */
-	@IgnoreSecurity
-    @RequestMapping(value="/refreshAll")
-	@ResponseBody
-	public ResponseEntity refreshAll(Model model,HttpServletRequest request, HttpServletResponse response,String date)throws Exception {
-		ResponseEntity responseEntity = new ResponseEntity();
-	    kmtExerciseQuestionService.refreshAllToEs(date);
-        return responseEntity;
-	}
-	
-
-}

+ 0 - 256
ssj-aijia-api/src/main/java/com/ssj/aijia/opentest/OpenTestController.java

@@ -1,256 +0,0 @@
-package com.ssj.aijia.opentest;
-
-import com.alibaba.dubbo.config.annotation.Reference;
-import com.ssj.framework.core.common.controller.BaseController;
-import com.ssj.framework.core.security.annotation.ModifySecurity;
-import com.ssj.framework.core.security.manager.TokenManager;
-import com.ssj.framework.core.util.ResponseConstant;
-import com.ssj.framework.core.util.ResponseEntity;
-import com.ssj.service.conch.opentest.OpenTestService;
-import com.ssj.service.conch.opentest.dto.ConditionDto;
-import com.ssj.service.conch.opentest.request.*;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
-
-import java.util.*;
-
-/**
- * 小塾测评的接口
- *
- * @author Mount Liu
- * @date 2020/2/11
- */
-@Api(value = "小塾测评的接口", tags = "小塾测评的接口")
-@RestController
-@RequestMapping("/api/xiaoshuTest")
-public class OpenTestController extends BaseController {
-    @Reference(version = "1.0", timeout = 60000)
-    private OpenTestService openTestService;
-
-    @Autowired
-    private TokenManager tokenManager;
-
-    @ModifySecurity
-    @RequestMapping(value = "/saveInfo", method = RequestMethod.POST)
-    @ApiOperation(value = "完善资料页", httpMethod = "POST", notes = "完善资料页")
-    public ResponseEntity saveInfo(@RequestParam(name = "accessToken") String accessToken, @RequestBody SaveInfoReq req) {
-        ResponseEntity responseEntity;
-        try {
-            String userId = tokenManager.getUserId(accessToken);
-            responseEntity = openTestService.saveInfo(req, userId);
-        } catch (Exception e) {
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "服务器发生异常,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/getMyInfo", method = RequestMethod.POST)
-    @ApiOperation(value = "获取我的信息", httpMethod = "POST", notes = "获取我的信息")
-    public ResponseEntity getMyInfo(@RequestParam(name = "accessToken") String accessToken) {
-        ResponseEntity responseEntity;
-        try {
-            String userId = tokenManager.getUserId(accessToken);
-            responseEntity = openTestService.getMyInfo(userId);
-        } catch (Exception e) {
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "服务器发生异常,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/getQuestion", method = RequestMethod.POST)
-    @ApiOperation(value = "筛选试卷", httpMethod = "POST", notes = "筛选试卷")
-    public ResponseEntity getQuestion(@RequestParam(name = "accessToken") String accessToken, @RequestBody GetQuestionReq req) {
-        ResponseEntity responseEntity;
-        try {
-            String userId = tokenManager.getUserId(accessToken);
-            responseEntity = openTestService.getQuestion(req, userId);
-        } catch (Exception e) {
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "服务器发生异常,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/getQuestionV1", method = RequestMethod.POST)
-    @ApiOperation(value = "筛选试卷", httpMethod = "POST", notes = "筛选试卷")
-    public ResponseEntity getQuestionV1(@RequestParam(name = "accessToken") String accessToken, @RequestBody GetQuestionV1Req req) {
-        ResponseEntity responseEntity;
-        try {
-            String userId = tokenManager.getUserId(accessToken);
-            responseEntity = openTestService.getQuestionV1(req, userId);
-        } catch (Exception e) {
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "服务器发生异常,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/getTestList", method = RequestMethod.POST)
-    @ApiOperation(value = "筛选试卷", httpMethod = "POST", notes = "筛选试卷")
-    public ResponseEntity getTestList(@RequestParam(name = "accessToken") String accessToken) {
-        ResponseEntity responseEntity;
-        try {
-            String userId = tokenManager.getUserId(accessToken);
-            responseEntity = openTestService.getTestList(userId);
-        } catch (Exception e) {
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "服务器发生异常,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/getTestListV1", method = RequestMethod.POST)
-    @ApiOperation(value = "筛选试卷", httpMethod = "POST", notes = "筛选试卷")
-    public ResponseEntity getTestListV1(@RequestParam(name = "accessToken") String accessToken, @RequestBody GetTestListReq req) {
-        ResponseEntity responseEntity;
-        try {
-            String userId = tokenManager.getUserId(accessToken);
-            responseEntity = openTestService.getTestListV1(userId, req.getType());
-        } catch (Exception e) {
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "服务器发生异常,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/getResult", method = RequestMethod.POST)
-    @ApiOperation(value = "查看答题结果", httpMethod = "POST", notes = "查看答题结果")
-    public ResponseEntity getResult(@RequestParam(name = "accessToken") String accessToken, @RequestBody GetResultReq req) {
-        ResponseEntity responseEntity;
-        try {
-            responseEntity = openTestService.getResult(req);
-        } catch (Exception e) {
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "服务器发生异常,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/getResultV1", method = RequestMethod.POST)
-    @ApiOperation(value = "查看答题结果", httpMethod = "POST", notes = "查看答题结果")
-    public ResponseEntity getResultV1(@RequestParam(name = "accessToken") String accessToken, @RequestBody GetResultReq req) {
-        ResponseEntity responseEntity;
-        try {
-            responseEntity = openTestService.getResultV1(req);
-        } catch (Exception e) {
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "服务器发生异常,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @ModifySecurity
-    @RequestMapping(value = "/saveResult", method = RequestMethod.POST)
-    @ApiOperation(value = "提交答题结果", httpMethod = "POST", notes = "提交答题结果")
-    public ResponseEntity saveResult(@RequestParam(name = "accessToken") String accessToken, @RequestBody SaveResultReq req) {
-        ResponseEntity responseEntity;
-        try {
-            String userId = tokenManager.getUserId(accessToken);
-            responseEntity = openTestService.saveResult(req, userId);
-        } catch (Exception e) {
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "服务器发生异常,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @ModifySecurity
-    @RequestMapping(value = "/saveResultV1", method = RequestMethod.POST)
-    @ApiOperation(value = "提交答题结果", httpMethod = "POST", notes = "提交答题结果")
-    public ResponseEntity saveResultV1(@RequestParam(name = "accessToken") String accessToken, @RequestBody SaveResultV1Req req) {
-        ResponseEntity responseEntity;
-        try {
-            String userId = tokenManager.getUserId(accessToken);
-            responseEntity = openTestService.saveResultV1(req, userId);
-        } catch (Exception e) {
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "服务器发生异常,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/getReport", method = RequestMethod.POST)
-    @ApiOperation(value = "查看诊断报告", httpMethod = "POST", notes = "查看诊断报告")
-    public ResponseEntity getReport(@RequestParam(name = "accessToken") String accessToken, @RequestBody GetResultReq req) {
-        ResponseEntity responseEntity;
-        try {
-            responseEntity = openTestService.getReport(req);
-        } catch (Exception e) {
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "服务器发生异常,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/getRankingList", method = RequestMethod.POST)
-    @ApiOperation(value = "查看排行榜", httpMethod = "POST", notes = "查看排行榜")
-    public ResponseEntity getRankingList(@RequestParam(name = "accessToken") String accessToken, @RequestBody GetResultReq req) {
-        ResponseEntity responseEntity;
-        try {
-            String userId = tokenManager.getUserId(accessToken);
-            responseEntity = openTestService.getRankingList(req, userId);
-        } catch (Exception e) {
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "服务器发生异常,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/getConditionInfo", method = RequestMethod.POST)
-    @ApiOperation(value = "获取年级科目版本信息", httpMethod = "POST", notes = "获取年级科目版本信息")
-    public ResponseEntity getConditionInfo(@RequestParam(name = "accessToken") String accessToken) {
-        ResponseEntity responseEntity;
-        try {
-            responseEntity = openTestService.getConditionInfo();
-        } catch (Exception e) {
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "服务器发生异常,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/getConditionInfoV1", method = RequestMethod.POST)
-    @ApiOperation(value = "获取年级科目版本信息", httpMethod = "POST", notes = "获取年级科目版本信息")
-    public ResponseEntity getConditionInfoV1(@RequestParam(name = "accessToken") String accessToken) {
-        ResponseEntity responseEntity;
-        try {
-            responseEntity = openTestService.getConditionInfoV1();
-        } catch (Exception e) {
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "服务器发生异常,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @ModifySecurity
-    @RequestMapping(value = "/deleteResult", method = RequestMethod.POST)
-    @ApiOperation(value = "重新测评", httpMethod = "POST", notes = "重新测评")
-    public ResponseEntity deleteResult(@RequestParam(name = "accessToken") String accessToken, @RequestBody GetResultReq req) {
-        ResponseEntity responseEntity;
-        try {
-            responseEntity = openTestService.deleteResult(req.getResultId());
-        } catch (Exception e) {
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "服务器发生异常,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @ModifySecurity
-    @RequestMapping(value = "/setConditionInfo", method = RequestMethod.POST)
-    @ApiOperation(value = "设置年级科目版本信息", httpMethod = "POST", notes = "设置年级科目版本信息")
-    public ResponseEntity getConditionInfo(@RequestParam(name = "accessToken") String accessToken, @RequestParam(name = "value") String value) {
-        ResponseEntity responseEntity;
-        try {
-            responseEntity = openTestService.setConditionInfo(value);
-        } catch (Exception e) {
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "服务器发生异常,请稍后重试");
-        }
-        return responseEntity;
-    }
-}

+ 0 - 141
ssj-aijia-api/src/main/java/com/ssj/aijia/opentest/RecordQuestionSysController.java

@@ -1,141 +0,0 @@
-package com.ssj.aijia.opentest;
-
-import com.alibaba.dubbo.config.annotation.Reference;
-import com.ssj.framework.core.common.controller.BaseController;
-import com.ssj.framework.core.security.annotation.IgnoreSecurity;
-import com.ssj.framework.core.security.annotation.ModifySecurity;
-import com.ssj.framework.core.security.manager.TokenManager;
-import com.ssj.framework.core.util.ResponseConstant;
-import com.ssj.framework.core.util.ResponseEntity;
-import com.ssj.service.conch.opentest.RecordQuestionService;
-import com.ssj.service.conch.opentest.request.*;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
-
-import javax.validation.Valid;
-
-/**
- * @author yanghuan
- * @title: UnitTestController
- * @projectName ssj
- * @description: TODO
- * @date 2020/5/15 9:41
- */
-@Api(value = "单元测评的接口",tags="单元测评的接口")
-@RestController
-@RequestMapping("/api/recordQuestionSys")
-public class RecordQuestionSysController extends BaseController {
-
-    @Reference(version = "1.0", timeout = 60000)
-    private RecordQuestionService recordQuestionService;
-
-    @Autowired
-    private TokenManager tokenManager;
-
-    @RequestMapping(value = "login", method = RequestMethod.POST)
-    @ApiOperation(value = "录题登录", httpMethod = "POST", notes = "录题登录")
-    @IgnoreSecurity
-    public ResponseEntity login(@RequestBody @Valid LoginReq req) {
-
-        ResponseEntity responseEntity;
-        try {
-            responseEntity = recordQuestionService.login(req);
-        } catch (Exception e) {
-            logger.error("req={}", req);
-            logger.error("录题登录异常", e);
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @ModifySecurity
-    @RequestMapping(value = "/addOrEditQuestion",method = RequestMethod.POST)
-    @ApiOperation(value = "添加或修改题目",httpMethod = "POST",notes = "添加或修改题目")
-    public ResponseEntity addOrEditQuestion(@RequestParam(name="accessToken") String accessToken, @RequestBody QuestionReuqest questionReuqest){
-        ResponseEntity responseEntity;
-        try {
-            responseEntity = recordQuestionService.addOrEditQuestion(questionReuqest);
-        } catch (Exception e) {
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @ModifySecurity
-    @RequestMapping(value = "deleteQuestion", method = RequestMethod.POST)
-    @ApiOperation(value = "删除题目", httpMethod = "POST", notes = "删除题目")
-    public ResponseEntity deleteQuestion(@RequestParam(name = "accessToken") String accessToken,
-                                         @RequestBody @Valid DeleteReq req) {
-
-        ResponseEntity responseEntity;
-        try {
-            responseEntity = recordQuestionService.deleteQuestion(req);
-        } catch (Exception e) {
-            logger.error("req={}", req);
-            logger.error("删除题目异常", e);
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-
-    @RequestMapping(value = "/findQuestionList",method = RequestMethod.POST)
-    @ApiOperation(value = "查询题目",httpMethod = "POST",notes = "查询题目")
-    public ResponseEntity findQuestionList(@RequestParam(name="accessToken") String accessToken, @RequestBody QuestionUnitRequest request){
-        ResponseEntity responseEntity;
-        try {
-            responseEntity = recordQuestionService.findQuestionList( request);
-        } catch (Exception e) {
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/getConditionInfo", method = RequestMethod.POST)
-    @ApiOperation(value = "获取题目筛选条件", httpMethod = "POST", notes = "获取题目筛选条件")
-    public ResponseEntity getConditionInfo(@RequestParam(name = "accessToken") String accessToken) {
-        ResponseEntity responseEntity;
-        try {
-            responseEntity = recordQuestionService.getConditionInfo(true, 1);
-        } catch (Exception e) {
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统异常,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/getKnowledge", method = RequestMethod.POST)
-    @ApiOperation(value = "获取知识点", httpMethod = "POST", notes = "获取知识点")
-    public ResponseEntity getKnowledge(@RequestParam(name = "accessToken") String accessToken, @RequestBody GetKnowledgeReq req) {
-        ResponseEntity responseEntity;
-        try {
-            responseEntity = recordQuestionService.getKnowledge(req);
-        } catch (Exception e) {
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统异常,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @ModifySecurity
-    @RequestMapping(value = "/publishQuestion", method = RequestMethod.POST)
-    @ApiOperation(value = "发布题目", httpMethod = "POST", notes = "发布题目")
-    public ResponseEntity publishQuestion(@RequestParam(name = "accessToken") String accessToken, @RequestBody PublishReq req) {
-        ResponseEntity responseEntity;
-        try {
-            responseEntity = recordQuestionService.publishQuestion(req);
-        } catch (Exception e) {
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统异常,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-
-}

+ 0 - 236
ssj-aijia-api/src/main/java/com/ssj/aijia/parents/controller/CourseController.java

@@ -1,236 +0,0 @@
-package com.ssj.aijia.parents.controller;
-
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.apache.commons.lang3.StringUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
-
-import com.alibaba.dubbo.config.annotation.Reference;
-import com.ssj.bean.weixin.libmy.domain.LibVip;
-import com.ssj.bean.weixin.zyb.domain.ZuoybKnowHow;
-import com.ssj.bean.weixin.zyb.domain.ZuoybKnowHowDetails;
-import com.ssj.bean.weixin.zyb.domain.ZuoybStudentWorkHow;
-import com.ssj.framework.core.util.ResponseEntity;
-import com.ssj.service.conch.parents.request.CourseHowReq;
-import com.ssj.service.weixin.library.service.ILibVipService;
-import com.ssj.service.weixin.zuoyb.service.ZuoybKnowHowService;
-import com.ssj.service.weixin.zuoyb.vo.ZuoybKnowHowDetailsModel;
-
-
-/** 
- * @author  wuwen 
- * @version 2018年4月28日16:03:24
- * 类说明   
- */
-@Api(value = "家长端相关的接口", tags = "学科相关的接口")
-@RestController
-@RequestMapping("/api/parents/course")
-public class CourseController {
-	
-	@Reference(version = "1.0" ,timeout = 60000)
-	private ILibVipService vipService;
-	
-	@Reference(version = "1.0" ,timeout = 60000)
-	 private  ZuoybKnowHowService   zuoybKnowHowService;
-	 
-
-	@ApiOperation(value = "家长端的接口 kmt --1.1 ", httpMethod = "POST")  
-    @RequestMapping(value = "/vip/tags", method = RequestMethod.POST)
-    public ResponseEntity vipTags(@RequestParam(name = "accessToken") String accessToken,
-    		@RequestBody CourseHowReq req) throws Exception {
-        ResponseEntity responseEntity = new ResponseEntity();
-        Map<String, Object> data = new HashMap<String, Object>();
-        List<String> tags=new ArrayList<String>();
-        try {
-        	LibVip kmtStudent=vipService.getById(req.getVipId());
-    		if(kmtStudent!=null){
-	    		String character=kmtStudent.getTagsCharacter();
-	    		String habit=kmtStudent.getTagsHabit();
-	    		
-	    		String[] characters=character.split(";");
-	    		for (String tag : characters) {
-	    			tags.add(tag);
-				}
-	    		String[] habits=habit.split(";");
-	    		for (String tag : habits) {
-	    			tags.add(tag);
-				}
-    		}
-        	data.put("tags", tags);
-        	responseEntity.success(data,"查询成功");
-        } catch (Exception e) {
-        	e.printStackTrace();
-       	 	responseEntity.failure("查询失败");
-		}
-        return responseEntity;
-    }
-	
-	
-
-	
-	@ApiOperation(value = "按照总模块-分知识点/(已掌握/已选知识点总数) ", httpMethod = "POST")  
-    @RequestMapping(value = "/how/master", method = RequestMethod.POST)
-    public ResponseEntity howMaster(@RequestParam(name = "accessToken") String accessToken,
-    		@RequestBody CourseHowReq req) throws Exception {
-        ResponseEntity responseEntity = new ResponseEntity();
-        Map<String, Object> data = new HashMap<String, Object>();
-        try {
-        	 LibVip vip=vipService.getById(req.getVipId());
-        	 String banben=vip.getBanben()!=null ? vip.getBanben().toString():"1";//版本
-    	     String grade = vip.getGrade()!=null?vip.getGrade():"二年级";//年级
-        	 
-    	     // 根据图书馆和会员的年级和科目查询知识点
-    	 	List<ZuoybKnowHow>  konwHowList= zuoybKnowHowService.
-    	 			findByCourseNameByGrade("SSJ", req.getCourseName(), grade,banben,new ArrayList<ZuoybStudentWorkHow>());
-    	 	
-    	 	List<Map<String, Object>> masterMapList=zuoybKnowHowService.findMasterByVip(req.getVipId());
-    	    List<String> masterList=new ArrayList<String>();//已掌握的知识点
-    	    for (Map<String, Object> map : masterMapList) {
-    	    	masterList.add(map.toString());
-			}
-    	    
-    	    
-    	   Set<String> layer=new HashSet<String>();//一层      
-    	    for (ZuoybKnowHow zuoybKnowHow : konwHowList) {
-    	    	List<ZuoybKnowHowDetails> tmp1=zuoybKnowHow.getHowDetailsList();
-    	    	for (ZuoybKnowHowDetails zuoybKnowHowDetails : tmp1) {
-    	    		layer.add(zuoybKnowHowDetails.getModule());
-				}
-    	    }
-    	    
-    	    Map<String,List<ZuoybKnowHowDetails>> layer1=new HashMap<String, List<ZuoybKnowHowDetails>>();//二层
-    	    for (ZuoybKnowHow zuoybKnowHow : konwHowList) {
-    	    	List<ZuoybKnowHowDetails> tmp1=zuoybKnowHow.getHowDetailsList();
-    	    	for (ZuoybKnowHowDetails zuoybKnowHowDetails : tmp1) {
-    	    		if(layer1.containsKey(zuoybKnowHowDetails.getModule())){
-    	    			layer1.get(zuoybKnowHowDetails.getModule()).add(zuoybKnowHowDetails);
-        	    	}else{
-        	    		List<ZuoybKnowHowDetails> tmp=new ArrayList<ZuoybKnowHowDetails>();
-        	    		tmp.add(zuoybKnowHowDetails);
-        	    		layer1.put(zuoybKnowHowDetails.getModule(), tmp);
-        	    	}
-				}
-    	    }
-    	    
-    	    Map<String,List<ZuoybKnowHowDetails>> layer2=new HashMap<String, List<ZuoybKnowHowDetails>>();//三层
-    	    for (ZuoybKnowHow zuoybKnowHow : konwHowList) {
-    	    	List<ZuoybKnowHowDetails> tmp1=zuoybKnowHow.getHowDetailsList();
-    	    	for (ZuoybKnowHowDetails zuoybKnowHowDetails : tmp1) {
-    	    		if(StringUtils.isNotEmpty(zuoybKnowHowDetails.getTwoModule())){
-    	    			if(layer2.containsKey(zuoybKnowHowDetails.getModule()+"-"+zuoybKnowHowDetails.getTwoModule())){
-        	    			layer2.get(zuoybKnowHowDetails.getModule()+"-"+zuoybKnowHowDetails.getTwoModule()).add(zuoybKnowHowDetails);
-            	    	}else{
-            	    		List<ZuoybKnowHowDetails> tmp=new ArrayList<ZuoybKnowHowDetails>();
-            	    		tmp.add(zuoybKnowHowDetails);
-            	    		layer2.put(zuoybKnowHowDetails.getModule()+"-"+zuoybKnowHowDetails.getTwoModule(), tmp);
-            	    	}	
-    	    		}else{
-    	    			if(layer1.containsKey(zuoybKnowHowDetails.getModule())){
-        	    			layer1.get(zuoybKnowHowDetails.getModule()).add(zuoybKnowHowDetails);
-            	    	}else{
-            	    		List<ZuoybKnowHowDetails> tmp=new ArrayList<ZuoybKnowHowDetails>();
-            	    		tmp.add(zuoybKnowHowDetails);
-            	    		layer1.put(zuoybKnowHowDetails.getModule(), tmp);
-            	    	}	 
-    	    			
-    	    		}
-    	    		
-				}
-    	    }
-    	    
-    	    List<ZuoybKnowHowDetailsModel> layerReq=new ArrayList<ZuoybKnowHowDetailsModel>();
-    	    List<ZuoybKnowHowDetailsModel> subModel=null;
-    	    List<ZuoybKnowHowDetailsModel> subModel1=null;
-    	    for (String key : layer) {
-    	    	subModel=new ArrayList<ZuoybKnowHowDetailsModel>();
-    	    	ZuoybKnowHowDetailsModel model=new ZuoybKnowHowDetailsModel();
-    	    	model.setName(key);
-    	    	List<ZuoybKnowHowDetails> tmp=layer1.get(key);
-    	    	if(tmp!=null){
-	    	    	for (ZuoybKnowHowDetails zuoybKnowHowDetails : tmp) {
-	    	    		subModel1=new ArrayList<ZuoybKnowHowDetailsModel>();
-	    	    		ZuoybKnowHowDetailsModel model1=new ZuoybKnowHowDetailsModel();
-	    	    		String k=key+"-"+zuoybKnowHowDetails.getTwoModule() ;
-	    	    		model1.setName(StringUtils.isNotEmpty(zuoybKnowHowDetails.getTwoModule())?zuoybKnowHowDetails.getTwoModule():zuoybKnowHowDetails.getName());
-	    	    		List<ZuoybKnowHowDetails> tmp1=layer2.get(k);
-	    	    		
-	    	    		if(tmp1!=null){
-		    	    		for (ZuoybKnowHowDetails zuoybKnowHowDetails2 : tmp1) {
-		    	    			ZuoybKnowHowDetailsModel model2=new ZuoybKnowHowDetailsModel();
-		    	    			model2.setName(zuoybKnowHowDetails2.getName());
-		    	    			model2.setCountNum(0);
-		    	    			model2.setMasterNum(0);
-		    	    			if(!isRepeat(subModel1,model2)){
-		    	    				subModel1.add(model2);
-		    	    			}
-							}
-		    	    		
-	    	    		}
-	    	    		model1.setSubModel(subModel1);
-	    	    		model1.setCountNum(subModel1.size());//总条数
-	    	    		model1.setMasterNum(tmp1!=null ? getMasterNum(masterList,tmp1) :0);//已掌握条数
-	    	    		if(!isRepeat(subModel,model1)){
-	    	    			subModel.add(model1);
-	    	    		}
-					}
-	    	    
-    	    	}
-    	    	model.setSubModel(subModel);
-    	    	model.setCountNum(subModel.size());//总条数
-    	    	model.setMasterNum(tmp !=null ?getMasterNum(masterList,tmp): 0);//已掌握条数
-    	    	if(!isRepeat(layerReq,model)){
-    	    		layerReq.add(model);
-    	    	}
-			}
-    	    data.put("layerReq", layerReq);
-        	responseEntity.success(data,"查询成功");
-
-        } catch (Exception e) {
-        	e.printStackTrace();
-       	 	responseEntity.failure("查询失败");
-		}
-        return responseEntity;
-    }
-    
-  //计算已掌握的
-  	private boolean isRepeat( List<ZuoybKnowHowDetailsModel> list, ZuoybKnowHowDetailsModel model){
-  		boolean is=false;
-  		for (ZuoybKnowHowDetailsModel zuoybKnowHowDetailsModel : list) {
-			if(zuoybKnowHowDetailsModel.getName().equals(model.getName())){
-				is=true;
-			}
-		}
-  		return is;
-  	}
-	
-	//计算已掌握的
-	private Integer getMasterNum(List<String> masterList,List<ZuoybKnowHowDetails>  knowHowDetails){
-		Integer masterNum=0;
-		Set<String> idSet=new HashSet<String>();
-		for (ZuoybKnowHowDetails knowHowDetail : knowHowDetails) {
-			idSet.add(knowHowDetail.getId());
-		}
-		for (String id : idSet) {
-			if(masterList.contains(id)){
-				masterNum=masterNum+1;	
-			}
-		}
-		return masterNum;
-	}
-	
-	
-
-}

+ 0 - 856
ssj-aijia-api/src/main/java/com/ssj/aijia/parents/controller/ParentsController.java

@@ -1,856 +0,0 @@
-package com.ssj.aijia.parents.controller;
-
-import com.alibaba.dubbo.config.annotation.Reference;
-import com.ssj.bean.sys.appinfo.bean.AppInfo;
-import com.ssj.framework.core.common.controller.BaseController;
-import com.ssj.framework.core.security.annotation.IgnoreSecurity;
-import com.ssj.framework.core.security.annotation.ModifySecurity;
-import com.ssj.framework.core.security.manager.TokenManager;
-import com.ssj.framework.core.util.ResponseConstant;
-import com.ssj.framework.core.util.ResponseEntity;
-import com.ssj.framework.core.util.StringUtil;
-import com.ssj.service.conch.common.service.ConchCommonService;
-import com.ssj.service.conch.conch.service.ConchDerverService;
-import com.ssj.service.conch.parents.dto.*;
-import com.ssj.service.conch.parents.request.*;
-import com.ssj.service.conch.parents.request.version4.*;
-import com.ssj.service.conch.parents.service.ParentService;
-import com.ssj.service.conch.schoolmaster.dto.CourseDateDataDto;
-import com.ssj.service.conch.schoolmaster.request.ConfirmAdjustSchoolHoursRequest;
-import com.ssj.service.conch.schoolmaster.request.TeacherCoursePlanDetailRequest;
-import com.ssj.service.conch.schoolmaster.service.SchoolService;
-import com.ssj.service.conch.zyb.request.ZuoybDayReq;
-import com.ssj.service.sys.situation.service.ILearningSituationMain;
-import com.ssj.service.sys.situation.service.LearningSituationService;
-import com.ssj.service.weixin.user.dto.AppWxUserInfo;
-import com.ssj.service.weixin.user.service.UserService;
-
-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.data.domain.Pageable;
-import org.springframework.data.domain.Sort.Direction;
-import org.springframework.web.bind.annotation.*;
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- * @author  ZhangCaibao
- * @version 2018年4月13日 下午5:52:07
- * 类说明
- */
-@Api(value = "家长端相关的接口", tags = "家长端相关的接口")
-@RestController
-@RequestMapping("/api/parents/parents")
-public class ParentsController extends BaseController {
-	@Reference(version = "1.0" ,timeout = 60000)
-    private ParentService parentService;
-    @Autowired
-    private TokenManager tokenManager;
-    @Reference(version = "1.0" ,timeout = 60000)
-    private ConchDerverService conchDerverService;
-    @Reference(version = "1.0" ,timeout = 60000)
-    private ConchCommonService conchCommonService;
-    @Reference(version = "1.0" ,timeout = 60000)
-    private UserService userService;
-    @Reference(version = "1.0" ,timeout = 60000)
-    private SchoolService schoolService;
-
-    @Reference(version = "1.0" ,timeout = 60000)
-    private LearningSituationService learningSituationService;
-
-    @ApiOperation(value = "家长端APP微信授权登录")
-	@IgnoreSecurity
-	@ModifySecurity
-	@RequestMapping(value = "/appAuthlogin", method = RequestMethod.POST)
-	public ResponseEntity appAuthlogin( @RequestBody (required=true) ParentAuthLoginReq param) {
-    	ResponseEntity responseEntity = null;
-        try{
-        	responseEntity = parentService.appAuthlogin(param);
-        } catch (Exception e){
-        	responseEntity = new ResponseEntity();
-        	responseEntity.failure(ResponseConstant.CODE_500, "服务器发生异常,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @ApiOperation(value = "APP授权保存用户的基本信息")
-	@RequestMapping(value = "/saveAppUserInfo", method = RequestMethod.POST)
-	public ResponseEntity saveAppUserInfo(@RequestParam(name = "accessToken") String accessToken,
-			@RequestBody (required=true)  AppWxUserInfo info ) {
-		ResponseEntity responseEntity = new ResponseEntity();
-		try {
-            if(StringUtil.isEmpty(info.getUnionid())){
-                responseEntity.failure("用户unionid为空");
-                return responseEntity;
-            }
-            if(StringUtil.isEmpty(info.getOpenid())){
-                responseEntity.failure("用户openid为空");
-                return responseEntity;
-            }
-            if(StringUtil.isEmpty(info.getNickname())){
-                responseEntity.failure("用户普通用户昵称为空");
-                return responseEntity;
-            }
-			userService.saveAppUser(accessToken, info);
-			responseEntity.success("保存成功");
-		} catch (Exception e) {
-			responseEntity.failure(ResponseConstant.CODE_000, "服务器发生异常,请稍后重试");
-		}
-		return responseEntity;
-	}
-
-    /**
-     * 退出登录
-     * @param accessToken
-     * @return
-     */
-    @ApiOperation(value = "退出登录")
-    @IgnoreSecurity
-    @RequestMapping(value = "/logout", method = RequestMethod.POST)
-    public ResponseEntity logout(@RequestParam(name = "accessToken") String accessToken) {
-        tokenManager.removeToken(accessToken);
-        return new ResponseEntity().success();
-    }
-
-    /**
-     *===============================首页===================================
-     */
-    @RequestMapping(value = "/childSmarttimeList", method = RequestMethod.POST)
-    @ApiOperation(value = "孩子相册", httpMethod = "POST", notes = "孩子相册")
-    public ResponseEntity childSmarttimeList(@RequestParam(name = "accessToken") String accessToken, @RequestBody ChildSmarttimeListReq req){
-        ResponseEntity responseEntity = new ResponseEntity();
-        try{
-        	Map<String, Object> params = new HashMap<String, Object>();
-         	params.put("vipId", req.getVipId());
-            Pageable pageable = initPage(req.getPageNo(), req.getPageSize());
-            Map<String, Object> result = parentService.childSmarttimeList(params, pageable);
-            responseEntity.success(result, "成功");
-        } catch (Exception e){
-        	responseEntity.failure(ResponseConstant.CODE_500, "服务器发生异常,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @IgnoreSecurity
-    @RequestMapping(value = "/getChildLocation", method = RequestMethod.POST)
-    @ApiOperation(value = "获取孩子定位信息", httpMethod = "POST", notes = "获取孩子定位信息")
-    public ResponseEntity getChildLocation(@RequestParam(name = "accessToken") String accessToken, @RequestBody VipReq req){
-        ResponseEntity responseEntity;
-        try{
-            responseEntity = parentService.getChildLocation(req.getVipId());
-        } catch (Exception e){
-        	responseEntity = new ResponseEntity();
-        	responseEntity.failure(ResponseConstant.CODE_500, "服务器发生异常,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/getSayList", method = RequestMethod.POST)
-    @ApiOperation(value = "爸妈说消息列表", httpMethod = "POST", notes = "爸妈说消息列表")
-    public ResponseEntity getSayList(@RequestParam(name = "accessToken") String accessToken){
-    	ResponseEntity responseEntity = new ResponseEntity();
-        try {
-        	String userId = tokenManager.getUserId(accessToken);
-        	Map<String, Object> data = new HashMap<String, Object>() ;
-        	List<ParentsSayDto> dataList = parentService.getSayList(userId);
-        	data.put("list", dataList);
-        	responseEntity.success(data,"成功");
-        } catch (Exception e) {
-        	responseEntity.failure(ResponseConstant.CODE_500, "服务器发生异常,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/getMessageList", method = RequestMethod.POST)
-    @ApiOperation(value = "获取消息列表", httpMethod = "POST", notes = "获取消息列表")
-    public ResponseEntity getMessageList(@RequestParam(name = "accessToken") String accessToken,@RequestBody MessageReq req){
-        ResponseEntity responseEntity;
-        try{
-            Pageable pageable = initPage(req.getPageNo(),req.getPageSize(),Direction.DESC,"created");
-            responseEntity = parentService.getMessageList(req, pageable);
-        } catch (Exception e){
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "服务器发生异常,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-
-    @RequestMapping(value = "/getPhotoList", method = RequestMethod.POST)
-    @IgnoreSecurity
-    @ApiOperation(value = "首页轮播图片", httpMethod = "POST", notes = "首页轮播图片")
-    public ResponseEntity getPhotoList(@RequestBody PhotoReq req){
-        ResponseEntity responseEntity;
-        try{
-            responseEntity = parentService.getPhotoList(req.getPhoneType());
-        } catch (Exception e){
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "服务器发生异常,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-
-    /**
-     *==============================作业模块==================================
-     */
-    @RequestMapping(value = "/homeworkTask", method = RequestMethod.POST)
-    @ApiOperation(value = "作业任务", httpMethod = "POST", notes = "作业任务")
-    public ResponseEntity homeworkTask (@RequestParam(name = "accessToken") String accessToken, @RequestBody HomeworkTaskReq req){
-        ResponseEntity responseEntity = new ResponseEntity();
-        try{
-            Pageable pageable = initPage(req.getPageNo(), req.getPageSize());
-            Map<String, Object> data = parentService.getHistoryTask(req.getVipId(), req.getMaxCreateTime(), pageable);
-            data.put("todayTask", parentService.searchTodayHomeworkTask(req.getVipId()));
-            responseEntity.success(data, "成功");
-        } catch (Exception e){
-            logger.error("异常", e);
-        	responseEntity.failure(ResponseConstant.CODE_500, "服务器发生异常,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-
-    @RequestMapping(value = "/correctDetail", method = RequestMethod.POST)
-    @ApiOperation(value = "单科批改详情", httpMethod = "POST", notes = "单科批改详情")
-    public ResponseEntity correctDetail (@RequestParam(name = "accessToken") String accessToken, @RequestBody CorrectDetailReq req){
-        ResponseEntity responseEntity = new ResponseEntity();
-        try{
-            Map<String, Object> data =  parentService.correctDetail(req.getVipId(), req.getSubject(), req.getDate());
-            if ((Boolean)data.get("isSuccess")){
-                responseEntity.success(data.get("data"), "成功");
-            } else {
-                responseEntity.failure(ResponseConstant.CODE_000, "失败");
-            }
-        } catch (Exception e){
-            logger.error("异常", e);
-        	responseEntity.failure(ResponseConstant.CODE_500, "服务器发生异常,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/homeworkReport", method = RequestMethod.POST)
-    @ApiOperation(value = "作业反馈报告", httpMethod = "POST", notes = "作业反馈报告")
-    public ResponseEntity homeworkReport (@RequestParam(name = "accessToken") String accessToken, @RequestBody HomeworkReportReq req){
-        ResponseEntity responseEntity = new ResponseEntity();
-        try{
-            if (StringUtils.isNotBlank(req.getVipId()) && StringUtils.isNotBlank(req.getDate())) {
-                Map<String, Object> data = parentService.findHomeworkReport(req.getVipId(), req.getDate());
-                responseEntity.success(data, "成功");
-            }else {
-                logger.error("请求参数有误,vipId={}, date={}", req.getVipId(), req.getDate());
-                responseEntity.failure(ResponseConstant.CODE_000, "请求参数有误");
-            }
-        } catch (Exception e){
-            logger.error("异常", e);
-        	responseEntity.failure(ResponseConstant.CODE_500, "服务器发生异常,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/queryAssessment", method = RequestMethod.POST)
-    @ApiOperation(value = "查询课堂评价", httpMethod = "POST", notes = "查询课堂评价")
-    public ResponseEntity queryAssessment (@RequestParam(name = "accessToken") String accessToken, @RequestBody QueryAssessmentReq req){
-        ResponseEntity responseEntity = new ResponseEntity();
-        try{
-            Map<String, Object> data = parentService.queryAssessment(req.getVipId(), req.getDate());
-            responseEntity.success(data, "成功");
-        } catch (Exception e){
-            logger.error("异常", e);
-        	responseEntity.failure(ResponseConstant.CODE_500, "服务器发生异常,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/assessment", method = RequestMethod.POST)
-    @ApiOperation(value = "作业课堂评价提交", httpMethod = "POST", notes = "课堂评价")
-    public ResponseEntity assessment (@RequestParam(name = "accessToken") String accessToken, @RequestBody AssessmentReq req){
-        ResponseEntity responseEntity = new ResponseEntity();
-        try{
-            parentService.submitAssessment(req);
-            responseEntity.success();
-        } catch (Exception e){
-            logger.error("异常", e);
-        	responseEntity.failure(ResponseConstant.CODE_500, "服务器发生异常,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    /**
-     *==============================学情模块==================================
-     */
-    @RequestMapping(value = "/learningSituationAbstract", method = RequestMethod.POST)
-    @ApiOperation(value = "学情整体情况", httpMethod = "POST", notes = "学情整体情况")
-    public ResponseEntity learningSituationAbstract (@RequestParam(name = "accessToken") String accessToken, @RequestBody CorrectDetailReq req){
-        ResponseEntity responseEntity = new ResponseEntity();
-        try{
-            LearningSituationAbstractDto data = parentService.learningSituationAbstract(req.getVipId());
-            responseEntity.success(data, "成功");
-        } catch (Exception e){
-        	responseEntity.failure(ResponseConstant.CODE_500, "服务器发生异常,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/knowledgeAtlas", method = RequestMethod.POST)
-    @ApiOperation(value = "知识图谱", httpMethod = "POST", notes = "知识图谱")
-    public ResponseEntity knowledgeAtlas(@RequestParam(name = "accessToken") String accessToken, @RequestBody CourseHowReq req){
-        ResponseEntity responseEntity = null;
-        try{
-        	responseEntity = parentService.knowledgeAtlas(req);
-        } catch (Exception e){
-        	responseEntity = new ResponseEntity();
-        	responseEntity.failure(ResponseConstant.CODE_500, "服务器发生异常,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/recent", method = RequestMethod.POST)
-    @ApiOperation(value = "学习历史-当日学习任务日历", httpMethod = "POST", notes = "学习历史-当日学习任务日历")
-    public ResponseEntity recent(@RequestParam(name = "accessToken") String accessToken, @RequestBody VipReq req){
-        ResponseEntity responseEntity = null;
-        try{
-        	responseEntity = parentService.recent(req.getVipId());
-        } catch (Exception e){
-            logger.error("7天任务异常", e);
-        	responseEntity = new ResponseEntity();
-        	responseEntity.failure(ResponseConstant.CODE_500, "服务器发生异常,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/calendarTrack", method = RequestMethod.POST)
-    @ApiOperation(value = "学习历史-历史学习任务日历", httpMethod = "POST", notes = "学习历史-历史学习任务日历")
-    public ResponseEntity calendarTrack(@RequestParam(name = "accessToken") String accessToken, @RequestBody ZuoybDayReq req){
-        ResponseEntity responseEntity = null;
-        try{
-        	responseEntity = parentService.calendarTrack(req);
-        } catch (Exception e){
-        	responseEntity = new ResponseEntity();
-        	responseEntity.failure(ResponseConstant.CODE_500, "服务器发生异常,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/learningSituationDetail", method = RequestMethod.POST)
-    @ApiOperation(value = "学情学科情况", httpMethod = "POST", notes = "学情学科情况")
-    public ResponseEntity learningSituationDetail (@RequestParam(name = "accessToken") String accessToken, @RequestBody CorrectDetailReq req){
-        ResponseEntity responseEntity = new ResponseEntity();
-        try{
-            LearningSituationDetailDto data = learningSituationService.learningSituationDetail(req.getVipId(), req.getSubject());
-            responseEntity.success(data, "成功");
-        } catch (Exception e){
-            logger.error("异常", e);
-        	responseEntity.failure(ResponseConstant.CODE_500, "服务器发生异常,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    //------------------------------------------------------------------难题模块-------------------------------------
-    @RequestMapping(value = "/unAnsweredProblemList", method = RequestMethod.POST)
-    @ApiOperation(value = "未解答难题列表", httpMethod = "POST", notes = "未解答难题列表")
-    public ResponseEntity unAnsweredProblemList(@RequestParam(name = "accessToken") String accessToken,@RequestBody UnAnsweredProblemReq req){
-        ResponseEntity responseEntity;
-        try{
-            Pageable pageable = initPage(req.getPageNo(), req.getPageSize());
-            responseEntity = parentService.unAnsweredProblemList(req,pageable);
-        } catch (Exception e){
-            responseEntity = new ResponseEntity();
-        	responseEntity.failure(ResponseConstant.CODE_500, "服务器发生异常,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/answeredProblemKnowHow", method = RequestMethod.POST)
-    @ApiOperation(value = "已解答难题知识点汇总", httpMethod = "POST", notes = "已解答难题知识点汇总")
-    public ResponseEntity answeredProblemKnowHow(@RequestParam(name = "accessToken") String accessToken,@RequestBody ProblemKnowHowReq req){
-        ResponseEntity responseEntity;
-        try{
-            responseEntity = parentService.answeredProblemKnowHow(req);
-        } catch (Exception e){
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "服务器发生异常,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/answeredProblemList", method = RequestMethod.POST)
-    @ApiOperation(value = "已解答难题列表", httpMethod = "POST", notes = "已解答难题列表")
-    public ResponseEntity answeredProblemList(@RequestParam(name = "accessToken") String accessToken,@RequestBody AnsweredProblemReq req){
-        ResponseEntity responseEntity;
-        try{
-            Pageable pageable = initPage(req.getPageNo(), req.getPageSize());
-            responseEntity = parentService.answeredProblemList(req,pageable);
-        } catch (Exception e){
-            responseEntity = new ResponseEntity();
-        	responseEntity.failure(ResponseConstant.CODE_500, "服务器发生异常,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/answeredProblemDetail", method = RequestMethod.POST)
-    @ApiOperation(value = "已解答难题详情", httpMethod = "POST", notes = "已解答难题详情")
-    public ResponseEntity answeredProblemDetail(@RequestParam(name = "accessToken") String accessToken,@RequestBody FindProblemRequest req){
-        ResponseEntity responseEntity;
-        try{
-            responseEntity = parentService.answeredProblemDetail(req);
-        } catch (Exception e){
-            responseEntity = new ResponseEntity();
-        	responseEntity.failure(ResponseConstant.CODE_500, "服务器发生异常,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/calendarAnsweredProblem", method = RequestMethod.POST)
-    @ApiOperation(value = "任务日历查询某天已解答难题列表", httpMethod = "POST", notes = "任务日历查询某天已解答难题列表")
-    public ResponseEntity calendarAnsweredProblem(@RequestParam(name = "accessToken") String accessToken,@RequestBody AnswdProblemOnedayReq req){
-        ResponseEntity responseEntity;
-        try{
-            responseEntity = parentService.calendarAnsweredProblem(req);
-        } catch (Exception e){
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "服务器发生异常,请稍后重试");
-        }
-        return responseEntity;
-    }
-    //------------------------------------------------------------------一对一模块-------------------------------------
-    @RequestMapping(value = "/lessonServiceManager", method = RequestMethod.POST)
-    @ApiOperation(value = "一对一学习任务", httpMethod = "POST", notes = "一对一学习任务")
-    public ResponseEntity lessonServiceManager(@RequestParam(name = "accessToken") String accessToken,@RequestBody VipReq req){
-        ResponseEntity responseEntity = null;
-        try{
-        	String userId = tokenManager.getUserId(accessToken);
-        	responseEntity = parentService.lessonServiceManager(userId,req.getVipId());
-        } catch (Exception e){
-        	responseEntity = new ResponseEntity();
-        	responseEntity.failure(ResponseConstant.CODE_500, "服务器发生异常,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/applyCourseTime", method = RequestMethod.POST)
-    @ModifySecurity
-    @ApiOperation(value = "申请调课", httpMethod = "POST", notes = "申请调课")
-    public ResponseEntity applyCourseTime(@RequestParam(name = "accessToken") String accessToken,@RequestBody ApplyCourseTimeReq req){
-        ResponseEntity responseEntity = null;
-        try{
-        	responseEntity = parentService.applyCourseTime(req);
-        } catch (Exception e){
-        	responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "服务器发生异常,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/applyChangeTeacher", method = RequestMethod.POST)
-    @ModifySecurity
-    @ApiOperation(value = "申请换老师", httpMethod = "POST", notes = "申请换老师")
-    public ResponseEntity applyChangeTeacher(@RequestParam(name = "accessToken") String accessToken,@RequestBody ApplyTeacherReq req){
-        ResponseEntity responseEntity = null;
-        try{
-        	responseEntity = parentService.applyChangeTeacher(req);
-        } catch (Exception e){
-        	responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "服务器发生异常,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/confirmTeacher", method = RequestMethod.POST)
-    @ModifySecurity
-    @ApiOperation(value = "校长换老师后-家长确认", httpMethod = "POST", notes = "校长换老师后-家长确认")
-    public ResponseEntity confirmTeacher(@RequestParam(name = "accessToken") String accessToken,@RequestBody LessonReq req){
-        ResponseEntity responseEntity = new ResponseEntity();
-        try{
-        	responseEntity = parentService.confirmTeacher(req.getLessonServiceId());
-        } catch (Exception e){
-        	responseEntity.failure(ResponseConstant.CODE_500, "服务器发生异常,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/teacherCoursePlanDetail", method = RequestMethod.POST)
-    @ApiOperation(value = "获取当前老师排课状况", httpMethod = "POST", notes = "获取当前老师排课状况")
-    public ResponseEntity teacherCoursePlanDetail(@RequestParam(name = "accessToken") String accessToken,@RequestBody TeacherCoursePlanDetailRequest req){
-        ResponseEntity responseEntity = new ResponseEntity();
-        try{
-        	List<Map<String, String>> result = parentService.teacherCoursePlanDetail(req);
-			Map<String, Object> data = new HashMap<String, Object>();
-			data.put("list", result);
-			responseEntity.success(data, "成功");
-        } catch (Exception e){
-            logger.error("异常", e);
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/getStudentCourseData", method = RequestMethod.POST)
-    @ApiOperation(value = "获取当前课程情况", httpMethod = "POST", notes = "获取当前课程情况")
-    public ResponseEntity getStudentCourseData(@RequestParam(name = "accessToken") String accessToken,
-                                               @RequestBody ConfirmAdjustSchoolHoursRequest request) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            List<CourseDateDataDto> list = schoolService.findStudentCourseData(request.getBizId(), request.getTime());
-            Map<String, Object> data = new HashMap<>();
-            data.put("list", list);
-            responseEntity.success(data, "成功");
-        } catch (Exception e) {
-            logger.error("异常", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "服务器发生异常,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/getTeacherCourseTimeDetail", method = RequestMethod.POST)
-    @ApiOperation(value = "获取当前老师排课状况V1", httpMethod = "POST", notes = "获取当前老师排课状况Vq")
-    public ResponseEntity getTeacherCourseTimeDetail(@RequestParam(name = "accessToken") String accessToken,
-                                                     @RequestBody TeacherCoursePlanDetailRequest request) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            List<Map<String, String>> result = schoolService.getTeacherCourseTimeDetail(request);
-            Map<String, Object> data = new HashMap<String, Object>();
-            data.put("list", result);
-            responseEntity.success(data, "成功");
-        } catch (Exception e) {
-            logger.error("异常信息", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "服务器发生异常,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/lessonFeedbackList", method = RequestMethod.POST)
-    @ApiOperation(value = "往期反馈记录", httpMethod = "POST", notes = "往期反馈记录")
-    public ResponseEntity lessonFeedbackList(@RequestParam(name = "accessToken") String accessToken,@RequestBody LessonReq req){
-        ResponseEntity responseEntity;
-        try{
-            responseEntity = parentService.lessonFeedbackList(req);
-        } catch (Exception e){
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "服务器发生异常,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/calendarLessonFeedback", method = RequestMethod.POST)
-    @ApiOperation(value = "一对一任务日历反馈记录", httpMethod = "POST", notes = "一对一任务日历反馈记录")
-    public ResponseEntity calendarLessonFeedback(@RequestParam(name = "accessToken") String accessToken,@RequestBody HomeworkReportReq req){
-        ResponseEntity responseEntity;
-        try{
-            responseEntity = parentService.calendarLessonFeedback(req);
-        } catch (Exception e){
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "服务器发生异常,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/lessonFeedbackDetails", method = RequestMethod.POST)
-    @ApiOperation(value = "一对一反馈报告", httpMethod = "POST", notes = "一对一反馈报告")
-    public ResponseEntity lessonFeedbackDetails(@RequestParam(name = "accessToken") String accessToken,@RequestBody CourseReq req){
-        ResponseEntity responseEntity;
-        try{
-            responseEntity = parentService.lessonFeedbackDetails(req,accessToken);
-        } catch (Exception e){
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "服务器发生异常,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/getCourseAssessment", method = RequestMethod.POST)
-    @ApiOperation(value = "一对一反馈-查看课堂评价", httpMethod = "POST", notes = "一对一反馈-查看课堂评价")
-    public ResponseEntity getCourseAssessment(@RequestParam(name = "accessToken") String accessToken,@RequestBody CourseReq req){
-        ResponseEntity responseEntity;
-        try {
-            responseEntity = parentService.getCourseAssessment(req);
-        } catch (Exception e) {
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "服务器发生异常,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/superScholarLessonFeedbackDetails", method = RequestMethod.POST)
-    @ApiOperation(value = "学霸一对一反馈报告", httpMethod = "POST", notes = "学霸一对一反馈报告")
-    public ResponseEntity superScholarLessonFeedbackDetails(@RequestParam(name = "accessToken") String accessToken,@RequestBody CourseReq req){
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            if (StringUtils.isNotBlank(req.getCourseId())){
-                SuperScholarFeedbackDto data = parentService.superScholar121Feedback(req.getCourseId());
-                responseEntity.success(data,"成功");
-            } else {
-                responseEntity.failure(ResponseConstant.CODE_000, "请传输正确的课程编号");
-            }
-        } catch (Exception e) {
-            logger.error("学霸一对一反馈报告异常", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "服务器发生异常,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/upCourseAssessment", method = RequestMethod.POST)
-    @ModifySecurity
-    @ApiOperation(value = "一对一反馈-课堂评价", httpMethod = "POST", notes = "一对一反馈-课堂评价")
-    public ResponseEntity upCourseAssessment(@RequestParam(name = "accessToken") String accessToken,@RequestBody CourseAssessmentReq req){
-        ResponseEntity responseEntity;
-        try {
-            responseEntity = parentService.upCourseAssessment(req);
-        } catch (Exception e) {
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "服务器发生异常,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    //------------------------------------------------------------------我的信息-------------------------------------
-    @RequestMapping(value = "/getMyInfo", method = RequestMethod.POST)
-    @ApiOperation(value = "我的信息", httpMethod = "POST", notes = "我的信息")
-    public ResponseEntity getMyInfo(@RequestParam(name = "accessToken") String accessToken){
-        ResponseEntity responseEntity = new ResponseEntity();
-        try{
-        	String parentId = tokenManager.getUserId(accessToken);
-        	ParentsInfoDto result = parentService.getMyInfo(parentId);
-        	responseEntity.success(result,"成功");
-        } catch (Exception e){
-            responseEntity.failure(ResponseConstant.CODE_500, "服务器发生异常,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/getMyChildInfo", method = RequestMethod.POST)
-    @ApiOperation(value = "查询孩子信息", httpMethod = "POST", notes = "查询孩子信息")
-    public ResponseEntity getMyChildInfo(@RequestParam(name = "accessToken") String accessToken,@RequestBody VipReq req){
-        ResponseEntity responseEntity = new ResponseEntity();
-        try{
-        	String userId = tokenManager.getUserId(accessToken);
-        	ChildDto result = parentService.getMyChildInfo(userId,req.getVipId());
-        	responseEntity.success(result,"成功");
-        } catch (Exception e){
-        	responseEntity.failure(ResponseConstant.CODE_500, "服务器发生异常,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/upMyChildInfo", method = RequestMethod.POST)
-    @ApiOperation(value = "修改孩子信息", httpMethod = "POST", notes = "修改孩子信息")
-    public ResponseEntity upMyChildInfo(@RequestParam(name = "accessToken") String accessToken,@RequestBody ChildInfoReq req){
-        ResponseEntity responseEntity = new ResponseEntity();
-        try{
-        	parentService.upMyChildInfo(req);
-        	responseEntity.success();
-        } catch (Exception e){
-            responseEntity.failure(ResponseConstant.CODE_500, "服务器发生异常,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/getSchoolList", method = RequestMethod.POST)
-    @ApiOperation(value = "获取学校列表", httpMethod = "POST", notes = "获取学校列表")
-    public ResponseEntity getSchoolList(@RequestParam(name = "accessToken") String accessToken,@RequestBody QuerySchoolList req){
-    	ResponseEntity responseEntity = new ResponseEntity();
-        try {
-        	Map<String, Object> params = new HashMap<String, Object>();
-        	List<Map<String, Object>> list = parentService.getSchoolList(req);
-        	params.put("list", list);
-        	responseEntity.success(params,"获取数据成功!");
-        } catch (Exception e) {
-            responseEntity.failure(ResponseConstant.CODE_500, "服务器发生异常,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/myOrdersInfo", method = RequestMethod.POST)
-    @ApiOperation(value = "我的订单", httpMethod = "POST", notes = "我的订单")
-    public ResponseEntity myOrdersInfo(@RequestParam(name = "accessToken") String accessToken,@RequestBody OrderReq req){
-        ResponseEntity responseEntity = null;
-        try{
-        	String userId = tokenManager.getUserId(accessToken);
-        	responseEntity =  parentService.myOrdersInfo(userId,req);
-        } catch (Exception e){
-            responseEntity = new ResponseEntity();
-			responseEntity.failure(ResponseConstant.CODE_500, "服务器发生异常,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/payOrder", method = RequestMethod.POST)
-    @ModifySecurity
-    @ApiOperation(value = "我的订单-支付", httpMethod = "POST", notes = "我的订单-支付")
-    public ResponseEntity payOrder(@RequestParam(name = "accessToken") String accessToken,@RequestBody PayOrderReq req){
-        return parentService.payOrder(req,accessToken);
-    }
-
-    @RequestMapping(value = "/applyOrderRefund", method = RequestMethod.POST)
-    @ApiOperation(value = "我的订单-发起退款", httpMethod = "POST", notes = "我的订单-发起退款")
-    public ResponseEntity applyOrderRefund(@RequestParam(name = "accessToken") String accessToken,@RequestBody RefundReq req){
-        ResponseEntity responseEntity = null;
-        try{
-        	String userId = tokenManager.getUserId(accessToken);
-        	responseEntity = parentService.applyOrderRefund(userId, req.getOrderNo());
-        } catch (Exception e){
-        	responseEntity = new ResponseEntity();
-			responseEntity.failure(ResponseConstant.CODE_500, "服务器发生异常,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/confirmOrderRefund", method = RequestMethod.POST)
-    @ModifySecurity
-    @ApiOperation(value = "我的订单-确定退款", httpMethod = "POST", notes = "我的订单-确定退款")
-    public ResponseEntity confirmOrderRefund(@RequestParam(name = "accessToken") String accessToken,@RequestBody ConfirmRefundReq req){
-        ResponseEntity responseEntity = null;
-        try{
-        	String userId = tokenManager.getUserId(accessToken);
-        	responseEntity = parentService.confirmOrderRefund(userId, req);
-        } catch (Exception e){
-        	responseEntity = new ResponseEntity();
-			responseEntity.failure(ResponseConstant.CODE_500, "服务器发生异常,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/untieDerver", method = RequestMethod.POST)
-    @ModifySecurity
-    @ApiOperation(value = "解绑小塾", httpMethod = "POST", notes = "解绑小塾")
-    public ResponseEntity untieDerver(@RequestParam(name = "accessToken") String accessToken,@RequestBody UntieDerverReq req){
-    	ResponseEntity responseEntity = null;
-		try {
-			responseEntity = conchDerverService.untyingParents(req.getDerver(), tokenManager.getUserId(accessToken));
-		} catch (Exception e) {
-			responseEntity = new ResponseEntity();
-			responseEntity.failure(ResponseConstant.CODE_500, "服务器发生异常,请稍后重试");
-		}
-		return responseEntity;
-    }
-
-    @ApiOperation(value = "解绑小塾内部专用",httpMethod = "POST")
-	@IgnoreSecurity
-	@ModifySecurity
-	@RequestMapping(value = "/untieDerverByCeshi", method = RequestMethod.POST)
-	public ResponseEntity untieDerverByCeshi(@RequestParam(name = "parentId") String parentId,
-			@RequestParam(name = "derver") String derver) {
-		ResponseEntity responseEntity = new ResponseEntity();
-		try {
-			responseEntity =conchDerverService.untyingParents(derver, parentId);
-			responseEntity.success();
-		} catch (Exception e) {
-			logger.error("解绑小塾异常", e);
-			responseEntity.failure(ResponseConstant.CODE_500, "解绑小塾异常");
-		}
-		return responseEntity;
-	}
-
-    @RequestMapping(value = "/swipeQrCode", method = RequestMethod.POST)
-    @ModifySecurity
-    @ApiOperation(value = "app扫描二维码通用接口", httpMethod = "POST", notes = "app扫描二维码通用接口")
-    public ResponseEntity swipeQrCode(@RequestParam(name = "accessToken") String accessToken,@RequestBody SwipeQrCodeReq req){
-    	ResponseEntity responseEntity = null;
-		try {
-			String userId = tokenManager.getUserId(accessToken);
-			responseEntity = conchCommonService.swipeQrCode(userId,req);
-		} catch (Exception e) {
-			responseEntity = new ResponseEntity();
-			responseEntity.failure(ResponseConstant.CODE_500, "服务器发生异常,请稍后重试");
-		}
-		return responseEntity;
-    }
-
-    @RequestMapping(value = "/version", method = RequestMethod.POST)
-    @IgnoreSecurity
-    @ApiOperation(value = "获取当前版本", httpMethod = "POST", notes = "获取当前版本")
-    public ResponseEntity version() {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            AppInfo appInfo = parentService.getVersion(2);
-            Map<String,Object> map = new HashMap<>(16);
-            if(appInfo != null){
-                map.put("id",appInfo.getId());
-                map.put("version",appInfo.getVersion());
-                map.put("fileKey",appInfo.getFileKey());
-                map.put("versionType",appInfo.getVersionType());
-                map.put("issueNum",appInfo.getIssueNum());
-                map.put("createTime",appInfo.getCreateTime());
-                map.put("isDelete",appInfo.getIsDelete());
-                map.put("needUpdate",appInfo.getNeedUpdate());
-            }
-            responseEntity.success(map, "成功");
-        } catch (Exception e) {
-            logger.error("获取当前版本异常", e);
-            responseEntity.failure(ResponseConstant.CODE_500, e.getMessage());
-        }
-        logger.info("version end");
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/setPushRemind", method = RequestMethod.POST)
-    @ApiOperation(value = "设置推送消息提醒接口", httpMethod = "POST", notes = "设置推送消息提醒接口")
-    public ResponseEntity setPushRemind(@RequestParam(name = "accessToken") String accessToken,@RequestBody PushRemindReq req) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-        	String userId = tokenManager.getUserId(accessToken);
-        	parentService.setPushRemind(userId,req);
-            responseEntity.success();
-        } catch (Exception e) {
-            logger.error("设置推送消息提醒接口异常", e);
-            responseEntity.failure(ResponseConstant.CODE_500, e.getMessage());
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/sendSms", method = RequestMethod.POST)
-    @IgnoreSecurity
-    @ApiOperation(value = "发送短信验证码", httpMethod = "POST", notes = "发送短信验证码")
-    public ResponseEntity sendSms(@RequestBody SmsSendReq req) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            parentService.sendSms(req.getPhoneNumber(), req.getType());
-            responseEntity.success();
-        } catch (Exception e) {
-            logger.error("发送短信验证码接口异常", e);
-            responseEntity.failure(ResponseConstant.CODE_500, e.getMessage());
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/confirmSms", method = RequestMethod.POST)
-    @IgnoreSecurity
-    @ApiOperation(value = "验证短信验证码", httpMethod = "POST", notes = "验证短信验证码")
-    public ResponseEntity confirmSms(@RequestBody SmsConfirmReq req) {
-        ResponseEntity responseEntity;
-        try {
-            responseEntity = parentService.confirmSms(req.getPhoneNumber(), req.getCode());
-            if (responseEntity.getCode().equals("999")) {
-                //清除验证码
-                tokenManager.delString(req.getPhoneNumber());
-            }
-            return responseEntity;
-        } catch (Exception e) {
-            responseEntity = new ResponseEntity();
-            logger.error("发送短信验证码接口异常", e);
-            responseEntity.failure(ResponseConstant.CODE_500, e.getMessage());
-        }
-        return responseEntity;
-    }
-
-
-    @Reference(version = "1.0" ,timeout = 60000)
-    private ILearningSituationMain learningSituationMain;
-    @RequestMapping(value = "/learningSituation", method = RequestMethod.POST)
-    @IgnoreSecurity
-    @ApiOperation(value = "学情手动计算", httpMethod = "POST", notes = "学情手动计算")
-    public ResponseEntity learningSituation(@RequestBody SmsConfirmReq req) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            learningSituationMain.querySituation();
-            responseEntity.success();
-        } catch (Exception e) {
-            logger.error("学情手动计算", e);
-            responseEntity.failure(ResponseConstant.CODE_500, e.getMessage());
-        }
-        return responseEntity;
-    }
-}

Fichier diff supprimé car celui-ci est trop grand
+ 0 - 1618
ssj-aijia-api/src/main/java/com/ssj/aijia/parents/controller/v1/ParentsV1Controller.java


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 3481
ssj-aijia-api/src/main/java/com/ssj/aijia/parents/controller/v2/ParentsV2Controller.java


+ 0 - 680
ssj-aijia-api/src/main/java/com/ssj/aijia/schoolmaster/controller/SchoolController.java

@@ -1,680 +0,0 @@
-package com.ssj.aijia.schoolmaster.controller;
-
-import com.alibaba.dubbo.config.annotation.Reference;
-import com.alibaba.fastjson.JSON;
-import com.alibaba.fastjson.JSONObject;
-import com.ssj.bean.weixin.libmy.domain.TbLibManager;
-import com.ssj.framework.core.common.controller.BaseController;
-import com.ssj.framework.core.security.annotation.ModifySecurity;
-import com.ssj.framework.core.security.manager.TokenManager;
-import com.ssj.framework.core.util.Constant;
-import com.ssj.framework.core.util.ResponseConstant;
-import com.ssj.framework.core.util.ResponseEntity;
-import com.ssj.service.conch.schoolmaster.dto.*;
-import com.ssj.service.conch.schoolmaster.request.*;
-import com.ssj.service.conch.schoolmaster.service.SchoolService;
-import com.ssj.service.weixin.library.service.IBookManagerService;
-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.data.domain.Pageable;
-import org.springframework.web.bind.annotation.*;
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-/** 
- * @author  ZhangCaibao 
- * @version 2018年4月12日 下午9:36:15 
- * 类说明 
- */
-@Api(value = "一对一校长端相关的接口", tags = "一对一校长端相关的接口")
-@RestController
-@RequestMapping("/api/school/school")
-public class SchoolController extends BaseController {
-	@Autowired
-	private TokenManager tokenManager;
-
-	@Reference(version = "1.0" ,timeout = 60000)
-	private SchoolService schoolService;
-	
-	@Reference(version = "1.0" ,timeout = 60000)
-    private IBookManagerService managerService;
-
-    @ModifySecurity
-	@RequestMapping(value = "/swipeBinding", method = RequestMethod.POST)
-	@ApiOperation(value = "校长端扫卡绑定", httpMethod = "POST", notes = "校长端扫卡绑定")
-	public ResponseEntity swipeBinding(@RequestParam(name = "accessToken") String accessToken,
-									   @RequestBody SwipeBindingRequest req) {
-		String masterId = tokenManager.getUserId(accessToken);
-		ResponseEntity responseEntity = null;
-		if (StringUtils.isBlank(masterId) || StringUtils.isBlank(req.getTeacherCodeUrl())){
-			responseEntity = new ResponseEntity();
-			responseEntity.failure(ResponseConstant.CODE_000, "不存在校长id,或者老师二维码连接为空, master_id="
-					+masterId + ", codeUrl=" + req.getTeacherCodeUrl() + ", accessToken=" + accessToken);
-		} else {
-			responseEntity = schoolService.swipeBinding(masterId, req);
-		}
-		return responseEntity;
-	}
-
-	/******************************************************我的信息*********************************************************/
-	@RequestMapping(value = "/myInfo", method = RequestMethod.POST)
-	@ApiOperation(value = "个人信息获取", httpMethod = "POST", notes = "个人信息获取")
-	public ResponseEntity myInfo(@RequestParam(name = "accessToken") String accessToken) {
-		ResponseEntity responseEntity = null;
-		try {
-			String masterId = tokenManager.getUserId(accessToken);
-			responseEntity = schoolService.myInfo(masterId);
-		} catch (Exception e) {
-            responseEntity = new ResponseEntity();
-			responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-		}
-		return responseEntity;
-	}
-
-
-	@RequestMapping(value = "/systemMessageList", method = RequestMethod.POST)
-	@ApiOperation(value = "获取系统消息列表", httpMethod = "POST", notes = "获取系统消息列表")
-	public ResponseEntity systemMessageList(@RequestParam(name = "accessToken") String accessToken) {
-		ResponseEntity responseEntity = new ResponseEntity();
-		try {
-			String data = "{\"title\":\"绑定成功\",\"content\":\"今天天气真好!\",\"sendTime\":\"18-02-26\"}";
-			responseEntity.success(JSON.parse(data), "成功");
-		} catch (Exception e) {
-            logger.error("获取系统消息列表异常", e);
-			responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-		}
-		return responseEntity;
-	}
-
-	/******************************************************课务管理*********************************************************/
-
-
-	@RequestMapping(value = "/courseManagementInfo", method = RequestMethod.POST)
-	@ApiOperation(value = "获取课务管理数据列表", httpMethod = "POST", notes = "获取课务管理数据列表")
-	public ResponseEntity courseManagementInfo(@RequestParam(name = "accessToken") String accessToken,
-											   @RequestBody CourseManagementInfoRequest request) {
-		ResponseEntity responseEntity = new ResponseEntity();
-		try {
-			String masterId = tokenManager.getUserId(accessToken);
-			CourseManagementInfoDto data = schoolService.courseManagementInfo(masterId);
-			responseEntity.success(data, "成功");
-		} catch (Exception e) {
-			logger.error("获取课务管理数据列表异常", e);
-			responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-		}
-		return responseEntity;
-	}
-
-
-	@RequestMapping(value = "/batchSendUrge", method = RequestMethod.POST)
-	@ApiOperation(value = "一键完成催促", httpMethod = "POST", notes = "一键完成催促")
-	public ResponseEntity batchSendUrge(@RequestParam(name = "accessToken") String accessToken) {
-		ResponseEntity responseEntity = new ResponseEntity();
-		try {
-			String masterId = tokenManager.getUserId(accessToken);
-			schoolService.pushAllAffairs(masterId);
-			responseEntity.success(ResponseConstant.CODE_999, "催促成功");
-		} catch (Exception e) {
-			logger.error("一键完成催促异常", e);
-			responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-		}
-		return responseEntity;
-	}
-
-
-	@RequestMapping(value = "/sendUrge", method = RequestMethod.POST)
-	@ApiOperation(value = "单独催促老师", httpMethod = "POST", notes = "单独催促老师")
-	public ResponseEntity sendUrge(@RequestParam(name = "accessToken") String accessToken,
-								   @RequestBody SendUrgeRequest request) {
-		ResponseEntity responseEntity = new ResponseEntity();
-		try {
-			String masterId = tokenManager.getUserId(accessToken);
-			if (StringUtils.isBlank(request.getBizId()) || StringUtils.isBlank(request.getBizType())){
-				responseEntity.success(ResponseConstant.CODE_999, "传入参数存在空值,bizid=" + request.getBizId() + ", biztype=" + request.getBizType());
-			} else {
-				boolean result = schoolService.pushTeacher(request.getBizId(), request.getBizType(), masterId);
-				if (result){
-					responseEntity.success(ResponseConstant.CODE_999, "催促成功");
-				} else {
-					responseEntity.failure(ResponseConstant.CODE_999, "催促失败");
-				}
-			}
-
-		} catch (Exception e) {
-			logger.error("单独催促老师异常", e);
-			responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-		}
-		return responseEntity;
-	}
-
-
-	@RequestMapping(value = "/changeTeacher", method = RequestMethod.POST)
-	@ApiOperation(value = "更换老师", httpMethod = "POST", notes = "更换老师")
-	@ModifySecurity
-	public ResponseEntity changeTeacher(@RequestParam(name = "accessToken") String accessToken,
-										@RequestBody ChangeTeacherRequest request) {
-		logger.info("请求参数req={}", JSONObject.toJSON(request));
-		ResponseEntity responseEntity = null;
-		try {
-			responseEntity = schoolService.changeTeacher(request.getBizId(), request.getTeacherId());
-		} catch (Exception e) {
-			logger.error("更换老师异常", e);
-            responseEntity = new ResponseEntity();
-			responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-		}
-		return responseEntity;
-	}
-
-
-	@RequestMapping(value = "/confirmAdjustSchoolHours", method = RequestMethod.POST)
-	@ApiOperation(value = "同意(确定)调课申请", httpMethod = "POST", notes = "同意(确定)调课申请")
-	@ModifySecurity
-	public ResponseEntity confirmAdjustSchoolHours(@RequestParam(name = "accessToken") String accessToken,
-												   @RequestBody ConfirmAdjustSchoolHoursRequest request) {
-		ResponseEntity responseEntity = new ResponseEntity();
-		try {
-			String result = schoolService.confirmAdjustSchoolHours(request.getBizId());
-			if (StringUtils.isNotBlank(result)) {
-				responseEntity.failure(ResponseConstant.CODE_000, result);
-				return responseEntity;
-			}
-			responseEntity.success();
-		} catch (Exception e) {
-			logger.error("同意(确定)调课申请异常", e);
-			responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-		}
-		return responseEntity;
-	}
-
-	@RequestMapping(value = "/getStudentCourseData", method = RequestMethod.POST)
-	@ApiOperation(value = "获取当前课程情况", httpMethod = "POST", notes = "获取当前课程情况")
-	public ResponseEntity getStudentCourseData(@RequestParam(name = "accessToken") String accessToken,
-											@RequestBody ConfirmAdjustSchoolHoursRequest request) {
-		ResponseEntity responseEntity = new ResponseEntity();
-		try {
-			List<CourseDateDataDto> list = schoolService.findStudentCourseData(request.getBizId(), request.getTime());
-			Map<String, Object> data = new HashMap<>();
-			data.put("list", list);
-			responseEntity.success(data, "成功");
-		} catch (Exception e) {
-			logger.error("获取当前课程情况异常", e);
-			responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-		}
-		return responseEntity;
-	}
-
-
-	@RequestMapping(value = "/adjustSchoolHours", method = RequestMethod.POST)
-	@ApiOperation(value = "校长调整上课时间", httpMethod = "POST", notes = "校长调整上课时间")
-	@ModifySecurity
-	public ResponseEntity adjustSchoolHours(@RequestParam(name = "accessToken") String accessToken,
-											@RequestBody AdjustSchoolHoursRequest request) {
-		ResponseEntity responseEntity = null;
-		try {
-			responseEntity = schoolService.adjustSchoolHours(request);
-		} catch (Exception e) {
-			logger.error("校长调整上课时间异常", e);
-            responseEntity = new ResponseEntity();
-			responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-		}
-		return responseEntity;
-	}
-
-
-	@RequestMapping(value = "/teacherCoursePlanDetail", method = RequestMethod.POST)
-	@ApiOperation(value = "获取当前老师排课状况", httpMethod = "POST", notes = "获取当前老师排课状况")
-	public ResponseEntity teacherCoursePlanDetail(@RequestParam(name = "accessToken") String accessToken,
-												  @RequestBody TeacherCoursePlanDetailRequest request) {
-		ResponseEntity responseEntity = new ResponseEntity();
-		try {
-			List<Map<String, String>> result = schoolService.teacherCoursePlanDetail(request);
-			Map<String, Object> data = new HashMap<String, Object>();
-			data.put("list", result);
-			responseEntity.success(data, "成功");
-		} catch (Exception e) {
-			logger.error("获取当前老师排课状况异常", e);
-			responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-		}
-		return responseEntity;
-	}
-
-	@RequestMapping(value = "/getTeacherCourseTimeDetail", method = RequestMethod.POST)
-	@ApiOperation(value = "获取当前老师排课状况V2", httpMethod = "POST", notes = "获取当前老师排课状况V2")
-	public ResponseEntity getTeacherCourseTimeDetail(@RequestParam(name = "accessToken") String accessToken,
-												  @RequestBody TeacherCoursePlanDetailRequest request) {
-		ResponseEntity responseEntity = new ResponseEntity();
-		try {
-			List<Map<String, String>> result = schoolService.getTeacherCourseTimeDetail(request);
-			Map<String, Object> data = new HashMap<String, Object>();
-			data.put("list", result);
-			responseEntity.success(data, "成功");
-		} catch (Exception e) {
-			logger.error("异常信息", e);
-			responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-		}
-		return responseEntity;
-	}
-
-	@RequestMapping(value = "/reviewRefundRequest", method = RequestMethod.POST)
-	@ApiOperation(value = "退款申请处理", httpMethod = "POST", notes = "退款申请处理")
-	@ModifySecurity
-	public ResponseEntity reviewRefundRequest(@RequestParam(name = "accessToken") String accessToken,
-											  @RequestBody ReviewRefundRequest request) {
-		ResponseEntity responseEntity = new ResponseEntity();
-		try {
-			schoolService.reviewRefund(request.getBizId(), request.getResult(),request.getRefuseReason());
-			responseEntity.success();
-		} catch (Exception e) {
-			logger.error("退款申请处理异常信息", e);
-			responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-		}
-		return responseEntity;
-	}
-
-
-	@RequestMapping(value = "/tutorshipFeedbackHistoryList", method = RequestMethod.POST)
-	@ApiOperation(value = "查看往期反馈记录列表", httpMethod = "POST", notes = "查看往期反馈记录列表")
-	public ResponseEntity tutorshipFeedbackHistoryList(@RequestParam(name = "accessToken") String accessToken,
-													   @RequestBody LessonFeedbackRequest request) {
-		ResponseEntity responseEntity = null;
-		try {
-			responseEntity = schoolService.lessonFeedbackHistory(request.getPlanId());
-		} catch (Exception e) {
-			logger.error("查看往期反馈记录列表异常", e);
-            responseEntity = new ResponseEntity();
-			responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-		}
-		return responseEntity;
-	}
-
-//	@RequestMapping(value = "/confirmAdjustTeacher", method = RequestMethod.POST)
-//	@ApiOperation(value = "同意(确定)换老师申请", httpMethod = "POST", notes = "同意(确定)换老师申请")
-//	@ModifySecurity
-//	public ResponseEntity confirmAdjustTeacher(@RequestParam(name = "accessToken") String accessToken,
-//											   @RequestBody ChangeTeacherRequest request) {
-//		ResponseEntity responseEntity = null;
-//		try {
-//			responseEntity = schoolService.confirmAdjustTeacher(request);
-//		} catch (Exception e) {
-//			responseEntity = new ResponseEntity();
-//			responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-//		}
-//		return responseEntity;
-//	}
-
-
-	/******************************************************人员管理*********************************************************/
-
-	@RequestMapping(value = "/myStudentList", method = RequestMethod.POST)
-	@ApiOperation(value = "我的学生列表", httpMethod = "POST", notes = "我的学生列表")
-	public ResponseEntity myStudentList(@RequestParam(name = "accessToken") String accessToken,
-										@RequestBody PageRequest request) {
-		ResponseEntity responseEntity = new ResponseEntity();
-		try {
-			String masterId = tokenManager.getUserId(accessToken);
-			Pageable pageable = initPage(request.getPageNo(), request.getPageSize());
-			responseEntity.success(schoolService.myStudentList(masterId, request.getMaxCreateTime(), pageable), "成功");
-		} catch (Exception e) {
-			logger.error("我的学生列表异常", e);
-			responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-		}
-		return responseEntity;
-	}
-
-	@RequestMapping(value = "/myTeacherList", method = RequestMethod.POST)
-	@ApiOperation(value = "我的老师列表", httpMethod = "POST", notes = "我的老师列表")
-	public ResponseEntity myTeacherList(@RequestParam(name = "accessToken") String accessToken,
-										@RequestBody PageRequest request) {
-		ResponseEntity responseEntity = new ResponseEntity();
-		try {
-			String masterId = tokenManager.getUserId(accessToken);
-			Pageable pageable = initPage(request.getPageNo(), request.getPageSize());
-			responseEntity.success(schoolService.myTeacherList(masterId, request.getMaxCreateTime(), pageable), "成功");
-		} catch (Exception e) {
-			logger.error("我的老师列表异常", e);
-			responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-		}
-		return responseEntity;
-	}
-
-
-	@RequestMapping(value = "/searchMyStudentList", method = RequestMethod.POST)
-	@ApiOperation(value = "搜索学员", httpMethod = "POST", notes = "搜索学员")
-	public ResponseEntity searchMyStudentList(@RequestParam(name = "accessToken") String accessToken,
-											  @RequestBody SearchKeyRequest request) {
-		ResponseEntity responseEntity = new ResponseEntity();
-		try {
-			String masterId = tokenManager.getUserId(accessToken);
-			List<StudentDto> list = schoolService.searchMyStudentList(masterId, request.getSearchKey());
-			Map<String, Object> data = new HashMap<String, Object>();
-			data.put("list", list);
-			responseEntity.success(data, "成功");
-		} catch (Exception e) {
-			logger.error("搜索学员异常", e);
-			responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-		}
-		return responseEntity;
-	}
-
-
-	@RequestMapping(value = "/searchMyTeacherList", method = RequestMethod.POST)
-	@ApiOperation(value = "搜索老师", httpMethod = "POST", notes = "搜索老师")
-	public ResponseEntity searchMyTeacherList(@RequestParam(name = "accessToken") String accessToken,
-											  @RequestBody SearchKeyRequest request) {
-		ResponseEntity responseEntity = new ResponseEntity();
-		try {
-			String masterId = tokenManager.getUserId(accessToken);
-			List<TeacherDto> list = schoolService.searchMyTeacherList(masterId, request.getSearchKey());
-			Map<String, Object> data = new HashMap<String, Object>();
-			data.put("list", list);
-			responseEntity.success(data, "成功");
-		} catch (Exception e) {
-            logger.error("异常", e);
-			responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-		}
-		return responseEntity;
-	}
-
-
-	@RequestMapping(value = "/teacherDetail", method = RequestMethod.POST)
-	@ApiOperation(value = "老师详情", httpMethod = "POST", notes = "老师详情")
-	public ResponseEntity teacherDetail(@RequestParam(name = "accessToken") String accessToken,
-										@RequestBody SearchTeacherRequest request) {
-		ResponseEntity responseEntity = new ResponseEntity();
-		try {
-		    if (StringUtils.isBlank(request.getTeacherId())){
-		        responseEntity.success(ResponseConstant.CODE_999, "传参teacherId为空");
-            } else {
-                responseEntity.success(schoolService.teacherDetail(request.getTeacherId(), request.getTeacherType()), "成功");
-            }
-		} catch (Exception e) {
-			logger.error("老师详情异常", e);
-			responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-		}
-		return responseEntity;
-	}
-
-	@RequestMapping(value = "/teacherInfo", method = RequestMethod.POST)
-	@ApiOperation(value = "老师个人简历", httpMethod = "POST", notes = "老师详情")
-	public ResponseEntity teacherInfo(@RequestParam(name = "accessToken") String accessToken,
-										@RequestBody SearchTeacherInfoReq req) {
-		ResponseEntity responseEntity = new ResponseEntity();
-		try {
-			if (StringUtils.isBlank(req.getTeacherId())){
-				responseEntity.success(ResponseConstant.CODE_999, "传参teacherId为空");
-			} else {
-				responseEntity.success(schoolService.teacherInfo(req.getTeacherId()), "成功");
-			}
-		} catch (Exception e) {
-			logger.error("老师个人简历异常", e);
-			responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-		}
-		return responseEntity;
-	}
-
-
-	@RequestMapping(value = "/saveTeacherInfo", method = RequestMethod.POST)
-	@ApiOperation(value = "完善老师信息", httpMethod = "POST", notes = "完善老师信息")
-	public ResponseEntity saveTeacherInfo(@RequestParam(name = "accessToken") String accessToken,
-										  @RequestBody TeacherInfoRequest request) {
-		ResponseEntity responseEntity = new ResponseEntity();
-		try {
-			schoolService.saveTeacherInfo(request);
-			responseEntity.success();
-		} catch (Exception e) {
-			logger.error("完善老师信息异常", e);
-			responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-		}
-		return responseEntity;
-	}
-
-	@RequestMapping(value = "/saveStudentInfo", method = RequestMethod.POST)
-	@ApiOperation(value = "完善学员信息", httpMethod = "POST", notes = "完善学员信息")
-	public ResponseEntity saveStudentInfo(@RequestParam(name = "accessToken") String accessToken,
-										  @RequestBody StudentInfoRequest request) {
-		ResponseEntity responseEntity = new ResponseEntity();
-		try {
-			schoolService.saveStudentInfo(request);
-			responseEntity.success();
-		} catch (Exception e) {
-			logger.error("完善学员信息异常", e);
-			responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-		}
-		return responseEntity;
-	}
-
-	@RequestMapping(value = "/teacherListForStudent", method = RequestMethod.POST)
-	@ApiOperation(value = "查看学生授课老师列表", httpMethod = "POST", notes = "查看学生授课老师列表")
-	public ResponseEntity teacherListForStudent(@RequestParam(name = "accessToken") String accessToken,
-												@RequestBody ForStudentRequest request) {
-		ResponseEntity responseEntity = null;
-		try {
-			String masterId = tokenManager.getUserId(accessToken);
-			responseEntity = schoolService.teacherListForStudent(masterId,request);
-		} catch (Exception e) {
-			logger.error("查看学生授课老师列表异常", e);
-			responseEntity = new ResponseEntity();
-			responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-		}
-		return responseEntity;
-	}
-
-
-	@RequestMapping(value = "/courseListForStudent", method = RequestMethod.POST)
-	@ApiOperation(value = "查看学生课程表", httpMethod = "POST", notes = "查看学生课程表")
-	public ResponseEntity courseListForStudent(@RequestParam(name = "accessToken") String accessToken,
-											   @RequestBody StudentRequest request) {
-		ResponseEntity responseEntity = null;
-		try {
-			String masterId = tokenManager.getUserId(accessToken);
-			responseEntity = schoolService.courseListForStudent(masterId, request.getStudentId());
-		} catch (Exception e) {
-			logger.error("查看学生课程表异常", e);
-			responseEntity = new ResponseEntity();
-			responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-		}
-		return responseEntity;
-	}
-
-
-	@RequestMapping(value = "/studentInfo", method = RequestMethod.POST)
-	@ApiOperation(value = "查看学生资料", httpMethod = "POST", notes = "查看学生资料")
-	public ResponseEntity studentInfo(@RequestParam(name = "accessToken") String accessToken,
-									  @RequestBody StudentRequest request) {
-		ResponseEntity responseEntity = new ResponseEntity();
-		try {
-			//根据vipid查询小孩
-            if (StringUtils.isBlank(request.getStudentId())){
-                responseEntity.success(ResponseConstant.CODE_999, "传入的学生id为空");
-            } else {
-                StudentInfoDto dto = schoolService.findStudentInfo(request.getStudentId());
-                responseEntity.success(dto, "成功");
-            }
-		} catch (Exception e) {
-			logger.error("查看学生资料异常", e);
-			responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-		}
-		return responseEntity;
-	}
-
-
-	@RequestMapping(value = "/orderListForStudent", method = RequestMethod.POST)
-	@ApiOperation(value = "查看学生订单", httpMethod = "POST", notes = "查看学生订单")
-	public ResponseEntity orderListForStudent(@RequestParam(name = "accessToken") String accessToken,
-											  @RequestBody StudentRequest request) {
-		ResponseEntity responseEntity = new ResponseEntity();
-		try {
-			String masterId = tokenManager.getUserId(accessToken);
-			List<OrderDto> list = schoolService.orderListForStudent(masterId, request.getStudentId());
-			Map<String, Object> data = new HashMap<String, Object>();
-			data.put("list", list);
-			responseEntity.success(data, "成功");
-		} catch (Exception e) {
-			logger.error("查看学生订单异常", e);
-			responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-		}
-		return responseEntity;
-	}
-
-	@RequestMapping(value = "/teacherListForSystemMatch", method = RequestMethod.POST)
-	@ApiOperation(value = "获取系统自动匹配的推荐老师列表", httpMethod = "POST", notes = "获取系统自动匹配的推荐老师列表")
-	public ResponseEntity teacherListForSystemMatch(@RequestParam(name = "accessToken") String accessToken,
-													@RequestBody ForSystemMatchRequest request) {
-		ResponseEntity responseEntity = null;
-		try {
-			String masterId = tokenManager.getUserId(accessToken);
-			responseEntity = schoolService.teacherListForSystemMatch(masterId, request);
-		} catch (Exception e) {
-			logger.error("异常日志", e);
-			responseEntity = new ResponseEntity();
-			responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-		}
-		return responseEntity;
-	}
-
-
-	@RequestMapping(value = "/estimateOrderMoney", method = RequestMethod.POST)
-	@ApiOperation(value = "预估订单价格", httpMethod = "POST", notes = "预估订单价格")
-	public ResponseEntity estimateOrderMoney(@RequestParam(name = "accessToken") String accessToken,
-											 @RequestBody EstimateOrderRequest request) {
-		ResponseEntity responseEntity = new ResponseEntity();
-		try {
-			//如果校长是私塾家VIP体验合作馆则预估价格为0
-			String masterId = tokenManager.getUserId(accessToken);
-			TbLibManager master = managerService.findByUserId(masterId, Constant.SCHOOL_MASTER_TYPE);
-			if("844abb1c-0599-435d-b125-3a6e65411bf7".equals(master.getLibId())||
-					"f44b335b-126f-4f78-855a-501656a6ad91".equals(master.getLibId())||
-					master.getLibId().equals("cdf451d8-4764-4522-a591-64531cef0394")) {
-				Map<String, Object> data = new HashMap<String, Object>();
-				data.put("orderMoney", "0");
-				data.put("coursePrice", "0");
-				responseEntity.success(data, "成功");
-				return responseEntity;
-			}
-			responseEntity = schoolService.computeOrderAmount(request.getStudentId(),request.getCourseCount(),request.getTeacherType());
-		} catch (Exception e) {
-			logger.error("异常日志", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-		}
-		return responseEntity;
-	}
-
-	@RequestMapping(value = "/commitOrder", method = RequestMethod.POST)
-	@ApiOperation(value = "提交订单", httpMethod = "POST", notes = "提交订单")
-	@ModifySecurity
-	public ResponseEntity commitOrder(@RequestParam(name = "accessToken") String accessToken,
-									  @RequestBody CommitOrderRequest request) {
-		ResponseEntity responseEntity = null;
-		String userId = tokenManager.getUserId(accessToken);
-		try {
-			responseEntity = schoolService.commitOrder(request, userId);
-		} catch (Exception e) {
-			//抛异常将1分钟不能重复下单key置为失效
-			tokenManager.delString(userId+request.getStudentId()+"VALIDATE_TIME");
-			responseEntity = new ResponseEntity();
-			logger.error("异常日志", e);
-			responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-		}
-		return responseEntity;
-	}
-
-	@RequestMapping(value = "/refundSchedule", method = RequestMethod.POST)
-	@ApiOperation(value = "退款进度查询", httpMethod = "POST", notes = "退款进度查询")
-	public ResponseEntity refundSchedule(@RequestParam(name = "accessToken") String accessToken,
-										 @RequestBody RefundRequest request) {
-		ResponseEntity responseEntity = new ResponseEntity();
-		try {
-			RefundScheduleDto data = schoolService.refundSchedule(request.getOrderId());
-			responseEntity.success(data, "成功");
-		} catch (Exception e) {
-			logger.error("退款进度查询异常", e);
-			responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-		}
-		return responseEntity;
-	}
-	
-	@RequestMapping(value = "/giveLessonsServiceDetailForStudent", method = RequestMethod.POST)
-	@ApiOperation(value = "查看X学生一对一产品(授课)服务详情", httpMethod = "POST", notes = "查看X学生一对一产品(授课)服务详情")
-	public ResponseEntity giveLessonsServiceDetailForStudent(@RequestParam(name = "accessToken") String accessToken,
-										 @RequestBody StudentRequest request) {
-		ResponseEntity responseEntity = null;
-		try {
-			String userId = tokenManager.getUserId(accessToken);
-			responseEntity = schoolService.giveLessonsServiceDetailForStudent(userId, request.getStudentId(),request.getSubjectName());
-		} catch (Exception e) {
-			logger.error("查看X学生一对一产品(授课)服务详情异常", e);
-			responseEntity = new ResponseEntity();
-			responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-		}
-		return responseEntity;
-	}
-	
-	@RequestMapping(value = "/homeworkLibraryServiceDetailForStudent", method = RequestMethod.POST)
-	@ApiOperation(value = "查看X学生作业吧产品务详情", httpMethod = "POST", notes = "查看X学生作业吧产品务详情")
-	public ResponseEntity homeworkLibraryServiceDetailForStudent(@RequestParam(name = "accessToken") String accessToken,
-										 @RequestBody StudentRequest request) {
-		ResponseEntity responseEntity = new ResponseEntity();
-		try {
-			if (StringUtils.isNotBlank(request.getStudentId())){
-				responseEntity.success(schoolService.studentZybDetail(request.getStudentId()), "成功");
-			} else {
-				responseEntity.failure("学生id不能为空");
-			}
-		} catch (Exception e) {
-			logger.error("查看X学生作业吧产品务详情异常", e);
-			responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-		}
-		return responseEntity;
-	}
-	
-	
-	/******************************************************2018-9-30 新增接口*********************************************************/
-	@RequestMapping(value = "/refuseAdjustSchoolHours", method = RequestMethod.POST)
-	@ApiOperation(value = "拒绝调课申请", httpMethod = "POST", notes = "拒绝调课申请")
-	public ResponseEntity refuseAdjustSchoolHours(@RequestParam(name = "accessToken") String accessToken,@RequestBody RefuseAdjustRequest request) {
-		ResponseEntity responseEntity = null;
-		try {
-			responseEntity = schoolService.refuseAdjustSchoolHours(request.getBizId(),request.getRefuseReason());
-		} catch (Exception e) {
-			logger.error("拒绝调课申请异常", e);
-			responseEntity = new ResponseEntity();
-			responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-		}
-		return responseEntity;
-	}
-	
-	@RequestMapping(value = "/refuseAdjustTeacher", method = RequestMethod.POST)
-	@ApiOperation(value = "拒绝换老师", httpMethod = "POST", notes = "拒绝换老师")
-	public ResponseEntity refuseAdjustTeacher(@RequestParam(name = "accessToken") String accessToken,@RequestBody RefuseAdjustRequest request) {
-		ResponseEntity responseEntity = null;
-		try {
-			responseEntity = schoolService.refuseAdjustTeacher(request.getBizId(),request.getRefuseReason());
-		} catch (Exception e) {
-			logger.error("拒绝换老师异常", e);
-			responseEntity = new ResponseEntity();
-			responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-		}
-		return responseEntity;
-	}
-
-	@RequestMapping(value = "/teacherListForGroup", method = RequestMethod.POST)
-	@ApiOperation(value = "小课老师列表", httpMethod = "POST", notes = "小课老师列表")
-	public ResponseEntity teacherListForGroup(@RequestParam(name = "accessToken") String accessToken,
-		@RequestBody Teachers4GroupRequest request) {
-			ResponseEntity responseEntity = new ResponseEntity();
-			try {
-				String masterId = tokenManager.getUserId(accessToken);
-				List<TeacherDto> list = schoolService.teacherList4Group(masterId, request);
-				Map<String, Object> data = new HashMap<>();
-				data.put("list", list);
-				responseEntity.success(data, "查询成功");
-			} catch (Exception e) {
-				logger.error("异常日志", e);
-				responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-			}
-			return responseEntity;
-	}
-}

Fichier diff supprimé car celui-ci est trop grand
+ 0 - 1044
ssj-aijia-api/src/main/java/com/ssj/aijia/schoolmaster/controller/v1/SchoolV1Controller.java


+ 0 - 850
ssj-aijia-api/src/main/java/com/ssj/aijia/student/controller/StudentAppController.java

@@ -1,850 +0,0 @@
-package com.ssj.aijia.student.controller;
-
-
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.commons.lang3.StringUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.data.domain.Page;
-import org.springframework.data.domain.Pageable;
-import org.springframework.data.domain.Sort.Direction;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
-
-import com.alibaba.dubbo.config.annotation.Reference;
-import com.ssj.bean.sys.homework.domain.HomeworkPicture;
-import com.ssj.framework.basic.utils.DateHelper;
-import com.ssj.framework.core.common.controller.BaseController;
-import com.ssj.framework.core.security.annotation.IgnoreSecurity;
-import com.ssj.framework.core.security.annotation.ModifySecurity;
-import com.ssj.framework.core.security.manager.TokenManager;
-import com.ssj.framework.core.util.PropertiesUtil;
-import com.ssj.framework.core.util.ResponseConstant;
-import com.ssj.framework.core.util.ResponseEntity;
-import com.ssj.framework.weixin.util.DateUtil;
-import com.ssj.service.conch.common.service.ConchCommonService;
-import com.ssj.service.conch.conch.request.DeleteHomeworkRequest;
-import com.ssj.service.conch.parents.dto.CorrectDetailDto2;
-import com.ssj.service.conch.parents.request.version4.ChildSmarttimeListReq;
-import com.ssj.service.conch.parents.request.version4.HomeworkTaskReq;
-import com.ssj.service.conch.student.dto.AppCorrectDetailDto;
-import com.ssj.service.conch.student.dto.CircleCommentRankDto;
-import com.ssj.service.conch.student.dto.NewUserFriendsApplyDto;
-import com.ssj.service.conch.student.dto.SmartTimeGroupDTO;
-import com.ssj.service.conch.student.dto.UserFriendDto;
-import com.ssj.service.conch.student.dto.UserFriendsApplyDto;
-import com.ssj.service.conch.student.dto.WrongTopicDetailDto;
-import com.ssj.service.conch.student.request.AcceptSolutionRequest;
-import com.ssj.service.conch.student.request.ChildPictureReq;
-import com.ssj.service.conch.student.request.CorrectWrongTopicRequest;
-import com.ssj.service.conch.student.request.EndHomeworkReq;
-import com.ssj.service.conch.student.request.FirstLevelCommentsReq;
-import com.ssj.service.conch.student.request.FriendUserIdConfirmReq;
-import com.ssj.service.conch.student.request.FriendUserIdReq;
-import com.ssj.service.conch.student.request.FriendUserNameReq;
-import com.ssj.service.conch.student.request.HomeworkRequest;
-import com.ssj.service.conch.student.request.ProblemIdRequest;
-import com.ssj.service.conch.student.request.ProblemReq;
-import com.ssj.service.conch.student.request.RankingListRequest;
-import com.ssj.service.conch.student.request.ReplyCommentsReq;
-import com.ssj.service.conch.student.request.ReplySchoolmateCircleReq;
-import com.ssj.service.conch.student.request.SchoolmateCircleReq;
-import com.ssj.service.conch.student.request.SchoolmateDetailReq;
-import com.ssj.service.conch.student.request.SecondLevelCommentsReq;
-import com.ssj.service.conch.student.request.SendSchoolmateCircleReq;
-import com.ssj.service.conch.student.request.SetLikeReq;
-import com.ssj.service.conch.student.request.StartHomeworkReq;
-import com.ssj.service.conch.student.request.StudentVipReq;
-import com.ssj.service.conch.student.request.SwipeQrCodeRequest;
-import com.ssj.service.conch.student.request.UploadPictureReq;
-import com.ssj.service.conch.student.request.WrongTopicBookRequest;
-import com.ssj.service.conch.student.service.StudentAppService;
-import com.ssj.service.conch.teacher.request.oneonly.RephotoReq;
-import com.ssj.service.sys.homework.service.HomeworkPictureService;
-import com.ssj.service.sys.schoolmatecircle.service.SSJUserFriendApplyService;
-import com.ssj.service.sys.schoolmatecircle.service.SSJUserFriendService;
-import com.ssj.service.weixin.user.request.LoginTypeParam;
-
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-
-@Api(value = "学生端app相关的接口", tags = "学生端app相关的接口")
-@RestController
-@RequestMapping("/api/student/app")
-public class StudentAppController extends BaseController {
-
-    @Autowired
-    private TokenManager tokenManager;
-
-    @Reference(version = "1.0" ,timeout = 60000)
-    private StudentAppService studentAppService;
-    
-    @Reference(version = "1.0" ,timeout = 60000)
-    private ConchCommonService conchCommonService;
-
-
-    
-    @Reference(version = "1.0" ,timeout = 60000)
-    private SSJUserFriendService userFriendService;
-    
-    @Reference(version = "1.0" ,timeout = 60000)
-    private SSJUserFriendApplyService userFriendApplyService;
-    
-    @Reference(version = "1.0" ,timeout = 60000)
-	private HomeworkPictureService homeworkPictureService;
-
-    /**
-     * ========================================我的==========================================
-     */
-    @RequestMapping(value = "/swipeQrCode", method = RequestMethod.POST)
-    @IgnoreSecurity
-    @ApiOperation(value = "扫二维码通用接口", httpMethod = "POST", response = ResponseEntity.class, notes = "扫二维码通用接口")
-    public ResponseEntity swipeQrCode(@RequestBody SwipeQrCodeRequest request) {
-        ResponseEntity responseEntity = null;
-        try {
-        	responseEntity = conchCommonService.swipeQrCode(request);
-        } catch (Exception e) {
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-    
-    @RequestMapping(value = "/changeAccount", method = RequestMethod.POST)
-    @IgnoreSecurity
-    @ApiOperation(value = "切换账号", httpMethod = "POST", response = ResponseEntity.class, notes = "切换账号")
-    public ResponseEntity changeAccount(@RequestParam(name = "accessToken") String  accessToken, @RequestBody StudentVipReq request) {
-        ResponseEntity responseEntity = null;
-        try {
-        	responseEntity = studentAppService.changeAccount(accessToken,request.getVipId(),request.getPlatform(),request.getXingeToken());
-        } catch (Exception e) {
-        	responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-    
-    @RequestMapping(value = "/getMyInfo", method = RequestMethod.POST)
-    @IgnoreSecurity
-    @ApiOperation(value = "获取我的信息", httpMethod = "POST", response = ResponseEntity.class, notes = "切换账号")
-    public ResponseEntity getMyInfo(@RequestParam(name = "accessToken") String  accessToken) {
-        ResponseEntity responseEntity = null;
-        try {
-        	String userId = tokenManager.getUserId(accessToken);
-        	responseEntity = studentAppService.getMyInfo(userId);
-        } catch (Exception e) {
-        	responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    /**
-     * ========================================同学圈==========================================
-     */
-    @RequestMapping(value = "/schoolmateCircleList", method = RequestMethod.POST)
-    @ApiOperation(value = "查询分享/答题榜列表", httpMethod = "POST", notes = "查询分享/答题榜列表")
-    public ResponseEntity schoolmateCircleList(@RequestParam(name = "accessToken") String accessToken, @RequestBody SchoolmateCircleReq req){
-        ResponseEntity responseEntity;
-        logger.info("accessToken:"+accessToken+"*****查询同学圈列表入参:"+req.toString());
-        try{
-            Map<String, Object> params = new HashMap<>(16);
-            String userId = tokenManager.getUserId(accessToken);
-            params.put("userId", userId);
-            params.put("type",req.getType());
-            params.put("authority",req.getAuthority());
-            params.put("maxCreateTime",req.getMaxCreateTime());
-            Pageable pageable = initPage(req.getPageNo(), req.getPageSize());
-            responseEntity = studentAppService.schoolmateCircleList(params, pageable);
-        } catch (Exception e){
-            e.printStackTrace();
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/setLike", method = RequestMethod.POST)
-    @ApiOperation(value = "点赞", httpMethod = "POST", notes = "点赞")
-    public ResponseEntity setLike(@RequestParam(name = "accessToken") String accessToken, @RequestBody SetLikeReq req){
-        ResponseEntity responseEntity;
-        logger.info("accessToken:"+accessToken+"*****点赞入参:"+req.toString());
-        try{
-            String userId = tokenManager.getUserId(accessToken);
-            responseEntity = studentAppService.setLike(req.getHeadId(),req.getType(),userId);
-        } catch (Exception e){
-            e.printStackTrace();
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/firstLevelCommentsList", method = RequestMethod.POST)
-    @ApiOperation(value = "查询一级评论(答题榜)", httpMethod = "POST", notes = "查询一级评论")
-    public ResponseEntity firstLevelCommentsList(@RequestParam(name = "accessToken") String accessToken, @RequestBody FirstLevelCommentsReq req){
-        ResponseEntity responseEntity;
-        logger.info("accessToken:"+accessToken+"*****查询一级评论(答题榜):"+req.toString());
-        try{
-            Map<String, Object> params = new HashMap<>(16);
-            String userId = tokenManager.getUserId(accessToken);
-            params.put("userId",userId);
-            params.put("schoolmateCircleId",req.getSchoolmateCircleId());
-            params.put("maxCreateTime",req.getMaxCreateTime());
-            Pageable pageable = initPage(req.getPageNo(), req.getPageSize());
-            responseEntity = studentAppService.firstLevelCommentsList(params,pageable);
-        } catch (Exception e){
-            e.printStackTrace();
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/secondLevelCommentsList", method = RequestMethod.POST)
-    @ApiOperation(value = "查询一级评论下二级评论(答题榜)", httpMethod = "POST", notes = "查询一级评论下二级评论")
-    public ResponseEntity secondLevelCommentsList(@RequestParam(name = "accessToken") String accessToken, @RequestBody SecondLevelCommentsReq req){
-        ResponseEntity responseEntity;
-        logger.info("accessToken:"+accessToken+"*****查询一级评论下二级评论(答题榜):"+req.toString());
-        try{
-            Map<String, Object> params = new HashMap<>(16);
-            Pageable pageable = initPage(req.getPageNo(), req.getPageSize());
-            params.put("commentId",req.getCommentId());
-            params.put("maxCreateTime",req.getMaxCreateTime());
-            responseEntity = studentAppService.secondLevelCommentsList(params,pageable);
-        } catch (Exception e){
-            e.printStackTrace();
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/findCommentsList", method = RequestMethod.POST)
-    @ApiOperation(value = "查询评论(分享)", httpMethod = "POST", notes = "查询评论(分享)")
-    public ResponseEntity findCommentsList(@RequestParam(name = "accessToken") String accessToken, @RequestBody FirstLevelCommentsReq req){
-        ResponseEntity responseEntity;
-        logger.info("accessToken:"+accessToken+"*****查询评论(分享):"+req.toString());
-        try{
-            Map<String, Object> params = new HashMap<>(16);
-            String userId = tokenManager.getUserId(accessToken);
-            params.put("userId",userId);
-            Pageable pageable = initPage(req.getPageNo(), req.getPageSize());
-            params.put("schoolmateCircleId",req.getSchoolmateCircleId());
-            params.put("maxCreateTime",req.getMaxCreateTime());
-            responseEntity = studentAppService.findCommentsList(params,pageable);
-        } catch (Exception e){
-            e.printStackTrace();
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/queryShortcuts", method = RequestMethod.POST)
-    @ApiOperation(value = "查询快捷回复内容", httpMethod = "POST", notes = "查询快捷回复内容")
-    public ResponseEntity queryShortcuts(@RequestParam(name = "accessToken") String accessToken){
-        ResponseEntity responseEntity;
-        try{
-            responseEntity = studentAppService.queryShortcuts();
-        } catch (Exception e){
-            e.printStackTrace();
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/replySchoolmateCircle", method = RequestMethod.POST)
-    @ApiOperation(value = "回复同学圈评论", httpMethod = "POST", notes = "回复同学圈评论")
-    public ResponseEntity replySchoolmateCircle(@RequestParam(name = "accessToken") String accessToken, @RequestBody ReplySchoolmateCircleReq req){
-        ResponseEntity responseEntity;
-        logger.info("accessToken:"+accessToken+"*****回复同学圈评论:"+req.toString());
-        try{
-            String userId = tokenManager.getUserId(accessToken);
-            responseEntity = studentAppService.replySchoolmateCircle(req.getSchoolmateCircleId(),req.getContent(),userId,req.getMaterial());
-        } catch (Exception e){
-            e.printStackTrace();
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/replyComments", method = RequestMethod.POST)
-    @ApiOperation(value = "回复答题榜下评论人评论下其他评论人评论", httpMethod = "POST", notes = "回复答题榜下评论人评论下其他评论人评论")
-    public ResponseEntity replyComments(@RequestParam(name = "accessToken") String accessToken, @RequestBody ReplyCommentsReq req){
-        ResponseEntity responseEntity;
-        logger.info("accessToken:"+accessToken+"*****回复答题榜下评论人评论下其他评论人评论:"+req.toString());
-        try{
-            String userId = tokenManager.getUserId(accessToken);
-            responseEntity = studentAppService.replyComments(userId,req.getContent(),req.getCommentId(),req.getBeCommentedUserId(),req.getType());
-        } catch (Exception e){
-            e.printStackTrace();
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/sendSchoolmateCircle", method = RequestMethod.POST)
-    @ApiOperation(value = "发同学圈", httpMethod = "POST", notes = "发同学圈")
-    public ResponseEntity sendSchoolmateCircle(@RequestParam(name = "accessToken") String accessToken, @RequestBody SendSchoolmateCircleReq req){
-        ResponseEntity responseEntity;
-        logger.info("accessToken:"+accessToken+"*****发同学圈:"+req.toString());
-        try{
-            String userId = tokenManager.getUserId(accessToken);
-            responseEntity = studentAppService.sendSchoolmateCircle(req.getType(),userId,req.getContent(),req.getMaterial());
-        } catch (Exception e){
-            e.printStackTrace();
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/queryCircleMessageCount", method = RequestMethod.POST)
-    @ApiOperation(value = "查询同学圈消息总数", httpMethod = "POST", response = ResponseEntity.class, notes = "查询同学圈消息总数")
-    public ResponseEntity queryCircleMessageCount(@RequestParam(name = "accessToken") String  accessToken) {
-        ResponseEntity responseEntity;
-        try {
-            String userId = tokenManager.getUserId(accessToken);
-            responseEntity = studentAppService.queryCircleMessageCount(userId);
-        } catch (Exception e) {
-            e.printStackTrace();
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/circleMessageList", method = RequestMethod.POST)
-    @ApiOperation(value = "同学圈消息列表", httpMethod = "POST", response = ResponseEntity.class, notes = "同学圈消息列表")
-    public ResponseEntity circleMessageList(@RequestParam(name = "accessToken") String  accessToken) {
-        ResponseEntity responseEntity;
-        try {
-            String userId = tokenManager.getUserId(accessToken);
-            responseEntity = studentAppService.circleMessageList(userId);
-        } catch (Exception e) {
-            e.printStackTrace();
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/acceptSolution", method = RequestMethod.POST)
-    @ApiOperation(value = "采纳解答", httpMethod = "POST", response = ResponseEntity.class, notes = "采纳解答")
-    public ResponseEntity acceptSolution(@RequestParam(name = "accessToken") String  accessToken,
-                                         @RequestBody AcceptSolutionRequest req) {
-        ResponseEntity responseEntity;
-        logger.info("accessToken:"+accessToken+"*****采纳解答:"+req.toString());
-        try {
-            String userId = tokenManager.getUserId(accessToken);
-            responseEntity = studentAppService.acceptSolution(req.getCommentId(), userId);
-        } catch (Exception e) {
-            e.printStackTrace();
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/schoolmateCircleDetail", method = RequestMethod.POST)
-    @ApiOperation(value = "查询分享/答题榜详情", httpMethod = "POST", notes = "查询分享/答题榜详情")
-    public ResponseEntity schoolmateCircleDetail(@RequestParam(name = "accessToken") String accessToken, @RequestBody SchoolmateDetailReq req){
-        ResponseEntity responseEntity;
-        logger.info("accessToken:"+accessToken+"*****查询分享/答题榜详情:"+req.toString());
-        try{
-            String userId = tokenManager.getUserId(accessToken);
-            Pageable pageable = initPage(req.getPageNo(), req.getPageSize());
-            responseEntity = studentAppService.schoolmateCircleDetail(req.getId(), userId, pageable);
-        } catch (Exception e){
-            e.printStackTrace();
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-    /**
-     * ========================================排行榜==========================================
-     */
-    @RequestMapping(value = "/rankingList", method = RequestMethod.POST)
-    @ApiOperation(value = "查询排行榜", httpMethod = "POST", response = ResponseEntity.class, notes = "查询排行榜")
-    public ResponseEntity rankingList(@RequestParam(name = "accessToken") String  accessToken, @RequestBody RankingListRequest request) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            List<CircleCommentRankDto> list = studentAppService.rankingList(request.getType(), request.getTime());
-            Map<String, Object> data = new HashMap<>();
-            data.put("list", list);
-            responseEntity.success(data,"成功");
-        } catch (Exception e) {
-            logger.error("查询排行榜", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "查询排行榜");
-        }
-        return responseEntity;
-    }
-
-
-    /**
-     * ========================================错题本==========================================
-     */
-    @RequestMapping(value = "/wrongTopicBook", method = RequestMethod.POST)
-    @ApiOperation(value = "查询错题本列表", httpMethod = "POST", response = ResponseEntity.class, notes = "查询错题本列表")
-    public ResponseEntity wrongTopicBook(@RequestParam(name = "accessToken") String  accessToken, @RequestBody WrongTopicBookRequest request) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            Pageable pageable = initPage(request.getPageNo(), request.getPageSize());
-            String maxCreateTime = request.getMaxCreateTime();
-            Map<String, Object> data = studentAppService.wrongTopicBook(request.getVipId(), request.getSubject(),
-                    maxCreateTime == null ? DateUtil.format_yyyyMMddHHmmss(new Date()) : maxCreateTime, request.getType(), pageable);
-            responseEntity.success(data,"成功");
-        } catch (Exception e) {
-            logger.error("查询错题本列表", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "查询错题本列表");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/wrongTopicDetail", method = RequestMethod.POST)
-    @ApiOperation(value = "查询错题详情", httpMethod = "POST", response = ResponseEntity.class, notes = "查询错题详情")
-    public ResponseEntity wrongTopicDetail(@RequestParam(name = "accessToken") String  accessToken, @RequestBody HomeworkRequest request) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            WrongTopicDetailDto data = studentAppService.wrongTopicDetail(request.getWorkId());
-            responseEntity.success(data,"成功");
-        } catch (Exception e) {
-            logger.error("查询错题详情", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "查询错题详情");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/correctWrongTopic", method = RequestMethod.POST)
-    @ModifySecurity
-    @ApiOperation(value = "订正错题", httpMethod = "POST", response = ResponseEntity.class, notes = "订正错题")
-    public ResponseEntity correctWrongTopic(@RequestParam(name = "accessToken") String  accessToken, @RequestBody CorrectWrongTopicRequest request) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            boolean data = studentAppService.reviseWrongTopic(request);
-            if (data) {
-                responseEntity.success("成功");
-            } else {
-                responseEntity.failure("订正失败");
-            }
-        } catch (Exception e) {
-            logger.error("订正错题", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "订正错题");
-        }
-        return responseEntity;
-    }
-
-
-    /**
-     * ========================================难题==========================================
-     */
-    @RequestMapping(value = "/problemList", method = RequestMethod.POST)
-    @ApiOperation(value = "难题列表", httpMethod = "POST", response = ResponseEntity.class, notes = "难题列表")
-    public ResponseEntity problemList(@RequestParam(name = "accessToken") String  accessToken, @RequestBody ProblemReq req) {
-        ResponseEntity responseEntity;
-        try{
-            Pageable pageable = initPage(req.getPageNo(), req.getPageSize());
-            responseEntity = studentAppService.problemList(req,pageable);
-        } catch (Exception e){
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/answeredProblemDetail", method = RequestMethod.POST)
-    @ApiOperation(value = "已解答难题详情", httpMethod = "POST", response = ResponseEntity.class, notes = "已解答难题详情")
-    public ResponseEntity answeredProblemDetail(@RequestParam(name = "accessToken") String  accessToken, @RequestBody ProblemIdRequest req) {
-        ResponseEntity responseEntity;
-        try{
-            responseEntity = studentAppService.answeredProblemDetail(req);
-        } catch (Exception e){
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    /**
-     * ========================================作业==========================================
-     */
-    @RequestMapping(value = "/homeworkTask", method = RequestMethod.POST)
-    @ApiOperation(value = "作业任务", httpMethod = "POST", response = ResponseEntity.class, notes = "作业任务")
-    public ResponseEntity homeworkTask(@RequestParam(name = "accessToken") String  accessToken, @RequestBody HomeworkTaskReq request) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            Pageable pageable = initPage(request.getPageNo(), request.getPageSize());
-            String maxCreateTime = request.getMaxCreateTime();
-            if (StringUtils.isBlank(maxCreateTime)){
-                maxCreateTime = DateUtil.format_yyyyMMddHHmmss(new Date());
-            } else {
-                Date date = DateUtil.parse_yyyyMMddHHmmss(maxCreateTime);
-                if (date == null) {
-                    responseEntity.failure("请求参数错误");
-                    return responseEntity;
-                }
-            }
-            Map<String, Object> data = studentAppService.appHomeworkTask(request.getVipId(), maxCreateTime, pageable);
-            responseEntity.success(data,"成功");
-        } catch (Exception e) {
-            logger.error("学生端app-作业任务", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "作业任务");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/homeworkTaskDetail", method = RequestMethod.POST)
-    @ApiOperation(value = "作业任务详情", httpMethod = "POST", response = ResponseEntity.class, notes = "作业任务详情")
-    public ResponseEntity homeworkTaskDetail(@RequestParam(name = "accessToken") String  accessToken, @RequestBody HomeworkRequest request) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            AppCorrectDetailDto data = studentAppService.homeworkTaskDetail(request.getWorkId());
-            if (data != null) {
-                responseEntity.success(data,"成功");
-            } else {
-                responseEntity.failure("未查询到作业原图");
-            }
-        } catch (Exception e) {
-            logger.error("学生端app-作业任务详情", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "作业任务详情");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/homeworkTaskDetail2", method = RequestMethod.POST)
-    @ApiOperation(value = "作业任务详情2", httpMethod = "POST", response = ResponseEntity.class, notes = "作业任务详情2")
-    public ResponseEntity homeworkTaskDetail2(@RequestParam(name = "accessToken") String  accessToken, @RequestBody HomeworkRequest request) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            CorrectDetailDto2 data = studentAppService.homeworkTaskDetail2(request.getWorkId());
-            if (data != null) {
-                responseEntity.success(data,"成功");
-            } else {
-                responseEntity.failure("未查询到作业原图");
-            }
-        } catch (Exception e) {
-            logger.error("学生端-作业任务详情", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "作业任务详情");
-        }
-        return responseEntity;
-    }
-    
-    @RequestMapping(value = "/startHomework", method = RequestMethod.POST)
-    @ModifySecurity
-    @ApiOperation(value = "开始作业", httpMethod = "POST", response = ResponseEntity.class, notes = "开始作业")
-    public ResponseEntity startHomework(@RequestParam(name = "accessToken") String  accessToken, @RequestBody StartHomeworkReq req) {
-        ResponseEntity responseEntity;
-        try {
-        	responseEntity = studentAppService.startHomework(req.getVipId(),req.getCourseName(),req.getCurrentTime());
-        } catch (Exception e) {
-        	logger.error("学生端app-开始作业", e);
-        	responseEntity = new ResponseEntity();
-        	responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-    
-    @RequestMapping(value = "/endHomework", method = RequestMethod.POST)
-    @ModifySecurity
-    @ApiOperation(value = "完成作业", httpMethod = "POST", response = ResponseEntity.class, notes = "完成作业")
-    public ResponseEntity endHomework(@RequestParam(name = "accessToken") String  accessToken, @RequestBody EndHomeworkReq req) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            studentAppService.endHomework(req.getHomeworkId(), req.getEndTime(), req.getUsedTime());
-            responseEntity.success();
-        } catch (Exception e) {
-        	logger.error("学生端app-完成作业", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-    
-    @RequestMapping(value = "/deleteHomework", method = RequestMethod.POST)
-    @ModifySecurity
-    @ApiOperation(value = "删除未拍照作业计时", httpMethod = "POST", response = ResponseEntity.class, notes = "删除未拍照作业计时")
-    public ResponseEntity deleteHomework(@RequestParam(name = "accessToken") String  accessToken, @RequestBody DeleteHomeworkRequest req) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            studentAppService.deleteHomework(req.getHomeworkId(),req.getUsedTime());
-            responseEntity.success();
-        } catch (Exception e) {
-        	logger.error("学生端app-删除未拍照作业计时", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/replaceVagueImg", method = RequestMethod.POST)
-    @ModifySecurity
-    @ApiOperation(value = "模糊更替", httpMethod = "POST", response = ResponseEntity.class, notes = "模糊更替")
-    public ResponseEntity replaceVagueImg(@RequestParam(name = "accessToken") String  accessToken, @RequestBody RephotoReq req) {
-        ResponseEntity responseEntity = new ResponseEntity();
-
-        String homeworkPictureId = req.getPhotoId();
-        if (StringUtils.isBlank(homeworkPictureId)) {
-            return responseEntity.failure("作业图片id不能为空");
-        }
-
-        String fileKey = req.getFileKey();
-        if (StringUtils.isBlank(fileKey)) {
-            return responseEntity.failure("新图片路径不能为空");
-        }
-
-        try {
-            HomeworkPicture homeworkPicture = homeworkPictureService.getById(homeworkPictureId);
-            if (homeworkPicture == null) {
-                return responseEntity.failure("作业图片不存在");
-            }
-            return homeworkPictureService.replaceVagueImgAndPushConch(homeworkPicture, fileKey, null);
-        } catch (Exception e) {
-            logger.error(String.format("模糊更替失败:homeworkPictureId->%s,fileKey->%s,异常:%s", homeworkPictureId, fileKey, e));
-            responseEntity.failure(ResponseConstant.CODE_000, "系统繁忙,请稍后重试");
-        }
-
-        return responseEntity;
-    }
-
-    /**
-     * ========================================小时光==========================================
-     */
-    @RequestMapping(value = "/smarttime", method = RequestMethod.POST)
-    @ApiOperation(value = "我的小时光", httpMethod = "POST", response = ResponseEntity.class, notes = "我的小时光")
-    public ResponseEntity smartTime(@RequestParam(name = "accessToken") String  accessToken, @RequestBody ChildSmarttimeListReq req) {
-    	ResponseEntity responseEntity = new ResponseEntity();
-        try{
-        	Map<String, Object> params = new HashMap<>();
-
-            String vipId = req.getVipId();
-            if (StringUtils.isBlank(vipId)) {
-                responseEntity.failure("请求参数错误");
-                return responseEntity;
-            }
-            params.put("vipId", vipId);
-
-            Integer type = req.getType();
-            if (type == null) {
-                responseEntity.failure("请选择分类方式");
-                return responseEntity;
-            } else if (type != 1 && type != 2) {
-                responseEntity.failure("分类方式错误");
-                return responseEntity;
-            }
-            params.put("type", type);
-
-            Pageable pageable = initPage(req.getPageNo(), req.getPageSize());
-            Page<SmartTimeGroupDTO> result = studentAppService.smartTime(params, pageable);
-            responseEntity.success(result, "成功");
-        } catch (Exception e){
-        	logger.error("学生端app-我的小时光", e);
-        	responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    /**
-     * ========================================通用==========================================
-     */
-    @RequestMapping(value = "/uploadPicture", method = RequestMethod.POST)
-    @ApiOperation(value = "上传(作业-难题-小时光)", httpMethod = "POST", response = ResponseEntity.class, notes = "上传(作业-难题-小时光)")
-    public ResponseEntity uploadPicture(@RequestParam(name = "accessToken") String  accessToken, @RequestBody UploadPictureReq req) {
-    	ResponseEntity responseEntity = null;
-        try{
-        	responseEntity = studentAppService.uploadPicture(req);
-        } catch (Exception e){
-        	logger.error("学生端app-上传(作业-难题-小时光)", e);
-        	responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-    
-    @RequestMapping(value = "/childPicture", method = RequestMethod.POST)
-    @ApiOperation(value = "查看(作业-难题-小时光)服务器图片", httpMethod = "POST", response = ResponseEntity.class, notes = "查看(作业-难题-小时光)服务器图片")
-    public ResponseEntity childPicture(@RequestParam(name = "accessToken") String  accessToken, @RequestBody ChildPictureReq req) {
-    	ResponseEntity responseEntity = new ResponseEntity();
-        try{
-        	
-        	Map<String, Object> params = new HashMap<String, Object>();
-            params.put("EQ_isDelete", 0);
-            params.put("EQ_vipId", req.getVipId());
-            params.put("LTE_createTime", req.getMaxCreateTime());
-        	Pageable pageable = initPage(req.getPageNo(), req.getPageSize(), Direction.DESC, "createTime");
-        	Map<String, Object> data = studentAppService.childPicture(req.getType(),params,pageable);
-            responseEntity.success(data, "成功");
-        } catch (Exception e){
-            logger.error("异常", e);
-        }
-        return responseEntity;
-    }
-    
-    /**
-     * 返回登录方式,便于Ios调过校验。如果是0则表示是ios_pad扫码登录页面,1则表示是ios正常登录注册界面
-     *
-     * @return
-     */
-    @ApiOperation(value = "返回登录方式",httpMethod = "POST")
-    @IgnoreSecurity
-    @RequestMapping(value = "/getLoginType",method = RequestMethod.POST)
-    public ResponseEntity getLoginType(@RequestBody (required=true) LoginTypeParam param) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        //判断传入的审核时间和服务器当前时间对比是否小于7天
-        try {
-       	 String loginType = PropertiesUtil.getValue("IOS_PAD_LOGIN_TYPE");
-       	 
-       	 Map<String, Object> data = new HashMap<String,Object>();
-            
-       	 SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
-    		 int days = DateHelper.daysBetween(sdf.parse(param.getValidateTime()),new Date());
-       	 if(days <= 7 && loginType.equals("1")) {
-       		//如果小于7天那么就是账号密码登录 并且 数据库中返回登录方式是账号密码方式 则返回账号密码的方式登录
-       		 data.put("loginType", "1");
-       		 responseEntity.success(data,"成功");
-                return responseEntity;
-       	 }
-   		 data.put("loginType", "0");
-   		 responseEntity.success(data,"成功");
-		 } catch (ParseException e) {
-			responseEntity.failure(ResponseConstant.CODE_500, "返回登录方式异常");
-		 }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/test", method = RequestMethod.POST)
-    @ApiOperation(value = "定时任务测试", httpMethod = "POST", response = ResponseEntity.class, notes = "定时任务测试")
-    public ResponseEntity test(@RequestParam(name = "accessToken") String  accessToken) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try{
-            studentAppService.test();
-            responseEntity.success("成功");
-        } catch (Exception e){
-            logger.error("异常", e);
-        }
-        return responseEntity;
-    }
-    
-    /**
-     * ========================================好友功能==========================================
-     */
-    @ApiOperation(value = "查看好友列表",httpMethod = "POST")
-    @RequestMapping(value = "/findFriends",method = RequestMethod.POST)
-    public ResponseEntity findFriends(@RequestParam(name = "accessToken") String  accessToken) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try{
-        	String userId = tokenManager.getUserId(accessToken);
-        	List<UserFriendDto> dtoList = userFriendService.findFriends(userId);
-        	Map<String, Object> data = new HashMap<String,Object>();
-        	data.put("friendList", dtoList);
-            responseEntity.success(data,"成功");
-        } catch (Exception e){
-        	responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-    
-    @ApiOperation(value = "添加好友申请",httpMethod = "POST")
-    @ModifySecurity
-    @RequestMapping(value = "/addFriendApply",method = RequestMethod.POST)
-    public ResponseEntity addFriendApply(@RequestParam(name = "accessToken") String  accessToken,@RequestBody FriendUserIdReq req) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try{
-        	String userId = tokenManager.getUserId(accessToken);
-        	userFriendApplyService.addFriendApply(userId,req.getFriendUserId());
-            responseEntity.success();
-        } catch (Exception e){
-        	responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-    
-    @ApiOperation(value = "新朋友好友申请列表",httpMethod = "POST")
-    @RequestMapping(value = "/friendsApplyInfo",method = RequestMethod.POST)
-    public ResponseEntity friendsApplyInfo(@RequestParam(name = "accessToken") String  accessToken) {
-    	ResponseEntity responseEntity = new ResponseEntity();
-        try{
-        	String userId = tokenManager.getUserId(accessToken);
-        	List<NewUserFriendsApplyDto> dtoList = userFriendApplyService.friendsApplyInfo(userId);
-        	Map<String, Object> data = new HashMap<String,Object>();
-        	data.put("friendList", dtoList);
-            responseEntity.success(data,"成功");
-        } catch (Exception e){
-        	responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-    
-    @ApiOperation(value = "同意/忽略添加好友",httpMethod = "POST")
-    @ModifySecurity
-    @RequestMapping(value = "/addFriend",method = RequestMethod.POST)
-    public ResponseEntity addFriend(@RequestParam(name = "accessToken") String  accessToken,@RequestBody FriendUserIdConfirmReq req) {
-    	ResponseEntity responseEntity = new ResponseEntity();
-        try{
-        	String userId = tokenManager.getUserId(accessToken);
-        	userFriendService.addFriend(userId,req.getFriendUserId(),req.getStatus());
-        	responseEntity.success();
-        } catch (Exception e){
-        	responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-    
-    @ApiOperation(value = "删除好友",httpMethod = "POST")
-    @ModifySecurity
-    @RequestMapping(value = "/deleteFriend",method = RequestMethod.POST)
-    public ResponseEntity deleteFriend(@RequestParam(name = "accessToken") String  accessToken,@RequestBody FriendUserIdReq req) {
-    	ResponseEntity responseEntity = new ResponseEntity();
-        try{
-        	String userId = tokenManager.getUserId(accessToken);
-        	userFriendService.deleteFriend(userId,req.getFriendUserId());
-            responseEntity.success();
-        } catch (Exception e){
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-    
-    @ApiOperation(value = "查找好友",httpMethod = "POST")
-    @RequestMapping(value = "/searchFriends",method = RequestMethod.POST)
-    public ResponseEntity searchFriends(@RequestParam(name = "accessToken") String  accessToken,@RequestBody FriendUserNameReq req) {
-    	ResponseEntity responseEntity = new ResponseEntity();
-    	try{
-    		String userId = tokenManager.getUserId(accessToken);
-        	List<UserFriendsApplyDto> dtoList = userFriendApplyService.searchFriends(userId,req.getFriendUserName());
-        	Map<String, Object> data = new HashMap<String,Object>();
-        	data.put("friendList", dtoList);
-            responseEntity.success(data,"成功");
-        } catch (Exception e){
-        	responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-    
-    @ApiOperation(value = "好友申请历史",httpMethod = "POST")
-    @RequestMapping(value = "/historyFriendsApply",method = RequestMethod.POST)
-    public ResponseEntity historyFriendsApply(@RequestParam(name = "accessToken") String  accessToken) {
-    	ResponseEntity responseEntity = new ResponseEntity();
-    	try{
-    		String userId = tokenManager.getUserId(accessToken);
-        	List<UserFriendsApplyDto> dtoList = userFriendApplyService.historyFriendsApply(userId);
-        	Map<String, Object> data = new HashMap<String,Object>();
-        	data.put("friendList", dtoList);
-            responseEntity.success(data,"成功");
-        } catch (Exception e){
-        	responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-}

+ 0 - 972
ssj-aijia-api/src/main/java/com/ssj/aijia/student/controller/StudentController.java

@@ -1,972 +0,0 @@
-package com.ssj.aijia.student.controller;
-
-import com.alibaba.dubbo.config.annotation.Reference;
-import com.ssj.bean.sys.homework.domain.HomeworkPicture;
-import com.ssj.bean.weixin.libmy.domain.LibVip;
-import com.ssj.framework.basic.utils.DateHelper;
-import com.ssj.framework.core.common.controller.BaseController;
-import com.ssj.framework.core.security.annotation.IgnoreSecurity;
-import com.ssj.framework.core.security.annotation.ModifySecurity;
-import com.ssj.framework.core.security.manager.TokenManager;
-import com.ssj.framework.core.util.PropertiesUtil;
-import com.ssj.framework.core.util.ResponseConstant;
-import com.ssj.framework.core.util.ResponseEntity;
-import com.ssj.framework.weixin.util.DateUtil;
-import com.ssj.service.conch.common.service.ConchCommonService;
-import com.ssj.service.conch.conch.request.DeleteHomeworkRequest;
-import com.ssj.service.conch.conch.service.ConchDerverService;
-import com.ssj.service.conch.conch.service.IntegralDetailService;
-import com.ssj.service.conch.parents.dto.CorrectDetailDto;
-import com.ssj.service.conch.parents.dto.CorrectDetailDto2;
-import com.ssj.service.conch.parents.request.ShareReq;
-import com.ssj.service.conch.parents.request.version4.ChildSmarttimeListReq;
-import com.ssj.service.conch.parents.request.version4.HomeworkTaskReq;
-import com.ssj.service.conch.parents.v2.service.ParentV2Service;
-import com.ssj.service.conch.student.dto.*;
-import com.ssj.service.conch.student.request.*;
-import com.ssj.service.conch.student.service.StudentService;
-import com.ssj.service.conch.teacher.request.oneonly.RephotoReq;
-import com.ssj.service.sys.homework.service.HomeworkPictureService;
-import com.ssj.service.sys.schoolmatecircle.service.SSJUserFriendApplyService;
-import com.ssj.service.sys.schoolmatecircle.service.SSJUserFriendService;
-import com.ssj.service.sys.schoolmatecircle.service.SchoolmateMessageService;
-import com.ssj.service.weixin.library.service.ILibVipService;
-import com.ssj.service.weixin.sales.service.LibVipServiceService;
-import com.ssj.service.weixin.user.request.LoginTypeParam;
-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.data.domain.Pageable;
-import org.springframework.data.domain.Sort.Direction;
-import org.springframework.web.bind.annotation.*;
-
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-@Api(value = "学生端相关的接口", tags = "学生端相关的接口")
-@RestController
-@RequestMapping("/api/student/student")
-public class StudentController extends BaseController {
-
-    @Autowired
-    private TokenManager tokenManager;
-
-    @Reference(version = "1.0" ,timeout = 60000)
-    private StudentService studentService;
-    
-    @Reference(version = "1.0" ,timeout = 60000)
-    private ConchCommonService conchCommonService;
-
-    @Reference(version = "1.0" ,timeout = 60000)
-    private ParentV2Service parentV2Service;
-
-    
-    @Reference(version = "1.0" ,timeout = 60000)
-    private SSJUserFriendService userFriendService;
-    
-    @Reference(version = "1.0" ,timeout = 60000)
-    private SSJUserFriendApplyService userFriendApplyService;
-    @Reference(version = "1.0" ,timeout = 60000)
-    private SchoolmateMessageService schoolmateMessageService;
-    @Reference(version = "1.0" ,timeout = 60000)
-    private HomeworkPictureService homeworkPictureService;
-    @Reference(version = "1.0" ,timeout = 60000)
-    private ConchDerverService conchDerverService;
-    @Reference(version = "1.0" ,timeout = 60000)
-    private LibVipServiceService libVipServiceService;
-    @Reference(version = "1.0" ,timeout = 60000)
-    private IntegralDetailService integralDetailService;
-    @Reference(version = "1.0" ,timeout = 60000)
-    private ILibVipService vipService;
-
-    @RequestMapping(value = "/homepageInfo", method = RequestMethod.POST)
-    @IgnoreSecurity
-    @ApiOperation(value = "首页", httpMethod = "POST", response = ResponseEntity.class, notes = "首页")
-    public ResponseEntity homepageInfo(@RequestParam(name = "accessToken") String  accessToken, @RequestBody IndexReq req) {
-        ResponseEntity responseEntity = new ResponseEntity();
-
-        String vipId = req.getVipId();
-        if (StringUtils.isBlank(vipId)) {
-            return responseEntity.failure("学生id不能为空");
-        }
-
-        try {
-            Map<String, Object> resultMap = new HashMap<>();
-            String userId = tokenManager.getUserId(accessToken);
-            long count = schoolmateMessageService.countByUserId(userId);
-            Integer blurredPictureSum = homeworkPictureService.countByVipIdAndIsMark(vipId);
-            resultMap.put("count", count);//同学圈消息数量
-            if (blurredPictureSum > 0) {//存在模糊作业图片
-                resultMap.put("isVague", 1);
-            } else {
-                resultMap.put("isVague", 0);
-            }
-            /** 加入作业吧服务结束日期  by duyy on 2019-04-12*/
-            String zybEndDate = libVipServiceService.selectZybEndTimeByVipId(vipId);
-            resultMap.put("zybEndDate", zybEndDate == null ? "" : zybEndDate);
-            resultMap.put("whetherSignIn",integralDetailService.findTodaySignData(vipId));
-            LibVip vip = vipService.getById(vipId);
-            resultMap.put("isBind",vip==null?2:StringUtils.isEmpty(vip.getLibId())?2:1);
-            responseEntity.success(resultMap, "查询成功");
-            return responseEntity;
-        } catch (Exception e) {
-            logger.error("学生pad端:", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    /**
-     * ========================================我的==========================================
-     */
-    @RequestMapping(value = "/swipeQrCode", method = RequestMethod.POST)
-    @IgnoreSecurity
-    @ApiOperation(value = "扫二维码通用接口", httpMethod = "POST", response = ResponseEntity.class, notes = "扫二维码通用接口")
-    public ResponseEntity swipeQrCode(@RequestBody SwipeQrCodeRequest request) {
-        ResponseEntity responseEntity = null;
-        try {
-        	responseEntity = conchCommonService.swipeQrCode(request);
-        } catch (Exception e) {
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-    
-    @RequestMapping(value = "/changeAccount", method = RequestMethod.POST)
-    @IgnoreSecurity
-    @ModifySecurity
-    @ApiOperation(value = "切换账号", httpMethod = "POST", response = ResponseEntity.class, notes = "切换账号")
-    public ResponseEntity changeAccount(@RequestParam(name = "accessToken") String  accessToken, @RequestBody StudentVipReq request) {
-        ResponseEntity responseEntity = null;
-        try {
-        	responseEntity = studentService.changeAccount(accessToken,request.getVipId(),request.getPlatform(),request.getXingeToken());
-        } catch (Exception e) {
-        	responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-    
-    @RequestMapping(value = "/getMyInfo", method = RequestMethod.POST)
-    @IgnoreSecurity
-    @ApiOperation(value = "获取我的信息", httpMethod = "POST", response = ResponseEntity.class, notes = "切换账号")
-    public ResponseEntity getMyInfo(@RequestParam(name = "accessToken") String  accessToken) {
-        ResponseEntity responseEntity = null;
-        try {
-        	String userId = tokenManager.getUserId(accessToken);
-        	responseEntity = studentService.getMyInfo(userId);
-        } catch (Exception e) {
-        	responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    /**
-     * ========================================同学圈==========================================
-     */
-    @RequestMapping(value = "/schoolmateCircleList", method = RequestMethod.POST)
-    @ApiOperation(value = "查询分享/答题榜列表", httpMethod = "POST", notes = "查询分享/答题榜列表")
-    public ResponseEntity schoolmateCircleList(@RequestParam(name = "accessToken") String accessToken, @RequestBody SchoolmateCircleReq req){
-        ResponseEntity responseEntity;
-        logger.info("accessToken:"+accessToken+"*****查询同学圈列表入参:"+req.toString());
-        try{
-            Map<String, Object> params = new HashMap<>(16);
-            String userId = tokenManager.getUserId(accessToken);
-            params.put("userId", userId);
-            params.put("type",req.getType());
-            params.put("authority",req.getAuthority());
-            params.put("maxCreateTime",req.getMaxCreateTime());
-            Pageable pageable = initPage(req.getPageNo(), req.getPageSize());
-            responseEntity = studentService.schoolmateCircleList(params, pageable);
-        } catch (Exception e){
-            e.printStackTrace();
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/setLike", method = RequestMethod.POST)
-    @ApiOperation(value = "点赞", httpMethod = "POST", notes = "点赞")
-    public ResponseEntity setLike(@RequestParam(name = "accessToken") String accessToken, @RequestBody SetLikeReq req){
-        ResponseEntity responseEntity = new ResponseEntity();
-        logger.info("accessToken:"+accessToken+"*****点赞入参:"+req.toString());
-        try{
-            String userId = tokenManager.getUserId(accessToken);
-            /** 该功能需验证是否有购买作业吧服务   by duyy on 2019-04-12*/
-    		if(!libVipServiceService.checkZybExistOrExpiredByChildUserId(userId)) {
-    			responseEntity.failure("您还不是作业吧会员,不可进行此操作");
-    			return responseEntity;
-    		}
-            responseEntity = studentService.setLike(req.getHeadId(),req.getType(),userId);
-        } catch (Exception e){
-            e.printStackTrace();
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/firstLevelCommentsList", method = RequestMethod.POST)
-    @ApiOperation(value = "查询一级评论(答题榜)", httpMethod = "POST", notes = "查询一级评论")
-    public ResponseEntity firstLevelCommentsList(@RequestParam(name = "accessToken") String accessToken, @RequestBody FirstLevelCommentsReq req){
-        ResponseEntity responseEntity;
-        logger.info("accessToken:"+accessToken+"*****查询一级评论(答题榜):"+req.toString());
-        try{
-            Map<String, Object> params = new HashMap<>(16);
-            String userId = tokenManager.getUserId(accessToken);
-            params.put("userId",userId);
-            params.put("schoolmateCircleId",req.getSchoolmateCircleId());
-            params.put("maxCreateTime",req.getMaxCreateTime());
-            Pageable pageable = initPage(req.getPageNo(), req.getPageSize());
-            responseEntity = studentService.firstLevelCommentsList(params,pageable);
-        } catch (Exception e){
-            e.printStackTrace();
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/secondLevelCommentsList", method = RequestMethod.POST)
-    @ApiOperation(value = "查询一级评论下二级评论(答题榜)", httpMethod = "POST", notes = "查询一级评论下二级评论")
-    public ResponseEntity secondLevelCommentsList(@RequestParam(name = "accessToken") String accessToken, @RequestBody SecondLevelCommentsReq req){
-        ResponseEntity responseEntity;
-        logger.info("accessToken:"+accessToken+"*****查询一级评论下二级评论(答题榜):"+req.toString());
-        try{
-            Map<String, Object> params = new HashMap<>(16);
-            Pageable pageable = initPage(req.getPageNo(), req.getPageSize());
-            params.put("commentId",req.getCommentId());
-            params.put("maxCreateTime",req.getMaxCreateTime());
-            responseEntity = studentService.secondLevelCommentsList(params,pageable);
-        } catch (Exception e){
-            e.printStackTrace();
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/findCommentsList", method = RequestMethod.POST)
-    @ApiOperation(value = "查询评论(分享)", httpMethod = "POST", notes = "查询评论(分享)")
-    public ResponseEntity findCommentsList(@RequestParam(name = "accessToken") String accessToken, @RequestBody FirstLevelCommentsReq req){
-        ResponseEntity responseEntity;
-        logger.info("accessToken:"+accessToken+"*****查询评论(分享):"+req.toString());
-        try{
-            Map<String, Object> params = new HashMap<>(16);
-            String userId = tokenManager.getUserId(accessToken);
-            params.put("userId",userId);
-            Pageable pageable = initPage(req.getPageNo(), req.getPageSize());
-            params.put("schoolmateCircleId",req.getSchoolmateCircleId());
-            params.put("maxCreateTime",req.getMaxCreateTime());
-            responseEntity = studentService.findCommentsList(params,pageable);
-        } catch (Exception e){
-            e.printStackTrace();
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/queryShortcuts", method = RequestMethod.POST)
-    @ApiOperation(value = "查询快捷回复内容", httpMethod = "POST", notes = "查询快捷回复内容")
-    public ResponseEntity queryShortcuts(@RequestParam(name = "accessToken") String accessToken){
-        ResponseEntity responseEntity;
-        try{
-            responseEntity = studentService.queryShortcuts();
-        } catch (Exception e){
-            e.printStackTrace();
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/replySchoolmateCircle", method = RequestMethod.POST)
-    @ApiOperation(value = "回复同学圈评论", httpMethod = "POST", notes = "回复同学圈评论")
-    public ResponseEntity replySchoolmateCircle(@RequestParam(name = "accessToken") String accessToken, @RequestBody ReplySchoolmateCircleReq req){
-        ResponseEntity responseEntity = new ResponseEntity();
-        logger.info("accessToken:"+accessToken+"*****回复同学圈评论:"+req.toString());
-        try{
-            String userId = tokenManager.getUserId(accessToken);
-            /** 该功能需验证是否有购买作业吧服务   by duyy on 2019-04-12*/
-    		if(!libVipServiceService.checkZybExistOrExpiredByChildUserId(userId)) {
-    			responseEntity.failure("您还不是作业吧会员,不可进行此操作");
-    			return responseEntity;
-    		}
-            responseEntity = studentService.replySchoolmateCircle(req.getSchoolmateCircleId(),req.getContent(),userId,req.getMaterial());
-        } catch (Exception e){
-            e.printStackTrace();
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/replyComments", method = RequestMethod.POST)
-    @ApiOperation(value = "回复答题榜下评论人评论下其他评论人评论", httpMethod = "POST", notes = "回复答题榜下评论人评论下其他评论人评论")
-    public ResponseEntity replyComments(@RequestParam(name = "accessToken") String accessToken, @RequestBody ReplyCommentsReq req){
-        ResponseEntity responseEntity = new ResponseEntity();
-        logger.info("accessToken:"+accessToken+"*****回复答题榜下评论人评论下其他评论人评论:"+req.toString());
-        try{
-            String userId = tokenManager.getUserId(accessToken);
-            /** 该功能需验证是否有购买作业吧服务   by duyy on 2019-04-12*/
-    		if(!libVipServiceService.checkZybExistOrExpiredByChildUserId(userId)) {
-    			responseEntity.failure("您还不是作业吧会员,不可进行此操作");
-    			return responseEntity;
-    		}
-            responseEntity = studentService.replyComments(userId,req.getContent(),req.getCommentId(),req.getBeCommentedUserId(),req.getType());
-        } catch (Exception e){
-            e.printStackTrace();
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/sendSchoolmateCircle", method = RequestMethod.POST)
-    @ApiOperation(value = "发同学圈", httpMethod = "POST", notes = "发同学圈")
-    public ResponseEntity sendSchoolmateCircle(@RequestParam(name = "accessToken") String accessToken, @RequestBody SendSchoolmateCircleReq req){
-        ResponseEntity responseEntity = new ResponseEntity();
-        logger.info("accessToken:"+accessToken+"*****发同学圈:"+req.toString());
-        try{
-            String userId = tokenManager.getUserId(accessToken);
-            /** 该功能需验证是否有购买作业吧服务   by duyy on 2019-04-12*/
-    		if(!libVipServiceService.checkZybExistOrExpiredByChildUserId(userId)) {
-    			responseEntity.failure("您还不是作业吧会员,不可进行此操作");
-    			return responseEntity;
-    		}
-            responseEntity = studentService.sendSchoolmateCircle(req.getType(),userId,req.getContent(),req.getMaterial());
-        } catch (Exception e){
-            e.printStackTrace();
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/queryCircleMessageCount", method = RequestMethod.POST)
-    @ApiOperation(value = "查询同学圈消息总数", httpMethod = "POST", response = ResponseEntity.class, notes = "查询同学圈消息总数")
-    public ResponseEntity queryCircleMessageCount(@RequestParam(name = "accessToken") String  accessToken) {
-        ResponseEntity responseEntity;
-        try {
-            String userId = tokenManager.getUserId(accessToken);
-            responseEntity = studentService.queryCircleMessageCount(userId);
-        } catch (Exception e) {
-            e.printStackTrace();
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/circleMessageList", method = RequestMethod.POST)
-    @ApiOperation(value = "同学圈消息列表", httpMethod = "POST", response = ResponseEntity.class, notes = "同学圈消息列表")
-    public ResponseEntity circleMessageList(@RequestParam(name = "accessToken") String  accessToken) {
-        ResponseEntity responseEntity;
-        try {
-            String userId = tokenManager.getUserId(accessToken);
-            responseEntity = studentService.circleMessageList(userId);
-        } catch (Exception e) {
-            e.printStackTrace();
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/acceptSolution", method = RequestMethod.POST)
-    @ApiOperation(value = "采纳解答", httpMethod = "POST", response = ResponseEntity.class, notes = "采纳解答")
-    public ResponseEntity acceptSolution(@RequestParam(name = "accessToken") String  accessToken,
-                                         @RequestBody AcceptSolutionRequest req) {
-        ResponseEntity responseEntity;
-        logger.info("accessToken:"+accessToken+"*****采纳解答:"+req.toString());
-        try {
-            String userId = tokenManager.getUserId(accessToken);
-            responseEntity = studentService.acceptSolution(req.getCommentId(), userId);
-        } catch (Exception e) {
-            e.printStackTrace();
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/schoolmateCircleDetail", method = RequestMethod.POST)
-    @ApiOperation(value = "查询分享/答题榜详情", httpMethod = "POST", notes = "查询分享/答题榜详情")
-    public ResponseEntity schoolmateCircleDetail(@RequestParam(name = "accessToken") String accessToken, @RequestBody SchoolmateDetailReq req){
-        ResponseEntity responseEntity;
-        logger.info("accessToken:"+accessToken+"*****查询分享/答题榜详情:"+req.toString());
-        try{
-            String userId = tokenManager.getUserId(accessToken);
-            Pageable pageable = initPage(req.getPageNo(), req.getPageSize());
-            responseEntity = studentService.schoolmateCircleDetail(req.getId(), userId, pageable);
-        } catch (Exception e){
-            e.printStackTrace();
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-    /**
-     * ========================================排行榜==========================================
-     */
-    @RequestMapping(value = "/rankingList", method = RequestMethod.POST)
-    @ApiOperation(value = "查询排行榜", httpMethod = "POST", response = ResponseEntity.class, notes = "查询排行榜")
-    public ResponseEntity rankingList(@RequestParam(name = "accessToken") String  accessToken, @RequestBody RankingListRequest request) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            List<CircleCommentRankDto> list = studentService.rankingList(request.getType(), request.getTime());
-            Map<String, Object> data = new HashMap<>();
-            data.put("list", list);
-            responseEntity.success(data,"成功");
-        } catch (Exception e) {
-            logger.error("查询排行榜", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "查询排行榜");
-        }
-        return responseEntity;
-    }
-
-
-    /**
-     * ========================================错题本==========================================
-     */
-    @RequestMapping(value = "/wrongTopicBook", method = RequestMethod.POST)
-    @ApiOperation(value = "查询错题本列表", httpMethod = "POST", response = ResponseEntity.class, notes = "查询错题本列表")
-    public ResponseEntity wrongTopicBook(@RequestParam(name = "accessToken") String  accessToken, @RequestBody WrongTopicBookRequest request) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            Pageable pageable = initPage(request.getPageNo(), request.getPageSize());
-            String maxCreateTime = request.getMaxCreateTime();
-            Map<String, Object> data = studentService.wrongTopicBook(request.getVipId(), request.getSubject(),
-                    maxCreateTime == null ? DateUtil.format_yyyyMMddHHmmss(new Date()) : maxCreateTime, request.getType(), pageable);
-            responseEntity.success(data,"成功");
-        } catch (Exception e) {
-            logger.error("查询错题本列表", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "查询错题本列表");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/wrongTopicDetail", method = RequestMethod.POST)
-    @ApiOperation(value = "查询错题详情", httpMethod = "POST", response = ResponseEntity.class, notes = "查询错题详情")
-    public ResponseEntity wrongTopicDetail(@RequestParam(name = "accessToken") String  accessToken, @RequestBody HomeworkRequest request) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            WrongTopicDetailDto data = studentService.wrongTopicDetail(request.getWorkId());
-            responseEntity.success(data,"成功");
-        } catch (Exception e) {
-            logger.error("查询错题详情", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "查询错题详情");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/correctWrongTopic", method = RequestMethod.POST)
-    @ModifySecurity
-    @ApiOperation(value = "订正错题", httpMethod = "POST", response = ResponseEntity.class, notes = "订正错题")
-    public ResponseEntity correctWrongTopic(@RequestParam(name = "accessToken") String  accessToken, @RequestBody CorrectWrongTopicRequest request) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            boolean data = studentService.reviseWrongTopic(request);
-            if (data) {
-                responseEntity.success("成功");
-            } else {
-                responseEntity.failure("订正失败");
-            }
-        } catch (Exception e) {
-            logger.error("订正错题", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "订正错题");
-        }
-        return responseEntity;
-    }
-
-
-    /**
-     * ========================================难题==========================================
-     */
-    @RequestMapping(value = "/problemList", method = RequestMethod.POST)
-    @ApiOperation(value = "难题列表", httpMethod = "POST", response = ResponseEntity.class, notes = "难题列表")
-    public ResponseEntity problemList(@RequestParam(name = "accessToken") String  accessToken, @RequestBody ProblemReq req) {
-        ResponseEntity responseEntity;
-        try{
-            Pageable pageable = initPage(req.getPageNo(), req.getPageSize());
-            responseEntity = studentService.problemList(req,pageable);
-        } catch (Exception e){
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/answeredProblemDetail", method = RequestMethod.POST)
-    @ApiOperation(value = "已解答难题详情", httpMethod = "POST", response = ResponseEntity.class, notes = "已解答难题详情")
-    public ResponseEntity answeredProblemDetail(@RequestParam(name = "accessToken") String  accessToken, @RequestBody ProblemIdRequest req) {
-        ResponseEntity responseEntity;
-        try{
-            responseEntity = studentService.answeredProblemDetail(req);
-        } catch (Exception e){
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-    /**
-     * ========================================作业==========================================
-     */
-    @RequestMapping(value = "/homeworkTask", method = RequestMethod.POST)
-    @ApiOperation(value = "作业任务", httpMethod = "POST", response = ResponseEntity.class, notes = "作业任务")
-    public ResponseEntity homeworkTask(@RequestParam(name = "accessToken") String  accessToken, @RequestBody HomeworkTaskReq request) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            Pageable pageable = initPage(request.getPageNo(), request.getPageSize());
-            Map<String, Object> data = studentService.homeworkTask(request.getVipId(), request.getMaxCreateTime(), pageable);
-            responseEntity.success(data,"成功");
-        } catch (Exception e) {
-            logger.error("学生端-作业任务", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "作业任务");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/homeworkTaskDetail", method = RequestMethod.POST)
-    @ApiOperation(value = "作业任务详情", httpMethod = "POST", response = ResponseEntity.class, notes = "作业任务详情")
-    public ResponseEntity homeworkTaskDetail(@RequestParam(name = "accessToken") String  accessToken, @RequestBody HomeworkRequest request) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            CorrectDetailDto data = studentService.homeworkTaskDetail(request.getWorkId());
-            if (data != null) {
-                responseEntity.success(data,"成功");
-            } else {
-                responseEntity.failure("未查询到作业原图");
-            }
-        } catch (Exception e) {
-            logger.error("学生端-作业任务详情", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "作业任务详情");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/homeworkTaskDetail2", method = RequestMethod.POST)
-    @ApiOperation(value = "作业任务详情2", httpMethod = "POST", response = ResponseEntity.class, notes = "作业任务详情2")
-    public ResponseEntity homeworkTaskDetail2(@RequestParam(name = "accessToken") String  accessToken, @RequestBody HomeworkRequest request) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            CorrectDetailDto2 data = studentService.homeworkTaskDetail2(request.getWorkId());
-            if (data != null) {
-                responseEntity.success(data,"成功");
-            } else {
-                responseEntity.failure("未查询到作业原图");
-            }
-        } catch (Exception e) {
-            logger.error("学生端-作业任务详情", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "作业任务详情");
-        }
-        return responseEntity;
-    }
-    
-    @RequestMapping(value = "/startHomework", method = RequestMethod.POST)
-    @ModifySecurity
-    @ApiOperation(value = "开始作业", httpMethod = "POST", response = ResponseEntity.class, notes = "开始作业")
-    public ResponseEntity startHomework(@RequestParam(name = "accessToken") String  accessToken, @RequestBody StartHomeworkReq req) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-        	String userId = tokenManager.getUserId(accessToken);
-        	/** 该功能需验证是否有购买作业吧服务   by duyy on 2019-04-12*/
-    		if(!libVipServiceService.checkZybExistOrExpiredByChildUserId(userId)) {
-    			responseEntity.failure("您还不是作业吧会员,不可进行此操作");
-    			return responseEntity;
-    		}
-        	responseEntity = studentService.startHomework(req.getVipId(),req.getCourseName(),req.getCurrentTime());
-        } catch (Exception e) {
-        	logger.error("学生端-开始作业", e);
-        	responseEntity = new ResponseEntity();
-        	responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-    
-    @RequestMapping(value = "/endHomework", method = RequestMethod.POST)
-    @ModifySecurity
-    @ApiOperation(value = "完成作业", httpMethod = "POST", response = ResponseEntity.class, notes = "完成作业")
-    public ResponseEntity endHomework(@RequestParam(name = "accessToken") String  accessToken, @RequestBody EndHomeworkReq req) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            studentService.endHomework(req.getHomeworkId(), req.getEndTime(), req.getUsedTime());
-            responseEntity.success();
-        } catch (Exception e) {
-        	logger.error("学生端-完成作业", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-    
-    @RequestMapping(value = "/deleteHomework", method = RequestMethod.POST)
-    @ModifySecurity
-    @ApiOperation(value = "删除未拍照作业计时", httpMethod = "POST", response = ResponseEntity.class, notes = "删除未拍照作业计时")
-    public ResponseEntity deleteHomework(@RequestParam(name = "accessToken") String  accessToken, @RequestBody DeleteHomeworkRequest req) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            studentService.deleteHomework(req.getHomeworkId(),req.getUsedTime());
-            responseEntity.success();
-        } catch (Exception e) {
-        	logger.error("学生端-删除未拍照作业计时", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/replaceVagueImg", method = RequestMethod.POST)
-    @ModifySecurity
-    @ApiOperation(value = "模糊更替", httpMethod = "POST", response = ResponseEntity.class, notes = "模糊更替")
-    public ResponseEntity replaceVagueImg(@RequestParam(name = "accessToken") String  accessToken, @RequestBody RephotoReq req) {
-        ResponseEntity responseEntity = new ResponseEntity();
-
-        String homeworkPictureId = req.getPhotoId();
-        if (StringUtils.isBlank(homeworkPictureId)) {
-            return responseEntity.failure("作业图片id不能为空");
-        }
-
-        String fileKey = req.getFileKey();
-        if (StringUtils.isBlank(fileKey)) {
-            return responseEntity.failure("新图片路径不能为空");
-        }
-
-        try {
-            HomeworkPicture homeworkPicture = homeworkPictureService.getById(homeworkPictureId);
-            if (homeworkPicture == null) {
-                return responseEntity.failure("作业图片不存在");
-            }
-            homeworkPicture.setType(3);
-            return homeworkPictureService.replaceVagueImgAndPushConch(homeworkPicture, fileKey, null);
-        } catch (Exception e) {
-            logger.error(String.format("模糊更替失败:homeworkPictureId->%s,fileKey->%s,异常:%s", homeworkPictureId, fileKey, e));
-            responseEntity.failure(ResponseConstant.CODE_000, "系统繁忙,请稍后重试");
-        }
-
-        return responseEntity;
-    }
-
-    /**
-     * ========================================小时光==========================================
-     */
-    @RequestMapping(value = "/smarttime", method = RequestMethod.POST)
-    @ApiOperation(value = "我的小时光", httpMethod = "POST", response = ResponseEntity.class, notes = "我的小时光")
-    public ResponseEntity smarttime(@RequestParam(name = "accessToken") String  accessToken, @RequestBody ChildSmarttimeListReq req) {
-    	ResponseEntity responseEntity = new ResponseEntity();
-        try{
-        	Map<String, Object> params = new HashMap<String, Object>();
-         	params.put("vipId", req.getVipId());
-            Pageable pageable = initPage(req.getPageNo(), req.getPageSize());
-            Map<String, Object> result = studentService.smarttime(params, pageable);
-            responseEntity.success(result, "成功");
-        } catch (Exception e){
-        	logger.error("学生端-我的小时光", e);
-        	responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    /**
-     * ========================================通用==========================================
-     */
-    @RequestMapping(value = "/uploadPicture", method = RequestMethod.POST)
-    @ApiOperation(value = "上传(作业-难题-小时光)", httpMethod = "POST", response = ResponseEntity.class, notes = "上传(作业-难题-小时光)")
-    public ResponseEntity uploadPicture(@RequestParam(name = "accessToken") String  accessToken, @RequestBody UploadPictureReq req) {
-    	ResponseEntity responseEntity = null;
-        try{
-        	responseEntity = studentService.uploadPicture(req);
-        } catch (Exception e){
-        	logger.error("学生端-上传(作业-难题-小时光)", e);
-        	responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-    
-    @RequestMapping(value = "/getOrgTeacherBindInfo", method = RequestMethod.POST)
-	@ApiOperation(value = "查询难题老师绑定情况", httpMethod = "POST", notes = "小塾作业计时+拍照(无网络情况)")
-	public ResponseEntity getOrgTeacherBindInfo(@RequestParam(name = "accessToken") String accessToken, @RequestBody StudentBindInfoReq req) {
-		ResponseEntity responseEntity;
-		try {
-			String subject = "";
-			if(req.getSubject().equals("YUWEN")) {
-				subject = "语文";
-			}else if(req.getSubject().equals("YINGYU")) {
-				subject = "英语";
-			}else if(req.getSubject().equals("SHUXUE")) {
-				subject = "数学";
-			}
-			responseEntity = conchDerverService.getOrgTeacherBindInfo(req.getVipId(), subject);
-		} catch (Exception e) {
-			logger.error(e.toString());
-			responseEntity = new ResponseEntity();
-			responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-		}
-		return responseEntity;
-	}
-    
-    @RequestMapping(value = "/childPicture", method = RequestMethod.POST)
-    @ApiOperation(value = "查看(作业-难题-小时光)服务器图片", httpMethod = "POST", response = ResponseEntity.class, notes = "查看(作业-难题-小时光)服务器图片")
-    public ResponseEntity childPicture(@RequestParam(name = "accessToken") String  accessToken, @RequestBody ChildPictureReq req) {
-    	ResponseEntity responseEntity = new ResponseEntity();
-        try{
-        	
-        	Map<String, Object> params = new HashMap<String, Object>();
-            params.put("EQ_isDelete", 0);
-            params.put("EQ_vipId", req.getVipId());
-            params.put("LTE_createTime", req.getMaxCreateTime());
-        	Pageable pageable = initPage(req.getPageNo(), req.getPageSize(), Direction.DESC, "createTime");
-        	Map<String, Object> data = studentService.childPicture(req.getType(),params,pageable);
-            responseEntity.success(data, "成功");
-        } catch (Exception e){
-            logger.error("异常", e);
-        }
-        return responseEntity;
-    }
-    
-    /**
-     * 返回登录方式,便于Ios调过校验。如果是0则表示是ios_pad扫码登录页面,1则表示是ios正常登录注册界面
-     *
-     * @return
-     */
-    @ApiOperation(value = "返回登录方式",httpMethod = "POST")
-    @IgnoreSecurity
-    @RequestMapping(value = "/getLoginType",method = RequestMethod.POST)
-    public ResponseEntity getLoginType(@RequestBody (required=true) LoginTypeParam param) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        //判断传入的审核时间和服务器当前时间对比是否小于7天
-        try {
-       	 String loginType = PropertiesUtil.getValue("IOS_PAD_LOGIN_TYPE");
-       	 
-       	 Map<String, Object> data = new HashMap<String,Object>();
-            
-       	 SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
-    		 int days = DateHelper.daysBetween(sdf.parse(param.getValidateTime()),new Date());
-       	 if(days <= 7 && loginType.equals("1")) {
-       		//如果小于7天那么就是账号密码登录 并且 数据库中返回登录方式是账号密码方式 则返回账号密码的方式登录
-       		 data.put("loginType", "1");
-       		 responseEntity.success(data,"成功");
-                return responseEntity;
-       	 }
-   		 data.put("loginType", "0");
-   		 responseEntity.success(data,"成功");
-		 } catch (ParseException e) {
-			responseEntity.failure(ResponseConstant.CODE_500, "返回登录方式异常");
-		 }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/test", method = RequestMethod.POST)
-    @ApiOperation(value = "定时任务测试", httpMethod = "POST", response = ResponseEntity.class, notes = "定时任务测试")
-    public ResponseEntity test(@RequestParam(name = "accessToken") String  accessToken) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try{
-            studentService.test();
-            responseEntity.success("成功");
-        } catch (Exception e){
-            logger.error("异常", e);
-        }
-        return responseEntity;
-    }
-    
-    /**
-     * ========================================好友功能==========================================
-     */
-    @ApiOperation(value = "查看好友列表",httpMethod = "POST")
-    @RequestMapping(value = "/findFriends",method = RequestMethod.POST)
-    public ResponseEntity findFriends(@RequestParam(name = "accessToken") String  accessToken) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try{
-        	String userId = tokenManager.getUserId(accessToken);
-        	List<UserFriendDto> dtoList = userFriendService.findFriends(userId);
-        	Map<String, Object> data = new HashMap<String,Object>();
-        	data.put("friendList", dtoList);
-            responseEntity.success(data,"成功");
-        } catch (Exception e){
-        	responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-    
-    @ApiOperation(value = "添加好友申请",httpMethod = "POST")
-    @ModifySecurity
-    @RequestMapping(value = "/addFriendApply",method = RequestMethod.POST)
-    public ResponseEntity addFriendApply(@RequestParam(name = "accessToken") String  accessToken,@RequestBody FriendUserIdReq req) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try{
-        	String userId = tokenManager.getUserId(accessToken);
-    		/** 该功能需验证是否有购买作业吧服务,如果添加的好友不是会员,提示失败   by duyy on 2019-04-12*/
-    		if(!libVipServiceService.checkZybExistOrExpiredByChildUserId(userId)) {
-    			responseEntity.failure("您还不是作业吧会员,不可进行此操作");
-    			return responseEntity;
-    		}
-    		if(!libVipServiceService.checkZybExistOrExpiredByChildUserId(req.getFriendUserId())) {
-    			responseEntity.failure("您添加的好友还不是作业吧会员,不可进行此操作");
-    			return responseEntity;
-    		}
-        	userFriendApplyService.addFriendApply(userId,req.getFriendUserId());
-            responseEntity.success();
-        } catch (Exception e){
-        	responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-    
-    @ApiOperation(value = "新朋友好友申请列表",httpMethod = "POST")
-    @RequestMapping(value = "/friendsApplyInfo",method = RequestMethod.POST)
-    public ResponseEntity friendsApplyInfo(@RequestParam(name = "accessToken") String  accessToken) {
-    	ResponseEntity responseEntity = new ResponseEntity();
-        try{
-        	String userId = tokenManager.getUserId(accessToken);
-        	List<NewUserFriendsApplyDto> dtoList = userFriendApplyService.friendsApplyInfo(userId);
-        	Map<String, Object> data = new HashMap<String,Object>();
-        	data.put("friendList", dtoList);
-            responseEntity.success(data,"成功");
-        } catch (Exception e){
-        	responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-    
-    @ApiOperation(value = "同意/忽略添加好友",httpMethod = "POST")
-    @ModifySecurity
-    @RequestMapping(value = "/addFriend",method = RequestMethod.POST)
-    public ResponseEntity addFriend(@RequestParam(name = "accessToken") String  accessToken,@RequestBody FriendUserIdConfirmReq req) {
-    	ResponseEntity responseEntity = new ResponseEntity();
-        try{
-        	String userId = tokenManager.getUserId(accessToken);
-        	userFriendService.addFriend(userId,req.getFriendUserId(),req.getStatus());
-        	responseEntity.success();
-        } catch (Exception e){
-        	responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-    
-    @ApiOperation(value = "删除好友",httpMethod = "POST")
-    @ModifySecurity
-    @RequestMapping(value = "/deleteFriend",method = RequestMethod.POST)
-    public ResponseEntity deleteFriend(@RequestParam(name = "accessToken") String  accessToken,@RequestBody FriendUserIdReq req) {
-    	ResponseEntity responseEntity = new ResponseEntity();
-        try{
-        	String userId = tokenManager.getUserId(accessToken);
-        	userFriendService.deleteFriend(userId,req.getFriendUserId());
-            responseEntity.success();
-        } catch (Exception e){
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-    
-    @ApiOperation(value = "查找好友",httpMethod = "POST")
-    @RequestMapping(value = "/searchFriends",method = RequestMethod.POST)
-    public ResponseEntity searchFriends(@RequestParam(name = "accessToken") String  accessToken,@RequestBody FriendUserNameReq req) {
-    	ResponseEntity responseEntity = new ResponseEntity();
-    	try{
-    		String userId = tokenManager.getUserId(accessToken);
-    		/** 该功能需验证是否有购买作业吧服务   by duyy on 2019-04-12*/
-    		if(!libVipServiceService.checkZybExistOrExpiredByChildUserId(userId)) {
-    			responseEntity.failure("您还不是作业吧会员,不可进行此操作");
-    			return responseEntity;
-    		}
-    		
-        	List<UserFriendsApplyDto> dtoList = userFriendApplyService.searchFriends(userId,req.getFriendUserName());
-        	Map<String, Object> data = new HashMap<String,Object>();
-        	data.put("friendList", dtoList);
-            responseEntity.success(data,"成功");
-        } catch (Exception e){
-        	responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-    
-    @ApiOperation(value = "好友申请历史",httpMethod = "POST")
-    @RequestMapping(value = "/historyFriendsApply",method = RequestMethod.POST)
-    public ResponseEntity historyFriendsApply(@RequestParam(name = "accessToken") String  accessToken) {
-    	ResponseEntity responseEntity = new ResponseEntity();
-    	try{
-    		String userId = tokenManager.getUserId(accessToken);
-        	List<UserFriendsApplyDto> dtoList = userFriendApplyService.historyFriendsApply(userId);
-        	Map<String, Object> data = new HashMap<String,Object>();
-        	data.put("friendList", dtoList);
-            responseEntity.success(data,"成功");
-        } catch (Exception e){
-        	responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/homeworkCheckIn", method = RequestMethod.POST)
-	@ApiOperation(value = "作业登记", httpMethod = "POST", notes = "作业登记")
-	public ResponseEntity homeworkCheckIn(@RequestParam(name = "accessToken") String accessToken, @RequestBody IpadHomeworkCheckInReq req) {
-		ResponseEntity responseEntity = new ResponseEntity();
-		try {
-			String userId = tokenManager.getUserId(accessToken);
-			/** 该功能需验证是否有购买作业吧服务   by duyy on 2019-04-12*/
-    		if(!libVipServiceService.checkZybExistOrExpiredByChildUserId(userId)) {
-    			responseEntity.failure("您还不是作业吧会员,不可进行此操作");
-    			return responseEntity;
-    		}
-			studentService.homeworkCheckIn(req);
-			responseEntity.success();
-		} catch (Exception e) {
-			responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-		}
-		return responseEntity;
-	}
-    
-    @RequestMapping(value = "/getHomeworkCheckIn", method = RequestMethod.POST)
-    @ApiOperation(value = "获取作业登记图片", httpMethod = "POST", notes = "获取当天作业登记图片")
-    public ResponseEntity getHomeworkCheckIn(@RequestParam(name = "accessToken") String accessToken, @RequestBody IpadHomeworkCheckInReq req) {
-    	ResponseEntity responseEntity = new ResponseEntity();
-    	try {
-    		List<String> checkInImgList = studentService.getHomeworkCheckIn(req);
-    		Map<String, Object> data = new HashMap<String, Object>();
-    		data.put("checkInImgList", checkInImgList);
-			responseEntity.success(data, "成功");
-		} catch (Exception e) {
-			responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-		}
-    	return responseEntity;
-    }
-
-    /**
-     * ==========================签到==========================
-     */
-    @RequestMapping(value = "/signIn", method = RequestMethod.POST)
-    @ApiOperation(value = "签到", httpMethod = "POST", notes = "签到")
-    public ResponseEntity signIn(@RequestParam(name = "accessToken") String accessToken, @RequestBody IndexReq req) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        String vipId = req.getVipId();
-        if (StringUtils.isBlank(vipId)) {
-            return responseEntity.failure("学生id不能为空");
-        }
-        try {
-            responseEntity = integralDetailService.signToday(req.getVipId());
-        } catch (Exception e) {
-            responseEntity.failure(ResponseConstant.CODE_500, "签到失败,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "shareMsgAddIntegral",method = RequestMethod.POST)
-    @ApiOperation(value = "分享增加积分",httpMethod = "POST",notes = "分享增加积分")
-    public ResponseEntity shareMsgAddIntegral(@RequestParam(name = "accessToken") String accessToken, @RequestBody ShareReq req){
-        ResponseEntity responseEntity;
-        try {
-            responseEntity = parentV2Service.shareMsgAddIntegral(req);
-        } catch (Exception e) {
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-}

+ 0 - 154
ssj-aijia-api/src/main/java/com/ssj/aijia/task/SyncAiDataTask.java

@@ -1,154 +0,0 @@
-package com.ssj.aijia.task;
-
-import java.util.Date;
-import java.util.List;
-
-
-import com.ssj.bean.common.files.domain.FileInfo;
-import com.ssj.bean.kmt.kmt.domain.KmtAiRecord;
-import com.ssj.bean.kmt.kmt.domain.KmtQuestion;
-import com.ssj.bean.kmt.kmt.domain.KmtQuestionKnow;
-import com.ssj.framework.core.util.PropertiesUtil;
-import com.ssj.framework.core.util.SystemResourceLocator;
-
-import com.ssj.service.ai.model.KmtQuestionModel;
-import com.ssj.service.ai.utils.ExcelUtils;
-import com.ssj.service.kmt.service.KmtAiRecordService;
-import com.ssj.service.kmt.service.KmtQuestionKnowService;
-import com.ssj.service.kmt.service.KmtQuestionService;
-import com.ssj.taskthread.Task;
-import org.apache.commons.lang3.StringUtils;
-
-import com.alibaba.fastjson.JSONObject;
-
-
-
-/**
-* 2018年9月20日15:34:29
-* @author wuwen
-* AI上传的数据处理
-*/
-public class SyncAiDataTask extends Task {
-	
-	 private List<FileInfo> fileInfos;
-	 
-	 private String fileName;
-
-	 public SyncAiDataTask(List<FileInfo> fileInfos,String fileName) {
-	        super();
-	        this.fileInfos=fileInfos;
-	        this.fileName=fileName;
-	 } 
-	 
-	 public List<FileInfo> getFileInfos() {
-		return fileInfos;
-	}
-
-	public void setFileInfos(List<FileInfo> fileInfos) {
-		this.fileInfos = fileInfos;
-	}
-
-	public String getFileName() {
-		return fileName;
-	}
-
-	public void setFileName(String fileName) {
-		this.fileName = fileName;
-	}
-	 
-	 @Override
-	 public void run() {
-		logger.error("AI上传的数据处理任务开始---------------");
-		KmtQuestionService kmtQuestionService= SystemResourceLocator.getBean(KmtQuestionService.class);
-		KmtQuestionKnowService kmtQuestionKnowService=SystemResourceLocator.getBean(KmtQuestionKnowService.class);
-		KmtAiRecordService kmtAiRecordService=SystemResourceLocator.getBean(KmtAiRecordService.class);
-		String savePath = PropertiesUtil.getValue("file_save_path");
-
-		
-		for (FileInfo fileInfo : fileInfos) {
-			
-			//记录AI上传的数据
-			KmtAiRecord aiRecord=new KmtAiRecord();
-			aiRecord.setCountNum(0);
-			aiRecord.setCorrectNum(0);
-			aiRecord.setErrorNum(0);
-			aiRecord.setFileCode(fileInfo.getFileCode());
-			aiRecord.setFileName(fileName);
-			aiRecord.setFilePath(fileInfo.getFilePath());
-			aiRecord.setCreateTime(new Date());
-			aiRecord.setRemarks("");
-			aiRecord.setState(0);//未导入
-			aiRecord.setType(1);//生成的题目
-			kmtAiRecordService.save(aiRecord);
-			
-			
-			if(StringUtils.isNotEmpty(aiRecord.getId())){
-				Integer countNum=0;//总量
-				Integer correctNum=0;//正确量
-				Integer errorNum=0;//错误量
-				StringBuffer bb=new StringBuffer("");
-				
-				String filePath=savePath+"/"+fileInfo.getFilePath();
-				List<KmtQuestionModel> kmtQuestionModels= ExcelUtils.runExcelUtils(filePath.trim());
-				countNum=kmtQuestionModels!=null? kmtQuestionModels.size() : 0;
-				for (KmtQuestionModel kmtQuestionModel : kmtQuestionModels) {
-					try {
-						KmtQuestion kmtQuestion=kmtQuestionModel.getKmtQuestion();
-						if(StringUtils.isNotEmpty(kmtQuestion.getId())){
-							KmtQuestion question=kmtQuestionService.getById(kmtQuestion.getId());
-							if(question!=null){
-								if(question.getState()==1){
-									kmtQuestion.setState(1);
-								}else{
-									kmtQuestion.setState(7);
-								}
-							}else{
-								kmtQuestion.setState(7);
-							}
-							
-							kmtQuestion.setCreateTime(new Date());
-							kmtQuestion.setCheckuser(
-									question!=null && StringUtils.isNotEmpty(question.getCheckuser()) 
-									?  kmtQuestion.getCheckuser() : null);
-							kmtQuestion.setSource(
-									question!=null && StringUtils.isNotEmpty(question.getSource()) 
-									?  kmtQuestion.getSource() + ";AI生成题目导入:"+fileName
-											: "AI生成题目导入:"+fileName);
-							kmtQuestionService.insertKmtQuestion(kmtQuestion);
-						}
-						
-						if(StringUtils.isNotEmpty(kmtQuestion.getId())){
-							List<KmtQuestionKnow> kmtQuestionKnows =kmtQuestionModel.getKmtQuestionKnows();
-							for (KmtQuestionKnow kmtQuestionKnow : kmtQuestionKnows) {
-								kmtQuestionKnow.setQuestionId(kmtQuestion.getId());
-								KmtQuestionKnow questionKnow=kmtQuestionKnowService.findQuByHowKdList(
-										kmtQuestionKnow.getHowDetailsId(), kmtQuestionKnow.getQuestionId(),
-										kmtQuestionKnow.getHowDetailsKdId());
-								if(questionKnow==null){
-									kmtQuestionKnow.setCreateTime(new Date());
-									kmtQuestionKnowService.save(kmtQuestionKnow);
-								}
-							}
-						}
-						
-						correctNum=correctNum+1;
-					} catch (Exception e) {
-						e.printStackTrace();
-						logger.error("AI上传的数据处理任务中,异常题目:"+JSONObject.toJSONString(kmtQuestionModel));
-						bb.append(JSONObject.toJSONString(kmtQuestionModel));
-						errorNum=errorNum+1;
-					}
-				}
-				aiRecord.setState(1);//导入完成
-				aiRecord.setCountNum(countNum);
-				aiRecord.setCorrectNum(correctNum);
-				aiRecord.setErrorNum(errorNum);
-				aiRecord.setRemarks(bb.toString());//保存所有异常的数据
-				kmtAiRecordService.save(aiRecord);
-			}
-		}
-		logger.error("AI上传的数据处理任务结束---------------");
-	 }
-	 
-		
-}

+ 0 - 115
ssj-aijia-api/src/main/java/com/ssj/aijia/task/SyncAiExamDataTask.java

@@ -1,115 +0,0 @@
-package com.ssj.aijia.task;
-
-import java.util.Date;
-import java.util.List;
-
-
-import com.ssj.bean.common.files.domain.FileInfo;
-import com.ssj.bean.kmt.kmt.domain.KmtAiRecord;
-import com.ssj.bean.kmt.kmt.domain.KmtQuestionTempExam;
-import com.ssj.framework.core.util.PropertiesUtil;
-import com.ssj.framework.core.util.SystemResourceLocator;
-import com.ssj.service.ai.utils.ExcelUtils;
-import com.ssj.service.kmt.service.KmtAiRecordService;
-import com.ssj.service.kmt.service.KmtQuestionTempExamService;
-import com.ssj.taskthread.Task;
-import org.apache.commons.lang3.StringUtils;
-
-import com.alibaba.fastjson.JSONObject;
-
-
-
-/**
-* 2018年9月20日15:34:29
-* @author wuwen
-* AI上传的试卷数据处理
-*/
-public class SyncAiExamDataTask extends Task {
-	
-	 private List<FileInfo> fileInfos;
-	 
-	 private String fileName;
-
-	 public SyncAiExamDataTask(List<FileInfo> fileInfos,String fileName) {
-	        super();
-	        this.fileInfos=fileInfos;
-	        this.fileName=fileName;
-	 } 
-	 
-	 public List<FileInfo> getFileInfos() {
-		return fileInfos;
-	}
-
-	public void setFileInfos(List<FileInfo> fileInfos) {
-		this.fileInfos = fileInfos;
-	}
-
-	public String getFileName() {
-		return fileName;
-	}
-
-	public void setFileName(String fileName) {
-		this.fileName = fileName;
-	}
-	 
-	 @Override
-	 public void run() {
-		logger.error("AI试卷上传的数据处理任务开始---------------");
-		KmtQuestionTempExamService kmtQuestionTempService= SystemResourceLocator.getBean(KmtQuestionTempExamService.class);
-		KmtAiRecordService kmtAiRecordService=SystemResourceLocator.getBean(KmtAiRecordService.class);
-		String savePath = PropertiesUtil.getValue("file_save_path");
-
-		
-		for (FileInfo fileInfo : fileInfos) {
-			
-			//记录AI上传的数据
-			KmtAiRecord aiRecord=new KmtAiRecord();
-			aiRecord.setCountNum(0);
-			aiRecord.setCorrectNum(0);
-			aiRecord.setErrorNum(0);
-			aiRecord.setFileCode(fileInfo.getFileCode());
-			aiRecord.setFileName(fileName);
-			aiRecord.setFilePath(fileInfo.getFilePath());
-			aiRecord.setCreateTime(new Date());
-			aiRecord.setRemarks("");
-			aiRecord.setState(0);//未导入
-			aiRecord.setType(2);//试卷识别的题目
-			kmtAiRecordService.save(aiRecord);
-			
-			
-			if(StringUtils.isNotEmpty(aiRecord.getId())){
-				Integer countNum=0;//总量
-				Integer correctNum=0;//正确量
-				Integer errorNum=0;//错误量
-				StringBuffer bb=new StringBuffer("");
-				
-				String filePath=savePath+"/"+fileInfo.getFilePath();
-				List<KmtQuestionTempExam> kmtQuestionModels= ExcelUtils.runExamExcelUtils(filePath.trim());
-				countNum=kmtQuestionModels!=null? kmtQuestionModels.size() : 0;
-				for (KmtQuestionTempExam kmtQuestionTemp : kmtQuestionModels) {
-					try {
-						
-						kmtQuestionTemp.setState(1);
-						kmtQuestionTempService.save(kmtQuestionTemp);
-
-						correctNum=correctNum+1;
-					} catch (Exception e) {
-						e.printStackTrace();
-						logger.error("AI试卷上传的数据处理任务中,异常题目:"+JSONObject.toJSONString(kmtQuestionTemp));
-						bb.append(JSONObject.toJSONString(kmtQuestionTemp));
-						errorNum=errorNum+1;
-					}
-				}
-				aiRecord.setState(1);//导入完成
-				aiRecord.setCountNum(countNum);
-				aiRecord.setCorrectNum(correctNum);
-				aiRecord.setErrorNum(errorNum);
-				aiRecord.setRemarks(bb.toString());//保存所有异常的数据
-				kmtAiRecordService.save(aiRecord);
-			}
-		}
-		logger.error("AI试卷上传的数据处理任务结束---------------");
-	 }
-	 
-		
-}

Fichier diff supprimé car celui-ci est trop grand
+ 0 - 1071
ssj-aijia-api/src/main/java/com/ssj/aijia/teacher/app/controller/TeacherAppController.java


+ 0 - 139
ssj-aijia-api/src/main/java/com/ssj/aijia/teacher/controller/CoachController.java

@@ -1,139 +0,0 @@
-package com.ssj.aijia.teacher.controller;
-
-import com.alibaba.dubbo.config.annotation.Reference;
-import com.ssj.bean.weixin.zyb.domain.ZuoybCourse;
-import com.ssj.bean.weixin.zyb.domain.ZuoybStudentWork;
-import com.ssj.framework.core.common.controller.BaseController;
-import com.ssj.framework.core.security.manager.TokenManager;
-import com.ssj.framework.core.util.ResponseConstant;
-import com.ssj.framework.core.util.ResponseEntity;
-import com.ssj.service.conch.teacher.request.WarTimeRequest;
-import com.ssj.service.conch.teacher.service.TeacherService;
-import com.ssj.service.weixin.zuoyb.service.ZuoybCourseService;
-import com.ssj.service.weixin.zuoyb.service.ZuoybStudentWorkService;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import org.apache.commons.lang3.StringUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.ui.Model;
-import org.springframework.web.bind.annotation.*;
-
-import java.util.Date;
-import java.util.HashMap;
-import java.util.Map;
-
-/** 
- * @author  wuwen 
- * @version 2018年5月2日10:42:45
- * 类说明 
- */
-@Api(value = "老师端相关的接口", tags = "辅导相关的接口")
-@RestController
-@RequestMapping("/api/teacher/coach")
-public class CoachController extends BaseController{
-
-	protected static final Logger     log = LoggerFactory.getLogger(CoachController.class);
-	
-	@Autowired
-    private TokenManager tokenManager;
-	
-	@Reference(version = "1.0" ,timeout = 60000)
-    private TeacherService  teacherService;
-    
-	@Reference(version = "1.0" ,timeout = 60000)
-	private ZuoybCourseService  zuoybCourseService;
-    
-	@Reference(version = "1.0" ,timeout = 60000)
-	private ZuoybStudentWorkService  zuoybStudentWorkService;
-	
-
-	/**
-	 * 设置挑战时间
-	* @throws Exception
-	* 创建人:wuwen 
-	* 2018年5月3日14:19:00
-	* @ResponseEntity
-	 */
-	@RequestMapping(value = "/saveWarTime", method = RequestMethod.POST)
-	@ApiOperation(value = "设置挑战时间", httpMethod = "POST", notes = "设置挑战时间")
-	public ResponseEntity saveWarTime(@RequestParam(name = "accessToken") String accessToken,Model model, 
-			@RequestBody WarTimeRequest request) throws Exception {
-		ResponseEntity responseEntity = new ResponseEntity();
-		try {
-			 String teacherId= tokenManager.getUserId(accessToken);
-			// DateFormat format= new SimpleDateFormat("HH:mm:ss");
-			// Date time=format.parse(request.getWarTime());
-			 ZuoybStudentWork  work= zuoybStudentWorkService.getByLibIdAndVipIdAndCourseId(request.getLibId(), request.getVipId(), request.getCourseId());
-			 if(work !=null){
-				 //work.setTimeWar(time);//改变时间
-			 }else{
-				ZuoybCourse zuoybCourse =zuoybCourseService.getById(request.getCourseId());
-				 work=new ZuoybStudentWork();
-				 work.setCourseHour(zuoybCourse.getCourseHour());
-				 work.setCourseName(zuoybCourse.getCourseName());
-				 work.setLibId(request.getLibId());
-				 work.setScoringTime(new Date());
-				 work.setStat(1);
-				 work.setVipId(request.getVipId());
-				 work.setTeacherId(teacherId);
-				 work.setType(2);
-				 work.setNum(zuoybCourse.getNum());
-				 work.setZybCourseId(zuoybCourse.getId());
-				 work.setStudentId(request.getStudentId());
-				 //work.setAcceptWar(1);//没接受
-				 //work.setTimeWar(time);//时间
-			 }
-			 zuoybStudentWorkService.save(work);
-			responseEntity.success();
-		} catch (Exception e) {
-			logger.error("request={}", request);
-			logger.error("设置挑战时间异常", e);
-			responseEntity.failure(ResponseConstant.CODE_000, "系统繁忙,请稍后重试");
-		}
-		return responseEntity;
-	}
-	
-	
-	
-	/**
-	 * 查询挑战时间
-	* @throws Exception
-	* 创建人:wuwen 
-	* 2018年5月3日14:19:00
-	* @ResponseEntity
-	 */
-	@RequestMapping(value = "/findWarTime", method = RequestMethod.POST)
-	@ApiOperation(value = "设置挑战时间", httpMethod = "POST", notes = "设置挑战时间")
-	public ResponseEntity findWarTime(@RequestParam(name = "accessToken") String accessToken,Model model, 
-			@RequestBody WarTimeRequest request) throws Exception {
-		ResponseEntity responseEntity = new ResponseEntity();
-		Map<String, Object> data =new HashMap<String, Object>();
-		try {
-			 String time="00:00:00"; 
-			// DateFormat format= new SimpleDateFormat("HH:mm:ss");
-			 ZuoybStudentWork  work= zuoybStudentWorkService.getByLibIdAndVipIdAndCourseId(request.getLibId(), request.getVipId(), request.getCourseId());
-			 if(work !=null){
-				 if(work.getStat()!=2){	// 未完成是直接返回设置的时间,如已完成是返回实际完成的时间
-					 //time=format.format(work.getTimeWar()); 
-				 }else{
-					 if(StringUtils.isNotEmpty(work.getTimeCost())){//有作业
-						 //计算时长.....
-					 }
-				 }
-				 data.put("time", time);//时间
-				 data.put("stat", work.getStat());// 1未开始,2已完成,3已提交
-			 }else{
-				 responseEntity.failure(ResponseConstant.CODE_000, "查询异常!该学员未设置挑战时间");
-			 }
-			responseEntity.success();
-		} catch (Exception e) {
-			logger.error("request={}", request);
-			logger.error("设置挑战时间异常", e);
-			responseEntity.failure(ResponseConstant.CODE_000, "系统繁忙,请稍后重试");
-		}
-		return responseEntity;
-	}
-
-}

Fichier diff supprimé car celui-ci est trop grand
+ 0 - 1184
ssj-aijia-api/src/main/java/com/ssj/aijia/teacher/controller/MyTeacherController.java


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 1475
ssj-aijia-api/src/main/java/com/ssj/aijia/teacher/controller/TZybController.java


+ 0 - 735
ssj-aijia-api/src/main/java/com/ssj/aijia/teacher/controller/TeacherController.java

@@ -1,735 +0,0 @@
-package com.ssj.aijia.teacher.controller;
-
-import com.alibaba.dubbo.config.annotation.Reference;
-import com.ssj.bean.conch.conch.domain.ConchDerver;
-import com.ssj.bean.sys.sort.domain.Sort;
-import com.ssj.bean.weixin.libmy.domain.LibVip;
-import com.ssj.bean.weixin.libmy.domain.TbLibManager;
-import com.ssj.bean.weixin.user.domain.User;
-import com.ssj.bean.weixin.zyb.domain.ZuoybKnowHow;
-import com.ssj.bean.weixin.zyb.domain.ZuoybStudentWorkHow;
-import com.ssj.framework.basic.utils.DateHelper;
-import com.ssj.framework.core.common.controller.BaseController;
-import com.ssj.framework.core.security.annotation.IgnoreSecurity;
-import com.ssj.framework.core.security.annotation.ModifySecurity;
-import com.ssj.framework.core.security.manager.TokenManager;
-import com.ssj.framework.core.util.ResponseConstant;
-import com.ssj.framework.core.util.ResponseEntity;
-import com.ssj.framework.core.util.SystemResourceLocator;
-import com.ssj.service.conch.conch.service.ConchDerverService;
-import com.ssj.service.conch.parents.request.FeedbackProblemRequest;
-import com.ssj.service.conch.parents.request.FindProblemRequest;
-import com.ssj.service.conch.schoolmaster.request.SwipeBindingRequest;
-import com.ssj.service.conch.teacher.dto.TeacherHomeDto;
-import com.ssj.service.conch.teacher.dto.TeacherInfoDto;
-import com.ssj.service.conch.teacher.request.*;
-import com.ssj.service.conch.teacher.service.ITzybService;
-import com.ssj.service.conch.teacher.service.TeacherService;
-import com.ssj.service.conch.zyb.request.SubjectReq;
-import com.ssj.service.sys.feedback.service.FeedbackService;
-import com.ssj.service.sys.problem.service.ProblemPictureService;
-import com.ssj.service.sys.problem.vo.ProblemFeedbackForTeacher;
-import com.ssj.service.sys.sort.service.SortService;
-import com.ssj.service.weixin.library.service.IBookManagerService;
-import com.ssj.service.weixin.library.service.ILibVipService;
-import com.ssj.service.weixin.user.service.UserService;
-import com.ssj.service.weixin.zuoyb.service.ZuoybKnowHowService;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import org.apache.commons.lang3.StringUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.data.domain.Pageable;
-import org.springframework.data.domain.Sort.Direction;
-import org.springframework.web.bind.annotation.*;
-
-import java.util.*;
-
-/** 
- * @author  ZhangCaibao 
- * @version 2018年4月13日 下午5:42:02 
- * 类说明 
- */
-@Api(value = "老师端相关的接口", tags = "老师端相关的接口")
-@RestController
-@RequestMapping("/api/teacher/teacher")
-public class TeacherController extends BaseController{
-
-	protected static final Logger     log = LoggerFactory.getLogger(TeacherController.class);
-	
-	@Autowired
-    private TokenManager tokenManager;
-
-	@Reference(version = "1.0" ,timeout = 60000)
-    private FeedbackService           feedbackService;
-
-	@Reference(version = "1.0" ,timeout = 60000)
-    private ProblemPictureService     problemPictureService;
-
-	@Reference(version = "1.0" ,timeout = 60000)
-    private TeacherService            teacherService;
-    
-	@Reference(version = "1.0" ,timeout = 60000)
-	private UserService userService;
-    
-	@Reference(version = "1.0" ,timeout = 60000)
-	private IBookManagerService  managerService;
-    
-	@Reference(version = "1.0" ,timeout = 60000)
-	private ConchDerverService conchDerverService;
-	@Reference(version = "1.0" ,timeout = 60000)
-	private  ZuoybKnowHowService   zuoybKnowHowService;
-	
-	@Reference(version = "1.0" ,timeout = 60000)
-	private ILibVipService vipService;
-	
-	@Reference(version = "1.0" ,timeout = 60000)
-	private ITzybService zybService;
-	
-	@Reference(version = "1.0" ,timeout = 60000)
-	private SortService sortService;
-
-    @RequestMapping(value = "/myHome", method = RequestMethod.POST)
-    @ApiOperation(value = "我的首页", httpMethod = "POST", notes = "我的首页")
-    public ResponseEntity myHome(@RequestParam(name = "accessToken") String accessToken) {
-    	ResponseEntity responseEntity = new ResponseEntity();
-        try {
-        	String userId = tokenManager.getUserId(accessToken);
-        	TeacherHomeDto dto = teacherService.myHome(userId);
-            responseEntity.success(dto,"获取信息成功");
-        } catch (Exception e) {
-        	logger.error("获取我的信息异常", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "获取我的信息异常");
-        }
-        return responseEntity;
-    }
-    
-
-	@RequestMapping(value = "/myInfo", method = RequestMethod.POST)
-    @ApiOperation(value = "我的个人资料", httpMethod = "POST", notes = "我的个人资料")
-    public ResponseEntity myInfo(@RequestParam(name = "accessToken") String accessToken) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-        	String userId = tokenManager.getUserId(accessToken);
-        	TbLibManager  teacher = managerService.findByUserId(userId,7);
-        	if(teacher == null){
-        		teacher=managerService.findByUserId(userId);
-        	}
-        	TeacherInfoDto dto  = new TeacherInfoDto();
-    		User user= userService.getById(userId);
-    		dto.setName(teacher.getName());
-    		dto.setBirthday(teacher.getBirthday());
-    		dto.setPhoto(teacher.gettPhoto()==null?user.getPhoto():teacher.gettPhoto());
-    		dto.setSex(teacher.getSex()==null?user.getSex():teacher.getSex());
-    		dto.setMobile(teacher.getTelephone()==null?user.getMobile():teacher.getTelephone());
-    		dto.setCourseName(teacher.getCourseName());
-    		dto.setGrade(teacher.getGrade());
-    		dto.setQrcode(user.getQrCode());
-    		dto.setTeachPoint(teacher.getTeachPoint());
-    		dto.setSchoolAge(teacher.getSchoolAge());
-    		dto.setPersonalInfo(teacher.getPersonalInfo());
-    		dto.setSuccessfulCase(teacher.getSuccessfulCase());
-    		if(StringUtils.isNotEmpty(teacher.getPersonalLabel())){
-    			List<Sort> sortList = sortService.getParamValByCode("onetoone_lable");
-    			String[] strArr = teacher.getPersonalLabel().split(",");
-        		List<Map<String, Object>> personal = new ArrayList<Map<String, Object>>();
-        		for(Sort sort :sortList){
-        			Map<String, Object> map = new HashMap<String, Object>();
-        			map.put("active", "1"); //1-未选中 2--选中
-        			map.put("lableName", sort.getName());
-        			for(String str:strArr){
-        				if(sort.getName().equals(str)){
-        					map.put("active", "2");
-        				}
-        			}
-        			personal.add(map);
-        		}
-    			dto.setPersonalLabel(personal);
-    		}
-    		
-         	responseEntity.success(dto,"成功");
-        } catch (Exception e) {
-            responseEntity.failure(ResponseConstant.CODE_500, "获取我的个人资料异常");
-        }
-        return responseEntity;
-    }
-    
-    @RequestMapping(value = "/upMyInfo", method = RequestMethod.POST)
-    @ApiOperation(value = "修改我的个人资料", httpMethod = "POST", notes = "修改我的个人资料")
-    public ResponseEntity upMyInfo(@RequestParam(name = "accessToken") String accessToken,
-    		@RequestBody UpdateTeacherRequest request) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-        	String userId = tokenManager.getUserId(accessToken);
-        	teacherService.upMyInfo(userId, request);
-        	responseEntity.success();
-        } catch (Exception e) {
-            responseEntity.failure(ResponseConstant.CODE_500, "获取我的信息异常");
-        }
-        return responseEntity;
-    }
-    
-    @RequestMapping(value = "/searchProblemTaskList", method = RequestMethod.POST)
-	@IgnoreSecurity
-    @ApiOperation(value = "获取当天任务列表", httpMethod = "POST", notes = "获取当天任务列表")
-    public ResponseEntity searchProblemTaskList(@RequestParam(name = "accessToken") String accessToken,@RequestBody SearchTaskListRequest request) {
-        
-    	ResponseEntity responseEntity = new ResponseEntity();
-        try {
-        	
-        	String teacherUserId = tokenManager.getUserId(accessToken);
-			logger.info("userId:" + teacherUserId);
-			//难题任务列表
-			logger.info("任务难题开始:");
-            Map<String, Object> data = teacherService.searchProblemTaskList(teacherUserId, request.getIsFeedback(),request.getVipId());
-            logger.info("任务难题结束,签到任务开始:");
-            //未完成--签到 --已完成 type=3等待批改type=2已发送
-	        List<Map<String, Object>> list = teacherService.findForPageSignList(teacherUserId, request.getIsFeedback(),request.getVipId());
-            data.put("worklist",list);
-            logger.info("签到任务结束,批改任务开始:");
-            //1、查询有几个科目
-            List<Map<String, Object>> workPicList = zybService.findWorkPicList(teacherUserId,request.getVipId());
-            List<Map<String, Object>> finishList = new ArrayList<Map<String, Object>>();//已完成
-            List<Map<String, Object>> unfinishList = new ArrayList<Map<String, Object>>(); //未完成
-            if(workPicList != null && workPicList.size()>0){
-            	for(Map<String, Object> map:workPicList){
-            		if("0".equals(map.get("feedbackcount").toString())){ //都已批改
-            			Map<String, Object> unmap = new HashMap<String, Object>() ;
-            			unmap.put("subject", map.get("subject"));
-            			unmap.put("child_name", map.get("child_name"));
-            			unmap.put("teacher_name", map.get("name"));
-            			unmap.put("create_time", map.get("create_time"));
-            			unmap.put("imgList", zybService.findTaskPicList(map.get("teacher_id").toString(),map.get("subject").toString(),map.get("vip_id").toString()));
-            			finishList.add(unmap);
-            		}else{
-            			Map<String, Object> unmap = new HashMap<String, Object>() ;
-            			unmap.put("subject", map.get("subject"));
-            			unmap.put("child_name", map.get("child_name"));
-            			unmap.put("teacher_name", map.get("name"));
-            			unmap.put("create_time", map.get("create_time"));
-            			unmap.put("imgList", zybService.findTaskPicList(map.get("teacher_id").toString(),map.get("subject").toString(),map.get("vip_id").toString()));
-            			unfinishList.add(unmap);
-            		}
-            	}
-            }
-            if(request.getIsFeedback() == 0){
-            	logger.info("批改任务结束,未完成提交图片开始:");
-            	 //未完成提交图片提示
-                List<Map<String, Object>> kmtList = teacherService.findForKmtEditList(teacherUserId,request.getVipId());
-                data.put("kmtList", kmtList);
-                data.put("taskNum", Integer.parseInt(data.get("taskNum").toString())+list.size()+kmtList.size());
-                //图片重拍任务
-                logger.info("未完成提交图片结束,重拍任务开始:");
-                List<Map<String, Object>> rephotoList = zybService.findRephotoList(teacherUserId,1,request.getVipId());
-                rephotoList.addAll(zybService.findRephotoList(teacherUserId,3,request.getVipId()));
-                data.put("rephotoList", rephotoList);
-                logger.info("重拍任务结束,一对一任务开始:");
-                //作业批改任务
-                data.put("viewWorkList", unfinishList);
-                //一对一任务
-                List<Map<String, Object>> oneUnfinishList = new ArrayList<Map<String, Object>>();
-                List<Map<String, Object>> vipList = zybService.findStudentListByTeacherId(teacherUserId,request.getIsFeedback(),request.getVipId());
-                if(vipList !=null && vipList.size()>0){
-                	for(Map<String, Object> map:vipList){
-            			 //查询到最新的一节课
-                		 
-                		 Map<String, Object> teacherMap = zybService.findIsHasTeacher(map.get("vip_id").toString(),map.get("lesson_service_id").toString());
-                		 if(teacherMap !=null){
-                			 Map<String, Object> amap = new HashMap<String, Object>();
-                			 Map<String, Object> studyMap = zybService.findStudyMap(map.get("vip_id").toString(),map.get("lesson_service_id").toString());
-                    		 String status = teacherMap.get("status").toString();//0:未支付 1:已支付待服务 2:已完结服务 3:退款中 4:退款
-                    			 if("1".equals(teacherMap.get("plan_status").toString()) || "0".equals(status)){ //未支付不处理
-                    				 
-                    			 }else{
-                    				 List<String> timeList = new ArrayList<String>();
-                    				 amap.put("lessonServiceId", teacherMap.get("lesson_service_id"));
-                                     amap.put("finishCourse", studyMap.get("finish_total2"));
-                                     amap.put("totalCourse", studyMap.get("total"));
-                                     int courseOrderType =1;
-                                     if(teacherMap.get("teacher_lever")==null || "".equals(teacherMap.get("teacher_lever"))){
-                                    	 courseOrderType =1;
-                                     }else{
-                                    	 if(teacherMap.get("teacher_lever").toString().contains("学霸")){
-                                    		 courseOrderType =2;
-                                    	 }else{
-                                    		 courseOrderType =1;
-                                    	 }
-                                     }
-                                     amap.put("courseOrderType", courseOrderType);
-                    				 if("2".equals(teacherMap.get("plan_status").toString())){ //老师未确认
-                                    	 amap.put("planStatus", "1");
-                                    	 amap.put("childName", teacherMap.get("child_name"));
-                                         amap.put("parentName", teacherMap.get("parent_name"));
-                                         amap.put("courseId", teacherMap.get("id"));
-                                         amap.put("courseName", teacherMap.get("course_name"));
-                                         amap.put("grade", teacherMap.get("grade"));
-                                         amap.put("courseType", teacherMap.get("course_type"));
-                                         amap.put("nowTime", teacherMap.get("course_time")+" "+teacherMap.get("start_time"));
-                                         amap.put("libName",teacherMap.get("league_name"));
-                                         amap.put("timeList", timeList);
-                                         oneUnfinishList.add(amap);
-                                     }else if("3".equals(teacherMap.get("plan_status").toString())){ //老师确认上课
-                                    	 if(teacherMap.get("course_know_id")==null){ //未生成讲义
-                                    		 amap.put("planStatus", "2");
-                                    		 timeList.add(DateHelper.format(DateHelper.parseDate(teacherMap.get("start_time").toString(), "HH:mm"), "HH:mm")+""); //老师确认上课时间
-                                    		 
-                                    		 //老师端生成讲义,目前小学阶段做限制使用(其中根据老师教龄在5年以上可不做限制使用),初高中不做限制使用
-                                    		 String schoolAge = teacherMap.get("school_age")==null?"0":teacherMap.get("school_age").toString();
-                                    		 if(!isGradeSchool(teacherMap.get("grade").toString()) || Integer.parseInt(schoolAge)>4 || courseOrderType==2){
-                                    			 amap.put("planStatus", "3");
-                                    			 timeList.add("");
-                                    		 }
-                                    		 
-                                    	 }else{
-                                    		 amap.put("planStatus", "3");
-                                    		 timeList.add(DateHelper.format(DateHelper.parseDate(teacherMap.get("start_time").toString(), "HH:mm"), "HH:mm")+""); //老师确认上课时间
-                                        	 timeList.add(DateHelper.format(DateHelper.parseDate(teacherMap.get("create_time").toString(), "yyyy-MM-dd HH:mm:ss"), "HH:mm")+"");//讲义生成时间
-                                    	 }
-                                    	 amap.put("childName", teacherMap.get("child_name"));
-                                         amap.put("parentName", teacherMap.get("parent_name"));
-                                         amap.put("courseId", teacherMap.get("id"));
-                                         amap.put("courseName", teacherMap.get("course_name"));
-                                         amap.put("grade", teacherMap.get("grade"));
-                                         amap.put("courseType", teacherMap.get("course_type"));
-                                         amap.put("nowTime", teacherMap.get("course_time")+" "+teacherMap.get("start_time"));
-                                         amap.put("libName",teacherMap.get("league_name"));
-                                         amap.put("timeList", timeList);
-                                         oneUnfinishList.add(amap);
-                                     }else if("4".equals(teacherMap.get("plan_status").toString())){
-                                    	 amap.put("planStatus", "4");
-                                    	 timeList.add(DateHelper.format(DateHelper.parseDate(teacherMap.get("start_time").toString(), "HH:mm"), "HH:mm")+""); //老师确认上课时间
-                                    	 timeList.add(teacherMap.get("create_time")==null?"":DateHelper.format(DateHelper.parseDate(teacherMap.get("create_time").toString(), "yyyy-MM-dd HH:mm:ss"), "HH:mm")+"");//讲义生成时间
-                                    	 timeList.add(DateHelper.format(DateHelper.parseDate(teacherMap.get("call_time").toString(), "yyyy-MM-dd HH:mm:ss"), "HH:mm")+"");//上课时间
-                                    	 amap.put("childName", teacherMap.get("child_name"));
-                                         amap.put("parentName", teacherMap.get("parent_name"));
-                                         amap.put("courseId", teacherMap.get("id"));
-                                         amap.put("courseName", teacherMap.get("course_name"));
-                                         amap.put("grade", teacherMap.get("grade"));
-                                         amap.put("courseType", teacherMap.get("course_type"));
-                                         amap.put("nowTime", teacherMap.get("course_time")+" "+teacherMap.get("start_time"));
-                                         amap.put("libName",teacherMap.get("league_name"));
-                                         amap.put("timeList", timeList);
-                                         oneUnfinishList.add(amap);
-                                     }
-                    			 }
-                    		 }
-            		}
-                }
-                logger.info("一对一任务结束:");
-                data.put("oneUnfinishList", oneUnfinishList);
-                data.put("taskNum", Integer.parseInt(data.get("taskNum").toString())+rephotoList.size()+oneUnfinishList.size()+unfinishList.size());
-            }else{
-				data.put("taskNum", Integer.parseInt(data.get("taskNum").toString()) + list.size());
-				data.put("kmtList", new ArrayList<Map<String, Object>>());
-				// 图片重拍任务
-				List<Map<String, Object>> rephotoList = zybService.findRephotoList(teacherUserId, 2,
-						request.getVipId());
-				data.put("rephotoList", rephotoList);
-				// 作业批改任务
-				data.put("viewWorkList", finishList);
-				List<Map<String, Object>> onefinishList = new ArrayList<Map<String, Object>>();
-
-				List<Map<String, Object>> vipList = zybService.findStudentListByTeacherId(teacherUserId,
-						request.getIsFeedback(), request.getVipId());
-				for (Map<String, Object> map : vipList) {
-					
-					int teacherLever = 1;
-					if (map.get("teacher_lever") == null || "".equals(map.get("teacher_lever"))) {
-						teacherLever =1;
-					} else {
-						if (map.get("teacher_lever").toString().contains("学霸")) {
-							teacherLever = 2;
-						} else {
-							teacherLever = 1;
-						}
-					}
-					if (teacherLever == 1) {
-						Map<String, Object> amap = new HashMap<String, Object>();
-						amap.put("courseOrderType",teacherLever);
-						Map<String, Object> studyMap = zybService.findTodayOneFinishTask(map.get("vip_id").toString(),
-								map.get("lesson_service_id").toString());
-						if (studyMap.get("child_name") != null) {
-
-							List<Map<String, Object>> modelList = new ArrayList<Map<String, Object>>();
-
-							amap.put("childName", studyMap.get("child_name"));
-							amap.put("lever", studyMap.get("master"));
-							amap.put("courseId", studyMap.get("id"));
-							amap.put("feedbackTime", studyMap.get("feedback_time"));
-							Map<String, Object> bmap = new HashMap<String, Object>();
-							bmap.put("model", "总体");
-							bmap.put("errorNum", studyMap.get("ztnum"));
-							modelList.add(bmap);
-							Map<String, Object> cmap = new HashMap<String, Object>();
-							cmap.put("model", "课后巩固");
-							cmap.put("errorNum", studyMap.get("khggnum"));
-							modelList.add(cmap);
-							Map<String, Object> dmap = new HashMap<String, Object>();
-							dmap.put("model", "小试牛刀");
-							dmap.put("errorNum", studyMap.get("ndaonum"));
-							modelList.add(dmap);
-							amap.put("modelList", modelList);
-							onefinishList.add(amap);
-						}
-					}else {
-						List<Map<String, Object>> xbTodayFinishList = zybService.xbTodayFinishList(map.get("vip_id").toString(),
-								map.get("lesson_service_id").toString());
-						if(xbTodayFinishList !=null && xbTodayFinishList.size()>0){
-							for(Map<String, Object> xmap:xbTodayFinishList){
-								Map<String, Object> amap = new HashMap<String, Object>();
-								amap.put("courseId", xmap.get("id"));
-								amap.put("courseOrderType",teacherLever);
-								amap.put("childName", xmap.get("child_name"));
-								amap.put("feedbackTime", xmap.get("feedback_time"));
-								amap.put("teacherSay", xmap.get("teacher_say")==null?new ArrayList<String>():Arrays.asList(xmap.get("teacher_say").toString().split("\n")));
-								amap.put("explainContent", xmap.get("explain_content")==null?new ArrayList<String>():Arrays.asList(xmap.get("explain_content").toString().split("\n")));
-								onefinishList.add(amap);
-							}
-						}
-					}
-                 }
-                 data.put("onefinishList", onefinishList);
-                 data.put("taskNum", Integer.parseInt(data.get("taskNum").toString())+rephotoList.size()+onefinishList.size()+unfinishList.size());
-            }
-            responseEntity.success(data, "成功");
-        } catch (Exception e) {
-        	e.printStackTrace();
-            responseEntity.failure(ResponseConstant.CODE_500, "获取当天任务列表异常");
-        }
-        return responseEntity;
-    }
-    
-    @RequestMapping(value = "/feedbackToProblem", method = RequestMethod.POST)
-    @ApiOperation(value = "小塾难题反馈", httpMethod = "POST", notes = "小塾难题反馈")
-	@ModifySecurity
-    public ResponseEntity feedbackToProblem(@RequestParam(name = "accessToken") String accessToken,@RequestBody FeedbackProblemRequest request) {
-        
-    	ResponseEntity responseEntity = new ResponseEntity();
-        try {
-        	if (StringUtils.isEmpty(request.getBizId())){
-        		responseEntity.failure(ResponseConstant.CODE_000, "图片id不能为空");
-			} else {
-				problemPictureService.feedbackToProblem(request);
-				responseEntity.success("反馈成功");
-			}
-        } catch (Exception e) {
-        	logger.error("异常", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "小塾难题反馈异常");
-        }
-        return responseEntity;
-    }
-    
-     @ApiOperation(value = "老师端难题解答知识点", httpMethod = "POST",  notes = "老师端难题解答知识点")  
-	 @RequestMapping(value = "/loadHowData", method = RequestMethod.POST)
-	 public ResponseEntity loadHowData(@RequestParam(name = "accessToken", required=true) String accessToken,
-			@RequestBody LoadHowDataReq request
-			 ) {
-		 ResponseEntity responseEntity = new ResponseEntity();
-		 logger.info("userId:" + tokenManager.getUserId(accessToken));
-		 try {
-			 if(StringUtils.isEmpty(request.getVipId())){
-        		 responseEntity.failure(ResponseConstant.CODE_000, "vipId为空");
-        		 return responseEntity;
-        	}
-			 
-			LibVip vip= vipService.getById(request.getVipId());
-			String banben="2";
-			String grade ="二年级";
-			if(vip!=null){
-				 banben=vip.getBanben()!=null ? vip.getBanben().toString():"2";
-				 grade = vip.getGrade()!=null?vip.getGrade():"二年级";
-				
-			}
-		   String date=SystemResourceLocator.getValue("startschool").toString();//开学的时间。。。
-		   List<ZuoybKnowHow>  konwHowList= zuoybKnowHowService.findByCourseNameByGrade
-		    		 ("SSJ", request.getCourseName(),grade, date,banben,
-		    				 new ArrayList<ZuoybStudentWorkHow>());
-		    	Map<String, Object> data = new HashMap<String, Object>();
-				data.put("list", konwHowList);
-				responseEntity.success(data, "获取成功!");
-		 } catch (Exception e) {
-			 e.printStackTrace();
-			 responseEntity.failure(ResponseConstant.CODE_000, "系统繁忙,请稍后重试");
-		 }
-		 return responseEntity;
-	 } 
-     @ApiOperation(value = "老师端难题解答全部知识点", httpMethod = "POST",  notes = "老师端难题解答全部知识点")  
-     @RequestMapping(value = "/loadAllHowData", method = RequestMethod.POST)
-     public ResponseEntity loadAllHowData(@RequestParam(name = "accessToken", required=true) String accessToken,
-    		 @RequestBody LoadHowDataReq request
-    		 ) {
-    	 ResponseEntity responseEntity = new ResponseEntity();
-		 logger.info("userId:" + tokenManager.getUserId(accessToken));
-		 try {
-			 if(StringUtils.isEmpty(request.getVipId())){
-        		 responseEntity.failure(ResponseConstant.CODE_000, "vipId为空");
-        		 return responseEntity;
-        	}
-    		LibVip vip= vipService.getById(request.getVipId());
- 			String banben="2";
- 			String grade ="二年级";
- 			if(vip!=null){
- 				 banben=vip.getBanben()!=null ? vip.getBanben().toString():"2";
- 				 grade = vip.getGrade()!=null?vip.getGrade():"二年级";
- 				
- 			}
-    		 List<ZuoybKnowHow>  konwHowList= zuoybKnowHowService.findByCourseNameByGrade
- 	    			("SSJ", request.getCourseName(),grade,banben,
- 	    					new ArrayList<ZuoybStudentWorkHow>());
-    		 Map<String, Object> data = new HashMap<String, Object>();
-    		 data.put("list", konwHowList);
-    		 responseEntity.success(data, "获取成功!");
-    	 } catch (Exception e) {
-    		 e.printStackTrace();
-    		 responseEntity.failure(ResponseConstant.CODE_000, "系统繁忙,请稍后重试");
-    	 }
-    	 return responseEntity;
-     } 
-    
-    @RequestMapping(value = "/findProblemDetails", method = RequestMethod.POST)
-    @ApiOperation(value = "获取难题详情", httpMethod = "POST", notes = "获取难题详情")
-    public ResponseEntity findProblemDetails(@RequestParam(name = "accessToken") String accessToken,@RequestBody FindProblemRequest request) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-        	String teacherUserId =  tokenManager.getUserId(accessToken);
-			logger.info("userId:" + teacherUserId);
-			if (StringUtils.isEmpty(request.getProblemId())){
-				responseEntity.failure(ResponseConstant.CODE_000, "难题id不能为空");
-			} else {
-				ProblemFeedbackForTeacher data = problemPictureService.findProblemInfoForTeacher(request,teacherUserId);
-				responseEntity.success(data, "成功");
-			}
-        } catch (Exception e) {
-        	logger.error("异常", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-	@RequestMapping(value = "/findProblemPartDetail", method = RequestMethod.POST)
-	@ApiOperation(value = "获取未答疑的难题详情", httpMethod = "POST", notes = "获取难题部分详情")
-	public ResponseEntity findProblemPartDetail(@RequestParam(name = "accessToken") String accessToken,@RequestBody FindProblemRequest request) {
-		ResponseEntity responseEntity = new ResponseEntity();
-		try {
-			if (StringUtils.isEmpty(request.getProblemId())){
-				responseEntity.failure(ResponseConstant.CODE_000, "难题id不能为空");
-			} else {
-				Map<String, Object> data = problemPictureService.findProblemPartDetail(request.getProblemId());
-				responseEntity.success(data.get("data"), data.get("msg") + "'");
-			}
-		} catch (Exception e) {
-			logger.error("异常", e);
-			responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-		}
-		return responseEntity;
-	}
-
-    
-    @RequestMapping(value = "/searchProblemStudentList", method = RequestMethod.POST)
-    @ApiOperation(value = "获取答疑学生列表", httpMethod = "POST", notes = "获取答疑学生列表")
-    public ResponseEntity searchProblemStudentList(@RequestParam(name = "accessToken") String accessToken,@RequestBody SearchStudentListRequest request) {
-        ResponseEntity responseEntity = new ResponseEntity();
-		logger.info("userId:" + tokenManager.getUserId(accessToken));
-		try {
-            Pageable pageable = initPage(request.getPageNo(), request.getPageSize(), Direction.DESC, "createTime");
-            Map<String, Object> data = teacherService.searchStudentList(accessToken,request, pageable);
-            responseEntity.success(data, "成功");
-        } catch (Exception e) {
-            logger.error(e.getMessage());
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/searchQuestionKnowledge", method = RequestMethod.POST)
-    @ApiOperation(value = "查询学生常问知识点", httpMethod = "POST", notes = "查询学生常问知识点")
-    public ResponseEntity searchQuestionKnowledge(@RequestParam(name = "userId") String userId,@RequestParam String subject) {
-        ResponseEntity responseEntity = new ResponseEntity();
-		logger.info("studentId:" + userId);
-		try {
-            String[] data = teacherService.searchQuestionKnowledge(userId, subject);
-            responseEntity.success(data, "成功");
-        } catch (Exception e) {
-            logger.error(e.getMessage());
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/searchProblemStudent", method = RequestMethod.POST)
-    @ApiOperation(value = "获取答疑学生档案", httpMethod = "POST", notes = "获取答疑学生档案")
-    public ResponseEntity searchProblemStudent(@RequestParam(name = "accessToken") String accessToken, @RequestBody ProblemStudentReq req) {
-        ResponseEntity responseEntity = new ResponseEntity();
-		logger.info("userId:" + tokenManager.getUserId(accessToken));
-
-		try {
-            Map<String, Object> data = teacherService.searchStudent(req.getUserId());
-            String[] knowledge = teacherService.searchQuestionKnowledge(req.getUserId(), "语文");
-            data.put("chineseKnowledge", knowledge);
-			knowledge = teacherService.searchQuestionKnowledge(req.getUserId(), "数学");
-			data.put("mathKnowledge", knowledge);
-			knowledge = teacherService.searchQuestionKnowledge(req.getUserId(), "英语");
-			data.put("englishKnowlegde", knowledge);
-            responseEntity.success(data, "成功");
-        } catch (Exception e) {
-		    logger.error(e.getMessage());
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/searchProblemListByStudent", method = RequestMethod.POST)
-    @ApiOperation(value = "获取学生学科下的难题列表", httpMethod = "POST", notes = "获取学生学科下的难题列表")
-    public ResponseEntity searchProblemListByStudent(@RequestParam(name = "accessToken") String accessToken,@RequestBody SearchSubjectProblemListRequest request) {
-	    ResponseEntity responseEntity = new ResponseEntity();
-		logger.info("userId:" + tokenManager.getUserId(accessToken));
-		try {
-	    	
-	    	//通过小孩的id查询设备信息
-	    	ConchDerver conchDerver = conchDerverService.findByUserId(request.getUserId());
-	    	Map<String, Object> params = new HashMap<String, Object>();
-	        params.put("EQ_isDelete", 0);
-	        params.put("EQ_derver", conchDerver.getDerver());
-	        params.put("EQ_subject", request.getSubject());
-	        if (StringUtils.isNoneBlank(request.getMaxCreateTime())) {
-	             params.put("LTE_createTime", request.getMaxCreateTime());
-	        }
-	        Pageable pageable = initPage(request.getPageNo(), request.getPageSize(), Direction.ASC,
-	                                       new String[] { "isFeedback","createTime" });
-	        Map<String, Object> data = problemPictureService.searchProblemListByStudentSubject(params, pageable);
-	        responseEntity.success(data, "成功");
-	     } catch (Exception e) {
-	         responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-	     }
-	     return responseEntity;
-    }
-
-    @RequestMapping(value = "/studentList", method = RequestMethod.POST)
-    @ApiOperation(value = "获取老师首页学生列表", httpMethod = "POST", notes = "获取首页学生列表")
-    public ResponseEntity searchStudentList(@RequestParam(name = "accessToken") String accessToken,
-    		@RequestBody SearchStudentListRequest request) {
-        ResponseEntity responseEntity = new ResponseEntity();
-		String teacherUserId = tokenManager.getUserId(accessToken);
-		logger.info("userId:" + teacherUserId);
-		try {
-            Pageable pageable = initPage(request.getPageNo(), request.getPageSize(), Direction.DESC, "createTime");
-            Map<String, Object> data = teacherService.findForPageStudentList(teacherUserId, request, pageable);
-            responseEntity.success(data, "成功");
-        } catch (Exception e) {
-            responseEntity.failure(ResponseConstant.CODE_500, "获取首页学生列表异常");
-        }
-        return responseEntity;
-    }
-    @RequestMapping(value = "/verifyStudent", method = RequestMethod.POST)
-    @ApiOperation(value = "校验已经在馆签到的学生,是否已被其他老师锁定", httpMethod = "POST", notes = "校验已经在馆签到的学生,是否已被其他老师锁定")
-    public ResponseEntity verifyStudent(@RequestParam(name = "accessToken") String accessToken,
-    		@RequestBody SubjectReq req) {
-    	ResponseEntity responseEntity = new ResponseEntity();
-    	logger.info("userId:" + tokenManager.getUserId(accessToken));
-    	try {
-    		String vipId =req.getVipId();
-    		String key ="verify"+DateHelper.getUserDate("yyyyMMdd");
-    		String oldUserId =tokenManager.getString(key+vipId);
-    		String userId = tokenManager.getUserId(accessToken);
-    		Map<String, Object> data = new HashMap<String, Object>();
-    		if(oldUserId==null || userId.equals(oldUserId)){
-    			tokenManager.setString(key+vipId, userId,24*3600);
-    			data.put("isVerify", "1");//未绑定,
-    		}else{
-    			data.put("isVerify", "0");//已绑定
-    		}
-    		responseEntity.success(data, "请求成功");
-    	} catch (Exception e) {
-    		responseEntity.failure(ResponseConstant.CODE_500, "获取首页学生列表异常");
-    	}
-    	return responseEntity;
-    }
-
-
-	/**
-	 * 小程序端查询难题信息
-	 * @return
-	 */
-	@RequestMapping(value = "/findPictureData", method = RequestMethod.POST)
-	@ApiOperation(value = "老师端扫码查询难题信息", httpMethod = "POST", notes = "老师端扫码查询难题信息")
-	public ResponseEntity findPictureData (@RequestParam(name = "accessToken") String accessToken,
-										   @RequestBody KmtProblemRequest req) {
-		ResponseEntity responseEntity = new ResponseEntity();
-		try {
-			if (StringUtils.isEmpty(req.getPid())){
-				responseEntity.failure(ResponseConstant.CODE_000, "图片id不能为空");
-			} else {
-				Map<String, Object> data = problemPictureService.findPictureData(req.getPid());
-				responseEntity.success(data.get("data"), data.get("msg") + "");
-			}
-		} catch (Exception e) {
-			e.printStackTrace();
-			responseEntity.failure(ResponseConstant.CODE_500, "获取难题信息异常");
-		}
-		return responseEntity;
-	}
-
-	/**
-	 * 小程序端保存图片信息
-	 * [['url','url'],[],[],[]]
-	 * @return
-	 */
-	@RequestMapping(value = "/savePictureImg", method = RequestMethod.POST)
-	@ApiOperation(value = "老师端扫码上传图片", httpMethod = "POST", notes = "老师端扫码上传图片")
-	public ResponseEntity savePictureImg (@RequestParam(name = "accessToken") String accessToken,
-										  @RequestBody KmtProblemRequest req) {
-		ResponseEntity responseEntity = new ResponseEntity();
-		try {
-			if (StringUtils.isEmpty(req.getPid())){
-				responseEntity.failure(ResponseConstant.CODE_000, "图片id不能为空");
-			} else {
-				String result = problemPictureService.saveAnswerPhoto(req.getPid(), req.getData());
-				//推送线上老师
-				problemPictureService.sendPictureMsg2KmtTeacher(req.getPid(),
-                        problemPictureService.getById(req.getPid()).getTeacherId());
-				responseEntity.success(ResponseConstant.CODE_999, result);
-			}
-		} catch (Exception e) {
-			e.printStackTrace();
-			responseEntity.failure(ResponseConstant.CODE_500, "保存答疑记录异常");
-		}
-		return responseEntity;
-	}
-    
-    
-//    @RequestMapping(value = "/signList", method = RequestMethod.POST)
-//    @ApiOperation(value = "查询老师学员的签到消息列表  type=1是未完成,2是已完成", httpMethod = "POST", notes = "查询老师学员的签到消息列表  type=1是未完成,2是已完成")
-//    public ResponseEntity signList(@RequestParam(name = "accessToken") String accessToken,
-//    		@RequestBody SignListRequest request) {
-//        ResponseEntity responseEntity = new ResponseEntity();
-//        try {
-//        	 Map<String, Object> data =new HashMap<String, Object>();
-//        	String teacherId= tokenManager.getUserId(accessToken);
-//            List<Map<String, Object>> list = teacherService.findForPageSignList(teacherId, request.getType());
-//            data.put("list",list);
-//            responseEntity.success(data, "成功");
-//        } catch (Exception e) {
-//            responseEntity.failure(ResponseConstant.CODE_500, "获取首页学生列表异常");
-//        }
-//        return responseEntity;
-//    }
-//    
-	@ModifySecurity
-	@RequestMapping(value = "/swipeBinding", method = RequestMethod.POST)
-	@ApiOperation(value = "老师端扫卡绑定", httpMethod = "POST", notes = "老师端扫卡绑定")
-	public ResponseEntity swipeBinding(@RequestParam(name = "accessToken") String accessToken,
-									   @RequestBody SwipeBindingRequest req) {
-		ResponseEntity responseEntity = new ResponseEntity();
-		return responseEntity;
-	}
-    
-	
-	public boolean isGradeSchool(String grad){
-		if(grad.equals("学前")||grad.equals("一年级")||grad.equals("二年级")||grad.equals("三年级")||grad.equals("四年级")||grad.equals("五年级")||grad.equals("六年级")){
-			return true;
-		}else{
-			return false;
-		}
-	}
-}

+ 0 - 389
ssj-aijia-api/src/main/java/com/ssj/aijia/teacher/controller/TeacherOrgController.java

@@ -1,389 +0,0 @@
-package com.ssj.aijia.teacher.controller;
-
-import java.util.List;
-import java.util.Map;
-
-import javax.validation.Valid;
-
-import org.apache.commons.lang3.StringUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.data.domain.Pageable;
-import org.springframework.data.domain.Sort.Direction;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
-
-import com.alibaba.dubbo.config.annotation.Reference;
-import com.alibaba.fastjson.JSON;
-import com.ssj.bean.sys.homework.domain.Homework;
-import com.ssj.bean.sys.homework.domain.HomeworkPicture;
-import com.ssj.framework.core.common.controller.BaseController;
-import com.ssj.framework.core.security.annotation.ModifySecurity;
-import com.ssj.framework.core.security.exception.CommonException;
-import com.ssj.framework.core.security.manager.TokenManager;
-import com.ssj.framework.core.util.PropertiesUtil;
-import com.ssj.framework.core.util.ResponseConstant;
-import com.ssj.framework.core.util.ResponseEntity;
-import com.ssj.framework.core.util.StringUtil;
-import com.ssj.framework.weixin.util.DateUtil;
-import com.ssj.service.conch.parents.dto.LearningSituationAbstractDto;
-import com.ssj.service.conch.parents.dto.LearningSituationDetailNewDto;
-import com.ssj.service.conch.parents.service.ParentService;
-import com.ssj.service.conch.parents.v1.request.AnsweredProblemDetailReq;
-import com.ssj.service.conch.parents.v2.service.ParentV2Service;
-import com.ssj.service.conch.teacher.request.teacherorg.AnsweredProblemReq;
-import com.ssj.service.conch.teacher.request.teacherorg.HomeworkReportReq;
-import com.ssj.service.conch.teacher.request.teacherorg.HomeworkTaskReq;
-import com.ssj.service.conch.teacher.request.teacherorg.IntegralLearningSituationReq;
-import com.ssj.service.conch.teacher.request.teacherorg.KnowListReq;
-import com.ssj.service.conch.teacher.request.teacherorg.OrganizationListReq;
-import com.ssj.service.conch.common.request.PageReq;
-import com.ssj.service.conch.teacher.request.teacherorg.SaveAnswerReq;
-import com.ssj.service.conch.teacher.request.teacherorg.SaveInfoReq;
-import com.ssj.service.conch.teacher.request.teacherorg.StartCorrectTimingReq;
-import com.ssj.service.conch.teacher.request.teacherorg.SubjectLearningSituationReq;
-import com.ssj.service.conch.teacher.request.teacherorg.SwipeBindingReq;
-import com.ssj.service.conch.teacher.service.TeacherOrgService;
-import com.ssj.service.sys.homework.service.HomeworkPictureService;
-import com.ssj.service.sys.homework.service.HomeworkService;
-import com.ssj.service.sys.situation.service.LearningSituationService;
-
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-
-/**
- * 机构老师端
- *
- * @author Mount Liu
- * @version 2019/2/28
- */
-@Api(value = "机构老师端相关的接口", tags = "机构老师端相关的接口")
-@RestController
-@RequestMapping("api/teacher/organization")
-public class TeacherOrgController extends BaseController {
-
-    protected static final Logger log = LoggerFactory.getLogger(TeacherOrgController.class);
-
-    @Autowired
-    private TokenManager tokenManager;
-
-    @Reference(version = "1.0" ,timeout = 60000)
-    private TeacherOrgService teacherOrgService;
-    @Reference(version = "1.0" ,timeout = 60000)
-    private ParentService parentService;
-    @Reference(version = "1.0" ,timeout = 60000)
-    private ParentV2Service parentV2Service;
-    @Reference(version = "1.0" ,timeout = 60000)
-    private HomeworkService homeworkService;
-    @Reference(version = "1.0" ,timeout = 60000)
-    private HomeworkPictureService homeworkPictureService;
-
-    @Reference(version = "1.0" ,timeout = 60000)
-    private LearningSituationService learningSituationService;
-
-    @RequestMapping(value = "/saveInfo", method = RequestMethod.POST)
-    @ApiOperation(value = "完善信息", httpMethod = "POST", notes = "完善信息")
-    @ModifySecurity
-    public ResponseEntity saveInfo(@RequestParam(name = "accessToken") String accessToken, @RequestBody SaveInfoReq req) {
-        ResponseEntity responseEntity;
-        try {
-            String userId = tokenManager.getUserId(accessToken);
-            responseEntity = teacherOrgService.saveInfo(userId, req);
-        } catch (Exception e) {
-            logger.error("异常", e);
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/getMyInfo", method = RequestMethod.POST)
-    @ApiOperation(value = "查看我的信息", httpMethod = "POST", notes = "查看我的信息")
-    public ResponseEntity getMyInfo(@RequestParam(name = "accessToken") String accessToken) {
-        ResponseEntity responseEntity;
-        try {
-            String userId = tokenManager.getUserId(accessToken);
-            responseEntity = teacherOrgService.getMyInfo(userId);
-        } catch (Exception e) {
-            logger.error("异常", e);
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/unAnsweredProblemList", method = RequestMethod.POST)
-    @ApiOperation(value = "未解答难题列表", httpMethod = "POST", notes = "未解答难题列表")
-    public ResponseEntity unAnsweredProblemList(@RequestParam(name = "accessToken") String accessToken, @RequestBody PageReq req) {
-        ResponseEntity responseEntity;
-        try {
-            String userId = tokenManager.getUserId(accessToken);
-            Pageable pageable = initPage(req.getPageNo(), req.getPageSize(), Direction.DESC, "createTime");
-            responseEntity = teacherOrgService.unAnsweredProblemList(userId, pageable, req);
-        } catch (Exception e) {
-            logger.error("异常", e);
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/answeredProblemList", method = RequestMethod.POST)
-    @ApiOperation(value = "已解答难题列表", httpMethod = "POST", notes = "已解答难题列表")
-    public ResponseEntity answeredProblemList(@RequestParam(name = "accessToken") String accessToken, @RequestBody AnsweredProblemReq req) {
-        ResponseEntity responseEntity;
-        try {
-            String userId = tokenManager.getUserId(accessToken);
-            Pageable pageable = initPage(req.getPageNo(), req.getPageSize(), Direction.DESC, "createTime");
-            responseEntity = teacherOrgService.answeredProblemList(userId, pageable, req);
-        } catch (Exception e) {
-            logger.error("异常", e);
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/saveAnswer", method = RequestMethod.POST)
-    @ApiOperation(value = "难题解答", httpMethod = "POST", notes = "难题解答")
-    @ModifySecurity
-    public ResponseEntity saveAnswer(@RequestParam(name = "accessToken") String accessToken, @RequestBody SaveAnswerReq req) {
-        ResponseEntity responseEntity;
-        try {
-            responseEntity = teacherOrgService.saveAnswer(req);
-        } catch (Exception e) {
-            logger.error("异常", e);
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/knowList", method = RequestMethod.POST)
-    @ApiOperation(value = "知识点列表", httpMethod = "POST", notes = "知识点列表")
-    public ResponseEntity knowList(@RequestParam(name = "accessToken") String accessToken, @RequestBody KnowListReq req) {
-        ResponseEntity responseEntity;
-        try {
-            Pageable pageable = initPage(req.getPageNo(), req.getPageSize(), Direction.ASC, "num");
-            responseEntity = teacherOrgService.knowListNew(req, pageable);
-        } catch (Exception e) {
-            logger.error("异常", e);
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-
-    @RequestMapping(value = "/bindStudentList", method = RequestMethod.POST)
-    @ApiOperation(value = "绑定学生列表", httpMethod = "POST", notes = "绑定学生列表")
-    public ResponseEntity bindStudentList(@RequestParam(name = "accessToken") String accessToken, @RequestBody PageReq req) {
-        ResponseEntity responseEntity;
-        try {
-            String userId = tokenManager.getUserId(accessToken);
-            Pageable pageable = initPage(req.getPageNo(), req.getPageSize());
-            responseEntity = teacherOrgService.bindStudentList(userId, pageable, req);
-        } catch (Exception e) {
-            logger.error("异常", e);
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/homeworkTask", method = RequestMethod.POST)
-    @ApiOperation(value = "作业任务", httpMethod = "POST", notes = "作业任务")
-    public ResponseEntity homeworkTask(@RequestParam(name = "accessToken") String accessToken, @RequestBody HomeworkTaskReq req) {
-        ResponseEntity responseEntity = new ResponseEntity();
-
-        String vipId = req.getVipId();
-        if (StringUtils.isBlank(vipId)) {
-            return responseEntity.failure("学生id不能为空");
-        }
-
-        String maxCreateTime = req.getMaxCreateTime();
-        try {
-            DateUtil.parse_yyyyMMdd(maxCreateTime);
-        } catch (Exception e) {
-            try {
-                DateUtil.parse_yyyyMMddHHmmss(maxCreateTime);
-            } catch (Exception e1) {
-                logger.error("时间格式错误:" + maxCreateTime);
-                return responseEntity.failure("最大创建时间格式错误");
-            }
-        }
-
-        try {
-            Pageable pageable = initPage(req.getPageNo(), req.getPageSize());
-            Map<String, Object> data = parentService.getHistoryTask(vipId, maxCreateTime, pageable);
-            data.put("todayTask", parentService.searchTodayHomeworkTask(vipId));
-            responseEntity.success(data, "成功");
-        } catch (Exception e) {
-            logger.error("查询作业任务异常:", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/homeworkReport", method = RequestMethod.POST)
-    @ApiOperation(value = "作业反馈报告", httpMethod = "POST", notes = "作业反馈报告")
-    public ResponseEntity homeworkReport(@RequestParam(name = "accessToken") String accessToken, @RequestBody HomeworkReportReq req) {
-        ResponseEntity responseEntity = new ResponseEntity();
-
-        String vipId = req.getVipId();
-        if (StringUtils.isBlank(vipId)) {
-            return responseEntity.failure("学生id不能为空");
-        }
-
-        String date = req.getDate();
-        try {
-            DateUtil.parse_yyyyMMdd(date);
-        } catch (Exception e) {
-            logger.warn("日期参数错误:" + date);
-            return responseEntity.failure("日期参数错误");
-        }
-
-        try {
-            Map<String, Object> resultMap = parentService.findHomeworkReport2(vipId, date);
-            responseEntity.success(resultMap, "查询成功");
-        } catch (Exception e) {
-            logger.error("查询作业反馈报告异常:", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/integralLearningSituation", method = RequestMethod.POST)
-    @ApiOperation(value = "学情-整体情况", httpMethod = "POST", notes = "学情-整体情况")
-    public ResponseEntity integralLearningSituation(@RequestParam(name = "accessToken") String accessToken, @RequestBody IntegralLearningSituationReq req) {
-        ResponseEntity responseEntity = new ResponseEntity();
-
-        String vipId = req.getVipId();
-        if (StringUtils.isBlank(vipId)) {
-            return responseEntity.failure("学生id不能为空");
-        }
-
-        try {
-            LearningSituationAbstractDto learningSituationAbstractDto = parentService.learningSituationAbstract(vipId);
-            responseEntity.success(learningSituationAbstractDto, "查询成功");
-        } catch (Exception e) {
-            logger.error("查询学情整体情况异常:", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/subjectLearningSituation", method = RequestMethod.POST)
-    @ApiOperation(value = "学情-学科详情", httpMethod = "POST", notes = "学情-学科详情")
-    public ResponseEntity subjectLearningSituation(@RequestParam(name = "accessToken") String accessToken, @RequestBody SubjectLearningSituationReq req) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            String  learningSituationStr= PropertiesUtil.getValue("LEARNINGING_SITUATION");
-            if (StringUtil.isNotBlank(learningSituationStr) && learningSituationStr.indexOf(req.getVipId()) != -1){
-                String data  = "";
-                if (req.getSubject().equals("语文")){
-                    data = PropertiesUtil.getValue("LEARNINGING_SITUATION_CHINESE_V2");
-                } else if (req.getSubject().equals("英语")){
-                    data = PropertiesUtil.getValue("LEARNINGING_SITUATION_ENGLISH_V2");
-                } else {
-                    data = PropertiesUtil.getValue("LEARNINGING_SITUATION_MATH_V2");
-                }
-                responseEntity.success(JSON.parse(data), "成功");
-            } else {
-                LearningSituationDetailNewDto data = learningSituationService.learningSituationDetailNew(req);
-                responseEntity.success(data, "成功");
-            }
-        } catch (CommonException e) {
-            return responseEntity.failure(ResponseConstant.CODE_500, e.getMessage());
-        } catch (Exception e) {
-            logger.error("异常", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/getOrganizationList", method = RequestMethod.POST)
-    @ApiOperation(value = "获取机构列表", httpMethod = "POST", notes = "获取机构列表")
-    public ResponseEntity getOrganizationList(@RequestParam(name = "accessToken") String accessToken, @RequestBody OrganizationListReq req) {
-        ResponseEntity responseEntity;
-        try {
-            Pageable pageable = initPage(req.getPageNo(), req.getPageSize(), Direction.ASC, "name");
-            responseEntity = teacherOrgService.getOrganizationList(req, pageable);
-        } catch (Exception e) {
-            logger.error("异常", e);
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/swipeBinding", method = RequestMethod.POST)
-    @ApiOperation(value = "扫一扫绑定", httpMethod = "POST", notes = "扫一扫绑定")
-    @ModifySecurity
-    public ResponseEntity swipeBinding(@RequestParam(name = "accessToken") String accessToken, @RequestBody SwipeBindingReq req) {
-        ResponseEntity responseEntity;
-        try {
-            String userId = tokenManager.getUserId(accessToken);
-            responseEntity = teacherOrgService.swipeBinding(userId,req);
-        } catch (Exception e) {
-            logger.error("异常", e);
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @ApiOperation(value = "已解答难题详情")
-    @RequestMapping(value = "/answeredProblemDetail", method = RequestMethod.POST)
-    public ResponseEntity answeredProblemDetailNew(@RequestParam(name = "accessToken") String accessToken, @RequestBody AnsweredProblemDetailReq req) {
-        ResponseEntity responseEntity;
-        try {
-            responseEntity = parentV2Service.answeredProblemDetailNew(req);
-        } catch (Exception e) {
-            logger.error("异常", e);
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_000, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    /**
-     * 开始作业批改计时
-     */
-    @ApiOperation(value = "开始作业批改计时")
-    @RequestMapping(value = "/startCorrectTiming", method = RequestMethod.POST)
-    public ResponseEntity startCorrectTiming(@RequestParam(name = "accessToken") String accessToken, @Valid @RequestBody StartCorrectTimingReq req) {
-        ResponseEntity responseEntity = new ResponseEntity();
-
-        String homeworkId = req.getHomeworkId();
-        Homework homework = homeworkService.getById(homeworkId);
-
-        if (homework == null) {
-            return responseEntity.failure("作业不存在");
-        }
-
-        Integer corrected = homeworkService.isCorrected(homeworkId);
-        if (corrected == 1) {
-            return responseEntity.failure("作业已批改");
-        }
-
-        //把图片设为锁定
-        List<HomeworkPicture> homeworkPictureList = homeworkPictureService.findAllByHomeworkId(homeworkId);
-        homeworkPictureList.forEach(homeworkPicture -> homeworkPicture.setLocking(1));
-        homeworkPictureService.save(homeworkPictureList);
-
-        homeworkService.startCorrectTiming(homeworkId);
-
-        responseEntity.success(ResponseConstant.CODE_999, "开始计时成功");
-
-        return responseEntity;
-    }
-
-}

Fichier diff supprimé car celui-ci est trop grand
+ 0 - 1267
ssj-aijia-api/src/main/java/com/ssj/aijia/teacher/controller/v1/MyTeacherV1Controller.java


+ 0 - 426
ssj-aijia-api/src/main/java/com/ssj/aijia/teacher/controller/v1/TeacherOrgV1Controller.java

@@ -1,426 +0,0 @@
-package com.ssj.aijia.teacher.controller.v1;
-
-import com.alibaba.dubbo.config.annotation.Reference;
-import com.alibaba.fastjson.JSON;
-import com.ssj.bean.conch.conch.dto.ProblemDetailDto;
-import com.ssj.bean.sys.homework.domain.Homework;
-import com.ssj.bean.sys.homework.domain.HomeworkPicture;
-import com.ssj.framework.core.common.controller.BaseController;
-import com.ssj.framework.core.security.annotation.ModifySecurity;
-import com.ssj.framework.core.security.exception.CommonException;
-import com.ssj.framework.core.security.manager.TokenManager;
-import com.ssj.framework.core.util.PropertiesUtil;
-import com.ssj.framework.core.util.ResponseConstant;
-import com.ssj.framework.core.util.ResponseEntity;
-import com.ssj.framework.core.util.StringUtil;
-import com.ssj.framework.weixin.util.DateUtil;
-import com.ssj.service.conch.common.request.PageReq;
-import com.ssj.service.conch.parents.dto.LearningSituationAbstractDto;
-import com.ssj.service.conch.parents.dto.LearningSituationDetailNewDto;
-import com.ssj.service.conch.parents.service.ParentService;
-import com.ssj.service.conch.parents.v1.request.AnsweredProblemDetailReq;
-import com.ssj.service.conch.parents.v2.service.ParentV2Service;
-import com.ssj.service.conch.teacher.request.teacherorg.*;
-import com.ssj.service.conch.teacher.service.TeacherOrgService;
-import com.ssj.service.sys.homework.service.HomeworkPictureService;
-import com.ssj.service.sys.homework.service.HomeworkService;
-import com.ssj.service.sys.problem.service.ProblemPictureService;
-import com.ssj.service.sys.situation.service.LearningSituationService;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import org.apache.commons.lang3.StringUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.data.domain.Pageable;
-import org.springframework.data.domain.Sort.Direction;
-import org.springframework.web.bind.annotation.*;
-
-import javax.validation.Valid;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- * 机构老师端
- *
- * @author Mount Liu
- * @version 2019/2/28
- */
-@Api(value = "机构老师端相关的接口V1", tags = "机构老师端相关的接口V1")
-@RestController
-@RequestMapping("api/teacher/organization/V1")
-public class TeacherOrgV1Controller extends BaseController {
-
-    protected static final Logger log = LoggerFactory.getLogger(TeacherOrgV1Controller.class);
-
-    @Autowired
-    private TokenManager tokenManager;
-
-    @Reference(version = "1.0" ,timeout = 60000)
-    private TeacherOrgService teacherOrgService;
-    @Reference(version = "1.0" ,timeout = 60000)
-    private ParentService parentService;
-    @Reference(version = "1.0" ,timeout = 60000)
-    private ParentV2Service parentV2Service;
-    @Reference(version = "1.0" ,timeout = 60000)
-    private HomeworkService homeworkService;
-    @Reference(version = "1.0" ,timeout = 60000)
-    private HomeworkPictureService homeworkPictureService;
-
-    @Reference(version = "1.0" ,timeout = 60000)
-    private LearningSituationService learningSituationService;
-    @Reference(version = "1.0" ,timeout = 60000)
-    private ProblemPictureService problemPictureService;
-
-    @RequestMapping(value = "/saveInfo", method = RequestMethod.POST)
-    @ApiOperation(value = "完善信息", httpMethod = "POST", notes = "完善信息")
-    @ModifySecurity
-    public ResponseEntity saveInfo(@RequestParam(name = "accessToken") String accessToken, @RequestBody SaveInfoReq req) {
-        ResponseEntity responseEntity;
-        try {
-            String userId = tokenManager.getUserId(accessToken);
-            responseEntity = teacherOrgService.saveInfo(userId, req);
-        } catch (Exception e) {
-            logger.error("异常", e);
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/getMyInfo", method = RequestMethod.POST)
-    @ApiOperation(value = "查看我的信息", httpMethod = "POST", notes = "查看我的信息")
-    public ResponseEntity getMyInfo(@RequestParam(name = "accessToken") String accessToken) {
-        ResponseEntity responseEntity;
-        try {
-            String userId = tokenManager.getUserId(accessToken);
-            responseEntity = teacherOrgService.getMyInfo(userId);
-        } catch (Exception e) {
-            logger.error("异常", e);
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/unAnsweredProblemList", method = RequestMethod.POST)
-    @ApiOperation(value = "未解答难题列表", httpMethod = "POST", notes = "未解答难题列表")
-    public ResponseEntity unAnsweredProblemList(@RequestParam(name = "accessToken") String accessToken, @RequestBody PageReq req) {
-        ResponseEntity responseEntity;
-        try {
-            String userId = tokenManager.getUserId(accessToken);
-            Pageable pageable = initPage(req.getPageNo(), req.getPageSize(), Direction.DESC, "createTime");
-            responseEntity = teacherOrgService.unAnsweredProblemList(userId, pageable, req);
-        } catch (Exception e) {
-            logger.error("异常", e);
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/answeredProblemList", method = RequestMethod.POST)
-    @ApiOperation(value = "已解答难题列表", httpMethod = "POST", notes = "已解答难题列表")
-    public ResponseEntity answeredProblemList(@RequestParam(name = "accessToken") String accessToken, @RequestBody AnsweredProblemReq req) {
-        ResponseEntity responseEntity;
-        try {
-            String userId = tokenManager.getUserId(accessToken);
-            Pageable pageable = initPage(req.getPageNo(), req.getPageSize(), Direction.DESC, "createTime");
-            responseEntity = teacherOrgService.answeredProblemList(userId, pageable, req);
-        } catch (Exception e) {
-            logger.error("异常", e);
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/saveAnswer", method = RequestMethod.POST)
-    @ApiOperation(value = "难题解答", httpMethod = "POST", notes = "难题解答")
-    @ModifySecurity
-    public ResponseEntity saveAnswer(@RequestParam(name = "accessToken") String accessToken, @RequestBody SaveAnswerReq req) {
-        ResponseEntity responseEntity;
-        try {
-            responseEntity = teacherOrgService.saveAnswer(req);
-        } catch (Exception e) {
-            logger.error("异常", e);
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/knowList", method = RequestMethod.POST)
-    @ApiOperation(value = "知识点列表", httpMethod = "POST", notes = "知识点列表")
-    public ResponseEntity knowList(@RequestParam(name = "accessToken") String accessToken, @RequestBody KnowListReq req) {
-        ResponseEntity responseEntity;
-        try {
-            Pageable pageable = initPage(req.getPageNo(), req.getPageSize(), Direction.ASC, "num");
-            responseEntity = teacherOrgService.knowListNew(req, pageable);
-        } catch (Exception e) {
-            logger.error("异常", e);
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-
-    @RequestMapping(value = "/bindStudentList", method = RequestMethod.POST)
-    @ApiOperation(value = "绑定学生列表", httpMethod = "POST", notes = "绑定学生列表")
-    public ResponseEntity bindStudentList(@RequestParam(name = "accessToken") String accessToken, @RequestBody PageReq req) {
-        ResponseEntity responseEntity;
-        try {
-            String userId = tokenManager.getUserId(accessToken);
-            Pageable pageable = initPage(req.getPageNo(), req.getPageSize());
-            responseEntity = teacherOrgService.bindStudentList(userId, pageable, req);
-        } catch (Exception e) {
-            logger.error("异常", e);
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/homeworkTask", method = RequestMethod.POST)
-    @ApiOperation(value = "作业任务", httpMethod = "POST", notes = "作业任务")
-    public ResponseEntity homeworkTask(@RequestParam(name = "accessToken") String accessToken, @RequestBody HomeworkTaskReq req) {
-        ResponseEntity responseEntity = new ResponseEntity();
-
-        String vipId = req.getVipId();
-        if (StringUtils.isBlank(vipId)) {
-            return responseEntity.failure("学生id不能为空");
-        }
-
-        String maxCreateTime = req.getMaxCreateTime();
-        try {
-            DateUtil.parse_yyyyMMdd(maxCreateTime);
-        } catch (Exception e) {
-            try {
-                DateUtil.parse_yyyyMMddHHmmss(maxCreateTime);
-            } catch (Exception e1) {
-                logger.error("时间格式错误:" + maxCreateTime);
-                return responseEntity.failure("最大创建时间格式错误");
-            }
-        }
-
-        try {
-            Pageable pageable = initPage(req.getPageNo(), req.getPageSize());
-            Map<String, Object> data = parentService.getHistoryTask(vipId, maxCreateTime, pageable);
-            data.put("todayTask", parentService.searchTodayHomeworkTask(vipId));
-            responseEntity.success(data, "成功");
-        } catch (Exception e) {
-            logger.error("查询作业任务异常:", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/homeworkReport", method = RequestMethod.POST)
-    @ApiOperation(value = "作业反馈报告", httpMethod = "POST", notes = "作业反馈报告")
-    public ResponseEntity homeworkReport(@RequestParam(name = "accessToken") String accessToken, @RequestBody HomeworkReportReq req) {
-        ResponseEntity responseEntity = new ResponseEntity();
-
-        String vipId = req.getVipId();
-        if (StringUtils.isBlank(vipId)) {
-            return responseEntity.failure("学生id不能为空");
-        }
-
-        String date = req.getDate();
-        try {
-            DateUtil.parse_yyyyMMdd(date);
-        } catch (Exception e) {
-            logger.warn("日期参数错误:" + date);
-            return responseEntity.failure("日期参数错误");
-        }
-
-        try {
-            Map<String, Object> resultMap = parentService.findHomeworkReport4(vipId, date, "", false);
-            responseEntity.success(resultMap, "查询成功");
-        } catch (Exception e) {
-            logger.error("查询作业反馈报告异常:", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/integralLearningSituation", method = RequestMethod.POST)
-    @ApiOperation(value = "学情-整体情况", httpMethod = "POST", notes = "学情-整体情况")
-    public ResponseEntity integralLearningSituation(@RequestParam(name = "accessToken") String accessToken, @RequestBody IntegralLearningSituationReq req) {
-        ResponseEntity responseEntity = new ResponseEntity();
-
-        String vipId = req.getVipId();
-        if (StringUtils.isBlank(vipId)) {
-            return responseEntity.failure("学生id不能为空");
-        }
-
-        try {
-            LearningSituationAbstractDto learningSituationAbstractDto = parentService.learningSituationAbstract(vipId);
-            responseEntity.success(learningSituationAbstractDto, "查询成功");
-        } catch (Exception e) {
-            logger.error("查询学情整体情况异常:", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/subjectLearningSituation", method = RequestMethod.POST)
-    @ApiOperation(value = "学情-学科详情", httpMethod = "POST", notes = "学情-学科详情")
-    public ResponseEntity subjectLearningSituation(@RequestParam(name = "accessToken") String accessToken, @RequestBody SubjectLearningSituationReq req) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            String  learningSituationStr= PropertiesUtil.getValue("LEARNINGING_SITUATION");
-            if (StringUtil.isNotBlank(learningSituationStr) && learningSituationStr.indexOf(req.getVipId()) != -1){
-                String data  = "";
-                if (req.getSubject().equals("语文")){
-                    data = PropertiesUtil.getValue("LEARNINGING_SITUATION_CHINESE_V2");
-                } else if (req.getSubject().equals("英语")){
-                    data = PropertiesUtil.getValue("LEARNINGING_SITUATION_ENGLISH_V2");
-                } else {
-                    data = PropertiesUtil.getValue("LEARNINGING_SITUATION_MATH_V2");
-                }
-                responseEntity.success(JSON.parse(data), "成功");
-            } else {
-                LearningSituationDetailNewDto data = learningSituationService.learningSituationDetailNew(req);
-                responseEntity.success(data, "成功");
-            }
-        } catch (CommonException e) {
-            return responseEntity.failure(ResponseConstant.CODE_500, e.getMessage());
-        } catch (Exception e) {
-            logger.error("异常", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/getOrganizationList", method = RequestMethod.POST)
-    @ApiOperation(value = "获取机构列表", httpMethod = "POST", notes = "获取机构列表")
-    public ResponseEntity getOrganizationList(@RequestParam(name = "accessToken") String accessToken, @RequestBody OrganizationListReq req) {
-        ResponseEntity responseEntity;
-        try {
-            Pageable pageable = initPage(req.getPageNo(), req.getPageSize(), Direction.ASC, "name");
-            responseEntity = teacherOrgService.getOrganizationList(req, pageable);
-        } catch (Exception e) {
-            logger.error("异常", e);
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/swipeBinding", method = RequestMethod.POST)
-    @ApiOperation(value = "扫一扫绑定", httpMethod = "POST", notes = "扫一扫绑定")
-    @ModifySecurity
-    public ResponseEntity swipeBinding(@RequestParam(name = "accessToken") String accessToken, @RequestBody SwipeBindingReq req) {
-        ResponseEntity responseEntity;
-        try {
-            String userId = tokenManager.getUserId(accessToken);
-            responseEntity = teacherOrgService.swipeBinding(userId,req);
-        } catch (Exception e) {
-            logger.error("异常", e);
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @ApiOperation(value = "已解答难题详情")
-    @RequestMapping(value = "/answeredProblemDetail", method = RequestMethod.POST)
-    public ResponseEntity answeredProblemDetailNew(@RequestParam(name = "accessToken") String accessToken, @RequestBody AnsweredProblemDetailReq req) {
-        ResponseEntity responseEntity;
-        try {
-            responseEntity = parentV2Service.answeredProblemDetailNew(req);
-        } catch (Exception e) {
-            logger.error("异常", e);
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_000, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    /**
-     * 开始作业批改计时
-     */
-    @ApiOperation(value = "开始作业批改计时")
-    @RequestMapping(value = "/startCorrectTiming", method = RequestMethod.POST)
-    public ResponseEntity startCorrectTiming(@RequestParam(name = "accessToken") String accessToken, @Valid @RequestBody StartCorrectTimingReq req) {
-        ResponseEntity responseEntity = new ResponseEntity();
-
-        String homeworkId = req.getHomeworkId();
-        Homework homework = homeworkService.getById(homeworkId);
-
-        if (homework == null) {
-            return responseEntity.failure("作业不存在");
-        }
-
-        Integer corrected = homeworkService.isCorrected(homeworkId);
-        if (corrected == 1) {
-            return responseEntity.failure("作业已批改");
-        }
-
-        //把图片设为锁定
-        List<HomeworkPicture> homeworkPictureList = homeworkPictureService.findAllByHomeworkId(homeworkId);
-        homeworkPictureList.forEach(homeworkPicture -> homeworkPicture.setLocking(1));
-        homeworkPictureService.save(homeworkPictureList);
-
-        homeworkService.startCorrectTiming(homeworkId);
-
-        responseEntity.success(ResponseConstant.CODE_999, "开始计时成功");
-
-        return responseEntity;
-    }
-
-    @ApiOperation(value = "难题列表(老师留言版)")
-    @RequestMapping(value = "/problemPictureList", method = RequestMethod.POST)
-    public ResponseEntity problemPictureList(@RequestParam(name = "accessToken") String accessToken, @RequestBody ClassIdPageRequest req) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            String userId = tokenManager.getUserId(accessToken);
-            Map<String, Object> data = new HashMap<String, Object>();
-            data.put("pageNo", req.getPageNo());
-            data.put("pageSize", req.getPageSize());
-            data.put("list", problemPictureService.findProblemPictureList(req, "",""));
-            responseEntity.success(data, "查询成功");
-        } catch (Exception e) {
-            logger.error("异常", e);
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @ApiOperation(value = "难题老师留言保存")
-    @RequestMapping(value = "/saveProblemTeacherMessage", method = RequestMethod.POST)
-    public ResponseEntity saveProblemTeacherMessage(@RequestParam(name = "accessToken") String accessToken, @Valid @RequestBody TeacherMessaggeRequest req) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            String userId = tokenManager.getUserId(accessToken);
-            problemPictureService.saveTeacherMessage(req, userId);
-            responseEntity.success(ResponseConstant.CODE_999, "保存成功");
-        } catch (Exception e) {
-            logger.error("异常", e);
-            responseEntity.failure(ResponseConstant.CODE_000, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-
-    @ApiOperation(value = "难题解答详情")
-    @RequestMapping(value = "/findProblemPictureDetail", method = RequestMethod.POST)
-    public ResponseEntity findProblemPictureDetail(@RequestParam(name = "accessToken") String accessToken, @RequestBody ProblemPictureV1Request req) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            ProblemDetailDto data = problemPictureService.getProblemFeedbackData(req.getProblemPictureId());
-            responseEntity.success(data, "查询成功");
-        } catch (Exception e) {
-            logger.error("异常", e);
-            responseEntity.failure(ResponseConstant.CODE_000, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-}

Fichier diff supprimé car celui-ci est trop grand
+ 0 - 1823
ssj-aijia-api/src/main/java/com/ssj/aijia/teacher/controller/v2/TeacherAppV2Controller.java


+ 0 - 920
ssj-aijia-api/src/main/java/com/ssj/aijia/teacher/controller/v2/TeacherLibraryV2Controller.java

@@ -1,920 +0,0 @@
-package com.ssj.aijia.teacher.controller.v2;
-
-import com.alibaba.dubbo.config.annotation.Reference;
-import com.ssj.bean.weixin.libmy.domain.TbLibManager;
-import com.ssj.bean.weixin.user.domain.User;
-import com.ssj.framework.basic.common.bean.Page;
-import com.ssj.framework.core.common.controller.BaseController;
-import com.ssj.framework.core.security.annotation.ModifySecurity;
-import com.ssj.framework.core.security.manager.TokenManager;
-import com.ssj.framework.core.util.ResponseConstant;
-import com.ssj.framework.core.util.ResponseEntity;
-import com.ssj.service.conch.conch.padrequest.PadEndHomeworkRequest;
-import com.ssj.service.conch.conch.padrequest.PadStartHomeworkRequest;
-import com.ssj.service.conch.conch.padrequest.PadUploadHomeworkRequest;
-import com.ssj.service.conch.conch.padrequest.PadVipIdCheckInImgRequest;
-import com.ssj.service.conch.conch.service.ConchDerverService;
-import com.ssj.service.conch.conch.service.ConchPadService;
-import com.ssj.service.conch.parents.request.*;
-import com.ssj.service.conch.parents.request.version4.CorrectDetailReq;
-import com.ssj.service.conch.parents.service.ParentService;
-import com.ssj.service.conch.parents.v2.dto.KnowHowDetailDTO;
-import com.ssj.service.conch.parents.v2.dto.WrongBookKnowledgeDTO2;
-import com.ssj.service.conch.parents.v2.dto.WrongBookQuestionDTO;
-import com.ssj.service.conch.parents.v2.request.*;
-import com.ssj.service.conch.parents.v2.service.ParentV2Service;
-import com.ssj.service.conch.teacher.app.request.QuestionRequest;
-import com.ssj.service.conch.teacher.library.dto.HomeworkDataDto;
-import com.ssj.service.conch.teacher.library.request.*;
-import com.ssj.service.conch.teacher.service.TeacherLibraryService;
-import com.ssj.service.kmt.dto.OriginalQuestionDTO;
-import com.ssj.service.kmt.dto.OriginalQuestionDTOV2;
-import com.ssj.service.kmt.service.KmtExerciseMapperService;
-import com.ssj.service.sys.homework.service.HomeworkService;
-import com.ssj.service.weixin.library.service.IBookManagerService;
-import com.ssj.service.weixin.user.service.UserService;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import org.apache.commons.collections.CollectionUtils;
-import org.apache.commons.lang3.StringUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.BeanUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.data.domain.Pageable;
-import org.springframework.web.bind.annotation.*;
-
-import javax.validation.Valid;
-import java.util.*;
-import java.util.stream.Collectors;
-
-/**
- * @author yangcan
- * 类描述:在馆老师端app接口
- * 创建时间:2019/7/9 15:07
- */
-@RestController
-@RequestMapping("/api/teacher/library/V2")
-@Api(value = "在馆老师端app的接口v2", tags = "在馆老师端app的接口v2")
-public class TeacherLibraryV2Controller extends BaseController {
-
-    private Logger logger = LoggerFactory.getLogger(this.getClass());
-
-    @Autowired
-    private TokenManager tokenManager;
-
-    @Reference(version = "1.0" ,timeout = 60000)
-    private TeacherLibraryService teacherLibraryService;
-    @Reference(version = "1.0" ,timeout = 60000)
-    private IBookManagerService bookManagerService;
-    @Reference(version = "1.0" ,timeout = 60000)
-    private HomeworkService homeworkService;
-    @Reference(version = "1.0" ,timeout = 60000)
-    private ParentService parentService;
-    @Reference(version = "1.0" ,timeout = 60000)
-    private UserService userService;
-    @Reference(version = "1.0" ,timeout = 60000)
-    private KmtExerciseMapperService kmtExerciseMapperService;
-    @Reference(version = "1.0" ,timeout = 60000)
-    private ConchDerverService conchDerverService;
-    @Reference(version = "1.0" ,timeout = 60000)
-    private ConchPadService conchPadService;
-    @Reference(version = "1.0", timeout = 60000)
-    private ParentV2Service parentV2Service;
-
-    @RequestMapping(value = "/libraryMyInfo", method = RequestMethod.POST)
-    @ApiOperation(value = "我的信息", httpMethod = "POST", notes = "我的信息")
-    public ResponseEntity libraryMyInfo(@RequestParam(required = true) String accessToken) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            String userId = tokenManager.getUserId(accessToken);
-            TbLibManager libManager = bookManagerService.findByUserId(userId,2);
-            Map<String, Object> data = new HashMap<>();
-            if(StringUtils.isNotBlank(libManager.getName())) {
-                data.put("photo",libManager.gettPhoto());
-                data.put("name",libManager.getName());
-            }else {
-                User user = userService.getById(libManager.getUserId());
-                data.put("photo",user.getPhoto());
-                data.put("name",user.getName());
-            }
-            responseEntity.success(data,"成功");
-        } catch (Exception e) {
-            logger.error("异常", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/noFinishTaskList", method = RequestMethod.POST)
-    @ApiOperation(value = "我的任务-未完成列表", httpMethod = "POST", notes = "我的任务-未完成列表")
-    public ResponseEntity noFinishTaskList(@RequestParam(required = true) String accessToken) {
-        ResponseEntity responseEntity;
-        try {
-            String userId = tokenManager.getUserId(accessToken);
-            responseEntity = teacherLibraryService.noFinishTaskListV1(userId);
-        } catch (Exception e) {
-            logger.error("异常", e);
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/finishTaskList", method = RequestMethod.POST)
-    @ApiOperation(value = "我的任务-已完成列表", httpMethod = "POST", notes = "我的任务-已完成列表")
-    public ResponseEntity finishTaskList(@RequestParam(required = true) String accessToken) {
-        ResponseEntity responseEntity;
-        try {
-            String userId = tokenManager.getUserId(accessToken);
-            responseEntity = teacherLibraryService.finishTaskListV1(userId);
-        } catch (Exception e) {
-            logger.error("异常", e);
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/noConfirmStudentList", method = RequestMethod.POST)
-    @ApiOperation(value = "未选定学生列表", httpMethod = "POST", notes = "未选定学生列表")
-    public ResponseEntity uploadConchInitInfo(@RequestParam(required = true) String accessToken) {
-        ResponseEntity responseEntity;
-        try {
-            String userId = tokenManager.getUserId(accessToken);
-            responseEntity = teacherLibraryService.findNoConfirmStudentList(userId);
-        } catch (Exception e) {
-            logger.error("异常", e);
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/confirmStudents", method = RequestMethod.POST)
-    @ApiOperation(value = "选定学生", httpMethod = "POST", notes = "选定学生")
-    public ResponseEntity confirmStudents(@RequestParam(required = true) String accessToken, @RequestBody VipIdListReq req) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            String userId = tokenManager.getUserId(accessToken);
-            responseEntity= teacherLibraryService.confirmStudents(userId,req.getVipIdList());
-        } catch (Exception e) {
-            logger.error("异常", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/questionPictureDetail", method = RequestMethod.POST)
-    @ApiOperation(value = "作业模糊/不全照片详情", httpMethod = "POST", notes = "作业模糊/不全照片详情")
-    public ResponseEntity questionPictureDetail(@RequestParam(required = true) String accessToken, @RequestBody QuestionRequest req) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            String userId = tokenManager.getUserId(accessToken);
-            responseEntity=teacherLibraryService.findquestionPictureList(userId,req);
-            responseEntity.success("成功");
-        } catch (Exception e) {
-            logger.error("异常", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/getStudentHomeworkData", method = RequestMethod.POST)
-    @ApiOperation(value = "获取学生作业编辑数据", httpMethod = "POST", notes = "获取学生作业编辑数据")
-    public ResponseEntity getStudentHomeworkData(@RequestParam String accessToken,
-                                                 @RequestBody @Valid HomeworkDataRequest homeworkDataRequest) {
-
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            String userId = tokenManager.getUserId(accessToken);
-            HomeworkDataDto homeworkDataDto = teacherLibraryService.getHomeworkData(homeworkDataRequest.getVipId(), userId);
-            responseEntity.success(homeworkDataDto, "请求成功");
-        } catch (Exception e) {
-            logger.error("异常", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/sumbitStudentHomework", method = RequestMethod.POST)
-    @ApiOperation(value = "学生作业编辑提交", httpMethod = "POST", notes = "学生作业编辑提交")
-    public ResponseEntity sumbitStudentHomework(@RequestParam(required = true) String accessToken, @RequestBody @Valid HomeworkDataSubmitRequest req) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            responseEntity = teacherLibraryService.saveHomeworkSituation(req,accessToken);
-        } catch (Exception e) {
-            logger.error("异常", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-
-    @RequestMapping(value = "/homeworkCheckIn", method = RequestMethod.POST)
-    @ApiOperation(value = "作业登记", httpMethod = "POST", notes = "作业登记")
-    public ResponseEntity homeworkCheckIn(@RequestParam(required = true) String accessToken, @RequestBody @Valid PadVipIdCheckInImgRequest req) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            responseEntity =  conchDerverService.homeworkCheckInByVipId(req.getVipId(), req.getCheckInImg());
-        } catch (Exception e) {
-            logger.error("异常", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/startHomework", method = RequestMethod.POST)
-    @ApiOperation(value = "开始计时", httpMethod = "POST", notes = "开始计时")
-    public ResponseEntity startHomework(@RequestParam(required = true) String accessToken, @RequestBody PadStartHomeworkRequest request) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            responseEntity.success(teacherLibraryService.startHomework(request), "成功");
-        } catch (Exception e) {
-            logger.error("异常", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-
-    @RequestMapping(value = "/endHomework", method = RequestMethod.POST)
-    @ApiOperation(value = "结束计时", httpMethod = "POST", notes = "结束计时")
-    public ResponseEntity endHomework(@RequestParam(required = true) String accessToken, @RequestBody PadEndHomeworkRequest request) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            responseEntity.success(conchPadService.endHomework(request.getVipId(), request.getCourseName(), request.getEndTime(), request.getUsedTime()), "成功");
-        } catch (Exception e) {
-            logger.error("异常", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-
-    @RequestMapping(value = "/uploadPicture", method = RequestMethod.POST)
-    @ApiOperation(value = "上传作业", httpMethod = "POST", notes = "上传作业")
-    public ResponseEntity uploadPicture(@RequestParam(required = true) String accessToken, @RequestBody PadUploadHomeworkRequest request) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            logger.error("oss回调上传fileKey={}", request.getFileKeys());
-            long start = System.currentTimeMillis();
-            String userId=tokenManager.getUserId(accessToken);
-            responseEntity = teacherLibraryService.noNetworkUploadHomework(request,userId);
-            long end = System.currentTimeMillis();
-            logger.error("老师管理端上传作业耗时:{}ms", (end-start));
-            logger.error("oss回调返回结果code={},msg={}", responseEntity.getCode(),responseEntity.getMsg());
-        } catch (Exception e) {
-            logger.error("异常", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @ApiOperation(value = "我的任务-替换模糊/不全图片", notes = "我的任务-替换模糊/不全图片")
-    @RequestMapping(value = "/replaceBadImg", method = RequestMethod.POST)
-    public ResponseEntity replaceBadImg(@RequestParam String accessToken,
-                                        @RequestBody @Valid ReplaceImgReq request) {
-
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            teacherLibraryService.replaceBadImg(request);
-            responseEntity.success(ResponseConstant.CODE_999, "替换成功");
-        } catch (Exception e) {
-            logger.error("request->{}", request);
-            logger.error("替换模糊/不全图片异常", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @ApiOperation(value = "查询所有状态学生列表")
-    @RequestMapping(value = "allStudentList", method = RequestMethod.POST)
-    public ResponseEntity allStudentList(@RequestParam(name = "accessToken") String accessToken,
-                                         @RequestBody @Valid StudentNameReq req) {
-
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            String teacherId = tokenManager.getUserId(accessToken);
-            return teacherLibraryService.findAllStudentList(req, teacherId);
-        } catch (Exception e) {
-            logger.error("查询所有状态学生列表", e);
-            responseEntity.failure(ResponseConstant.CODE_000, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @ApiOperation(value = "查询签到/签离学生列表")
-    @RequestMapping(value = "signStudentList", method = RequestMethod.POST)
-    public ResponseEntity signStudentList(@RequestParam(name = "accessToken") String accessToken,
-                                          @RequestBody @Valid SignStudentListReq req) {
-
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            String teacherId = tokenManager.getUserId(accessToken);
-            return teacherLibraryService.findSignStudentList(req, teacherId);
-        } catch (Exception e) {
-            logger.error("查询签到/签离学生列表异常", e);
-            responseEntity.failure(ResponseConstant.CODE_000, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @ApiOperation(value = "签到/签离")
-    @ModifySecurity
-    @RequestMapping(value = "sign", method = RequestMethod.POST)
-    public ResponseEntity sign(@RequestParam(name = "accessToken") String accessToken,
-                                 @RequestBody @Valid SignReq req) {
-
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            String confirmUserId = tokenManager.getUserId(accessToken);
-            TbLibManager tbLibManager = bookManagerService.findByUserIdAndType(confirmUserId, 2);
-            if (tbLibManager == null) {
-                return responseEntity.failure("不是在馆老师,无权限签到");
-            }
-            return teacherLibraryService.sign(req, confirmUserId, tbLibManager.getLibId());
-        } catch (Exception e) {
-            logger.error("老师为学生签到异常", e);
-            responseEntity.failure(ResponseConstant.CODE_000, "系统繁忙,请稍后重试");
-        }
-
-        return responseEntity;
-    }
-
-    @ApiOperation(value = "学生往期反馈记录列表")
-    @RequestMapping(value = "feedbackHistory", method = RequestMethod.POST)
-    public ResponseEntity feedbackHistory(@RequestParam(name = "accessToken") String accessToken,
-                                          @RequestBody @Valid FeedbackPageReq req) {
-
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            return teacherLibraryService.findFeedbackHistory(req, initPage(req.getPageNo(), req.getPageSize()));
-        } catch (Exception e) {
-            logger.error("查询学生往期反馈记录列表异常", e);
-            responseEntity.failure(ResponseConstant.CODE_000, "系统繁忙,请稍后重试");
-        }
-
-        return responseEntity;
-    }
-
-    @ApiOperation(value = "学生往期记录详情")
-    @RequestMapping(value = "feedbackDetail", method = RequestMethod.POST)
-    public ResponseEntity feedbackDetail(@RequestParam(name = "accessToken") String accessToken,
-                                         @RequestBody @Valid FeedbackDetailReq req) {
-
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            return teacherLibraryService.findFeedbackDetail(req);
-        } catch (Exception e) {
-            logger.error("学生往期记录详情异常", e);
-            responseEntity.failure(ResponseConstant.CODE_000, "系统繁忙,请稍后重试");
-        }
-
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/correctDetail3", method = RequestMethod.POST)
-    @ApiOperation(value = "单科批改详情3", httpMethod = "POST", notes = "单科批改详情3")
-    public ResponseEntity correctDetail3(@RequestParam(name = "accessToken") String accessToken, @RequestBody CorrectDetailReq req) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            responseEntity.success(parentService.correctDetail4(req.getVipId(), req.getSubject(), req.getDate()), "查询成功");
-        } catch (Exception e) {
-            logger.error("查询单科批改详情异常", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-
-        return responseEntity;
-    }
-
-    @ApiOperation(value = "错题本知识点模块")
-    @RequestMapping(value = "/wrongQuestionKnowModuleList", method = RequestMethod.POST)
-    public ResponseEntity wrongQuestionKnowModuleList(@RequestParam(name = "accessToken") String accessToken,
-                                                      @RequestBody @Valid ModuleReq req) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            List<String> moduleList = teacherLibraryService.findWrongQuestionKnowModuleList(req);
-            List<Map<String, Object>> resultList = new ArrayList<>();
-            moduleList.stream()
-                    .filter(StringUtils::isNotBlank)
-                    .forEach(it -> resultList.add(Collections.singletonMap("moduleName", it)));
-            responseEntity.success(Collections.singletonMap("list", resultList), "查询成功");
-        } catch (Exception e) {
-            logger.error("查询错题本知识点模块异常", e);
-            logger.error("请求参数:vipId={}, subject={}", req.getVipId(), req.getSubject());
-            responseEntity.failure(ResponseConstant.CODE_000, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @ApiOperation(value = "错题本知识点模块v2")
-    @RequestMapping(value = "/wrongQuestionKnowModuleListV2", method = RequestMethod.POST)
-    public ResponseEntity wrongQuestionKnowModuleListV2(@RequestParam(name = "accessToken") String accessToken,
-                                                        @RequestBody @Valid ModuleReqV2 req) {
-
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            List<String> moduleList = teacherLibraryService.findWrongQuestionKnowModuleListV2(req);
-            List<Map<String, Object>> resultList = new ArrayList<>();
-            moduleList.stream()
-                    .filter(StringUtils::isNotBlank)
-                    .forEach(it -> resultList.add(Collections.singletonMap("moduleName", it)));
-            responseEntity.success(Collections.singletonMap("list", resultList), "查询成功");
-        } catch (Exception e) {
-            logger.error("查询错题本知识点模块v2异常", e);
-            logger.error("请求参数:vipId={}, subject={}", req.getVipId(), req.getSubject());
-            responseEntity.failure(ResponseConstant.CODE_000, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @ApiOperation(value = "错题本知识点模块v3")
-    @RequestMapping(value = "/wrongQuestionKnowModuleListV3", method = RequestMethod.POST)
-    public ResponseEntity wrongQuestionKnowModuleListV3(@RequestParam(name = "accessToken") String accessToken,
-                                                        @RequestBody @Valid ModuleReqV3 req) {
-
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            List<String> moduleList = teacherLibraryService.findWrongQuestionKnowModuleListV3(req);
-            List<Map<String, Object>> resultList = new ArrayList<>();
-            moduleList.stream()
-                    .filter(StringUtils::isNotBlank)
-                    .sorted()
-                    .forEach(it -> resultList.add(Collections.singletonMap("moduleName", it)));
-            responseEntity.success(Collections.singletonMap("list", resultList), "查询成功");
-        } catch (Exception e) {
-            logger.error("查询错题本知识点模块v3异常", e);
-            logger.error("请求参数:vipId={}, subject={}", req.getVipId(), req.getSubject());
-            responseEntity.failure(ResponseConstant.CODE_000, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @ApiOperation(value = "错题本知识点列表")
-    @RequestMapping(value = "/wrongQuestionKnowledgeList", method = RequestMethod.POST)
-    public ResponseEntity wrongQuestionKnowledgeList(@RequestParam(name = "accessToken") String accessToken,
-                                                      @RequestBody @Valid WrongQuestionV2Req req) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            Pageable pageable = initPage(req.getPageNo(), req.getPageSize());
-            com.ssj.framework.basic.common.bean.Page<WrongBookKnowledgeDTO2> wrongQuestionKnowledgePage = teacherLibraryService.findWrongQuestionKnowledgePage(req, pageable);
-            responseEntity.success(wrongQuestionKnowledgePage, "查询成功");
-        } catch (Exception e) {
-            logger.error("查询错题本知识点列表异常", e);
-            logger.error("请求参数:req={}", req);
-            responseEntity.failure(ResponseConstant.CODE_000, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @ApiOperation(value = "错题本知识点列表v2")
-    @RequestMapping(value = "/wrongQuestionKnowledgeListV2", method = RequestMethod.POST)
-    public ResponseEntity wrongQuestionKnowledgeListV2(@RequestParam(name = "accessToken") String accessToken,
-                                                       @RequestBody @Valid WrongQuestionV3Req req) {
-
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            Pageable pageable = initPage(req.getPageNo(), req.getPageSize());
-            com.ssj.framework.basic.common.bean.Page<WrongBookKnowledgeDTO2> wrongQuestionKnowledgePage = teacherLibraryService.findWrongQuestionKnowledgePageV2(req, pageable);
-            responseEntity.success(wrongQuestionKnowledgePage, "查询成功");
-        } catch (Exception e) {
-            logger.error("查询错题本知识点列表v2异常", e);
-            logger.error("请求参数:req={}", req);
-            responseEntity.failure(ResponseConstant.CODE_000, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @ApiOperation(value = "错题本知识点列表v3")
-    @RequestMapping(value = "/wrongQuestionKnowledgeListV3", method = RequestMethod.POST)
-    public ResponseEntity wrongQuestionKnowledgeListV3(@RequestParam(name = "accessToken") String accessToken,
-                                                       @RequestBody @Valid WrongQuestionV4Req req) {
-
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            Pageable pageable = initPage(req.getPageNo(), req.getPageSize());
-            com.ssj.framework.basic.common.bean.Page<WrongBookKnowledgeDTO2> wrongQuestionKnowledgePage = teacherLibraryService.findWrongQuestionKnowledgePageV3(req, pageable);
-            responseEntity.success(wrongQuestionKnowledgePage, "查询成功");
-        } catch (Exception e) {
-            logger.error("查询错题本知识点列表v3异常", e);
-            logger.error("请求参数:req={}", req);
-            responseEntity.failure(ResponseConstant.CODE_000, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @ApiOperation(value = "错题本错题列表")
-    @RequestMapping(value = "/wrongBookQuestionList", method = RequestMethod.POST)
-    public ResponseEntity wrongBookQuestionList(@RequestParam(name = "accessToken") String accessToken,
-                                                @RequestBody @Valid WrongBookQuestionReq3 req) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            Pageable pageable = initPage(req.getPageNo(), req.getPageSize());
-            Page<WrongBookQuestionDTO> wrongBookQuestionPage = teacherLibraryService.findWrongBookQuestionPage(req, pageable);
-            responseEntity.success(wrongBookQuestionPage, "查询成功");
-        } catch (Exception e) {
-            logger.error("查询错题本错题列表异常", e);
-            logger.error("请求参数:vipId={}, knowHowDetailList={}", req.getVipId(), req.getKnowHowDetailList());
-            responseEntity.failure(ResponseConstant.CODE_000, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @ApiOperation(value = "错题本错题列表v2")
-    @RequestMapping(value = "/wrongBookQuestionListV2", method = RequestMethod.POST)
-    public ResponseEntity wrongBookQuestionListV2(@RequestParam(name = "accessToken") String accessToken,
-                                                  @RequestBody @Valid WrongBookQuestionReqV4 req) {
-
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            Pageable pageable = initPage(req.getPageNo(), req.getPageSize());
-            WrongBookQuestionReq3 reqV3 = new WrongBookQuestionReq3();
-            BeanUtils.copyProperties(req, reqV3);
-            if (Objects.equals(5, req.getType())) {
-                reqV3.setType(1);
-            }
-            Page<WrongBookQuestionDTO> wrongBookQuestionPage = teacherLibraryService.findWrongBookQuestionPage(reqV3, pageable);
-            Map<String, Object> resultPageMap = new HashMap<>();
-            resultPageMap.put("pages", wrongBookQuestionPage.getPages());
-            resultPageMap.put("pageNo", req.getPageNo());
-            resultPageMap.put("pageSize", req.getPageSize());
-            List<WrongBookQuestionDTO> list = wrongBookQuestionPage.getList();
-            resultPageMap.put("list", list);
-            List<OriginalQuestionDTOV2> finalRecommendQuestionList = new LinkedList<>();
-            if (CollectionUtils.isEmpty(list)) {
-                //没有错题查询推荐练习册的题目
-                List<String> knowHowDetailIdList = req.getKnowHowDetailList().stream()
-                        .map(KnowHowDetailDTO::getKnowHowDetailId)
-                        .distinct()
-                        .collect(Collectors.toList());
-                List<OriginalQuestionDTO> recommendQuestionList = kmtExerciseMapperService.findRecommendQuestionList(knowHowDetailIdList, Collections.emptySet(), 6);
-                OriginalQuestionDTOV2 tempParent;
-                for (OriginalQuestionDTO originalQuestionDTO : recommendQuestionList) {
-                    if (StringUtils.isBlank(originalQuestionDTO.getParentId())) {
-                        tempParent = new OriginalQuestionDTOV2();
-                        tempParent.setQuestionId(originalQuestionDTO.getId());
-                        tempParent.setQuestion(originalQuestionDTO.getQuestion());
-                        tempParent.setChildQuestionList(new LinkedList<>());
-                        finalRecommendQuestionList.add(tempParent);
-                    } else {
-                        Optional<OriginalQuestionDTOV2> optional = finalRecommendQuestionList.stream()
-                                .filter(it -> Objects.equals(it.getQuestionId(), originalQuestionDTO.getParentId()))
-                                .findFirst();
-                        if (optional.isPresent()) {
-                            tempParent = optional.get();
-                            List<OriginalQuestionDTOV2> childQuestionList = tempParent.getChildQuestionList();
-                            OriginalQuestionDTOV2 childQuestion = new OriginalQuestionDTOV2();
-                            childQuestion.setQuestionId(originalQuestionDTO.getId());
-                            childQuestion.setQuestion(originalQuestionDTO.getQuestion());
-                            childQuestionList.add(childQuestion);
-                        }
-                    }
-                }
-            }
-            resultPageMap.put("recommendQuestionList", finalRecommendQuestionList);
-            responseEntity.success(resultPageMap, "查询成功");
-        } catch (Exception e) {
-            logger.error("查询错题本错题列表v2异常", e);
-            logger.error("请求参数:vipId={}, knowHowDetailList={}", req.getVipId(), req.getKnowHowDetailList());
-            responseEntity.failure(ResponseConstant.CODE_000, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @ApiOperation(value = "错题本错题列表V3")
-    @RequestMapping(value = "/wrongBookQuestionListV3", method = RequestMethod.POST)
-    public ResponseEntity wrongBookQuestionListV3(@RequestParam(name = "accessToken") String accessToken,
-                                                  @RequestBody @Valid WrongBookQuestionReqV4 req) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            Pageable pageable = initPage(req.getPageNo(), req.getPageSize());
-            return teacherLibraryService.findWrongBookQuestionPageV3(req, pageable);
-        } catch (Exception e) {
-            logger.error("查询错题本错题列表v3异常", e);
-            logger.error("请求参数:vipId={}, knowHowDetailList={}", req.getVipId(), req.getKnowHowDetailList());
-            responseEntity.failure(ResponseConstant.CODE_000, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @ApiOperation(value = "错题本错题列表V4")
-    @RequestMapping(value = "/wrongBookQuestionListV4", method = RequestMethod.POST)
-    public ResponseEntity wrongBookQuestionListV4(@RequestParam(name = "accessToken") String accessToken,
-                                                  @RequestBody @Valid WrongBookQuestionReqV6 req) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            Pageable pageable = initPage(req.getPageNo(), req.getPageSize());
-            return teacherLibraryService.findWrongBookQuestionPageV4(req, pageable);
-        } catch (Exception e) {
-            logger.error("查询错题本错题列表v4异常", e);
-            logger.error("请求参数:vipId={}, knowHowDetailList={}", req.getVipId(), req.getKnowHowDetailList());
-            responseEntity.failure(ResponseConstant.CODE_000, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @ApiOperation(value = "查询错题原题和推荐的题")
-    @RequestMapping(value = "/wrongAndRecommendQuestionList", method = RequestMethod.POST)
-    public ResponseEntity findWrongAndRecommendQuestionList(@RequestParam(name = "accessToken") String accessToken,
-                                                            @RequestBody @Valid WrongBookQuestionListReq req) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            return teacherLibraryService.findWrongAndRecommendQuestionList(req);
-        } catch (Exception e) {
-            logger.error("查询错题原题和推荐的题异常", e);
-            logger.error("请求参数:{}", req.toString());
-            responseEntity.failure(ResponseConstant.CODE_000, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @ApiOperation(value = "查询错题原题和推荐的题v2")
-    @RequestMapping(value = "/wrongAndRecommendQuestionListV2", method = RequestMethod.POST)
-    public ResponseEntity findWrongAndRecommendQuestionListV2(@RequestParam(name = "accessToken") String accessToken,
-                                                              @RequestBody @Valid WrongBookQuestionListReqV2 req) {
-
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            return teacherLibraryService.findWrongAndRecommendQuestionListV2(req);
-        } catch (Exception e) {
-            logger.error("查询错题原题和推荐的题v2异常", e);
-            logger.error("请求参数:{}", req.toString());
-            responseEntity.failure(ResponseConstant.CODE_000, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @ApiOperation(value = "查询错题原题和推荐的题v3")
-    @RequestMapping(value = "/wrongAndRecommendQuestionListV3", method = RequestMethod.POST)
-    public ResponseEntity findWrongAndRecommendQuestionListV3(@RequestParam(name = "accessToken") String accessToken,
-                                                              @RequestBody @Valid WrongBookQuestionListReqV2 req) {
-
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            return teacherLibraryService.findWrongAndRecommendQuestionListV3(req);
-        } catch (Exception e) {
-            logger.error("查询错题原题和推荐的题v3异常", e);
-            logger.error("请求参数:{}", req.toString());
-            responseEntity.failure(ResponseConstant.CODE_000, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @ApiOperation(value = "查询知识点版本列表")
-    @RequestMapping(value = "/knowledgeVersionList", method = RequestMethod.POST)
-    public ResponseEntity knowledgeVersionList(@RequestParam(name = "accessToken") String accessToken,
-                                               @RequestBody @Valid KnowledgeVersionListReq req) {
-
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            return teacherLibraryService.findKnowledgeVersionList(req);
-        } catch (Exception e) {
-            logger.error("请求参数:req={}", req);
-            logger.error("查询查询知识点版本列表异常", e);
-            responseEntity.failure(ResponseConstant.CODE_000, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @ApiOperation(value = "学期回顾知识点列表")
-    @RequestMapping(value = "/semesterReviewKnowledgeList", method = RequestMethod.POST)
-    public ResponseEntity findSemesterReviewKnowledgeList(@RequestParam(name = "accessToken") String accessToken,
-                                                          @RequestBody @Valid SemesterReviewKnowledgeListReq req) {
-
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            return teacherLibraryService.findSemesterReviewKnowledgeList(req);
-        } catch (Exception e) {
-            logger.error("查询学期回顾知识点列表异常", e);
-            logger.error("请求参数:{}", req.toString());
-            responseEntity.failure(ResponseConstant.CODE_000, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @ApiOperation(value = "学期回顾知识点列表v2")
-    @RequestMapping(value = "/semesterReviewKnowledgeListV2", method = RequestMethod.POST)
-    public ResponseEntity semesterReviewKnowledgeListV2(@RequestParam(name = "accessToken") String accessToken,
-                                                        @RequestBody @Valid SemesterReviewKnowledgeListReq req) {
-
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            return teacherLibraryService.semesterReviewKnowledgeListV2(req);
-        } catch (Exception e) {
-            logger.error("查询学期回顾知识点列表v2异常", e);
-            logger.error("请求参数:{}", req.toString());
-            responseEntity.failure(ResponseConstant.CODE_000, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @ApiOperation(value = "学期回顾推荐题目")
-    @RequestMapping(value = "/semesterReviewRecommendQuestionList", method = RequestMethod.POST)
-    public ResponseEntity findSemesterReviewRecommendQuestionList(@RequestParam(name = "accessToken") String accessToken,
-                                                                  @RequestBody @Valid TrainRecommendQuestionReqV3 req) {
-
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            return teacherLibraryService.findSemesterReviewRecommendQuestionList(req);
-        } catch (Exception e) {
-            logger.error("查询学期回顾推荐题目异常", e);
-            logger.error("请求参数:{}", req.toString());
-            responseEntity.failure(ResponseConstant.CODE_000, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @ApiOperation(value = "我的任务-上传失败图片学生校验")
-    @RequestMapping(value = "/checkStudent", method = RequestMethod.POST)
-    public ResponseEntity checkStudent(@RequestParam(name = "accessToken") String accessToken,
-                                       @RequestBody @Valid VipIdListReq req) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            return teacherLibraryService.checkStudent(req);
-        } catch (Exception e) {
-            logger.error("查询学期回顾推荐题目异常", e);
-            logger.error("请求参数:{}", req.toString());
-            responseEntity.failure(ResponseConstant.CODE_000, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    //------------------------------------------------------------------定制练习-------------------------------------
-    @RequestMapping(value = "weeklySynchronousTrainQuestionList", method = RequestMethod.POST)
-    @ApiOperation(value = "每周同步训练", httpMethod = "POST", notes = "每周同步训练")
-    public ResponseEntity weeklySynchronousTrainQuestionList(@RequestParam(name = "accessToken") String accessToken,
-                                                             @RequestBody WeeklySynchronousTrainReq req){
-
-        ResponseEntity responseEntity;
-        try {
-            responseEntity = parentV2Service.findWeeklySynchronousTrainQuestionList(req);
-        } catch (Exception e) {
-            responseEntity = new ResponseEntity();
-            logger.error("req={}", req);
-            logger.error("查询每周同步训练异常", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "getPeiyouBookVersion",method = RequestMethod.POST)
-    @ApiOperation(value = "学能培优获取版本",httpMethod = "POST",notes = "学能培优获取版本")
-    public ResponseEntity getPeiyouBookVersion(@RequestParam(name = "accessToken") String accessToken, @RequestBody GetPeiyouBookVersionReq req){
-        ResponseEntity responseEntity;
-        try {
-            responseEntity = parentV2Service.getPeiyouBookVersion(req);
-        } catch (Exception e) {
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "getPeiyouBookUnit",method = RequestMethod.POST)
-    @ApiOperation(value = "学能培优获取单元",httpMethod = "POST",notes = "学能培优获取单元")
-    public ResponseEntity getPeiyouBookUnit(@RequestParam(name = "accessToken") String accessToken, @RequestBody GetPeiyouBookUnitReq req){
-        ResponseEntity responseEntity;
-        try {
-            responseEntity = parentV2Service.getPeiyouBookUnit(req);
-        } catch (Exception e) {
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "getSecondUnitInfo",method = RequestMethod.POST)
-    @ApiOperation(value = "学能培优获取(课文,知识点,攀登话题))",httpMethod = "POST",notes = "学能培优获取(课文,知识点,攀登话题))")
-    public ResponseEntity getSecondUnitInfo(@RequestParam(name = "accessToken") String accessToken, @RequestBody GetSecondUnitInfoReq req){
-        ResponseEntity responseEntity;
-        try {
-            responseEntity = parentV2Service.getSecondUnitInfo(req.getUnitId());
-        } catch (Exception e) {
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "getBookFileInfo",method = RequestMethod.POST)
-    @ApiOperation(value = "学能培优获取教材信息",httpMethod = "POST",notes = "学能培优获取教材信息")
-    public ResponseEntity getBookFileInfo(@RequestParam(name = "accessToken") String accessToken, @RequestBody GetBookFileInfoReq req){
-        ResponseEntity responseEntity;
-        try {
-            responseEntity = parentV2Service.getBookFileInfo(req.getSecondUnitId(),req.getType());
-        } catch (Exception e) {
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "getQuestionVersion",method = RequestMethod.POST)
-    @ApiOperation(value = "历年真题获取教材版本",httpMethod = "POST",notes = "历年真题获取教材版本")
-    public ResponseEntity getQuestionBooks(@RequestParam(name = "accessToken") String accessToken, @RequestBody ConditionReq req){
-        ResponseEntity responseEntity;
-        try {
-            responseEntity = parentV2Service.getQuestionVersion(req.getVipId(),req.getCourseName());
-        } catch (Exception e) {
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "getQuestionProvince",method = RequestMethod.POST)
-    @ApiOperation(value = "历年真题获取教材版本下的省份",httpMethod = "POST",notes = "历年真题获取教材版本下的省份")
-    public ResponseEntity getQuestionProvince(@RequestParam(name = "accessToken") String accessToken, @RequestBody ConditionReq req){
-        ResponseEntity responseEntity;
-        try {
-            responseEntity = parentV2Service.getQuestionProvince(req.getVipId(),req.getCourseName(),req.getBookName());
-        } catch (Exception e) {
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "getQuestionCity",method = RequestMethod.POST)
-    @ApiOperation(value = "历年真题获取教材版本下的省份下城市",httpMethod = "POST",notes = "历年真题获取教材版本下的省份下城市")
-    public ResponseEntity getQuestionCity(@RequestParam(name = "accessToken") String accessToken, @RequestBody ConditionReq req){
-        ResponseEntity responseEntity;
-        try {
-            responseEntity = parentV2Service.getQuestionCity(req.getProvinceTermtrainId());
-        } catch (Exception e) {
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "getQuestionArea",method = RequestMethod.POST)
-    @ApiOperation(value = "历年真题获取教材版本下的城市下区域",httpMethod = "POST",notes = "历年真题获取教材版本下的城市下区域")
-    public ResponseEntity getQuestionArea(@RequestParam(name = "accessToken") String accessToken, @RequestBody ConditionReq req){
-        ResponseEntity responseEntity;
-        try {
-            responseEntity = parentV2Service.getQuestionArea(req.getCityTermtrainId());
-        } catch (Exception e) {
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "getQuestionYear",method = RequestMethod.POST)
-    @ApiOperation(value = "历年真题获取教材版本下的省市区筛选的时间",httpMethod = "POST",notes = "历年真题获取教材版本下的省市区筛选的时间")
-    public ResponseEntity getQuestionYear(@RequestParam(name = "accessToken") String accessToken, @RequestBody ConditionReq req){
-        ResponseEntity responseEntity;
-        try {
-            responseEntity = parentV2Service.getQuestionYear(req.getAreaTermtrainId());
-        } catch (Exception e) {
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "getRealQuestionInfo",method = RequestMethod.POST)
-    @ApiOperation(value = "历年真题获取教材版本下的省市区时间筛选的真题文件",httpMethod = "POST",notes = "历年真题获取教材版本下的省市区时间筛选的真题文件")
-    public ResponseEntity getRealQuestionInfo(@RequestParam(name = "accessToken") String accessToken, @RequestBody ConditionReq req){
-        ResponseEntity responseEntity;
-        try {
-            responseEntity = parentV2Service.getRealQuestionInfo(req.getYearTermtrainId());
-        } catch (Exception e) {
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "getCustomizedSprintPaper",method = RequestMethod.POST)
-    @ApiOperation(value = "定制冲刺",httpMethod = "POST",notes = "定制冲刺")
-    public ResponseEntity getCustomizedSprintPaper(@RequestParam(name = "accessToken") String accessToken, @RequestBody GetCustomizedSprintPaperReq req){
-        ResponseEntity responseEntity;
-        try {
-            responseEntity = parentV2Service.getCustomizedSprintPaper(req);
-        } catch (Exception e) {
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "coreRanking",method = RequestMethod.POST)
-    @ApiOperation(value = "积分排行榜",httpMethod = "POST",notes = "积分排行榜")
-    public ResponseEntity coreRanking(@RequestParam(name="accessToken")String accessToken){
-        ResponseEntity responseEntity;
-        try {
-            String userId=tokenManager.getUserId(accessToken);
-            responseEntity=teacherLibraryService.coreRanking(userId);
-        } catch (Exception e) {
-            responseEntity=new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500,"系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-
-
-    }
-
-}

+ 0 - 602
ssj-aijia-api/src/main/java/com/ssj/aijia/teacher/controller/v2/TeacherOrgV2Controller.java

@@ -1,602 +0,0 @@
-package com.ssj.aijia.teacher.controller.v2;
-
-import com.alibaba.dubbo.config.annotation.Reference;
-import com.alibaba.fastjson.JSON;
-import com.ssj.bean.conch.conch.dto.ProblemDetailDto;
-import com.ssj.framework.basic.utils.PhoneVerifyUtil;
-import com.ssj.framework.basic.utils.RSAUtils;
-import com.ssj.framework.core.common.controller.BaseController;
-import com.ssj.framework.core.security.annotation.ModifySecurity;
-import com.ssj.framework.core.security.exception.CommonException;
-import com.ssj.framework.core.security.manager.TokenManager;
-import com.ssj.framework.core.util.PropertiesUtil;
-import com.ssj.framework.core.util.ResponseConstant;
-import com.ssj.framework.core.util.ResponseEntity;
-import com.ssj.framework.core.util.StringUtil;
-import com.ssj.framework.weixin.util.DateUtil;
-import com.ssj.service.conch.parents.dto.LearningSituationAbstractDto;
-import com.ssj.service.conch.parents.dto.LearningSituationDetailNewDto;
-import com.ssj.service.conch.parents.request.version4.CorrectDetailReq;
-import com.ssj.service.conch.parents.service.ParentService;
-import com.ssj.service.conch.parents.v1.request.AnsweredProblemDetailReq;
-import com.ssj.service.conch.parents.v2.request.*;
-import com.ssj.service.conch.parents.v2.service.ParentV2Service;
-import com.ssj.service.conch.teacher.library.request.ClassIdReq;
-import com.ssj.service.conch.teacher.library.request.QuestionDetailReq;
-import com.ssj.service.conch.teacher.request.teacherorg.*;
-import com.ssj.service.conch.teacher.service.TeacherOrgService;
-import com.ssj.service.conch.teacher.service.TeacherOrgV2Service;
-import com.ssj.service.conch.teacher.v2.request.ClassIdRequest;
-import com.ssj.service.sys.homework.service.HomeworkPictureService;
-import com.ssj.service.sys.homework.service.HomeworkService;
-import com.ssj.service.sys.problem.service.ProblemPictureService;
-import com.ssj.service.sys.situation.service.LearningSituationService;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import org.apache.commons.lang3.StringUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.data.domain.Pageable;
-import org.springframework.data.domain.Sort.Direction;
-import org.springframework.web.bind.annotation.*;
-
-import javax.validation.Valid;
-import java.util.Map;
-
-/**
- * 学科老师端
- *
- * @author Mount Liu
- * @version 2019/2/28
- */
-@Api(value = "机构老师端相关的接口V2", tags = "机构老师端相关的接口V2")
-@RestController
-@RequestMapping("api/teacher/organization/V2")
-public class TeacherOrgV2Controller extends BaseController {
-
-    protected static final Logger log = LoggerFactory.getLogger(TeacherOrgV2Controller.class);
-
-    @Autowired
-    private TokenManager tokenManager;
-
-    @Reference(version = "1.0" ,timeout = 60000)
-    private TeacherOrgService teacherOrgService;
-    @Reference(version = "1.0" ,timeout = 60000)
-    private TeacherOrgV2Service teacherOrgV2Service;
-    @Reference(version = "1.0" ,timeout = 60000)
-    private ParentService parentService;
-    @Reference(version = "1.0" ,timeout = 60000)
-    private ParentV2Service parentV2Service;
-    @Reference(version = "1.0" ,timeout = 60000)
-    private HomeworkService homeworkService;
-    @Reference(version = "1.0" ,timeout = 60000)
-    private HomeworkPictureService homeworkPictureService;
-
-    @Reference(version = "1.0" ,timeout = 60000)
-    private LearningSituationService learningSituationService;
-    @Reference(version = "1.0" ,timeout = 60000)
-    private ProblemPictureService problemPictureService;
-
-    @RequestMapping(value = "/saveInfo", method = RequestMethod.POST)
-    @ApiOperation(value = "完善信息", httpMethod = "POST", notes = "完善信息")
-    @ModifySecurity
-    public ResponseEntity saveInfo(@RequestParam(name = "accessToken") String accessToken, @RequestBody SaveInfoReq req) {
-        ResponseEntity responseEntity;
-        try {
-            String userId = tokenManager.getUserId(accessToken);
-            responseEntity = teacherOrgService.saveInfo(userId, req);
-        } catch (Exception e) {
-            logger.error("异常", e);
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/saveInfoV2", method = RequestMethod.POST)
-    @ApiOperation(value = "完善信息v2(参数加密)", httpMethod = "POST", notes = "完善信息v2(参数加密)")
-    @ModifySecurity
-    public ResponseEntity saveInfoV2(@RequestParam(name = "accessToken") String accessToken,
-                                     @RequestBody SaveInfoReq req) {
-
-        ResponseEntity responseEntity;
-        try {
-            String userId = tokenManager.getUserId(accessToken);
-            req.setName(RSAUtils.decrypt(req.getName()));
-            req.setTelephone(RSAUtils.decrypt(req.getTelephone()));
-            if(StringUtils.isNotEmpty(req.getTelephone())){
-                Boolean flag= PhoneVerifyUtil.vertifyPhone(req.getTelephone());
-                if(false==flag){
-                    return new ResponseEntity().failure("请输入正确的手机号");
-                }
-            }
-            responseEntity = teacherOrgService.saveInfo(userId, req);
-        } catch (Exception e) {
-            logger.error("完善信息v2(参数加密)异常", e);
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/getMyInfo", method = RequestMethod.POST)
-    @ApiOperation(value = "查看我的信息", httpMethod = "POST", notes = "查看我的信息")
-    public ResponseEntity getMyInfo(@RequestParam(name = "accessToken") String accessToken) {
-        ResponseEntity responseEntity;
-        try {
-            String userId = tokenManager.getUserId(accessToken);
-            responseEntity = teacherOrgService.getMyInfoV1(userId);
-        } catch (Exception e) {
-            logger.error("异常", e);
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/newGetMyInfo", method = RequestMethod.POST)
-    @ApiOperation(value = "新查看我的信息", httpMethod = "POST", notes = "查看我的信息")
-    public ResponseEntity newGetMyInfo(@RequestParam(name = "accessToken") String accessToken) {
-        ResponseEntity responseEntity;
-        try {
-            String userId = tokenManager.getUserId(accessToken);
-            responseEntity = teacherOrgService.newGetMyInfo(userId);
-        } catch (Exception e) {
-            logger.error("新查看我的信息异常", e);
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/homeworkTask", method = RequestMethod.POST)
-    @ApiOperation(value = "作业任务", httpMethod = "POST", notes = "作业任务")
-    public ResponseEntity homeworkTask(@RequestParam(name = "accessToken") String accessToken, @RequestBody HomeworkTaskReq req) {
-        ResponseEntity responseEntity = new ResponseEntity();
-
-        String vipId = req.getVipId();
-        if (StringUtils.isBlank(vipId)) {
-            return responseEntity.failure("学生id不能为空");
-        }
-
-        String maxCreateTime = req.getMaxCreateTime();
-        try {
-            DateUtil.parse_yyyyMMdd(maxCreateTime);
-        } catch (Exception e) {
-            try {
-                DateUtil.parse_yyyyMMddHHmmss(maxCreateTime);
-            } catch (Exception e1) {
-                logger.error("时间格式错误:" + maxCreateTime);
-                return responseEntity.failure("最大创建时间格式错误");
-            }
-        }
-
-        try {
-            Pageable pageable = initPage(req.getPageNo(), req.getPageSize());
-            Map<String, Object> data = parentService.getHistoryTask(vipId, maxCreateTime, pageable);
-            data.put("todayTask", parentService.searchTodayHomeworkTask(vipId));
-            responseEntity.success(data, "成功");
-        } catch (Exception e) {
-            logger.error("查询作业任务异常:", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/homeworkReport", method = RequestMethod.POST)
-    @ApiOperation(value = "作业反馈报告", httpMethod = "POST", notes = "作业反馈报告")
-    public ResponseEntity homeworkReport(@RequestParam(name = "accessToken") String accessToken, @RequestBody HomeworkReportReq req) {
-        ResponseEntity responseEntity = new ResponseEntity();
-
-        String vipId = req.getVipId();
-        if (StringUtils.isBlank(vipId)) {
-            return responseEntity.failure("学生id不能为空");
-        }
-
-        String date = req.getDate();
-        try {
-            DateUtil.parse_yyyyMMdd(date);
-        } catch (Exception e) {
-            logger.warn("日期参数错误:" + date);
-            return responseEntity.failure("日期参数错误");
-        }
-
-        try {
-            Map<String, Object> resultMap = parentService.findHomeworkReport4(vipId, date, "", false);
-            responseEntity.success(resultMap, "查询成功");
-        } catch (Exception e) {
-            logger.error("查询作业反馈报告异常:", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/integralLearningSituation", method = RequestMethod.POST)
-    @ApiOperation(value = "学情-整体情况", httpMethod = "POST", notes = "学情-整体情况")
-    public ResponseEntity integralLearningSituation(@RequestParam(name = "accessToken") String accessToken, @RequestBody IntegralLearningSituationReq req) {
-        ResponseEntity responseEntity = new ResponseEntity();
-
-        String vipId = req.getVipId();
-        if (StringUtils.isBlank(vipId)) {
-            return responseEntity.failure("学生id不能为空");
-        }
-
-        try {
-            LearningSituationAbstractDto learningSituationAbstractDto = parentService.learningSituationAbstract(vipId);
-            responseEntity.success(learningSituationAbstractDto, "查询成功");
-        } catch (Exception e) {
-            logger.error("查询学情整体情况异常:", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-
-        return responseEntity;
-    }
-
-    @ApiOperation(value = "周报历史记录")
-    @RequestMapping(value = "/weeklyReportHistory", method = RequestMethod.POST)
-    public ResponseEntity weeklyReportHistory(@RequestParam(name = "accessToken") String accessToken,
-                                              @RequestBody @Valid ReportHistoryReq req) {
-
-        ResponseEntity responseEntity;
-        try {
-            responseEntity = parentV2Service.findWeeklyReportHistory(req);
-        } catch (Exception e) {
-            logger.error("查询周报历史记录异常", e);
-            responseEntity = new ResponseEntity().failure(ResponseConstant.CODE_000, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @ApiOperation(value = "学习成长报告(周)")
-    @RequestMapping(value = "/weeklyReport", method = RequestMethod.POST)
-    public ResponseEntity weeklyReport(@RequestParam(name = "accessToken") String accessToken,
-                                       @RequestBody @Valid LearningGrowthReportReq req) {
-
-        ResponseEntity responseEntity;
-        try {
-            responseEntity = parentV2Service.findLearningGrowthReport(req);
-        } catch (Exception e) {
-            logger.error("查询周学习成长报告异常", e);
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_000, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @ApiOperation(value = "学习成长报告(周)V2")
-    @RequestMapping(value = "/weeklyReportV2", method = RequestMethod.POST)
-    public ResponseEntity weeklyReportV2(@RequestParam(name = "accessToken") String accessToken,
-                                       @RequestBody @Valid LearningGrowthReportReq req) {
-
-        ResponseEntity responseEntity;
-        try {
-            responseEntity = parentV2Service.findLearningGrowthReportV2(req);
-        } catch (Exception e) {
-            logger.error("查询周学习成长报告V2异常", e);
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_000, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @ApiOperation(value = "查询提分训练推荐题目")
-    @RequestMapping(value = "/trainRecommendQuestionList", method = RequestMethod.POST)
-    public ResponseEntity trainRecommendQuestionList(@RequestParam(name = "accessToken") String accessToken,
-                                                     @RequestBody @Valid TrainRecommendQuestionReqV2 req) {
-
-        ResponseEntity responseEntity;
-        try {
-            responseEntity = parentV2Service.findTrainRecommendQuestionV2(req);
-        } catch (Exception e) {
-            logger.error("查询提分训练推荐题目v2异常", e);
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_000, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @ApiOperation(value = "查询提分训练推荐题目v2")
-    @RequestMapping(value = "/trainRecommendQuestionListV2", method = RequestMethod.POST)
-    public ResponseEntity trainRecommendQuestionListV2(@RequestParam(name = "accessToken") String accessToken,
-                                                       @RequestBody @Valid TrainRecommendQuestionReqV3 req) {
-
-        ResponseEntity responseEntity;
-        try {
-            responseEntity = parentV2Service.findTrainRecommendQuestionV4(req);
-        } catch (Exception e) {
-            logger.error("查询提分训练推荐题目v2异常", e);
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_000, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @ApiOperation(value = "月报历史记录")
-    @RequestMapping(value = "/monthlyReportHistory", method = RequestMethod.POST)
-    public ResponseEntity monthlyReportHistory(@RequestParam(name = "accessToken") String accessToken,
-                                               @RequestBody @Valid ReportHistoryReq req) {
-
-        ResponseEntity responseEntity;
-        try {
-            responseEntity = parentV2Service.findMonthlyReportHistory(req);
-        } catch (Exception e) {
-            logger.error("查询月报历史记录异常", e);
-            responseEntity = new ResponseEntity().failure(ResponseConstant.CODE_000, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @ApiOperation(value = "学习成长报告(月)")
-    @RequestMapping(value = "/monthlyReport", method = RequestMethod.POST)
-    public ResponseEntity monthlyReport(@RequestParam(name = "accessToken") String accessToken,
-                                        @RequestBody @Valid LearningGrowthReportForMonthReq req) {
-
-        ResponseEntity responseEntity;
-        try {
-            responseEntity = parentV2Service.findLearningGrowthReportMonth(req);
-        } catch (Exception e) {
-            logger.error("查询月学习成长报告异常", e);
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_000, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @ApiOperation(value = "学习成长报告(月)v2")
-    @RequestMapping(value = "/monthlyReportV2", method = RequestMethod.POST)
-    public ResponseEntity monthlyReportV2(@RequestParam(name = "accessToken") String accessToken,
-                                          @RequestBody @Valid LearningGrowthReportForMonthReq req) {
-
-        ResponseEntity responseEntity;
-        try {
-            responseEntity = parentV2Service.findLearningGrowthReportMonthV2(req);
-        } catch (Exception e) {
-            logger.error("查询月学习成长报告异常", e);
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_000, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/learningSituationHistory", method = RequestMethod.POST)
-    @ApiOperation(value = "学情历史记录")
-    public ResponseEntity learningSituationHistory(@RequestParam(name = "accessToken") String accessToken, @RequestBody CorrectDetailReq req) {
-        ResponseEntity responseEntity ;
-        try {
-            responseEntity = learningSituationService.learningSituationHistory(req.getVipId(), req.getSubject());
-        } catch (Exception e) {
-            logger.error("异常", e);
-            responseEntity=new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/subjectLearningSituation", method = RequestMethod.POST)
-    @ApiOperation(value = "学情-学科详情", httpMethod = "POST", notes = "学情-学科详情")
-    public ResponseEntity subjectLearningSituation(@RequestParam(name = "accessToken") String accessToken, @RequestBody SubjectLearningSituationReq req) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            String  learningSituationStr= PropertiesUtil.getValue("LEARNINGING_SITUATION");
-            if (StringUtil.isNotBlank(learningSituationStr) && learningSituationStr.indexOf(req.getVipId()) != -1){
-                String data  = "";
-                if (req.getSubject().equals("语文")){
-                    data = PropertiesUtil.getValue("LEARNINGING_SITUATION_CHINESE_V2");
-                } else if (req.getSubject().equals("英语")){
-                    data = PropertiesUtil.getValue("LEARNINGING_SITUATION_ENGLISH_V2");
-                } else {
-                    data = PropertiesUtil.getValue("LEARNINGING_SITUATION_MATH_V2");
-                }
-                responseEntity.success(JSON.parse(data), "成功");
-            } else {
-                LearningSituationDetailNewDto data = learningSituationService.learningSituationDetailNew(req);
-                responseEntity.success(data, "成功");
-            }
-        } catch (CommonException e) {
-            return responseEntity.failure(ResponseConstant.CODE_500, e.getMessage());
-        } catch (Exception e) {
-            logger.error("异常", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/getOrganizationList", method = RequestMethod.POST)
-    @ApiOperation(value = "获取机构列表", httpMethod = "POST", notes = "获取机构列表")
-    public ResponseEntity getOrganizationList(@RequestParam(name = "accessToken") String accessToken, @RequestBody OrganizationListReq req) {
-        ResponseEntity responseEntity;
-        try {
-            Pageable pageable = initPage(req.getPageNo(), req.getPageSize(), Direction.ASC, "name");
-            responseEntity = teacherOrgService.getOrganizationList(req, pageable);
-        } catch (Exception e) {
-            logger.error("异常", e);
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @ApiOperation(value = "已解答难题详情")
-    @RequestMapping(value = "/answeredProblemDetail", method = RequestMethod.POST)
-    public ResponseEntity answeredProblemDetailNew(@RequestParam(name = "accessToken") String accessToken, @RequestBody AnsweredProblemDetailReq req) {
-        ResponseEntity responseEntity;
-        try {
-            responseEntity = parentV2Service.answeredProblemDetailNew(req);
-        } catch (Exception e) {
-            logger.error("异常", e);
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_000, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-
-    @ApiOperation(value = "学生详情(难题)")
-    @RequestMapping(value = "/studentProblemPictureList", method = RequestMethod.POST)
-    public ResponseEntity studentProblemPictureList(@RequestParam(name = "accessToken") String accessToken, @RequestBody AnsweredProblemReq req) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            String userId = tokenManager.getUserId(accessToken);
-            responseEntity.success(teacherOrgV2Service.studentProblemPictureList(req, userId), "查询成功");
-        } catch (Exception e) {
-            logger.error("异常", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @ApiOperation(value = "难题列表(老师留言版)")
-    @RequestMapping(value = "/problemPictureList", method = RequestMethod.POST)
-    public ResponseEntity problemPictureList(@RequestParam(name = "accessToken") String accessToken, @RequestBody ClassIdPageRequest req) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            String userId = tokenManager.getUserId(accessToken);
-            responseEntity.success(teacherOrgV2Service.findProblemPictureList(req, userId), "查询成功");
-        } catch (Exception e) {
-            logger.error("异常", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @ApiOperation(value = "难题老师留言保存")
-    @RequestMapping(value = "/saveProblemTeacherMessage", method = RequestMethod.POST)
-    public ResponseEntity saveProblemTeacherMessage(@RequestParam(name = "accessToken") String accessToken, @Valid @RequestBody TeacherMessaggeRequest req) {
-        ResponseEntity responseEntity;
-        try {
-            String userId = tokenManager.getUserId(accessToken);
-            responseEntity = problemPictureService.saveTeacherMessage(req, userId);
-        } catch (Exception e) {
-            responseEntity = new ResponseEntity();
-            logger.error("异常", e);
-            responseEntity.failure(ResponseConstant.CODE_000, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @ApiOperation(value = "难题解答详情")
-    @RequestMapping(value = "/findProblemPictureDetail", method = RequestMethod.POST)
-    public ResponseEntity findProblemPictureDetail(@RequestParam(name = "accessToken") String accessToken, @RequestBody ProblemPictureV1Request req) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            ProblemDetailDto data = teacherOrgV2Service.getProblemFeedbackData(req.getProblemPictureId());
-            responseEntity.success(data, "查询成功");
-        } catch (Exception e) {
-            logger.error("异常", e);
-            responseEntity.failure(ResponseConstant.CODE_000, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @ApiOperation(value = "学科列表")
-    @RequestMapping(value = "/subjectList", method = RequestMethod.POST)
-    public ResponseEntity findSubjectList(@RequestParam(name = "accessToken") String accessToken,
-                                          @RequestBody @Valid ClassIdReq req) {
-
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            String teacherId = tokenManager.getUserId(accessToken);
-            return teacherOrgV2Service.findSubjectList(req, teacherId);
-        } catch (Exception e) {
-            logger.error("查询学科列表异常", e);
-            responseEntity.failure(ResponseConstant.CODE_000, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @ApiOperation(value = "作业统计")
-    @RequestMapping(value = "/homeworkCount", method = RequestMethod.POST)
-    public ResponseEntity homeworkCount(@RequestParam(name = "accessToken") String accessToken,
-                                        @RequestBody @Valid ClassIdReq req) {
-
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            String teacherId = tokenManager.getUserId(accessToken);
-            return teacherOrgV2Service.homeworkCount(req, teacherId);
-        } catch (Exception e) {
-            logger.error("查询作业统计异常", e);
-            responseEntity.failure(ResponseConstant.CODE_000, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @ApiOperation(value = "提交作业学生列表")
-    @RequestMapping(value = "/submittedStudentList", method = RequestMethod.POST)
-    public ResponseEntity submittedStudentList(@RequestParam(name = "accessToken") String accessToken,
-                                               @RequestBody @Valid ClassIdReq req) {
-
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            String teacherId = tokenManager.getUserId(accessToken);
-            return teacherOrgV2Service.findSubmittedStudentList(req, teacherId);
-        } catch (Exception e) {
-            logger.error("查询提交作业学生列表异常", e);
-            responseEntity.failure(ResponseConstant.CODE_000, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @ApiOperation(value = "错题详情")
-    @RequestMapping(value = "/wrongQuestionDetail", method = RequestMethod.POST)
-    public ResponseEntity wrongQuestionDetail(@RequestParam(name = "accessToken") String accessToken,
-                                              @RequestBody @Valid QuestionDetailReq req) {
-
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            return teacherOrgV2Service.findWrongQuestionDetail(req);
-        } catch (Exception e) {
-            logger.error("查询错题详情异常", e);
-            responseEntity.failure(ResponseConstant.CODE_000, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @ApiOperation(value = "班级列表")
-    @RequestMapping(value = "/classList", method = RequestMethod.POST)
-    public ResponseEntity classList(@RequestParam(name = "accessToken") String accessToken) {
-        ResponseEntity responseEntity;
-        try {
-            String userId = tokenManager.getUserId(accessToken);
-            responseEntity = teacherOrgV2Service.classList(userId);
-        } catch (Exception e) {
-            logger.error("异常", e);
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_000, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @ApiOperation(value = "学生列表")
-    @RequestMapping(value = "/studentList", method = RequestMethod.POST)
-    public ResponseEntity studentList(@RequestParam(name = "accessToken") String accessToken, @RequestBody ClassIdRequest req) {
-        ResponseEntity responseEntity;
-        try {
-            responseEntity = teacherOrgV2Service.studentList(req.getClassId());
-        } catch (Exception e) {
-            logger.error("异常", e);
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_000, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-
-    @ApiOperation(value = "新班级列表")
-    @RequestMapping(value = "/newClassList", method = RequestMethod.POST)
-    public ResponseEntity newClassList(@RequestParam(name = "accessToken") String accessToken) {
-        ResponseEntity responseEntity;
-        try {
-            String userId = tokenManager.getUserId(accessToken);
-            responseEntity = teacherOrgV2Service.newClassList(userId);
-        } catch (Exception e) {
-            logger.error("异常", e);
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_000, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-}

+ 0 - 381
ssj-aijia-api/src/main/java/com/ssj/aijia/teacher/library/controller/TeacherLibraryController.java

@@ -1,381 +0,0 @@
-package com.ssj.aijia.teacher.library.controller;
-
-import com.alibaba.dubbo.config.annotation.Reference;
-import com.ssj.bean.sys.homework.domain.Homework;
-import com.ssj.bean.weixin.libmy.domain.TbLibManager;
-import com.ssj.bean.weixin.user.domain.User;
-import com.ssj.framework.basic.common.bean.Page;
-import com.ssj.framework.core.common.controller.BaseController;
-import com.ssj.framework.core.security.annotation.ModifySecurity;
-import com.ssj.framework.core.security.manager.TokenManager;
-import com.ssj.framework.core.util.ResponseConstant;
-import com.ssj.framework.core.util.ResponseEntity;
-import com.ssj.service.conch.parents.request.version4.CorrectDetailReq;
-import com.ssj.service.conch.parents.service.ParentService;
-import com.ssj.service.conch.parents.v1.dto.CorrectDetailDto4;
-import com.ssj.service.conch.parents.v2.dto.WrongBookKnowledgeDTO2;
-import com.ssj.service.conch.parents.v2.dto.WrongBookQuestionDTO;
-import com.ssj.service.conch.parents.v2.request.ModuleReq;
-import com.ssj.service.conch.parents.v2.request.WrongBookQuestionListReq;
-import com.ssj.service.conch.parents.v2.request.WrongBookQuestionReq3;
-import com.ssj.service.conch.parents.v2.request.WrongQuestionV2Req;
-import com.ssj.service.conch.teacher.app.request.QuestionRequest;
-import com.ssj.service.conch.teacher.library.dto.HomeworkDataDto;
-import com.ssj.service.conch.teacher.library.request.*;
-import com.ssj.service.conch.teacher.service.TeacherLibraryService;
-import com.ssj.service.sys.homework.service.HomeworkService;
-import com.ssj.service.weixin.library.service.IBookManagerService;
-import com.ssj.service.weixin.user.service.UserService;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import org.apache.commons.lang3.StringUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.data.domain.Pageable;
-import org.springframework.web.bind.annotation.*;
-
-import javax.validation.Valid;
-import java.util.*;
-
-/**
- * @author yangcan
- * 类描述:在馆老师端app接口
- * 创建时间:2019/7/9 15:07
- */
-@RestController
-@RequestMapping("/api/teacher/library/V1")
-@Api(value = "在馆老师端app的接口v1", tags = "在馆老师端app的接口v1")
-public class TeacherLibraryController extends BaseController {
-
-    private Logger logger = LoggerFactory.getLogger(this.getClass());
-
-    @Autowired
-    private TokenManager tokenManager;
-
-    @Reference(version = "1.0" ,timeout = 60000)
-    private TeacherLibraryService teacherLibraryService;
-    @Reference(version = "1.0" ,timeout = 60000)
-    private IBookManagerService bookManagerService;
-    @Reference(version = "1.0" ,timeout = 60000)
-    private HomeworkService homeworkService;
-    @Reference(version = "1.0" ,timeout = 60000)
-    private ParentService parentService;
-    @Reference(version = "1.0" ,timeout = 60000)
-    private UserService userService;
-
-    @RequestMapping(value = "/libraryMyInfo", method = RequestMethod.POST)
-    @ApiOperation(value = "我的信息", httpMethod = "POST", notes = "我的信息")
-    public ResponseEntity libraryMyInfo(@RequestParam(required = true) String accessToken) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            String userId = tokenManager.getUserId(accessToken);
-            TbLibManager libManager = bookManagerService.findByUserId(userId,2);
-            Map<String, Object> data = new HashMap<>();
-            if(StringUtils.isNotBlank(libManager.getName())) {
-                data.put("photo",libManager.gettPhoto());
-                data.put("name",libManager.getName());
-            }else {
-                User user = userService.getById(libManager.getUserId());
-                data.put("photo",user.getPhoto());
-                data.put("name",user.getName());
-            }
-            responseEntity.success(data,"成功");
-        } catch (Exception e) {
-            logger.error("异常", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/noFinishTaskList", method = RequestMethod.POST)
-    @ApiOperation(value = "我的任务-未完成列表", httpMethod = "POST", notes = "我的任务-未完成列表")
-    public ResponseEntity noFinishTaskList(@RequestParam(required = true) String accessToken) {
-        ResponseEntity responseEntity;
-        try {
-            String userId = tokenManager.getUserId(accessToken);
-            responseEntity = teacherLibraryService.noFinishTaskListV1(userId);
-        } catch (Exception e) {
-            logger.error("异常", e);
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/finishTaskList", method = RequestMethod.POST)
-    @ApiOperation(value = "我的任务-已完成列表", httpMethod = "POST", notes = "我的任务-已完成列表")
-    public ResponseEntity finishTaskList(@RequestParam(required = true) String accessToken) {
-        ResponseEntity responseEntity;
-        try {
-            String userId = tokenManager.getUserId(accessToken);
-            responseEntity = teacherLibraryService.finishTaskListV1(userId);
-        } catch (Exception e) {
-            logger.error("异常", e);
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/noConfirmStudentList", method = RequestMethod.POST)
-    @ApiOperation(value = "未选定学生列表", httpMethod = "POST", notes = "未选定学生列表")
-    public ResponseEntity uploadConchInitInfo(@RequestParam(required = true) String accessToken) {
-        ResponseEntity responseEntity;
-        try {
-            String userId = tokenManager.getUserId(accessToken);
-            responseEntity = teacherLibraryService.findNoConfirmStudentList(userId);
-        } catch (Exception e) {
-            logger.error("异常", e);
-            responseEntity = new ResponseEntity();
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/confirmStudents", method = RequestMethod.POST)
-    @ApiOperation(value = "选定学生", httpMethod = "POST", notes = "选定学生")
-    public ResponseEntity confirmStudents(@RequestParam(required = true) String accessToken, @RequestBody VipIdListReq req) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            String userId = tokenManager.getUserId(accessToken);
-            responseEntity= teacherLibraryService.confirmStudents(userId,req.getVipIdList());
-        } catch (Exception e) {
-            logger.error("异常", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/questionPictureDetail", method = RequestMethod.POST)
-    @ApiOperation(value = "作业模糊/不全照片详情", httpMethod = "POST", notes = "作业模糊/不全照片详情")
-    public ResponseEntity questionPictureDetail(@RequestParam(required = true) String accessToken, @RequestBody QuestionRequest req) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            String userId = tokenManager.getUserId(accessToken);
-            responseEntity=teacherLibraryService.findquestionPictureList(userId,req);
-            responseEntity.success("成功");
-        } catch (Exception e) {
-            logger.error("异常", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/getStudentHomeworkData", method = RequestMethod.POST)
-    @ApiOperation(value = "获取学生作业编辑数据", httpMethod = "POST", notes = "获取学生作业编辑数据")
-    public ResponseEntity getStudentHomeworkData(@RequestParam(required = true) String accessToken, @RequestBody HomeworkDataRequest homeworkDataRequest) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            String userId = tokenManager.getUserId(accessToken);
-            HomeworkDataDto homeworkDataDto = teacherLibraryService.getHomeworkData(homeworkDataRequest.getVipId(), userId);
-            responseEntity.success(homeworkDataDto, "请求成功");
-        } catch (Exception e) {
-            logger.error("异常", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/sumbitStudentHomework", method = RequestMethod.POST)
-    @ApiOperation(value = "学生作业编辑提交", httpMethod = "POST", notes = "学生作业编辑提交")
-    public ResponseEntity sumbitStudentHomework(@RequestParam(required = true) String accessToken, @RequestBody @Valid HomeworkDataSubmitRequest req) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            responseEntity = teacherLibraryService.saveHomeworkSituation(req,accessToken);
-        } catch (Exception e) {
-            logger.error("异常", e);
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @ApiOperation(value = "查询所有状态学生列表")
-    @RequestMapping(value = "allStudentList", method = RequestMethod.POST)
-    public ResponseEntity allStudentList(@RequestParam(name = "accessToken") String accessToken,
-                                         @RequestBody @Valid StudentNameReq req) {
-
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            String teacherId = tokenManager.getUserId(accessToken);
-            return teacherLibraryService.findAllStudentList(req, teacherId);
-        } catch (Exception e) {
-            logger.error("查询所有状态学生列表", e);
-            responseEntity.failure(ResponseConstant.CODE_000, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @ApiOperation(value = "查询签到/签离学生列表")
-    @RequestMapping(value = "signStudentList", method = RequestMethod.POST)
-    public ResponseEntity signStudentList(@RequestParam(name = "accessToken") String accessToken,
-                                          @RequestBody @Valid SignStudentListReq req) {
-
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            String teacherId = tokenManager.getUserId(accessToken);
-            return teacherLibraryService.findSignStudentList(req, teacherId);
-        } catch (Exception e) {
-            logger.error("查询签到/签离学生列表异常", e);
-            responseEntity.failure(ResponseConstant.CODE_000, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @ApiOperation(value = "签到/签离")
-    @ModifySecurity
-    @RequestMapping(value = "sign", method = RequestMethod.POST)
-    public ResponseEntity sign(@RequestParam(name = "accessToken") String accessToken,
-                                 @RequestBody @Valid SignReq req) {
-
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            String confirmUserId = tokenManager.getUserId(accessToken);
-            TbLibManager tbLibManager = bookManagerService.findByUserIdAndType(confirmUserId, 2);
-            if (tbLibManager == null) {
-                return responseEntity.failure("不是在馆老师,无权限签到");
-            }
-            return teacherLibraryService.sign(req, confirmUserId, tbLibManager.getLibId());
-        } catch (Exception e) {
-            logger.error("老师为学生签到异常", e);
-            responseEntity.failure(ResponseConstant.CODE_000, "系统繁忙,请稍后重试");
-        }
-
-        return responseEntity;
-    }
-
-    @ApiOperation(value = "学生往期反馈记录列表")
-    @RequestMapping(value = "feedbackHistory", method = RequestMethod.POST)
-    public ResponseEntity feedbackHistory(@RequestParam(name = "accessToken") String accessToken,
-                                          @RequestBody @Valid FeedbackPageReq req) {
-
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            return teacherLibraryService.findFeedbackHistory(req, initPage(req.getPageNo(), req.getPageSize()));
-        } catch (Exception e) {
-            logger.error("查询学生往期反馈记录列表异常", e);
-            responseEntity.failure(ResponseConstant.CODE_000, "系统繁忙,请稍后重试");
-        }
-
-        return responseEntity;
-    }
-
-    @ApiOperation(value = "学生往期记录详情")
-    @RequestMapping(value = "feedbackDetail", method = RequestMethod.POST)
-    public ResponseEntity feedbackDetail(@RequestParam(name = "accessToken") String accessToken,
-                                         @RequestBody @Valid FeedbackDetailReq req) {
-
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            return teacherLibraryService.findFeedbackDetail(req);
-        } catch (Exception e) {
-            logger.error("学生往期记录详情异常", e);
-            responseEntity.failure(ResponseConstant.CODE_000, "系统繁忙,请稍后重试");
-        }
-
-        return responseEntity;
-    }
-
-    @RequestMapping(value = "/correctDetail3", method = RequestMethod.POST)
-    @ApiOperation(value = "单科批改详情3", httpMethod = "POST", notes = "单科批改详情3")
-    public ResponseEntity correctDetail3(@RequestParam(name = "accessToken") String accessToken, @RequestBody CorrectDetailReq req) {
-        ResponseEntity responseEntity = new ResponseEntity();
-
-        try {
-            CorrectDetailDto4 correctDetailDto4 = parentService.correctDetail4(req.getVipId(), req.getSubject(), req.getDate());
-            Map<String, Object> resultMap = null;
-            if (correctDetailDto4 != null) {
-                resultMap = new HashMap<>();
-                Homework homework = homeworkService.getById(correctDetailDto4.getHomeworkId());
-                resultMap.put("subject", homework.getSubject());
-                resultMap.put("homeworkId", homework.getId());
-                resultMap.put("homeworkTime", homeworkService.getHomeworkTime(homework));
-                resultMap.put("correctTeacherId", correctDetailDto4.getCorrectTeacherId());
-                resultMap.put("correctionStatus", correctDetailDto4.getCorrectionStatus());
-                resultMap.put("homeworkList", correctDetailDto4.getHomeworkList());
-                resultMap.put("homeworkCommentList", correctDetailDto4.getHomeworkCommentList());
-                resultMap.put("wrongItemList", correctDetailDto4.getWrongItemList());
-                resultMap.put("wrongQuestionCount", correctDetailDto4.getWrongQuestionCount());
-                resultMap.put("relateKnowledgeList", correctDetailDto4.getRelateKnowledgeList());
-                resultMap.put("unfinishedList", correctDetailDto4.getUnfinishedList());
-            }
-            responseEntity.success(resultMap, "查询成功");
-        } catch (Exception e) {
-            logger.error("查询单科批改详情异常", e);
-            logger.error("请求参数:{}", req.toString());
-            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
-        }
-
-        return responseEntity;
-    }
-
-    @ApiOperation(value = "错题本知识点模块")
-    @RequestMapping(value = "/wrongQuestionKnowModuleList", method = RequestMethod.POST)
-    public ResponseEntity wrongQuestionKnowModuleList(@RequestParam(name = "accessToken") String accessToken,
-                                                      @RequestBody @Valid ModuleReq req) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            List<String> moduleList = teacherLibraryService.findWrongQuestionKnowModuleList(req);
-            List<Map<String, Object>> resultList = new ArrayList<>();
-            moduleList.stream()
-                    .filter(StringUtils::isNotBlank)
-                    .forEach(it -> resultList.add(Collections.singletonMap("moduleName", it)));
-            responseEntity.success(Collections.singletonMap("list", resultList), "查询成功");
-        } catch (Exception e) {
-            logger.error("查询错题本知识点模块异常", e);
-            logger.error("请求参数:vipId={}, subject={}", req.getVipId(), req.getSubject());
-            responseEntity.failure(ResponseConstant.CODE_000, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @ApiOperation(value = "错题本知识点列表")
-    @RequestMapping(value = "/wrongQuestionKnowledgeList", method = RequestMethod.POST)
-    public ResponseEntity wrongQuestionKnowledgeList(@RequestParam(name = "accessToken") String accessToken,
-                                                      @RequestBody @Valid WrongQuestionV2Req req) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            Pageable pageable = initPage(req.getPageNo(), req.getPageSize());
-            com.ssj.framework.basic.common.bean.Page<WrongBookKnowledgeDTO2> wrongQuestionKnowledgePage = teacherLibraryService.findWrongQuestionKnowledgePage(req, pageable);
-            responseEntity.success(wrongQuestionKnowledgePage, "查询成功");
-        } catch (Exception e) {
-            logger.error("查询错题本知识点列表异常", e);
-            logger.error("请求参数:req={}", req);
-            responseEntity.failure(ResponseConstant.CODE_000, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @ApiOperation(value = "错题本错题列表")
-    @RequestMapping(value = "/wrongBookQuestionList", method = RequestMethod.POST)
-    public ResponseEntity wrongBookQuestionList(@RequestParam(name = "accessToken") String accessToken,
-                                                @RequestBody @Valid WrongBookQuestionReq3 req) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            Pageable pageable = initPage(req.getPageNo(), req.getPageSize());
-            Page<WrongBookQuestionDTO> wrongBookQuestionPage = teacherLibraryService.findWrongBookQuestionPage(req, pageable);
-            responseEntity.success(wrongBookQuestionPage, "查询成功");
-        } catch (Exception e) {
-            logger.error("查询错题本错题列表异常", e);
-            logger.error("请求参数:vipId={}, knowHowDetailList={}", req.getVipId(), req.getKnowHowDetailList());
-            responseEntity.failure(ResponseConstant.CODE_000, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-    @ApiOperation(value = "查询错题原题和推荐的题")
-    @RequestMapping(value = "/wrongAndRecommendQuestionList", method = RequestMethod.POST)
-    public ResponseEntity findWrongAndRecommendQuestionList(@RequestParam(name = "accessToken") String accessToken,
-                                                            @RequestBody @Valid WrongBookQuestionListReq req) {
-        ResponseEntity responseEntity = new ResponseEntity();
-        try {
-            return teacherLibraryService.findWrongAndRecommendQuestionList(req);
-        } catch (Exception e) {
-            logger.error("查询错题原题和推荐的题异常", e);
-            logger.error("请求参数:{}", req.toString());
-            responseEntity.failure(ResponseConstant.CODE_000, "系统繁忙,请稍后重试");
-        }
-        return responseEntity;
-    }
-
-}

+ 0 - 55
ssj-aijia-api/src/main/resources/META-INF/resources/swagger-ui.html

@@ -1,55 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-    <meta charset="UTF-8">
-    <title>私塾家API文档</title>
-    <link rel="icon" type="image/png" href="./favicon.ico" sizes="32x32"/>
-    <link href='webjars/springfox-swagger-ui/css/typography.css' media='screen' rel='stylesheet' type='text/css'/>
-    <link href='webjars/springfox-swagger-ui/css/reset.css' media='screen' rel='stylesheet' type='text/css'/>
-    <link href='webjars/springfox-swagger-ui/css/screen.css' media='screen' rel='stylesheet' type='text/css'/>
-    <link href='webjars/springfox-swagger-ui/css/reset.css' media='print' rel='stylesheet' type='text/css'/>
-    <link href='webjars/springfox-swagger-ui/css/print.css' media='print' rel='stylesheet' type='text/css'/>
-
-    <script src='webjars/springfox-swagger-ui/lib/object-assign-pollyfill.js' type='text/javascript'></script>
-    <script src='webjars/springfox-swagger-ui/lib/jquery-1.8.0.min.js' type='text/javascript'></script>
-    <script src='webjars/springfox-swagger-ui/lib/jquery.slideto.min.js' type='text/javascript'></script>
-    <script src='webjars/springfox-swagger-ui/lib/jquery.wiggle.min.js' type='text/javascript'></script>
-    <script src='webjars/springfox-swagger-ui/lib/jquery.ba-bbq.min.js' type='text/javascript'></script>
-    <script src='webjars/springfox-swagger-ui/lib/handlebars-4.0.5.js' type='text/javascript'></script>
-    <script src='webjars/springfox-swagger-ui/lib/lodash.min.js' type='text/javascript'></script>
-    <script src='webjars/springfox-swagger-ui/lib/backbone-min.js' type='text/javascript'></script>
-    <script src='webjars/springfox-swagger-ui/swagger-ui.min.js' type='text/javascript'></script>
-    <script src='webjars/springfox-swagger-ui/lib/highlight.9.1.0.pack.js' type='text/javascript'></script>
-    <script src='webjars/springfox-swagger-ui/lib/highlight.9.1.0.pack_extended.js' type='text/javascript'></script>
-    <script src='webjars/springfox-swagger-ui/lib/jsoneditor.min.js' type='text/javascript'></script>
-    <script src='webjars/springfox-swagger-ui/lib/marked.js' type='text/javascript'></script>
-    <script src='webjars/springfox-swagger-ui/lib/swagger-oauth.js' type='text/javascript'></script>
-    <script src='webjars/springfox-swagger-ui/springfox.js' type='text/javascript'></script>
-
-    <!--国际化操作:选择中文版 -->
-    <script src='webjars/springfox-swagger-ui/lang/translator.js' type='text/javascript'></script>
-    <script src='webjars/springfox-swagger-ui/lang/zh-cn.js' type='text/javascript'></script>
-
-</head>
-
-<body class="swagger-section">
-<div id='header'>
-    <div class="swagger-ui-wrap">
-        <a id="logo" href="http://swagger.io">
-            <img class="logo__img" alt="swagger" height="30" width="30" src="./favicon.ico" />
-            <span class="logo__title">爱加接口公共api</span></a>
-        <form id='api_selector'>
-            <div class='input'>
-                <select id="select_baseUrl" name="select_baseUrl"></select>
-            </div>
-            <div class='input'><input placeholder="http://example.com/api" id="input_baseUrl" name="baseUrl" type="text"/></div>
-            <div id='auth_container'></div>
-            <div class='input'><a id="explore" class="header__btn" href="#" data-sw-translate>Explore</a></div>
-        </form>    
-    </div>
-</div>
-
-<div id="message-bar" class="swagger-ui-wrap" data-sw-translate> </div>
-<div id="swagger-ui-container" class="swagger-ui-wrap"></div>
-</body>
-</html>

+ 0 - 57
ssj-aijia-api/src/main/resources/META-INF/resources/webjars/springfox-swagger-ui/lang/zh-cn.js

@@ -1,57 +0,0 @@
-'use strict';
-
-/* jshint quotmark: double */
-window.SwaggerTranslator.learn({
-    "Warning: Deprecated":"警告:已过时",
-    "Implementation Notes":"实现备注",
-    "Response Class":"响应类",
-    "Status":"状态",
-    "Parameters":"参数",
-    "Parameter":"参数",
-    "Value":"值",
-    "Description":"描述",
-    "Parameter Type":"参数类型",
-    "Data Type":"数据类型",
-    "Response Messages":"响应消息",
-    "HTTP Status Code":"HTTP状态码",
-    "Reason":"原因",
-    "Response Model":"响应模型",
-    "Request URL":"请求URL",
-    "Request Headers":"请求头",
-    "Response Body":"响应体",
-    "Response Code":"响应码",
-    "Response Headers":"响应头",
-    "Hide Response":"隐藏响应",
-    "Headers":"头",
-    "Try it out!":"试一下!",
-    "Show/Hide":"显示/隐藏",
-    "List Operations":"显示操作",
-    "Expand Operations":"展开操作",
-    "Raw":"原始",
-    "can't parse JSON.  Raw result":"无法解析JSON. 原始结果",
-    "Example Value":"示例",
-    "Click to set as parameter value":"点击设置参数",
-    "Model Schema":"模型架构",
-    "Model":"模型",
-    "apply":"应用",
-    "Username":"用户名",
-    "Password":"密码",
-    "Terms of service":"服务条款",
-    "Created by":"创建者",
-    "See more at":"查看更多:",
-    "Contact the developer":"联系开发者",
-    "api version":"api版本",
-    "Response Content Type":"响应Content Type",
-    "Parameter content type:":"参数类型:",
-    "fetching resource":"正在获取资源",
-    "fetching resource list":"正在获取资源列表",
-    "Explore":"浏览",
-    "Show Swagger Petstore Example Apis":"显示 Swagger Petstore 示例 Apis",
-    "Can't read from server.  It may not have the appropriate access-control-origin settings.":"无法从服务器读取。可能没有正确设置access-control-origin。",
-    "Please specify the protocol for":"请指定协议:",
-    "Can't read swagger JSON from":"无法读取swagger JSON于",
-    "Finished Loading Resource Information. Rendering Swagger UI":"已加载资源信息。正在渲染Swagger UI",
-    "Unable to read api":"无法读取api",
-    "from path":"从路径",
-    "server returned":"服务器返回"
-});

+ 0 - 98
ssj-aijia-api/src/main/resources/META-INF/resources/wifi/css/wifi.css

@@ -1,98 +0,0 @@
-*{
-	margin: 0;
-	padding: 0;
-}
-.header {
-	display: flex;
-	display: -webkit-flex;
-	-webkit-justify-content: flex-end;
-	justify-content: flex-end;
-	-webkit-align-items: center;
-	align-items: center;
-}
-.header-icon {
-	width: 18px;
-	height: 18px;
-	padding: 12px;
-}
-.header-text {
-	font-size: 16px;
-	font-weight: bold;
-	color: #FF6465;
-	padding: 12px;
-}
-.img {
-	width: 100%;
-	text-align: center;
-	margin: 0 auto 15px auto;
-}
-.img img {
-	width: 175px;
-	height: 175px;
-}
-.context {
-	margin: 15px auto 10px auto;
-	text-align: center;
-	padding: 0 24px;
-	font-size: 16px;
-	font-weight: bold;
-	color: #393939;
-	word-break: break-all;
-}
-.context-red {
-	margin: 15px auto 10px auto;
-	text-align: center;
-	padding: 0 24px;
-	font-size: 16px;
-	font-weight: bold;
-	color: #FF6465;
-	display: none;
-}
-.input-container {
-	margin: 0 24px;
-	background: rgba(241,243,250,1);
-	border-radius: 5px;
-	padding: 12px;
-	display: flex;
-	display: -webkit-flex;
-	-webkit-justify-content: flex-start;
-	justify-content: flex-start;
-	-webkit-align-items: center;
-	align-items: center;
-}
-.input-label {
-	color: #7C819D;
-	font-size: 16px;
-	margin-right: 24px;
-}
-.input {
-	flex: 1;
-	-webkit-flex: 1;
-	border: none;
-	outline: none;
-	padding: 5px 0;
-	font-size: 16px;
-	color: #393939;
-	background: rgba(241,243,250,1);
-}
-.page1 {
-	display: block;
-}
-.page2 {
-	display: none;
-	text-align: center;
-}
-.logo {
-	width: 100px;
-	height: 120px;
-	margin: 35px auto 65px auto;
-}
-.text {
-	margin-bottom: 15px;
-	color: #393939;
-	font-size: 25px;
-}
-.icon {
-	width: 40px;
-	height: 40px;
-}

BIN
ssj-aijia-api/src/main/resources/META-INF/resources/wifi/img/12.png


BIN
ssj-aijia-api/src/main/resources/META-INF/resources/wifi/img/close_red.png


BIN
ssj-aijia-api/src/main/resources/META-INF/resources/wifi/img/logo.png


BIN
ssj-aijia-api/src/main/resources/META-INF/resources/wifi/img/pdlogo.png


BIN
ssj-aijia-api/src/main/resources/META-INF/resources/wifi/img/wifi_icon.png


BIN
ssj-aijia-api/src/main/resources/META-INF/resources/wifi/img/xuan_zhong.png


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 5
ssj-aijia-api/src/main/resources/META-INF/resources/wifi/js/jquery.min.js


+ 0 - 50
ssj-aijia-api/src/main/resources/META-INF/resources/wifi/js/pdwifi.js

@@ -1,50 +0,0 @@
-;$(function(){
-	var queryString = function (val) {
-		var uri = window.location.search;
-		var re = new RegExp("" +val+ "=([^&?]*)", "ig");
-		return ((uri.match(re)) ? (uri.match(re)[0].substr(val.length+1)):null);
-	};
-	var derver = queryString('derver');
-	var wifiName = queryString('wifiName');
-    var type = queryString('type');
-	if (wifiName) {
-		$('#account').text(decodeURI(wifiName));
-	}
-	$('#password').on('keyup', function () {
-		var password = $('#password').val();
-		if (password) {
-			$('#tips').hide();
-		}
-	})
-	$('#submitPassword').on('click', function () {
-		var password = $('#password').val();
-		var exp = /^[\w]{8,}$/;
-		if (password == '') {
-			$('#tips').show();
-			$('#tips').text('请输入wifi密码')
-			return
-		} else if (!exp.test(password)) {
-			$('#tips').show();
-			$('#tips').text('wifi密码只能输入字母和数字并且最少八位');
-		} else {
-			$('#tips').hide();
-		}
-
-		var url = '../api/pdconch/conch/connectWifi';
-        var data = { derver: derver, wifiName: wifiName, password: password,type:type };
-		$.ajax({
-			type: "post",
-			url: url,
-			async: true,
-            data: JSON.stringify(data),
-            contentType: "application/json",
-			success: function (res) {
-				if (res.code == '999') {
-					$('.header').hide();
-					$('.page1').hide();
-					$('.page2').show();
-				}
-			}
-		});
-	})
-});

+ 0 - 54
ssj-aijia-api/src/main/resources/META-INF/resources/wifi/js/wifi.js

@@ -1,54 +0,0 @@
-;$(function(){
-	var queryString = function (val) {
-		var uri = window.location.search;
-		var re = new RegExp("" +val+ "=([^&?]*)", "ig");
-		return ((uri.match(re)) ? (uri.match(re)[0].substr(val.length+1)):null);
-	};
-	var derver = queryString('derver');
-	var wifiName = queryString('wifiName');
-    var type = queryString('type');
-    //数据来源
-    var source = queryString('source');
-	if (wifiName) {
-		$('#account').text(decodeURI(wifiName));
-	}
-	$('#password').on('keyup', function () {
-		var password = $('#password').val();
-		if (password) {
-			$('#tips').hide();
-		}
-	})
-	$('#submitPassword').on('click', function () {
-		var password = $('#password').val();
-		var exp = /^[\w]{8,}$/;
-		if (password == '') {
-			$('#tips').show();
-			$('#tips').text('请输入wifi密码')
-			return
-		} else if (!exp.test(password)) {
-			$('#tips').show();
-			$('#tips').text('wifi密码只能输入字母和数字并且最少八位');
-		} else {
-			$('#tips').hide();
-		}
-        //var url = window.location.origin + '/api/parents/parents/V1/connectWifi';
-        url = 'https://t.sharingschool.com/sz/api/parents/parents/V1/connectWifi';
-        if(source == 'test'){
-            var url = 'https://xt.sharingschool.com/sz/api/parents/parents/V1/connectWifi';
-        }
-        var data = { derver: derver, wifiName: wifiName, password: password,type:type };
-		$.ajax({
-			type: "post",
-			url: url,
-			async: true,
-            data: JSON.stringify(data),
-            contentType: "application/json",
-			success: function (res) {
-				if (res.code == '999') {
-					$('.page1').hide();
-					$('.page2').show();
-				}
-			}
-		});
-	})
-});

+ 0 - 36
ssj-aijia-api/src/main/resources/META-INF/resources/wifi/pdwifi.html

@@ -1,36 +0,0 @@
-<!DOCTYPE html>
-<html>
-	<head>
-	    <link rel="icon" type="image/png" href="img/pdlogo.png" sizes="32x32"/>
-		<meta charset="UTF-8">
-		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
-		<title>晓方块wifi连接</title>
-		<link rel="stylesheet" type="text/css" href="css/wifi.css"/>
-	</head>
-	<body>
-		<div class="container">
-			<div class="header">
-				<!--<img class="header-icon" src="img/close_red.png"/>-->
-				<div class="header-text" id="submitPassword">保存</div>
-			</div>
-			<div class="page1">
-				<div class="img">
-					<img src="img/wifi_icon.png"/>
-				</div>
-				<div class="context" id="account">wifi账号</div>
-				<div class="input-container">
-					<div class="input-label">密码</div>
-					<input class="input" type="text" name="password" id="password" value="" placeholder="输入wifi密码"/>
-				</div>
-				<div class="context-red" id="tips">请输入wifi密码</div>
-			</div>
-			<div class="page2">
-				<img style="margin: 35px auto 65px auto;    width: 200px;" src="img/pdlogo.png"/>
-				<div class="text">发送成功</div>
-				<img style=" width: 40px;" src="img/12.png"/>
-			</div>
-		</div>
-		<script src="js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
-		<script src="js/pdwifi.js" type="text/javascript" charset="utf-8"></script>
-	</body>
-</html>

+ 0 - 36
ssj-aijia-api/src/main/resources/META-INF/resources/wifi/wifi.html

@@ -1,36 +0,0 @@
-<!DOCTYPE html>
-<html>
-	<head>
-		<meta charset="UTF-8">
-		  <link rel="icon" type="image/png" href="../favicon.ico" sizes="32x32"/>
-		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
-		<title>小塾wifi密码保存</title>
-		<link rel="stylesheet" type="text/css" href="css/wifi.css"/>
-	</head>
-	<body>
-		<div class="container">
-			<div class="page1">
-				<div class="header">
-					<!--<img class="header-icon" src="img/close_red.png"/>-->
-					<div class="header-text" id="submitPassword">保存</div>
-				</div>
-				<div class="img">
-					<img src="img/wifi_icon.png"/>
-				</div>
-				<div class="context" id="account">wifi账号</div>
-				<div class="input-container">
-					<div class="input-label">密码</div>
-					<input class="input" type="text" name="password" id="password" value="" placeholder="输入wifi密码"/>
-				</div>
-				<div class="context-red" id="tips">请输入wifi密码</div>
-			</div>
-			<div class="page2">
-				<img class="logo" src="img/logo.png"/>
-				<div class="text">发送成功</div>
-				<img class="icon" src="img/xuan_zhong.png"/>
-			</div>
-		</div>
-		<script src="js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
-		<script src="js/wifi.js" type="text/javascript" charset="utf-8"></script>
-	</body>
-</html>

+ 0 - 24
ssj-aijia-api/src/main/resources/application.properties

@@ -1,24 +0,0 @@
-spring.application.name=ssj-aijia-consumer
-server.port=8080
-logger.level=error
-dubbo.scan.base-packages=com.ssj
-dubbo.application.id=ssj-aijia-consumer
-dubbo.application.name=ssj-aijia-consumer
-#dubbo¼¯Èº·½Ê½
-dubbo.consumer.cluster=failfast
-dubbo.comsumer.retries=0
-dubbo.consumer.check=false
-
-
-spring.profiles.active=common,@activatedProperties@
-
-spring.mvc.static-path-pattern=/static/**   
-
-
-
-spring.thymeleaf.prefix=classpath:/templates/
-spring.thymeleaf.suffix=.html
-spring.thymeleaf.mode=HTML5
-spring.thymeleaf.encoding=UTF-8
-spring.thymeleaf.servlet.content-type=text/html
-spring.thymeleaf.cash=false

Fichier diff supprimé car celui-ci est trop grand
+ 0 - 156
ssj-aijia-api/src/test/java/TestRAS.java


+ 0 - 15
ssj-aijia-api/src/test/java/TestVoice.java

@@ -1,15 +0,0 @@
-import com.ssj.framework.basic.utils.EncryptUtil;
-import com.ssj.service.weixin.library.dto.SubjectMyInfoDto;
-import org.apache.commons.collections.CollectionUtils;
-import org.apache.commons.lang3.StringUtils;
-
-import java.math.BigDecimal;
-import java.util.*;
-import java.util.stream.Collectors;
-
-public class TestVoice {
-    public static void main(String[] args) {
-        String s="第二学期";
-        System.out.println(s.contains("第二学期"));
-    }
-}

+ 0 - 79
ssj-aijia-api/src/test/java/UserTest.java

@@ -1,79 +0,0 @@
-//import io.swagger.client.model.NewPassword;
-//import io.swagger.client.model.RegisterUsers;
-//import io.swagger.client.model.User;
-//import org.junit.Assert;
-//import org.junit.Test;
-//import org.slf4j.Logger;
-//import org.slf4j.LoggerFactory;
-//
-//import com.ssj.conch.easemob.impl.EasemobIMUsers;
-//
-//import java.util.Random;
-//
-//public class UserTest {
-//
-//    private static final Logger logger = LoggerFactory.getLogger(UserTest.class);
-//    private EasemobIMUsers easemobIMUsers = new EasemobIMUsers();
-//
-//    @Test
-//    public void createUser() {
-//        RegisterUsers users = new RegisterUsers();
-//        User user = new User().username("aaaa123456" + new Random().nextInt(500)).password("123456");
-//        User user1 = new User().username("aaa123456" + new Random().nextInt(500)).password("123456");
-//        users.add(user);
-//        users.add(user1);
-//        Object result = easemobIMUsers.createNewIMUserSingle(users);
-//        logger.info(result.toString());
-//        Assert.assertNotNull(result);
-//    }
-//
-//    @Test
-//    public void getUserByName() {
-//        String userName = "15474584287770";
-//        Object result = easemobIMUsers.getIMUserByUserName(userName);
-//        logger.info(result.toString());
-//    }
-//
-//    @Test
-//    public void gerUsers() {
-//        Object result = easemobIMUsers.getIMUsersBatch(5L, null);
-//        logger.info(result.toString());
-//    }
-//
-//    @Test
-//    public void changePassword() {
-//        String userName = "stringa";
-//        NewPassword psd = new NewPassword().newpassword("123");
-//        Object result = easemobIMUsers.modifyIMUserPasswordWithAdminToken(userName, psd);
-//        logger.info(result.toString());
-//    }
-//
-//    @Test
-//    public void getFriend() {
-//        String userName = "stringa";
-//        Object result = easemobIMUsers.getFriends(userName);
-//        logger.info(result.toString());
-//    }
-//    
-//    @Test
-//    public void addFriendSingle() {
-//        String userName = "2413890486";
-//        Object result = easemobIMUsers.addFriendSingle(userName,"5950904952");
-//        logger.info(result.toString());
-//    }
-//    
-//    @Test
-//    public void getIMUserStatus() {
-//        String userName = "3917621895";
-//        Object result = easemobIMUsers.getIMUserStatus(userName);
-//        logger.info(result.toString());
-//    }
-//    
-//    @Test
-//    public void deleteIMUserByUserName() {
-//        String userName = "15487278157280";
-//        Object result = easemobIMUsers.deleteIMUserByUserName(userName);
-//        logger.info(result.toString());
-//    }
-//    
-//}

BIN
ssj-bean/target/classes/com/ssj/bean/conch/conch/dto/KmtQuestionDto.class


BIN
ssj-common-common/target/classes/com/ssj/conch/util/AIServiceUtils.class


BIN
ssj-common-common/target/classes/com/ssj/framework/core/util/CachingConfig$1.class


BIN
ssj-common-common/target/classes/com/ssj/framework/core/util/CachingConfig$2.class


BIN
ssj-common-common/target/classes/com/ssj/framework/core/util/CachingConfig$3.class


BIN
ssj-common-common/target/classes/com/ssj/framework/core/util/CachingConfig$4.class


BIN
ssj-common-common/target/classes/com/ssj/framework/core/util/CachingConfig$5.class


BIN
ssj-common-common/target/classes/com/ssj/framework/core/util/CachingConfig$6.class


BIN
ssj-common-common/target/classes/com/ssj/framework/core/util/Constant.class


+ 0 - 51
ssj-common-xinge/pom.xml

@@ -1,51 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>ssj</artifactId>
-        <groupId>com.ssj</groupId>
-        <version>0.0.1-SNAPSHOT</version>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>ssj-common-xinge</artifactId>
-
-    <description>common-xinge</description>
-    <packaging>jar</packaging>
-    <dependencies>
-        <dependency>
-            <groupId>com.ssj</groupId>
-            <artifactId>ssj-common-common</artifactId>
-            <version>0.0.1-SNAPSHOT</version>
-        </dependency>
-        <dependency>
-            <groupId>com.google.code.gson</groupId>
-            <artifactId>gson</artifactId>
-            <version>2.8.5</version>
-        </dependency>
-        <dependency>
-            <groupId>org.json</groupId>
-            <artifactId>json</artifactId>
-            <version>20140107</version>
-        </dependency>
-    </dependencies>
-    <build>
-        <resources>
-            <resource>
-                <directory>src/main/java</directory>
-                <includes>
-                    <include>**/*.xml</include>
-                </includes>
-            </resource>
-            <resource>
-                <directory>src/main/resources</directory>
-                <includes>
-                    <include>**.*</include>
-                    <include>**/*.*</include><!-- i18n能读取到 -->
-                    <include>**/*/*.*</include>
-                </includes>
-            </resource>
-        </resources>
-    </build>
-</project>

+ 0 - 175
ssj-common-xinge/src/main/java/com/ssj/conch/push/util/xinge/api/RESTAPI.java

@@ -1,175 +0,0 @@
-package com.ssj.conch.push.util.xinge.api;
-
-/**
- * v2 REST API
- *
- */
-public class RESTAPI {
-
-  /**
-   * POST 请求方式
-   */
-  
-  public static final String HTTP_POST = "POST";
-  /**
-   * GET 请求方式<br>
-   * v2支持, v3不支持
-   */
-  public static final String HTTP_GET = "GET";
-
-  public static final int DEVICE_ALL = 0;
-  public static final int DEVICE_BROWSER = 1;
-  public static final int DEVICE_PC = 2;
-  public static final int DEVICE_ANDROID = 3;
-  public static final int DEVICE_IOS = 4;
-  public static final int DEVICE_WINPHONE = 5;
-
-  public static final int IOSENV_PROD = 1;
-  public static final int IOSENV_DEV = 2;
-
-  public static final long IOS_MIN_ID = 2200000000L;
-
-  /**
-   * 接口域名
-   */
-  public static final String RESTAPI_DOMAINS = "http://openapi.xg.qq.com/";
-
-  /**
-   * 版本号 v2
-   */
-  public static final String RESTAPI_VERSIONS = "v2";
-
-  /**
-   * 设备单推,使用指定的一个设备标识(Device Token)进行消息的推送
-   */
-  public static final String RESTAPI_PUSHSINGLEDEVICE =
-      RESTAPI_DOMAINS + RESTAPI_VERSIONS + "/push/single_device";
-
-  /**
-   * 账号单推,指对通过客户端SDK绑定接口绑定的指定单个账号的推送,iOS和Android的SDK都提供相应的接口
-   */
-  public static final String RESTAPI_PUSHSINGLEACCOUNT =
-      RESTAPI_DOMAINS + RESTAPI_VERSIONS + "/push/single_account";
-
-  /**
-   * 账号群推,是指对通过客户端SDK绑定接口绑定的账号的群组推送,iOS和Android的SDK都提供相应的接口
-   */
-  public static final String RESTAPI_PUSHACCOUNTLIST =
-      RESTAPI_DOMAINS + RESTAPI_VERSIONS + "/push/account_list";
-
-  /**
-   * 全量推送<br>
-   * 此接口用于对全部设备推送消息,后台对本接口的调用频率有限制<br>
-   * 1)1小时内不能推相同内容的消息<br>
-   * 2)1小时内最多调用此接口30次 <br>
-   */
-  public static final String RESTAPI_PUSHALLDEVICE =
-      RESTAPI_DOMAINS + RESTAPI_VERSIONS + "/push/all_device";
-
-  /**
-   * 标签群推<br>
-   * 可以针对设置过标签的设备进行推送。如:性别、身份等<br>
-   */
-  public static final String RESTAPI_PUSHTAGS =
-      RESTAPI_DOMAINS + RESTAPI_VERSIONS + "/push/tags_device";
-
-  /**
-   * 查询消息状态<br>
-   * 此接口目前仅支持全量推送和标签群推消息的发送状态的查询,不支持其他推送方式的查询<br>
-   */
-  public static final String RESTAPI_QUERYPUSHSTATUS =
-      RESTAPI_DOMAINS + RESTAPI_VERSIONS + "/push/get_msg_status";
-
-  /**
-   * 查询应用覆盖的设备Token总数 <br>
-   * 此接口用来查询指定应用的全部已注册的设备标识(Device Token)的总数
-   */
-  public static final String RESTAPI_QUERYDEVICECOUNT =
-      RESTAPI_DOMAINS + RESTAPI_VERSIONS + "/application/get_app_device_num";
-
-  /**
-   * 查询全部标签 <br>
-   * 此接口用来查询当前指定应用下被设置的全部标签数量和对应的标签名
-   */
-  public static final String RESTAPI_QUERYTAGS =
-      RESTAPI_DOMAINS + RESTAPI_VERSIONS + "/tags/query_app_tags";
-
-  /**
-   * 取消推送<br>
-   * 目前V2版本支持根据消息ID来取消尚未触发的、定时的、全量推送或标签群推的推送消息
-   */
-  public static final String RESTAPI_CANCELTIMINGPUSH =
-      RESTAPI_DOMAINS + RESTAPI_VERSIONS + "/push/cancel_timing_task";
-
-  /**
-   * 批量新增标签<br>
-   * 批量新增标签,可以给多定的设备(Device Token)设置标签,但是一个 App 下面最多只能有1万个标签,若超出,此接口将返回失败
-   */
-  public static final String RESTAPI_BATCHSETTAG =
-      RESTAPI_DOMAINS + RESTAPI_VERSIONS + "/tags/batch_set";
-
-  /**
-   * 批量删除标签
-   */
-  public static final String RESTAPI_BATCHDELTAG =
-      RESTAPI_DOMAINS + RESTAPI_VERSIONS + "/tags/batch_del";
-
-  /**
-   * 查询单个指定设备的标签<br>
-   * 此接口根据设备标识(Device Token)来查询相应设备被设置的全部标签,请务必保证设备标识(Device Token)的合法性
-   */
-  public static final String RESTAPI_QUERYTOKENTAGS =
-      RESTAPI_DOMAINS + RESTAPI_VERSIONS + "/tags/query_token_tags";
-
-  /**
-   * 查询单个指定标签的Token总数
-   */
-  public static final String RESTAPI_QUERYTAGTOKENNUM =
-      RESTAPI_DOMAINS + RESTAPI_VERSIONS + "/tags/query_tag_token_num";
-
-  /**
-   * 超大批量账号群推
-   */
-  public static final String RESTAPI_CREATEMULTIPUSH =
-      RESTAPI_DOMAINS + RESTAPI_VERSIONS + "/push/create_multipush";
-
-  /**
-   * 使用超大批量推送接口进行消息推送
-   */
-  public static final String RESTAPI_PUSHACCOUNTLISTMULTIPLE =
-      RESTAPI_DOMAINS + RESTAPI_VERSIONS + "/push/account_list_multiple";
-
-  /**
-   * 设备群推是指,使用设备标识(Device Token)进行消息的推送
-   */
-  public static final String RESTAPI_PUSHDEVICELISTMULTIPLE =
-      RESTAPI_DOMAINS + RESTAPI_VERSIONS + "/push/device_list_multiple";
-
-  /**
-   * 查询指定设备Token的注册状态<br>
-   * 此接口是为了查询指定设备(Device Token)在信鸽服务器上注册的状态,<br>
-   * 设备能收到信鸽推送的消息的首要条件是设备(Device Token)已经被注册到信鸽的后台,<br>
-   * 否则信鸽无法给指定设备下发消息的
-   */
-  public static final String RESTAPI_QUERYINFOOFTOKEN =
-      RESTAPI_DOMAINS + RESTAPI_VERSIONS + "/application/get_app_token_info";
-
-  /**
-   * 查询单个账号关联的设备(暂可不用)
-   */
-  public static final String RESTAPI_QUERYTOKENSOFACCOUNT =
-      RESTAPI_DOMAINS + RESTAPI_VERSIONS + "/application/get_app_account_tokens";
-
-  /**
-   * 删除单个账号关联的单个设备Token
-   */
-  public static final String RESTAPI_DELETETOKENOFACCOUNT =
-      RESTAPI_DOMAINS + RESTAPI_VERSIONS + "/application/del_app_account_tokens";
-
-  /**
-   * 删除单个账号关联的全部设备Token
-   */
-  public static final String RESTAPI_DELETEALLTOKENSOFACCOUNT =
-      RESTAPI_DOMAINS + RESTAPI_VERSIONS + "/application/del_app_account_all_tokens";
-
-}

+ 0 - 33
ssj-common-xinge/src/main/java/com/ssj/conch/push/util/xinge/api/RESTAPI_V3.java

@@ -1,33 +0,0 @@
-package com.ssj.conch.push.util.xinge.api;
-
-/**
- * v3 REST API
- *
- */
-public class RESTAPI_V3 extends RESTAPI {
- 
-
-  /**
-   * 版本号 v3
-   */
-  public static final String RESTAPI_VERSIONS = "v3";
-  
-  /**
-   * 接口域名
-   */
-  public static final String RESTAPI_DOMAINS = "https://openapi.xg.qq.com/";
-  
-  
-  /**
-   * 所有推送目标都采用相同的 URL 发起请求
-   */
-  public static final String RESTAPI_PUSHSINGLEDEVICE =
-      RESTAPI_DOMAINS + RESTAPI_VERSIONS + "/push/app";
-  
-  /**
-   * v3/tag
-   */
-  public static final String RESTAPI_TAG =
-      RESTAPI_DOMAINS + RESTAPI_VERSIONS + "/device/tag";
-
-}

+ 0 - 35
ssj-common-xinge/src/main/java/com/ssj/conch/push/util/xinge/bean/AcceptTimePair.java

@@ -1,35 +0,0 @@
-package com.ssj.conch.push.util.xinge.bean;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import io.swagger.annotations.ApiModelProperty;
-
-/**
- * Created by Administrator on 2018/7/10.
- */
-@JsonInclude(JsonInclude.Include.NON_NULL)
-public class AcceptTimePair {
-
-    @JsonProperty("start")
-    @ApiModelProperty(value = "接受时间 起始时间点",required = true)
-    public AcceptTimePoint start;
-
-    @JsonProperty("end")
-    @ApiModelProperty(value = "接受时间 结束时间点",required = true)
-    public AcceptTimePoint end;
-
-    public AcceptTimePoint getStart() {
-        return start;
-    }
-
-    public void setStart(AcceptTimePoint start) {
-        this.start = start;
-    }
-
-    public AcceptTimePoint getEnd() {
-        return end;
-    }
-
-    public void setEnd(AcceptTimePoint end) {
-        this.end = end;
-    }
-}

+ 0 - 35
ssj-common-xinge/src/main/java/com/ssj/conch/push/util/xinge/bean/AcceptTimePoint.java

@@ -1,35 +0,0 @@
-package com.ssj.conch.push.util.xinge.bean;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import io.swagger.annotations.ApiModelProperty;
-
-/**
- * Created by Administrator on 2018/7/10.
- */
-@JsonInclude(JsonInclude.Include.NON_NULL)
-public class AcceptTimePoint {
-
-    @JsonProperty(value = "hour", required = true)
-    @ApiModelProperty(value = "时间点,小时: HH",required = true)
-    public String hour;
-
-    @JsonProperty(value = "min", required = true)
-    @ApiModelProperty(value = "时间点,分钟: mm",required = true)
-    public String min;
-
-    public String getHour() {
-        return hour;
-    }
-
-    public void setHour(String hour) {
-        this.hour = hour;
-    }
-
-    public String getMin() {
-        return min;
-    }
-
-    public void setMin(String min) {
-        this.min = min;
-    }
-}

+ 0 - 46
ssj-common-xinge/src/main/java/com/ssj/conch/push/util/xinge/bean/AccountType.java

@@ -1,46 +0,0 @@
-package com.ssj.conch.push.util.xinge.bean;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonValue;
-import io.swagger.annotations.ApiModel;
-
-@ApiModel(value = "账号类型")
-@JsonInclude(JsonInclude.Include.NON_NULL)
-public enum AccountType {
-
-    unknown(0, "unknown"),
-    mobile(1, "手机号"),
-    email(2, "邮箱"),
-    wx_openid(1000, "微信openid"),
-    qq_openid(1001, "qq openid"),
-    weibo(1002, "新浪微博"),
-    alipay(1003, "支付宝"),
-    taobao(1004, "淘宝"),
-    douban(1005, "豆瓣"),
-    facebook(1006, "facebook"),
-    twitter(1007, "twitter"),
-    google(1008, "google"),
-    baidu(1009, "百度"),
-    jd(1010, "京东"),
-    linkin(1011, "linkin"),
-    others(1999, "其他"),
-    visitors(2000, "游客登录"),;
-
-    AccountType(int type, String name) {
-        this.type = type;
-        this.name = name;
-    }
-
-    @JsonValue
-    public int getType() {
-        return type;
-    }
-
-    public String getName() {
-        return name;
-    }
-
-    private int type;
-
-    private String name;
-
-}

+ 0 - 89
ssj-common-xinge/src/main/java/com/ssj/conch/push/util/xinge/bean/Alert.java

@@ -1,89 +0,0 @@
-package com.ssj.conch.push.util.xinge.bean;
-
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-
-import java.util.ArrayList;
-
-@JsonInclude(JsonInclude.Include.NON_NULL)
-public class Alert {
-
-    @JsonProperty(value = "title",required = true)
-    private String title;
-
-    @JsonProperty(value ="body", required = true)
-    private String body;
-
-    @JsonProperty(value ="title-loc-key")
-    private String title_loc_key;
-
-    @JsonProperty(value ="title-loc-args")
-    private ArrayList<String> title_loc_args;
-
-    @JsonProperty(value ="loc-key" )
-    private String loc_key;
-
-    @JsonProperty(value ="loc-args")
-    private ArrayList<String> loc_args;
-
-    @JsonProperty(value ="launch-image")
-    private String launch_image;
-
-    public String getTitle_loc_key() {
-        return title_loc_key;
-    }
-
-    public void setTitle_loc_key(String title_loc_key) {
-        this.title_loc_key = title_loc_key;
-    }
-
-    public ArrayList<String> getTitle_loc_args() {
-        return title_loc_args;
-    }
-
-    public void setTitle_loc_args(ArrayList<String> title_loc_args) {
-        this.title_loc_args = title_loc_args;
-    }
-
-    public String getLoc_key() {
-        return loc_key;
-    }
-
-    public void setLoc_key(String loc_key) {
-        this.loc_key = loc_key;
-    }
-
-    public ArrayList<String> getLoc_args() {
-        return loc_args;
-    }
-
-    public void setLoc_args(ArrayList<String> loc_args) {
-        this.loc_args = loc_args;
-    }
-
-    public String getLaunch_image() {
-        return launch_image;
-    }
-
-    public void setLaunch_image(String launch_image) {
-        this.launch_image = launch_image;
-    }
-
-    public String getTitle() {
-        return title;
-    }
-
-    public void setTitle(String title) {
-        this.title = title;
-    }
-
-    public String getBody() {
-        return body;
-    }
-
-    public void setBody(String body) {
-        this.body = body;
-    }
-
-
-}

+ 0 - 0
ssj-common-xinge/src/main/java/com/ssj/conch/push/util/xinge/bean/Aps.java


Certains fichiers n'ont pas été affichés car il y a eu trop de fichiers modifiés dans ce diff