|
|
@@ -3,24 +3,17 @@ package com.xunmei.auth.service;
|
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
|
import cn.hutool.http.HttpRequest;
|
|
|
import cn.hutool.http.HttpUtil;
|
|
|
-import cn.hutool.json.JSON;
|
|
|
import cn.hutool.json.JSONObject;
|
|
|
+import com.union.api.TUnionTransInfo;
|
|
|
+import com.union.api.UnionEsscAPI;
|
|
|
import com.xunmei.auth.form.LoginBody;
|
|
|
-import com.xunmei.common.core.constant.Constants;
|
|
|
-import com.xunmei.common.core.constant.SecurityConstants;
|
|
|
-import com.xunmei.common.core.domain.R;
|
|
|
-import com.xunmei.common.core.exception.ServiceException;
|
|
|
import com.xunmei.common.core.utils.StringUtils;
|
|
|
-import com.xunmei.system.api.RemoteUserService;
|
|
|
-import com.xunmei.system.api.model.LoginUser;
|
|
|
import io.netty.util.internal.StringUtil;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
-import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
-import javax.annotation.Resource;
|
|
|
import java.text.MessageFormat;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.HashMap;
|
|
|
@@ -241,7 +234,7 @@ public class FJNXLoginService{
|
|
|
//对登录用户的密码进行加密
|
|
|
UnionEsscAPI shortApi = new UnionEsscAPI(ipList,portList,5,appCode,appCode,"");
|
|
|
String pass = StringUtil.toHexString(login.getPassword().getBytes());
|
|
|
- TunionTransInfo transInfo = shortApi.unionAPIServiceE160(1,secretName,"",0,1,pass,"",1);
|
|
|
+ TUnionTransInfo transInfo = shortApi.unionAPIServiceE160(1,secretName,"",0,1,pass,"",1);
|
|
|
|
|
|
if(ObjectUtil.isNull(transInfo)){
|
|
|
return null;
|
|
|
@@ -253,7 +246,7 @@ public class FJNXLoginService{
|
|
|
return null;
|
|
|
}
|
|
|
|
|
|
- if(ObjectUtil.isNull(transInfo.getResponseBoby())){
|
|
|
+ if(ObjectUtil.isNull(transInfo.getReturnBody())){
|
|
|
logger.error("密码加密失败,数据为空");
|
|
|
return null;
|
|
|
}
|
|
|
@@ -263,7 +256,7 @@ public class FJNXLoginService{
|
|
|
|
|
|
JSONObject object = new JSONObject();
|
|
|
object.accumulate("loginName",login.getUsername());
|
|
|
- object.accumulate("pass",transInfo.getResponseBoby().getData());
|
|
|
+ object.accumulate("pass",transInfo.getReturnBody().getData());
|
|
|
object.accumulate("type",1);
|
|
|
object.accumulate("systemCode",1);
|
|
|
object.accumulate("passwordType",1);
|
|
|
@@ -290,51 +283,4 @@ public class FJNXLoginService{
|
|
|
logger.error("登录失败,{}",jsonObject.getStr("message"));
|
|
|
return null;
|
|
|
}
|
|
|
-
|
|
|
-/**
|
|
|
- * ----------------------------------------------------------------------------------------------------------------------
|
|
|
- * 以下代码需要在现场环境删除,且重新引入使用的变量和类
|
|
|
- * ---------------------------------------------------------------------------------------------------------------------
|
|
|
- */
|
|
|
- /**
|
|
|
- * 内部类只为代码不报错,打包前请删除,需要到内网引入响应的jar
|
|
|
- */
|
|
|
- //TODO
|
|
|
- private class UnionEsscAPI {
|
|
|
- public UnionEsscAPI(List<String> ipList, List<Integer> portList, int i, String appCode, String appCode1, String s) {
|
|
|
- }
|
|
|
-
|
|
|
- public TunionTransInfo unionAPIServiceE160(int i, String secretName, String s, int i1, int i2, String pass, String s1, int i3) {
|
|
|
- return null;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 内部类只为代码不报错,打包前请删除,需要到内网引入响应的jar
|
|
|
- */
|
|
|
- //TODO
|
|
|
- private class TunionTransInfo{
|
|
|
-
|
|
|
- public int getIsSuccess() {
|
|
|
- return 0;
|
|
|
- }
|
|
|
-
|
|
|
- public Object getResponseCode() {
|
|
|
- return null;
|
|
|
- }
|
|
|
-
|
|
|
- public Object getResponseRemark() {
|
|
|
- return null;
|
|
|
- }
|
|
|
-
|
|
|
- public ResponseBoby getResponseBoby() {
|
|
|
- return null;
|
|
|
- }
|
|
|
-
|
|
|
- private class ResponseBoby{
|
|
|
- public Object getData(){
|
|
|
- return null;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
}
|