|
|
@@ -1,5 +1,7 @@
|
|
|
package com.izouma.nineth.service;
|
|
|
|
|
|
+import com.alibaba.fastjson.JSONObject;
|
|
|
+import com.github.kevinsawicki.http.HttpRequest;
|
|
|
import com.izouma.nineth.domain.AirDrop;
|
|
|
import com.izouma.nineth.domain.IdentityAuth;
|
|
|
import com.izouma.nineth.domain.User;
|
|
|
@@ -81,4 +83,19 @@ public class IdentityAuthService {
|
|
|
auth.setStatus(status);
|
|
|
identityAuthRepo.save(auth);
|
|
|
}
|
|
|
+
|
|
|
+ public void validate(String name, String phone, String idno) {
|
|
|
+ String body = HttpRequest.post("https://jubrige.market.alicloudapi.com/mobile/3-validate-transfer")
|
|
|
+ .header("Authorization", "APPCODE b48bc8f6759345a79ae20a951f03dabe")
|
|
|
+ .contentType(HttpRequest.CONTENT_TYPE_FORM)
|
|
|
+ .form("idCardNo", idno)
|
|
|
+ .form("mobile", phone)
|
|
|
+ .form("name", name)
|
|
|
+ .body();
|
|
|
+ JSONObject jsonObject = JSONObject.parseObject(body);
|
|
|
+ if (jsonObject.getInteger("code") != 200) {
|
|
|
+ String msg = jsonObject.getString("msg");
|
|
|
+ throw new BusinessException(msg);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|