|
|
@@ -1,242 +1,340 @@
|
|
|
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.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.RemoteLogService;
|
|
|
import com.xunmei.system.api.RemoteUserService;
|
|
|
import com.xunmei.system.api.model.LoginUser;
|
|
|
import io.netty.util.internal.StringUtil;
|
|
|
-import lombok.extern.flogger.Flogger;
|
|
|
-import lombok.extern.slf4j.Slf4j;
|
|
|
-import org.apache.http.HttpEntity;
|
|
|
-import org.apache.http.StatusLine;
|
|
|
-import org.apache.http.client.methods.CloseableHttpResponse;
|
|
|
-import org.apache.http.client.methods.HttpGet;
|
|
|
-import org.apache.http.client.methods.HttpPost;
|
|
|
-import org.apache.http.entity.StringEntity;
|
|
|
-import org.apache.http.impl.client.CloseableHttpClient;
|
|
|
-import org.apache.http.impl.client.HttpClients;
|
|
|
-import org.apache.http.message.BasicHeader;
|
|
|
-import org.apache.http.protocol.HTTP;
|
|
|
-import org.apache.http.util.EntityUtils;
|
|
|
-import org.slf4j.ILoggerFactory;
|
|
|
+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 java.io.IOException;
|
|
|
-import java.nio.charset.StandardCharsets;
|
|
|
+import javax.annotation.Resource;
|
|
|
+import java.text.MessageFormat;
|
|
|
import java.util.ArrayList;
|
|
|
+import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
|
|
|
-//import com.union.api.TUnionTransInfo;
|
|
|
-//import com.union.api.UnionEsscAPI;
|
|
|
-
|
|
|
-import javax.annotation.Resource;
|
|
|
|
|
|
+/**
|
|
|
+ * #统一运营门户登录信息
|
|
|
+ * fjnx:
|
|
|
+ * # 统一运营门户ip
|
|
|
+ * host: 192.111.60.143
|
|
|
+ * # 统一运营门户端口
|
|
|
+ * port: 9191
|
|
|
+ * # 统一运营门户定义的系统编码
|
|
|
+ * systemCode: 61303
|
|
|
+ * # 密管系统ip
|
|
|
+ * passIp: 192.111.7.75
|
|
|
+ * # 密管系统端口
|
|
|
+ * passPort: 40105
|
|
|
+ * # 密管系统对应标识
|
|
|
+ * appCode: MSP
|
|
|
+ * # 密管系统 秘钥
|
|
|
+ * secretName: msp.uop-SM4.zek
|
|
|
+ * # 使用token获取用户信息,get方式
|
|
|
+ * webInfoUrl: http://{0}:{1}/yusp-group/api/session?systemCode={2}
|
|
|
+ * # 用户登录接口 方式post
|
|
|
+ * userLoginUrl: http://{0}:{1}/yusp-group/api/login?systemCode={2}
|
|
|
+ * # 移动运营门户参数
|
|
|
+ * fjnxApp:
|
|
|
+ * # 移动运营平台地址
|
|
|
+ * host: 192.111.37.181
|
|
|
+ * #根据token获取移动运营平台账号信息 post方式
|
|
|
+ * accountUrl: https://{0}/uaa/api/v1.0/user/account?access_token={1}
|
|
|
+ * # 根据账号获取人员信息 post方式
|
|
|
+ * userInfoUrl: https://{0}/sap/api/v1.0/user/user/find/{1}?access_token={2}
|
|
|
+ */
|
|
|
@Component
|
|
|
-@ConditionalOnProperty(name = "loginPlatform", matchIfMissing = false, havingValue = "fjnx")
|
|
|
-public class FJNXLoginService implements LoginService {
|
|
|
-// @Value("${fjnx.host}")
|
|
|
-// private String host;
|
|
|
-//
|
|
|
-// @Value("${fjnx.systemCode}")
|
|
|
-// private String systemCode;
|
|
|
-//
|
|
|
-// @Value("${fjnx.passIp}")
|
|
|
-// private String passIp;
|
|
|
-//
|
|
|
-// @Value("${fjnx.passPort}")
|
|
|
-// private String passPort;
|
|
|
-//
|
|
|
-// @Value("${fjnx.appCode}")
|
|
|
-// private String appCode;
|
|
|
-//
|
|
|
-// @Value("${fjnx.secretName}")
|
|
|
-// private String secretName;
|
|
|
-
|
|
|
- @Resource
|
|
|
- private RemoteUserService remoteUserService;
|
|
|
-
|
|
|
- @Resource
|
|
|
- private SysRecordLogService recordLogService;
|
|
|
-
|
|
|
-// private String logingByPassword(String username, String password) {
|
|
|
-// CloseableHttpClient client = null;
|
|
|
-// try {
|
|
|
-// List<String> ipList = new ArrayList<>();
|
|
|
-// List<Integer> portList = new ArrayList<>();
|
|
|
-// UnionEsscAPI shortApi = null;
|
|
|
-// TUnionTransInfo transInfo = null;
|
|
|
-// ipList.add(0, passIp);
|
|
|
-// portList.add(0, Integer.parseInt(passPort));
|
|
|
-// shortApi = new UnionEsscAPI(ipList, portList, 5, appCode, appCode, "0");
|
|
|
-// String pass = StringUtil.toHexString(password.getBytes());
|
|
|
-// transInfo = shortApi.unionAPIServiceE160(1, secretName, "", 0, 1, pass, "", 1);
|
|
|
-// if (ObjectUtil.isNull(transInfo)) {
|
|
|
-// throw new ServiceException("密码加密失败,返回对象为空");
|
|
|
-// }
|
|
|
-//
|
|
|
-// if (ObjectUtil.notEqual(transInfo.getResponseCode(), 0) || ObjectUtil.notEqual(transInfo.getIsSucess(), 1)) {
|
|
|
-// throw new ServiceException("密码加密失败!" + transInfo.getResponseRemark());
|
|
|
-// }
|
|
|
-//
|
|
|
-// if (ObjectUtil.isNull(transInfo.getReturnBody())) {
|
|
|
-// throw new ServiceException("密码加密失败,数据为空!");
|
|
|
-// }
|
|
|
-//
|
|
|
-// String url = host + "yusp-group/api/login?systemCode=" + systemCode;
|
|
|
-//
|
|
|
-//
|
|
|
-// HttpPost post = new HttpPost(url);
|
|
|
-// client = HttpClients.createDefault();
|
|
|
-// JSONObject object = new JSONObject();
|
|
|
-// object.accumulate("loginName", username);
|
|
|
-// object.accumulate("pass", transInfo.getReturnBody().getData());
|
|
|
-// object.accumulate("type", 1);
|
|
|
-// object.accumulate("systemCode", 1);
|
|
|
-// object.accumulate("passwordType", 1);
|
|
|
-// StringEntity s = new StringEntity(object.toString(), "utf-8");
|
|
|
-// s.setContentType(new BasicHeader(HTTP.CONTENT_TYPE, "application/json"));
|
|
|
-// post.setEntity(s);
|
|
|
-// post.setHeader("Content-type", "application/json");
|
|
|
-// CloseableHttpResponse response = client.execute(post);
|
|
|
-// HttpEntity entity = response.getEntity();
|
|
|
-// if (ObjectUtil.isNull(entity)) {
|
|
|
-// throw new ServiceException("登录失败,返回数据为空!");
|
|
|
-// }
|
|
|
-//
|
|
|
-// String body = EntityUtils.toString(entity, "utf-8");
|
|
|
-//// logger.warn("登录body返回:" + body);
|
|
|
-// JSONObject jsonObject = new JSONObject(body);
|
|
|
-// String code = jsonObject.getStr("code");
|
|
|
-//
|
|
|
-// if (StringUtils.isNotNull(code) && ObjectUtil.equal("0", code)) {
|
|
|
-// String data = jsonObject.getStr("data");
|
|
|
-// JSONObject jsonObject1 = new JSONObject(data);
|
|
|
-// String userStatus = jsonObject1.getStr("userStatus");
|
|
|
-// String tokenThird = jsonObject1.getStr("token");
|
|
|
-//// logger.info(tokenThird);
|
|
|
-// EntityUtils.consume(entity);
|
|
|
-// response.close();
|
|
|
-// return tokenThird;
|
|
|
-// } else {
|
|
|
-// throw new ServiceException("登录失败," + jsonObject.getStr("message"));
|
|
|
-// }
|
|
|
-// } finally {
|
|
|
-// if (client != null) {
|
|
|
-// try {
|
|
|
-// client.close();
|
|
|
-// } catch (IOException e) {
|
|
|
-// logger.error(e.getMessage());
|
|
|
-// }
|
|
|
-// }
|
|
|
-//
|
|
|
-// }
|
|
|
-//
|
|
|
-// }
|
|
|
-//
|
|
|
-//
|
|
|
-// private String loginByToken(String token) throws Exception {
|
|
|
-// String userName = "";
|
|
|
-// CloseableHttpClient client = null;
|
|
|
-//
|
|
|
-// try {
|
|
|
-// client = HttpClients.createDefault();
|
|
|
-// HttpGet get = new HttpGet(host + "yusp-group/api/session?systemCode=" + systemCode);
|
|
|
-// get.setHeader("Content-Type", "application/json");
|
|
|
-// get.setHeader("Authorization", "Bearer " + token);
|
|
|
-//
|
|
|
-// CloseableHttpResponse response = client.execute(get);
|
|
|
-// HttpEntity entity = response.getEntity();
|
|
|
-// StatusLine status = response.getStatusLine();
|
|
|
-// int statusCode = status.getStatusCode();
|
|
|
-// if (statusCode == 200) {
|
|
|
-// if (entity != null) {
|
|
|
-// String body = EntityUtils.toString(entity, "utf-8");
|
|
|
-//// logger.warn(body);
|
|
|
-// JSONObject jsonObject = new JSONObject(body);
|
|
|
-// String code = jsonObject.getStr("code");
|
|
|
-// if (StringUtils.isNotNull(code) && "0".equals(code)) {
|
|
|
-// String data = jsonObject.getStr("data");
|
|
|
-// JSONObject jsonObject1 = new JSONObject(data);
|
|
|
-// String userStatus = (String) jsonObject1.get("userStatus");
|
|
|
-// String loginName = (String) jsonObject1.get("loginName");
|
|
|
-// if (ObjectUtil.notEqual("0", userStatus)) {
|
|
|
-// userName = loginName;
|
|
|
-// }
|
|
|
-// } else {
|
|
|
-// throw new ServiceException("服务异常");
|
|
|
-// }
|
|
|
-// }
|
|
|
-// } else {
|
|
|
-// if (statusCode == 401) {
|
|
|
-// throw new ServiceException("无效的token");
|
|
|
-//
|
|
|
-// } else {
|
|
|
-// throw new ServiceException("调用单点登录失败");
|
|
|
-// }
|
|
|
-// }
|
|
|
-// } finally {
|
|
|
-// if (client != null) {
|
|
|
-// client.close();
|
|
|
-// }
|
|
|
-// }
|
|
|
-//
|
|
|
-// return userName;
|
|
|
-// }
|
|
|
-
|
|
|
-
|
|
|
- @Override
|
|
|
- public LoginUser loginByPassword(String username, String password, String platformType) {
|
|
|
- //todo:
|
|
|
- String token ="3459238452908345alsdfjalkdfjalskd"; // logingByPassword(username, password);
|
|
|
-
|
|
|
- if (StringUtils.isEmpty(token)) {
|
|
|
- throw new ServiceException("获取token为空");
|
|
|
- }
|
|
|
-
|
|
|
- R<LoginUser> userResult = remoteUserService.getUserInfo(username, SecurityConstants.INNER);
|
|
|
- if (StringUtils.isNull(userResult) || StringUtils.isNull(userResult.getData())) {
|
|
|
- recordLogService.recordLogininfor(username, Constants.LOGIN_FAIL, "登录用户不存在", platformType);
|
|
|
- throw new ServiceException("登录用户:" + username + " 不存在");
|
|
|
- }
|
|
|
-
|
|
|
- LoginUser user = userResult.getData();
|
|
|
- user.setToken(token);
|
|
|
- user.setPlatformType(platformType);
|
|
|
- recordLogService.recordLogininfor(username, Constants.LOGIN_SUCCESS, "登录成功", platformType);
|
|
|
-
|
|
|
- return user;
|
|
|
+public class FJNXLoginService{
|
|
|
+ /**
|
|
|
+ * 统一运营平台 服务ip地址
|
|
|
+ */
|
|
|
+ @Value("${fjnx.host}")
|
|
|
+ private String host;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 统一运营平台 服务端口
|
|
|
+ */
|
|
|
+ @Value("${fjnx.port}")
|
|
|
+ private String port;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 统一运营门户 给我们系统定义的 系统编号
|
|
|
+ */
|
|
|
+ @Value("${fjnx.systemCode}")
|
|
|
+ private String systemCode;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 密管系统ip
|
|
|
+ */
|
|
|
+ @Value("${fjnx.passIp}")
|
|
|
+ private String passIp;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 密管系统端口
|
|
|
+ */
|
|
|
+ @Value("${fjnx.passPort}")
|
|
|
+ private Integer passPort;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 密管系统 对应标识
|
|
|
+ */
|
|
|
+ @Value("${fjnx.appCode}")
|
|
|
+ private String appCode;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 密管系统 秘钥 msp.uop-SM4.zek
|
|
|
+ */
|
|
|
+ @Value("${fjnx.secretName}")
|
|
|
+ private String secretName;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 统一运营门户 根据token获取用户信息
|
|
|
+ * http://{0}:{1}/yusp-group/api/session?systemCode={2}
|
|
|
+ */
|
|
|
+ @Value("${fjnx.webInfoUrl}")
|
|
|
+ private String webInfoUrl;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 统一运营门户 用户密码登录接口
|
|
|
+ * userInfoUrl: http://{0}:{1}/yusp-group/api/login?systemCode={2}
|
|
|
+ */
|
|
|
+ @Value("${fjnx.userLoginUrl}")
|
|
|
+ private String userLoginUrl;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 移动运营平台地址
|
|
|
+ */
|
|
|
+ @Value("${fjnxApp.host}")
|
|
|
+ private String appHost;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 根据token获取移动运营平台账号信息 post方式
|
|
|
+ * https://{0}/uaa/api/v1.0/user/account?access_token={1}
|
|
|
+ */
|
|
|
+ @Value("${fjnxApp.host}")
|
|
|
+ private String accountUrl;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 根据账号获取人员信息 post方式
|
|
|
+ * https://{0}/sap/api/v1.0/user/user/find/{1}?access_token={2}
|
|
|
+ */
|
|
|
+ @Value("${fjnxApp.userInfoUrl}")
|
|
|
+ private String userInfoUrl;
|
|
|
+
|
|
|
+
|
|
|
+ private static final Logger logger = LoggerFactory.getLogger(FJNXLoginService.class);
|
|
|
+
|
|
|
+ /**
|
|
|
+ * token在统一运平台验证token,获取用户信息后返回当前登录名
|
|
|
+ * @param token
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public String getUserByWebToken(String token){
|
|
|
+ String userName = null;
|
|
|
+
|
|
|
+ String userInfoUrl = MessageFormat.format(webInfoUrl,host,port,systemCode);
|
|
|
+ String result = HttpRequest.get(userInfoUrl)
|
|
|
+ .header("Authorization","Bearer " + token)
|
|
|
+ .header("Content-Type","application/json")
|
|
|
+ .execute().body();
|
|
|
+ logger.info("web端token获取用户信息结果:{}",result);
|
|
|
+
|
|
|
+ if(StringUtils.isEmpty(result)){
|
|
|
+ throw new RuntimeException("token验证失败");
|
|
|
+ }
|
|
|
+
|
|
|
+ JSONObject jsonObject = new JSONObject(result);
|
|
|
+ String code = jsonObject.getStr("code");
|
|
|
+ if(StringUtils.isNotEmpty(code) && "0".equals(code)){
|
|
|
+ String data = jsonObject.getStr("data");
|
|
|
+ JSONObject jsonData = new JSONObject(data);
|
|
|
+ String userStatus = jsonData.getStr("userStatus");
|
|
|
+ String loginName = jsonData.getStr("loginName");
|
|
|
+ if(! "0".equals(userStatus)){
|
|
|
+ userName = loginName;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ return userName;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * H5单点登录,去移动运营平台验证token
|
|
|
+ * 1、获取当前登录账号信息
|
|
|
+ * 2、根据账号信息获取用户信息
|
|
|
+ * @param token
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public String getUserByAppToken(String token){
|
|
|
+
|
|
|
+ String account_url = MessageFormat.format(accountUrl,appCode,token);
|
|
|
+
|
|
|
+ String accountInfo = HttpUtil.post(account_url,new HashMap<>());
|
|
|
+
|
|
|
+ if(StringUtils.isEmpty(accountInfo)){
|
|
|
+ throw new RuntimeException("验证token失败,登录失败!");
|
|
|
+ }
|
|
|
+ JSONObject accountJson = new JSONObject(accountInfo);
|
|
|
+
|
|
|
+ if("true".equals(accountJson.getStr("result"))){
|
|
|
+ throw new RuntimeException("验证token失败,登录失败!");
|
|
|
+ }
|
|
|
+
|
|
|
+ JSONObject accountContent = new JSONObject(accountJson.getStr("data"));
|
|
|
+ String account = accountContent.getStr("username");
|
|
|
+
|
|
|
+ /*
|
|
|
+ 开始获取登录账号信息
|
|
|
+ */
|
|
|
+ String user_info_url = MessageFormat.format(userInfoUrl,appHost,account,token);
|
|
|
+ String userInfo = HttpUtil.post(user_info_url,new HashMap<>());
|
|
|
+ JSONObject userJson = new JSONObject(userInfo);
|
|
|
+
|
|
|
+ if(!"true".equals(userJson.getStr("result"))){
|
|
|
+ throw new RuntimeException("远程获取用户信息失败,登录失败!");
|
|
|
+ }
|
|
|
+
|
|
|
+ JSONObject userContent = new JSONObject(userJson.getStr("data"));
|
|
|
+ String sap_user = userContent.getStr("sap_user");
|
|
|
+
|
|
|
+ JSONObject info = new JSONObject(userJson.getStr("sap_user"));
|
|
|
+
|
|
|
+ String username = info.getStr("username");
|
|
|
+
|
|
|
+ return username;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 通过密管系统加密密码,然后登录到统一运营平台
|
|
|
+ * @param login
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public String webLoginByPass(LoginBody login){
|
|
|
+
|
|
|
+ /*
|
|
|
+ * 加密前参数准备
|
|
|
+ */
|
|
|
+
|
|
|
+ List<String> ipList = new ArrayList<>();
|
|
|
+ List<Integer> portList = new ArrayList<>();
|
|
|
+
|
|
|
+ ipList.add(passIp);
|
|
|
+ portList.add(passPort);
|
|
|
+
|
|
|
+ //对登录用户的密码进行加密
|
|
|
+ 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);
|
|
|
+
|
|
|
+ if(ObjectUtil.isNull(transInfo)){
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+
|
|
|
+ int isSuccess = transInfo.getIsSuccess();
|
|
|
+ if(ObjectUtil.notEqual(transInfo.getResponseCode(),0) || ObjectUtil.notEqual(isSuccess,1)){
|
|
|
+ logger.error("密码加密失败!{}",transInfo.getResponseRemark());
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+
|
|
|
+ if(ObjectUtil.isNull(transInfo.getResponseBoby())){
|
|
|
+ logger.error("密码加密失败,数据为空");
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+
|
|
|
+ //开始验证用户名密码
|
|
|
+ String loginUrl = MessageFormat.format(userLoginUrl, host, port, systemCode);
|
|
|
+
|
|
|
+ JSONObject object = new JSONObject();
|
|
|
+ object.accumulate("loginName",login.getUsername());
|
|
|
+ object.accumulate("pass",transInfo.getResponseBoby().getData());
|
|
|
+ object.accumulate("type",1);
|
|
|
+ object.accumulate("systemCode",1);
|
|
|
+ object.accumulate("passwordType",1);
|
|
|
+
|
|
|
+ String loginContent = HttpRequest.get(loginUrl)
|
|
|
+ .header("Content-Type","application/json")
|
|
|
+ .contentType("application/json")
|
|
|
+ .charset("utf-8")
|
|
|
+ .body(object.toString())
|
|
|
+ .execute().body();
|
|
|
+
|
|
|
+ logger.info("登录后信息:{}",loginContent);
|
|
|
+
|
|
|
+ JSONObject jsonObject = new JSONObject(loginContent);
|
|
|
+ String code = jsonObject.getStr("code");
|
|
|
+
|
|
|
+ if(StringUtils.isNotEmpty(code) && "0".equals(code)){
|
|
|
+ JSONObject jsonData = new JSONObject(jsonObject.getStr("data"));
|
|
|
+ String tokenThird = jsonData.getStr("token");
|
|
|
+ logger.info("登录后的token:{}",tokenThird);
|
|
|
+ return tokenThird;
|
|
|
+ }
|
|
|
+
|
|
|
+ logger.error("登录失败,{}",jsonObject.getStr("message"));
|
|
|
+ return null;
|
|
|
}
|
|
|
|
|
|
- @Override
|
|
|
- public LoginUser loginByToken(String token, String platformType) throws Exception {
|
|
|
- //todo:
|
|
|
- String username ="admin";// loginByToken(token);
|
|
|
- R<LoginUser> userResult = remoteUserService.getUserInfo(username, SecurityConstants.INNER);
|
|
|
- if (StringUtils.isNull(userResult) || StringUtils.isNull(userResult.getData())) {
|
|
|
- recordLogService.recordLogininfor(username, Constants.LOGIN_FAIL, "登录用户不存在", platformType);
|
|
|
- throw new ServiceException("登录用户:" + username + " 不存在");
|
|
|
+/**
|
|
|
+ * ----------------------------------------------------------------------------------------------------------------------
|
|
|
+ * 以下代码需要在现场环境删除,且重新引入使用的变量和类
|
|
|
+ * ---------------------------------------------------------------------------------------------------------------------
|
|
|
+ */
|
|
|
+ /**
|
|
|
+ * 内部类只为代码不报错,打包前请删除,需要到内网引入响应的jar
|
|
|
+ */
|
|
|
+ //TODO
|
|
|
+ private class UnionEsscAPI {
|
|
|
+ public UnionEsscAPI(List<String> ipList, List<Integer> portList, int i, String appCode, String appCode1, String s) {
|
|
|
}
|
|
|
|
|
|
- if (R.FAIL == userResult.getCode()) {
|
|
|
- throw new ServiceException(userResult.getMsg());
|
|
|
+ public TunionTransInfo unionAPIServiceE160(int i, String secretName, String s, int i1, int i2, String pass, String s1, int i3) {
|
|
|
+ return null;
|
|
|
}
|
|
|
- recordLogService.recordLogininfor(username, Constants.LOGIN_SUCCESS, "登录成功", platformType);
|
|
|
- LoginUser user = userResult.getData();
|
|
|
- user.setToken(token);
|
|
|
- user.setPlatformType(platformType);
|
|
|
- return user;
|
|
|
}
|
|
|
|
|
|
- @Override
|
|
|
- public void logout(String loginName, String platformType) {
|
|
|
- recordLogService.recordLogininfor(loginName, Constants.LOGOUT, "退出成功", platformType);
|
|
|
+ /**
|
|
|
+ * 内部类只为代码不报错,打包前请删除,需要到内网引入响应的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;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
-}
|
|
|
+}
|