Commit 5d5bb1c1 authored by 黎博's avatar 黎博

Common里新增websocker.senInfo

parent f84b590b
package cn.qg.qaplatform.process;
import cn.qg.qaplatform.config.WebSocketServer;
import cn.qg.qaplatform.utils.DBUtils;
import cn.qg.qaplatform.utils.Encrypt.LexinEncrypt;
import cn.qg.qaplatform.utils.HttpClientUtils;
......@@ -7,6 +8,7 @@ import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import lombok.extern.slf4j.Slf4j;
import org.springframework.util.DigestUtils;
import org.springframework.util.StringUtils;
import java.net.URISyntaxException;
import java.sql.SQLException;
......@@ -17,6 +19,7 @@ public class Common {
public static String MD5Keywy = "qEAxMJBv";
public static String AESKeywy = "sxD8KO79EDK0N0AJ";
public static String symbol = null;
/**
* 登录KA联调平台
......@@ -74,6 +77,10 @@ public class Common {
headers.put("Content-Type", "application/x-www-form-urlencoded");
JSONObject result = HttpClientUtils.doPost(url, "content=" + contentStr);
String response = LexinEncrypt.decryptAfterBase64Decode(result.get("content").toString(), AESKeywy);
if (!StringUtils.isEmpty(symbol)) {
WebSocketServer.sendInfo("提现参数为:" + contentStr, symbol);
WebSocketServer.sendInfo("提现结果为:" + contentStr, symbol);
}
log.info("提现后结果为:" + response);
return true;
}
......@@ -87,6 +94,9 @@ public class Common {
DBUtils dbUtils = new DBUtils(namespace, "cash_loan_flow", "qa", "qatest");
Map map = dbUtils.queryForMap(sql);
String channelOrderNo = map.get("channel_order_no").toString();
if (!StringUtils.isEmpty(symbol)) {
WebSocketServer.sendInfo("查询到的订单号为:" + channelOrderNo, symbol);
}
log.info("{}查询到的渠道订单号为:{}", phoneNo, channelOrderNo);
return channelOrderNo;
}
......@@ -100,6 +110,9 @@ public class Common {
DBUtils dbUtils = new DBUtils(namespace, "xyqb", "qa", "qatest");
Map map = dbUtils.queryForMap(sql);
String loanId = map.get("id").toString();
if (!StringUtils.isEmpty(symbol)) {
WebSocketServer.sendInfo("查询到的loanId为:" + loanId, symbol);
}
log.info("{}查询到的loanId为:{}", phoneNo, loanId);
return Integer.parseInt(loanId);
}
......
......@@ -84,7 +84,7 @@ public class Lexin {
content.put("bizData", bizDataStr);
log.info("进件参数为:" + content);
if (!StringUtils.isEmpty(symbol)) {
WebSocketServer.sendInfo("进件参数为:{}", content.toString());
WebSocketServer.sendInfo("进件参数为:{}" + content.toString(), symbol);
}
String contentStr = LexinEncrypt.encryptAndBase64Encode(JSONObject.toJSONString(content), AESKeywy);
......@@ -93,6 +93,9 @@ public class Lexin {
JSONObject result = HttpClientUtils.doPost(url, "content=" + contentStr);
String response = LexinEncrypt.decryptAfterBase64Decode(result.get("content").toString(), AESKeywy);
log.info("乐信进件返回结果: {}", JSONObject.parseObject(response).toString());
if (!StringUtils.isEmpty(symbol)) {
WebSocketServer.sendInfo("进件返回结果为:" + response, symbol);
}
return true;
}
......
package cn.qg.qaplatform.service.impl;
import cn.qg.qaplatform.common.enums.ChannelEnum;
import cn.qg.qaplatform.config.WebSocketServer;
import cn.qg.qaplatform.domain.ApplyDataVo;
import cn.qg.qaplatform.process.Common;
import cn.qg.qaplatform.process.Lexin;
......@@ -8,6 +9,7 @@ import cn.qg.qaplatform.process.Xyqb;
import cn.qg.qaplatform.service.QueryInProcessStatusService;
import cn.qg.qaplatform.service.LexinDataService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;
......@@ -35,6 +37,7 @@ public class LexinDataServiceImpl implements LexinDataService {
Integer amount = applyDataVo.getAmount();
Integer term = applyDataVo.getTerm();
Xyqb.symbol = symbol;
Common.symbol = symbol;
// 分配资产计划
boolean fundAssignResult = Common.assignFundCorp(namespace, fundId);
// 进件
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment