Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cash-loan-flow-boss
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
QG
cash-loan-flow-boss
Commits
705109b4
Commit
705109b4
authored
Dec 31, 2019
by
shangying
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sonar问题修改5
parent
ccbaf42a
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
59 additions
and
25 deletions
+59
-25
CommonType.java
...p/cashloanflowboss/api/oneclickdata/model/CommonType.java
+26
-0
ResposeResultEnum.java
...oanflowboss/api/oneclickdata/model/ResposeResultEnum.java
+2
-1
CreditGrantingServiceImpl.java
.../oneclickdata/service/impl/CreditGrantingServiceImpl.java
+5
-3
LoanOperationServiceImpl.java
...i/oneclickdata/service/impl/LoanOperationServiceImpl.java
+3
-2
OneClickDataQueueOperateServiceImpl.java
...ata/service/impl/OneClickDataQueueOperateServiceImpl.java
+6
-4
GetBiNoAndFinanceProducts.java
...oup/cashloanflowboss/utils/GetBiNoAndFinanceProducts.java
+9
-8
HttpService.java
...n/quantgroup/cashloanflowboss/utils/http/HttpService.java
+8
-7
No files found.
src/main/java/cn/quantgroup/cashloanflowboss/api/oneclickdata/model/CommonType.java
0 → 100644
View file @
705109b4
package
cn
.
quantgroup
.
cashloanflowboss
.
api
.
oneclickdata
.
model
;
import
lombok.Getter
;
/**
* Created by shang on 2019/12/31.
*/
@Getter
public
enum
CommonType
{
PRODUCTTYPEONE
(
1
,
"1"
),
PRODUCTTYPETWO
(
2
,
"2"
),
PRODUCTTYPETHR
(
3
,
"3"
),
PRODUCTTYPEFOUR
(
4
,
"4"
),
PRODUCTTYPETHREEN
(
3
,
"3"
),
PRODUCTID900
(
900
,
"900"
),
PRODUCTID910
(
910
,
"910"
),
PRODUCTID920
(
920
,
"920"
);
private
int
code
;
private
String
desc
;
CommonType
(
int
code
,
String
desc
)
{
this
.
code
=
code
;
this
.
desc
=
desc
;
}
}
src/main/java/cn/quantgroup/cashloanflowboss/api/oneclickdata/model/ResposeResultEnum.java
View file @
705109b4
...
...
@@ -12,7 +12,8 @@ public enum ResposeResultEnum {
STATUSCODE
(
3
,
"200"
),
CONTEXT
(
4
,
"success"
),
FUAD_ASSIFN_SUCC
(
5
,
"FUAD_ASSIFN_SUCC"
),
FUND_SUCC
(
6
,
"FUND_SUCC"
);
FUND_SUCC
(
6
,
"FUND_SUCC"
),
FUND_CORD210
(
7
,
"210"
);
private
int
code
;
private
String
desc
;
...
...
src/main/java/cn/quantgroup/cashloanflowboss/api/oneclickdata/service/impl/CreditGrantingServiceImpl.java
View file @
705109b4
...
...
@@ -140,7 +140,7 @@ public class CreditGrantingServiceImpl implements CreditGrantingService{
String
statusCode
=
result
.
get
(
"statusCode"
).
toString
().
trim
();
String
context
=
result
.
get
(
"context"
).
toString
().
trim
();
if
(
"200"
.
equals
(
statusCode
)
&&
"success"
.
equals
(
context
)){
if
(
ResposeResultEnum
.
STATUSCODE
.
getDesc
().
equals
(
statusCode
)
&&
ResposeResultEnum
.
CONTEXT
.
getDesc
()
.
equals
(
context
)){
//从数据库中获取当前的订单
log
.
info
(
"userId={},CreditStatusEnum={},LoanStatusEnum={},channel={}"
,
userId
,
CreditStatusEnum
.
DEFAULT
.
getCode
(),
LoanStatusEnum
.
DEFAULT
.
getCode
(),
oneClickModel
.
getChannel
());
OneClickData
oneClickData
=
oneClickDataRespository
.
findByUserIdAndCreditStatusAndLoanStatusAndChannelCode
(
userId
.
toString
().
trim
(),
CreditStatusEnum
.
DEFAULT
.
getCode
(),
LoanStatusEnum
.
DEFAULT
.
getCode
(),
oneClickModel
.
getChannel
().
toString
().
trim
());
...
...
@@ -164,7 +164,8 @@ public class CreditGrantingServiceImpl implements CreditGrantingService{
}
else
{
num
++;
log
.
info
(
"打印循环次数num:{}"
,
num
);
if
(
num
<=
3
)
{
int
numsum
=
3
;
if
(
num
<=
numsum
)
{
applyCreditNotify
(
oneClickModel
,
auditResult
,
num
);
}
else
{
return
Result
.
buildFail
(
"quotaCredit授信记录状态非creditStatus=1!!!,请检查数据"
)
;
...
...
@@ -178,7 +179,8 @@ public class CreditGrantingServiceImpl implements CreditGrantingService{
public
QuotaCredit
quotaCredit
(
Long
userId
,
Long
channel
,
int
num
)
throws
InterruptedException
{
QuotaCredit
quotaCredit
=
phoneInfoService
.
selectUserAuditRecords
(
userId
,
channel
);
if
(
num
<=
5
&&
Objects
.
isNull
(
quotaCredit
)){
int
numsum
=
5
;
if
(
num
<=
numsum
&&
Objects
.
isNull
(
quotaCredit
)){
num
++;
log
.
info
(
"打印一下num={}"
,
num
);
quotaCredit
(
userId
,
channel
,
num
);
...
...
src/main/java/cn/quantgroup/cashloanflowboss/api/oneclickdata/service/impl/LoanOperationServiceImpl.java
View file @
705109b4
...
...
@@ -2,6 +2,7 @@ package cn.quantgroup.cashloanflowboss.api.oneclickdata.service.impl;
import
cn.quantgroup.cashloanflowboss.api.oneclickdata.entity.OneClickData
;
import
cn.quantgroup.cashloanflowboss.api.oneclickdata.model.LoanStatusEnum
;
import
cn.quantgroup.cashloanflowboss.api.oneclickdata.model.ResposeResultEnum
;
import
cn.quantgroup.cashloanflowboss.api.oneclickdata.repository.OneClickDataRespository
;
import
cn.quantgroup.cashloanflowboss.api.oneclickdata.service.FundsAllocationplanService
;
import
cn.quantgroup.cashloanflowboss.api.oneclickdata.service.LoanOperationService
;
...
...
@@ -195,11 +196,11 @@ public class LoanOperationServiceImpl implements LoanOperationService{
JSONObject
result
=
HttpRequest
.
doPostReturnResponseJson
(
url
,
paras
,
header
);
String
businessCode
=
result
.
get
(
"businessCode"
).
toString
().
trim
();
String
code
=
result
.
get
(
"code"
).
toString
().
trim
();
if
(
"0000"
.
equals
(
businessCode
)
&&
"0000"
.
equals
(
code
))
{
if
(
ResposeResultEnum
.
BUSINESSCODE
.
getDesc
().
equals
(
businessCode
)
&&
ResposeResultEnum
.
BUSINESSCODE
.
getDesc
()
.
equals
(
code
))
{
// 需要咨询这个接口
// 待续中。。。。。。
if
(!
fundCorpId
.
equals
(
"210"
))
{
if
(!
fundCorpId
.
equals
(
ResposeResultEnum
.
FUND_CORD210
.
getDesc
()
))
{
// 查看当前的放款单的状态是21
LoanApplicationHistory
loanApplicationHistory
=
loanOperationService
.
selectLoanId
(
Long
.
valueOf
(
oneClickData
.
getUserId
().
trim
()),
oneClickData
.
getBizType
());
log
.
info
(
"放款通知请求完毕后loanApplicationHistory={}"
,
loanApplicationHistory
);
...
...
src/main/java/cn/quantgroup/cashloanflowboss/api/oneclickdata/service/impl/OneClickDataQueueOperateServiceImpl.java
View file @
705109b4
...
...
@@ -113,7 +113,7 @@ public class OneClickDataQueueOperateServiceImpl implements OneClickDataQueueOpe
log
.
info
(
"修改数据失败"
);
}
// 放款成功、放款失败、清单的流程需要进行二次风控操作
if
(
oneClickData
.
getType
()
!=
7
)
{
if
(
oneClickData
.
getType
()
!=
TypeEnum
.
CASHWITHDRAWAL
.
getCode
()
)
{
log
.
info
(
"当前的流程类型oneClickData.getType()={}"
,
oneClickData
.
getType
());
oneClickData
=
oneClickDataRespository
.
findByLoanId
(
loanApplicationHistory
.
getId
().
toString
().
trim
());
getBingSucc
(
oneClickData
);
...
...
@@ -134,7 +134,7 @@ public class OneClickDataQueueOperateServiceImpl implements OneClickDataQueueOpe
public
void
isNotSecondRiskSucc
(
JSONObject
result
,
OneClickData
oneClickData
){
String
statusCode
=
result
.
get
(
"statusCode"
).
toString
().
trim
();
String
context
=
result
.
get
(
"context"
).
toString
().
trim
();
if
(
"200"
.
equals
(
statusCode
)
&&
"success"
.
equals
(
context
)){
if
(
ResposeResultEnum
.
STATUSCODE
.
getDesc
().
equals
(
statusCode
)
&&
ResposeResultEnum
.
CONTEXT
.
getDesc
()
.
equals
(
context
)){
// 查看当前的放款单的状态是20
LoanApplicationHistory
loanApplicationHistory
=
loanOperationService
.
selectLoanId
(
Long
.
valueOf
(
oneClickData
.
getUserId
().
trim
()),
oneClickData
.
getBizType
());
log
.
info
(
"获取查询的二次风控请求成功后的loanApplicationHistory={}"
,
loanApplicationHistory
);
...
...
@@ -186,7 +186,7 @@ public class OneClickDataQueueOperateServiceImpl implements OneClickDataQueueOpe
String
payStatus
=
"true"
;
// 通过申请类型确定是否要放款成功、失败
// 放款成功、清单修改状态成功,放款失败修改状态失败
if
(
oneClickData
.
getType
()
==
5
){
if
(
oneClickData
.
getType
()
==
TypeEnum
.
LOANFAIL
.
getCode
()
){
payStatus
=
"false"
;
}
else
{
payStatus
=
"true"
;
...
...
@@ -205,7 +205,9 @@ public class OneClickDataQueueOperateServiceImpl implements OneClickDataQueueOpe
//这边判断有问题需要改??????????????
// ?????????????
if
(
result
.
get
(
"businessCode"
).
toString
().
trim
().
equals
(
ResposeResultEnum
.
BUSINESSCODE
.
getDesc
())
&&
result
.
get
(
"code"
).
toString
().
trim
().
equals
(
ResposeResultEnum
.
BUSINESSCODE
.
getDesc
()))
{
String
businessCode
=
result
.
get
(
"businessCode"
).
toString
().
trim
();
String
code
=
result
.
get
(
"code"
).
toString
().
trim
();
if
(
businessCode
.
equals
(
ResposeResultEnum
.
BUSINESSCODE
.
getDesc
())
&&
code
.
equals
(
ResposeResultEnum
.
BUSINESSCODE
.
getDesc
()))
{
// 查看当前的放款单的状态是21
LoanApplicationHistory
loanApplicationHistory
=
loanOperationService
.
selectLoanId
(
Long
.
valueOf
(
oneClickData
.
getUserId
().
trim
()),
oneClickData
.
getBizType
());
log
.
info
(
"放款请求成功后的loanApplicationHistory={}"
,
loanApplicationHistory
);
...
...
src/main/java/cn/quantgroup/cashloanflowboss/utils/GetBiNoAndFinanceProducts.java
View file @
705109b4
package
cn
.
quantgroup
.
cashloanflowboss
.
utils
;
import
cn.quantgroup.cashloanflowboss.api.oneclickdata.model.CommonType
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
...
...
@@ -15,16 +16,16 @@ public class GetBiNoAndFinanceProducts {
JSONArray
financeProducts
=
new
JSONArray
();
JSONArray
terms
=
new
JSONArray
();
JSONObject
para1
=
new
JSONObject
();
if
(
productId
==
1
||
productId
==
4
||
productId
==
900
||
productId
==
910
||
productId
==
920
){
if
(
productId
==
900
){
if
(
productId
==
CommonType
.
PRODUCTTYPEONE
.
getCode
()
||
productId
==
CommonType
.
PRODUCTTYPEFOUR
.
getCode
()
||
productId
==
CommonType
.
PRODUCTID900
.
getCode
()
||
productId
==
CommonType
.
PRODUCTID910
.
getCode
()
||
productId
==
CommonType
.
PRODUCTTYPEONE
.
getCode
()
){
if
(
productId
==
CommonType
.
PRODUCTID900
.
getCode
()
){
getResult
.
put
(
"biNo"
,
"9"
);
}
else
if
(
productId
==
910
){
}
else
if
(
productId
==
CommonType
.
PRODUCTID910
.
getCode
()
){
getResult
.
put
(
"biNo"
,
"9"
);
}
else
if
(
productId
==
920
){
}
else
if
(
productId
==
CommonType
.
PRODUCTID920
.
getCode
()
){
getResult
.
put
(
"biNo"
,
"9"
);
}
...
...
@@ -51,7 +52,7 @@ public class GetBiNoAndFinanceProducts {
para1
.
put
(
"terms"
,
terms
);
financeProducts
.
add
(
para1
);
getResult
.
put
(
"financeProducts"
,
financeProducts
);
}
else
if
(
productId
==
2
){
}
else
if
(
productId
==
CommonType
.
PRODUCTTYPETWO
.
getCode
()
){
getResult
.
put
(
"biNo"
,
"2"
);
para1
.
put
(
"min"
,
listPara1
.
get
(
4
).
toString
().
trim
());
para1
.
put
(
"max"
,
listPara1
.
get
(
0
).
toString
().
trim
());
...
...
@@ -79,11 +80,11 @@ public class GetBiNoAndFinanceProducts {
public
static
String
getBiNo
(
int
productId
){
String
biNo
=
"0"
;
if
(
productId
==
1
||
productId
==
4
){
if
(
productId
==
CommonType
.
PRODUCTTYPEONE
.
getCode
()
||
productId
==
CommonType
.
PRODUCTTYPEFOUR
.
getCode
()
){
biNo
=
"0"
;
}
else
if
(
productId
==
2
){
}
else
if
(
productId
==
CommonType
.
PRODUCTTYPETWO
.
getCode
()
){
biNo
=
"2"
;
}
else
if
(
productId
==
900
||
productId
==
910
||
productId
==
920
){
}
else
if
(
productId
==
CommonType
.
PRODUCTID900
.
getCode
()
||
productId
==
CommonType
.
PRODUCTID910
.
getCode
()
||
productId
==
CommonType
.
PRODUCTID920
.
getCode
()
){
biNo
=
"9"
;
}
return
biNo
;
...
...
src/main/java/cn/quantgroup/cashloanflowboss/utils/http/HttpService.java
View file @
705109b4
...
...
@@ -60,7 +60,8 @@ import java.util.zip.GZIPInputStream;
*/
@Slf4j
public
class
HttpService
{
private
final
static
String
httpsUrl
=
"https"
;
private
final
static
String
httpUrl
=
"http"
;
private
PoolingHttpClientConnectionManager
httpClientConnectionManager
=
null
;
private
static
final
HttpService
httpService
=
new
HttpService
();
...
...
@@ -134,7 +135,7 @@ public class HttpService {
HttpResultEntity
resultEntity
=
new
HttpResultEntity
();
String
result
=
""
;
if
(
null
==
urlString
||
urlString
.
isEmpty
()
||
!
urlString
.
startsWith
(
"http"
))
{
// 如果urlString为null或者urlString为空,或urlString非http开头,返回src空值
||
!
urlString
.
startsWith
(
httpUrl
))
{
// 如果urlString为null或者urlString为空,或urlString非http开头,返回src空值
return
resultEntity
;
}
...
...
@@ -165,7 +166,7 @@ public class HttpService {
// 执行请求
try
{
if
(
urlString
.
startsWith
(
"https"
))
{
if
(
urlString
.
startsWith
(
httpsUrl
))
{
System
.
setProperty
(
"jsse.enableSNIExtension"
,
"false"
);
if
(
filePath
==
null
){
response
=
createSSLClientDefault
().
execute
(
httpGet
,
localContext
);
...
...
@@ -253,7 +254,7 @@ public class HttpService {
// 执行请求
try
{
if
(
url
.
startsWith
(
"https"
))
{
if
(
url
.
startsWith
(
httpsUrl
))
{
System
.
setProperty
(
"jsse.enableSNIExtension"
,
"false"
);
if
(
filePath
==
null
){
response
=
createSSLClientDefault
().
execute
(
httpPost
,
localContext
);
...
...
@@ -327,7 +328,7 @@ public class HttpService {
// 执行请求
try
{
if
(
url
.
startsWith
(
"https"
))
{
if
(
url
.
startsWith
(
httpsUrl
))
{
System
.
setProperty
(
"jsse.enableSNIExtension"
,
"false"
);
if
(
filePath
==
null
){
response
=
createSSLClientDefault
().
execute
(
httpPost
,
localContext
);
...
...
@@ -475,8 +476,8 @@ public class HttpService {
// 执行请求
try
{
final
String
httpurl
=
"https"
;
if
(
url
.
startsWith
(
http
u
rl
))
{
if
(
url
.
startsWith
(
http
sU
rl
))
{
System
.
setProperty
(
"jsse.enableSNIExtension"
,
"false"
);
if
(
filePath
==
null
){
response
=
createSSLClientDefault
().
execute
(
httpPost
,
localContext
);
...
...
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