diff --git a/bocloud.sms.service/src/main/java/com/bocloud/sms/service/TrxServiceImpl.java b/bocloud.sms.service/src/main/java/com/bocloud/sms/service/TrxServiceImpl.java index ec23661..c5a8896 100644 --- a/bocloud.sms.service/src/main/java/com/bocloud/sms/service/TrxServiceImpl.java +++ b/bocloud.sms.service/src/main/java/com/bocloud/sms/service/TrxServiceImpl.java @@ -85,8 +85,32 @@ public class TrxServiceImpl implements TrxService { String url = trxUrl + "/userAuthen"; Map paramsMap = new HashMap<>(); paramsMap.put("cookie", trxAuthModel.getClientHello()); - paramsMap.put("certMd5", trxAuthModel.getServerHello()); - paramsMap.put("client_ip", trxAuthModel.getClientIp()); + + List> authen = new ArrayList<>(); + Map userMap = new HashMap<>(); + userMap.put("loginName", trxAuthModel.getLoginName()); + userMap.put("passwd", trxAuthModel.getPasswd()); + authen.add(userMap); + + Map md5Map = new HashMap<>(); + md5Map.put("certMd5", trxAuthModel.getServerHello()); + md5Map.put("value", ""); + md5Map.put("hashType", ""); + authen.add(md5Map); + + Map passcodeMap = new HashMap<>(); + passcodeMap.put("passcode", ""); + authen.add(passcodeMap); + + Map dfCodeMap = new HashMap<>(); + dfCodeMap.put("df_code", ""); + authen.add(dfCodeMap); + + Map ipMap = new HashMap<>(); + ipMap.put("client_ip", trxAuthModel.getClientIp()); + authen.add(ipMap); + paramsMap.put("Authen", authen); + JSONObject result = new JSONObject(); GeneralResult> login = new GeneralResult<>(); try { diff --git a/bocloud.sms.storage/src/main/java/com/bocloud/sms/model/TrxAuthModel.java b/bocloud.sms.storage/src/main/java/com/bocloud/sms/model/TrxAuthModel.java index 399f292..51f527e 100644 --- a/bocloud.sms.storage/src/main/java/com/bocloud/sms/model/TrxAuthModel.java +++ b/bocloud.sms.storage/src/main/java/com/bocloud/sms/model/TrxAuthModel.java @@ -4,8 +4,10 @@ import lombok.Data; @Data public class TrxAuthModel { - private String clientHello; - private String serverHello; + private String loginName; + private String passwd; + private String clientHello; // cookie + private String serverHello; // certMd5 private String trxToken; private String clientIp; }