Kaynağa Gözat

西安交通大学新增退出接口

wangliang 2 yıl önce
ebeveyn
işleme
7e3df00f82

+ 3 - 1
teachcloud-exchange-common/src/main/java/com/qmth/teachcloud/exchange/common/service/impl/CommonServiceImpl.java

@@ -9,6 +9,7 @@ import com.qmth.teachcloud.exchange.common.entity.BasicSchool;
 import com.qmth.teachcloud.exchange.common.enums.ExceptionResultEnum;
 import com.qmth.teachcloud.exchange.common.service.BasicSchoolService;
 import com.qmth.teachcloud.exchange.common.service.CommonService;
+import com.qmth.teachcloud.exchange.common.util.Base64Util;
 import com.qmth.teachcloud.exchange.common.util.JacksonUtil;
 import com.qmth.teachcloud.exchange.common.util.ServletUtil;
 import org.slf4j.Logger;
@@ -21,6 +22,7 @@ import javax.servlet.http.HttpServletResponse;
 import java.io.IOException;
 import java.net.URLDecoder;
 import java.net.URLEncoder;
+import java.nio.charset.StandardCharsets;
 import java.util.Objects;
 import java.util.Optional;
 import java.util.StringJoiner;
@@ -88,7 +90,7 @@ public class CommonServiceImpl implements CommonService {
         StringJoiner stringJoiner = new StringJoiner("")
                 .add(teachcloudLoginUrl)
                 .add(SystemConstant.GET_UNKNOWN).add(SystemConstant.HEADER_TIME).add(SystemConstant.GET_EQUAL).add(String.valueOf(timestamp))
-                .add(SystemConstant.GET_SYMBOL).add(SystemConstant.SIGNATURE).add(SystemConstant.GET_EQUAL).add(URLEncoder.encode(signature, SystemConstant.CHARSET_NAME))
+                .add(SystemConstant.GET_SYMBOL).add(SystemConstant.SIGNATURE).add(SystemConstant.GET_EQUAL).add(Base64Util.encode(signature.getBytes(StandardCharsets.UTF_8)))
                 .add(SystemConstant.GET_SYMBOL).add(SystemConstant.USER).add(SystemConstant.GET_EQUAL).add(URLEncoder.encode(account, SystemConstant.CHARSET_NAME));
 
         if (Objects.nonNull(returnUrl) && !Objects.equals(returnUrl, "")) {