|
@@ -10,6 +10,7 @@ import com.qmth.distributed.print.business.service.AuthInfoService;
|
|
|
import com.qmth.teachcloud.common.config.DictionaryConfig;
|
|
|
import com.qmth.teachcloud.common.contant.SystemConstant;
|
|
|
import com.qmth.teachcloud.common.entity.BasicSchool;
|
|
|
+import com.qmth.teachcloud.common.enums.RoleTypeEnum;
|
|
|
import com.qmth.teachcloud.common.service.CommonCacheService;
|
|
|
import com.qmth.teachcloud.common.util.*;
|
|
|
import io.swagger.annotations.*;
|
|
@@ -113,19 +114,33 @@ public class TSAuthController {
|
|
|
// String result = HttpUtil.postJson(dictionaryConfig.reportOpenDomain().getHostUrl() + dictionaryConfig.reportOpenDomain().getExamApi(), JacksonUtil.parseJson(map), accessToken, timestamp);
|
|
|
// if (Objects.nonNull(result)) {
|
|
|
// log.info("result:{}", JacksonUtil.parseJson(result));
|
|
|
+// }
|
|
|
+
|
|
|
+// /**
|
|
|
+// * 测试推送分析课程(试卷)
|
|
|
+// */
|
|
|
+// Map<String, Object> map = new HashMap<>();
|
|
|
+// map.computeIfAbsent("examId", v -> 262946761763454976L);
|
|
|
+// map.computeIfAbsent("courseCode", v -> 2022052700001L + "A");//试卷编号+卷型
|
|
|
+// map.computeIfAbsent("courseName", v -> "测试课程1");
|
|
|
+// map.computeIfAbsent("paperType", v -> "A");
|
|
|
+// map.computeIfAbsent("teachCollegeName", v -> "测试机构1");//机构名称
|
|
|
+// String accessToken = SignatureEntity.build(SignatureType.SECRET, SystemConstant.METHOD, dictionaryConfig.reportOpenDomain().getCourseApi(), timestamp, basicSchool.getAccessKey(), basicSchool.getAccessSecret());
|
|
|
+// String result = HttpUtil.postJson(dictionaryConfig.reportOpenDomain().getHostUrl() + dictionaryConfig.reportOpenDomain().getCourseApi(), JacksonUtil.parseJson(map), accessToken, timestamp);
|
|
|
+// if (Objects.nonNull(result)) {
|
|
|
+// log.info("result:{}", JacksonUtil.parseJson(result));
|
|
|
// }
|
|
|
|
|
|
/**
|
|
|
- * 测试推送分析课程(试卷)
|
|
|
+ * 测试单点登录
|
|
|
*/
|
|
|
Map<String, Object> map = new HashMap<>();
|
|
|
- map.computeIfAbsent("examId", v -> 262946761763454976L);
|
|
|
- map.computeIfAbsent("courseCode", v -> 2022052700001L + "A");//试卷编号+卷型
|
|
|
- map.computeIfAbsent("courseName", v -> "测试课程1");
|
|
|
- map.computeIfAbsent("paperType", v -> "A");
|
|
|
- map.computeIfAbsent("teachCollegeName", v -> "测试机构1");//机构名称
|
|
|
- String accessToken = SignatureEntity.build(SignatureType.SECRET, SystemConstant.METHOD, dictionaryConfig.reportOpenDomain().getCourseApi(), timestamp, basicSchool.getAccessKey(), basicSchool.getAccessSecret());
|
|
|
- String result = HttpUtil.postJson(dictionaryConfig.reportOpenDomain().getHostUrl() + dictionaryConfig.reportOpenDomain().getCourseApi(), JacksonUtil.parseJson(map), accessToken, timestamp);
|
|
|
+ map.computeIfAbsent("loginName", v -> "admin");
|
|
|
+ map.computeIfAbsent("role", v -> RoleTypeEnum.OFFICE_TEACHER);
|
|
|
+ map.computeIfAbsent("realName", v -> "admin");
|
|
|
+ map.computeIfAbsent("mobileNumber", v -> "18008659001");
|
|
|
+ String accessToken = SignatureEntity.build(SignatureType.SECRET, SystemConstant.METHOD, dictionaryConfig.reportOpenDomain().getSsoLoginApi(), timestamp, basicSchool.getAccessKey(), basicSchool.getAccessSecret());
|
|
|
+ String result = HttpUtil.postJson(dictionaryConfig.reportOpenDomain().getHostUrl() + dictionaryConfig.reportOpenDomain().getSsoLoginApi(), JacksonUtil.parseJson(map), accessToken, timestamp);
|
|
|
if (Objects.nonNull(result)) {
|
|
|
log.info("result:{}", JacksonUtil.parseJson(result));
|
|
|
}
|