|
@@ -1,5 +1,6 @@
|
|
|
package com.qmth.teachcloud.exchange.common.service.impl;
|
|
|
|
|
|
+import com.alibaba.fastjson.JSONObject;
|
|
|
import com.qmth.boot.tools.signature.SignatureEntity;
|
|
|
import com.qmth.boot.tools.signature.SignatureType;
|
|
|
import com.qmth.teachcloud.exchange.common.bean.dto.syssetting.SimpleObject;
|
|
@@ -61,15 +62,17 @@ public class CommonServiceImpl implements CommonService {
|
|
|
Optional.ofNullable(basicSchool).orElseThrow(() -> ExceptionResultEnum.PARAMS_ERROR.exception("学校信息不存在"));
|
|
|
Map<String, SimpleObject> mapSetting = commonCacheService.getSysSetting(basicSchool.getId());
|
|
|
String teachcloudLoginUrl = null;
|
|
|
+ log.info("mapSetting1 value:{}", JSONObject.toJSONString(mapSetting));
|
|
|
if (!CollectionUtils.isEmpty(mapSetting)) {
|
|
|
- SimpleObject simpleObject = mapSetting.get(SystemConstant.SCHOOL_SERVICE_ADDRESS);
|
|
|
- Objects.requireNonNull(simpleObject, "未配置学校cas地址");
|
|
|
- String schoolServiceAddress = simpleObject.getValue();
|
|
|
- if (Objects.nonNull(schoolServiceAddress) && !Objects.equals(schoolServiceAddress.trim(), "")) {
|
|
|
- if (schoolServiceAddress.lastIndexOf("/") == schoolServiceAddress.length() - 1) {
|
|
|
- schoolServiceAddress = schoolServiceAddress.substring(0, schoolServiceAddress.lastIndexOf("/"));
|
|
|
- }
|
|
|
- teachcloudLoginUrl = schoolServiceAddress + SystemConstant.CAS_VUE_LOGIN_PATH;
|
|
|
+ SimpleObject simpleObject = mapSetting.get(SystemConstant.TEACH_CLOUD_PRINT);
|
|
|
+ log.info("simpleObject1 value:{}", JSONObject.toJSONString(simpleObject));
|
|
|
+ Objects.requireNonNull(simpleObject, "未配置知学知考地址");
|
|
|
+ String teachCloudPrint = simpleObject.getValue();
|
|
|
+ if (Objects.nonNull(teachCloudPrint) && !Objects.equals(teachCloudPrint.trim(), "")) {
|
|
|
+// if (schoolServiceAddress.lastIndexOf("/") == schoolServiceAddress.length() - 1) {
|
|
|
+// schoolServiceAddress = schoolServiceAddress.substring(0, schoolServiceAddress.lastIndexOf("/"));
|
|
|
+// }
|
|
|
+ teachcloudLoginUrl = teachCloudPrint.replace("/#/login", SystemConstant.CAS_VUE_LOGIN_PATH);
|
|
|
}
|
|
|
}
|
|
|
if (Objects.isNull(teachcloudLoginUrl) || Objects.equals(teachcloudLoginUrl, "")) {
|
|
@@ -81,7 +84,6 @@ public class CommonServiceImpl implements CommonService {
|
|
|
if (Objects.isNull(schoolCode) || Objects.equals(schoolCode, "")) {
|
|
|
throw ExceptionResultEnum.PARAMS_ERROR.exception("学校code不存在");
|
|
|
}
|
|
|
-// accountUser = URLDecoder.decode(accountUser, SystemConstant.CHARSET_NAME);
|
|
|
|
|
|
long timestamp = System.currentTimeMillis();
|
|
|
// String path = teachcloudLoginUrl.substring(teachcloudLoginUrl.indexOf(SystemConstant.PATH_SUBSTR), teachcloudLoginUrl.length());
|