修改dna登录校验

master
DESKTOP-C3M45P4\dengdan 2025-04-22 13:00:06 +08:00
parent f1528fc299
commit 01b2c9b4a5
1 changed files with 8 additions and 2 deletions

View File

@ -1,5 +1,7 @@
package com.ljsd.service; package com.ljsd.service;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.ljsd.pojo.VerifyParams; import com.ljsd.pojo.VerifyParams;
import com.ljsd.util.AppConstans; import com.ljsd.util.AppConstans;
import com.ljsd.util.HttpUtils; import com.ljsd.util.HttpUtils;
@ -111,8 +113,12 @@ public class Dna01VerifyService extends AbstractVerifyService {
try { try {
String r = HttpUtils.doPost(url, parms); String r = HttpUtils.doPost(url, parms);
LOGGER.info("dna01请求结果:{}",r); LOGGER.info("dna01请求结果:{}",r);
if (r != null && r.equals("1")) { if (r != null) {
result = true; JSONObject jsonObject = JSON.parseObject(r);
String status = jsonObject.getString("status");
if("1".equals(status)){
return true;
}
} }
}catch (IOException e){ }catch (IOException e){
LOGGER.info("dna01验证失败,IOException:{}",e.getMessage()); LOGGER.info("dna01验证失败,IOException:{}",e.getMessage());