Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qa-platform
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
QA
qa-platform
Commits
5d5bb1c1
Commit
5d5bb1c1
authored
Sep 08, 2020
by
黎博
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Common里新增websocker.senInfo
parent
f84b590b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
1 deletion
+20
-1
Common.java
src/main/java/cn/qg/qaplatform/process/Common.java
+13
-0
Lexin.java
src/main/java/cn/qg/qaplatform/process/Lexin.java
+4
-1
LexinDataServiceImpl.java
...a/cn/qg/qaplatform/service/impl/LexinDataServiceImpl.java
+3
-0
No files found.
src/main/java/cn/qg/qaplatform/process/Common.java
View file @
5d5bb1c1
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
);
}
}
...
...
src/main/java/cn/qg/qaplatform/process/Lexin.java
View file @
5d5bb1c1
...
@@ -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
;
}
}
...
...
src/main/java/cn/qg/qaplatform/service/impl/LexinDataServiceImpl.java
View file @
5d5bb1c1
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
);
// 进件
// 进件
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment