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

Common里新增websocker.senInfo

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