|
|
@ -4,6 +4,8 @@ import cn.hutool.core.bean.BeanUtil; |
|
|
|
import cn.hutool.core.bean.copier.CopyOptions; |
|
|
|
import cn.hutool.core.bean.copier.CopyOptions; |
|
|
|
import cn.hutool.json.JSONUtil; |
|
|
|
import cn.hutool.json.JSONUtil; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
|
|
|
|
import com.jianshui.common.config.JianshuiConfig; |
|
|
|
|
|
|
|
import com.jianshui.common.constant.Constants; |
|
|
|
import com.jianshui.common.core.domain.AjaxResult; |
|
|
|
import com.jianshui.common.core.domain.AjaxResult; |
|
|
|
import com.jianshui.common.core.domain.entity.Companyservice; |
|
|
|
import com.jianshui.common.core.domain.entity.Companyservice; |
|
|
|
import com.jianshui.common.enums.ErrorCode; |
|
|
|
import com.jianshui.common.enums.ErrorCode; |
|
|
@ -44,6 +46,8 @@ public class AutonomousSqServiceImpl implements AutonomousSqService { |
|
|
|
private InvoiceAllLoginResultMapper invoiceAllLoginResultMapper; |
|
|
|
private InvoiceAllLoginResultMapper invoiceAllLoginResultMapper; |
|
|
|
@Autowired |
|
|
|
@Autowired |
|
|
|
private CompanyserviceMapper companyserviceMapper; |
|
|
|
private CompanyserviceMapper companyserviceMapper; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
|
|
|
|
private JianshuiConfig jianshuiConfig; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 功能描述: 自主授权回调接口 |
|
|
|
* 功能描述: 自主授权回调接口 |
|
|
@ -219,10 +223,10 @@ public class AutonomousSqServiceImpl implements AutonomousSqService { |
|
|
|
try { |
|
|
|
try { |
|
|
|
// 回调地址
|
|
|
|
// 回调地址
|
|
|
|
inoviceAllQdLoginDTO.setLoginType("1"); |
|
|
|
inoviceAllQdLoginDTO.setLoginType("1"); |
|
|
|
inoviceAllQdLoginDTO.setCallback("http://www.goldentaxcloud.com:8081/api/invoice_all/v1/autonomousAuthorization"); |
|
|
|
inoviceAllQdLoginDTO.setCallback(jianshuiConfig.configCallbackUrl()); |
|
|
|
log.info("全电登录接口,请求上游,地址:{},参数:{}", "http://zzsq.jcsk100.com/login/getLogin2", JSONUtil.toJsonStr(inoviceAllQdLoginDTO)); |
|
|
|
log.info("全电登录接口,请求上游,地址:{},参数:{}", Constants.QD_LOGIN, JSONUtil.toJsonStr(inoviceAllQdLoginDTO)); |
|
|
|
Thread requestThread = new Thread(() -> { |
|
|
|
Thread requestThread = new Thread(() -> { |
|
|
|
HttpUtils.sendJsonPost("http://zzsq.jcsk100.com/login/getLogin2", inoviceAllQdLoginDTO); |
|
|
|
HttpUtils.sendJsonPost(Constants.QD_LOGIN, inoviceAllQdLoginDTO); |
|
|
|
}); |
|
|
|
}); |
|
|
|
requestThread.start(); |
|
|
|
requestThread.start(); |
|
|
|
// 用户信息封装
|
|
|
|
// 用户信息封装
|
|
|
@ -240,7 +244,7 @@ public class AutonomousSqServiceImpl implements AutonomousSqService { |
|
|
|
invoiceAllApiLog.setCreateTime(new Date()); |
|
|
|
invoiceAllApiLog.setCreateTime(new Date()); |
|
|
|
invoiceAllApiLog.setCompany(companyservice.getSellertax()); |
|
|
|
invoiceAllApiLog.setCompany(companyservice.getSellertax()); |
|
|
|
invoiceAllApiLog.setIdentityId(companyservice.getIdentity()); |
|
|
|
invoiceAllApiLog.setIdentityId(companyservice.getIdentity()); |
|
|
|
invoiceAllApiLog.setUrl("http://zzsq.jcsk100.com/login/getLogin2"); |
|
|
|
invoiceAllApiLog.setUrl(Constants.QD_LOGIN); |
|
|
|
invoiceAllApiLog.setSendMsg(JSONUtil.toJsonStr(inoviceAllQdLoginDTO)); |
|
|
|
invoiceAllApiLog.setSendMsg(JSONUtil.toJsonStr(inoviceAllQdLoginDTO)); |
|
|
|
invoiceAllApiLog.setRequestId(qqlsh); |
|
|
|
invoiceAllApiLog.setRequestId(qqlsh); |
|
|
|
allApiLogMapper.insert(invoiceAllApiLog); |
|
|
|
allApiLogMapper.insert(invoiceAllApiLog); |
|
|
@ -282,9 +286,9 @@ public class AutonomousSqServiceImpl implements AutonomousSqService { |
|
|
|
if ("SMS".equals(invoiceAllLoginResult.getCode()) || "F000".equals(invoiceAllLoginResult.getCode())) { |
|
|
|
if ("SMS".equals(invoiceAllLoginResult.getCode()) || "F000".equals(invoiceAllLoginResult.getCode())) { |
|
|
|
try { |
|
|
|
try { |
|
|
|
// 请求封装
|
|
|
|
// 请求封装
|
|
|
|
log.info("自主授权短信提交接口,请求上游地址:{},入参:{}", "http://zzsq.jcsk100.com/login/submitSms", JSONUtil.toJsonStr(invoiceAllSubmitNoteDTO)); |
|
|
|
log.info("自主授权短信提交接口,请求上游地址:{},入参:{}", Constants.SUBMIT_SMS, JSONUtil.toJsonStr(invoiceAllSubmitNoteDTO)); |
|
|
|
Thread requestThread = new Thread(() -> { |
|
|
|
Thread requestThread = new Thread(() -> { |
|
|
|
HttpUtils.sendJsonPost("http://zzsq.jcsk100.com/login/submitSms", invoiceAllSubmitNoteDTO); |
|
|
|
HttpUtils.sendJsonPost(Constants.SUBMIT_SMS,invoiceAllSubmitNoteDTO); |
|
|
|
}); |
|
|
|
}); |
|
|
|
requestThread.start(); |
|
|
|
requestThread.start(); |
|
|
|
} catch (Exception e) { |
|
|
|
} catch (Exception e) { |
|
|
|