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
875b7d3e
Commit
875b7d3e
authored
Jul 30, 2020
by
黎博
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增日志
parent
0b562cdf
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
9 deletions
+42
-9
QueryLoanUserDataServiceImpl.java
...qaplatform/service/impl/QueryLoanUserDataServiceImpl.java
+42
-9
No files found.
src/main/java/cn/quantgroup/qaplatform/service/impl/QueryLoanUserDataServiceImpl.java
View file @
875b7d3e
...
...
@@ -4,11 +4,11 @@ import cn.quantgroup.qaplatform.config.DynamicDataSource;
import
cn.quantgroup.qaplatform.domain.LoanUser
;
import
cn.quantgroup.qaplatform.service.QueryBasicLoanStatusDataService
;
import
cn.quantgroup.qaplatform.service.QueryLoanUserDataService
;
import
cn.quantgroup.qaplatform.utils.RandomDataUtils
;
import
cn.quantgroup.qaplatform.utils.page.PageResult
;
import
cn.quantgroup.qaplatform.utils.page.PageUtil
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -19,6 +19,7 @@ import java.util.List;
* 查询旧有数据
*/
@Service
@Slf4j
public
class
QueryLoanUserDataServiceImpl
implements
QueryLoanUserDataService
{
@Autowired
...
...
@@ -26,6 +27,7 @@ public class QueryLoanUserDataServiceImpl implements QueryLoanUserDataService {
/**
* 筛选某个状态的用户(0-注册未申请,1-授信中,2-审核通过,3-审核拒绝,4-审核通过未提现,5-放款成功,6-放款失败,7-多订单)
*
* @param namespace 环境
* @param status 用户状态
* @param channel 渠道id
...
...
@@ -42,6 +44,10 @@ public class QueryLoanUserDataServiceImpl implements QueryLoanUserDataService {
*/
if
(
status
==
0
)
{
List
<
String
>
uuidList
=
basicLoanStatusDataService
.
getUnApplyUserUuidList
(
namespace
,
channel
);
if
(
uuidList
.
isEmpty
())
{
log
.
info
(
"渠道:"
+
channel
+
"【注册未申请】的人数为空!"
);
return
null
;
}
PageHelper
.
startPage
(
pageNum
,
pageSize
);
result
=
basicLoanStatusDataService
.
getUserDataListByUuidList
(
namespace
,
uuidList
);
PageInfo
<
LoanUser
>
pageList
=
new
PageInfo
<>(
result
);
...
...
@@ -54,6 +60,10 @@ public class QueryLoanUserDataServiceImpl implements QueryLoanUserDataService {
*/
if
(
status
==
1
)
{
List
<
String
>
userIdList
=
basicLoanStatusDataService
.
getAuditStatusUserIdList
(
namespace
,
0
,
channel
);
if
(
userIdList
.
isEmpty
())
{
log
.
info
(
namespace
+
"环境,"
+
"渠道:"
+
channel
+
"【授信中】的人数为空!"
);
return
null
;
}
PageHelper
.
startPage
(
pageNum
,
pageSize
);
result
=
basicLoanStatusDataService
.
getUserDataListByUserIdList
(
namespace
,
userIdList
);
PageInfo
<
LoanUser
>
pageList
=
new
PageInfo
<>(
result
);
...
...
@@ -66,6 +76,10 @@ public class QueryLoanUserDataServiceImpl implements QueryLoanUserDataService {
*/
if
(
status
==
2
)
{
List
<
String
>
userIdList
=
basicLoanStatusDataService
.
getAuditStatusUserIdList
(
namespace
,
2
,
channel
);
if
(
userIdList
.
isEmpty
())
{
log
.
info
(
namespace
+
"环境,"
+
"渠道:"
+
channel
+
"【审核通过】的人数为空!"
);
return
null
;
}
PageHelper
.
startPage
(
pageNum
,
pageSize
);
result
=
basicLoanStatusDataService
.
getUserDataListByUserIdList
(
namespace
,
userIdList
);
PageInfo
<
LoanUser
>
pageList
=
new
PageInfo
<>(
result
);
...
...
@@ -78,9 +92,13 @@ public class QueryLoanUserDataServiceImpl implements QueryLoanUserDataService {
*/
if
(
status
==
3
)
{
List
<
String
>
userIdList
=
basicLoanStatusDataService
.
getAuditStatusUserIdList
(
namespace
,
1
,
channel
);
if
(
userIdList
.
isEmpty
())
{
log
.
info
(
namespace
+
"环境,"
+
"渠道:"
+
channel
+
"【审核拒绝】的人数为空!"
);
return
null
;
}
PageHelper
.
startPage
(
pageNum
,
pageSize
);
result
=
basicLoanStatusDataService
.
getUserDataListByUserIdList
(
namespace
,
userIdList
);
result
.
forEach
((
item
)
->
item
.
setFundId
(
fundId
));
result
.
forEach
((
item
)
->
item
.
setFundId
(
fundId
));
PageInfo
<
LoanUser
>
pageList
=
new
PageInfo
<>(
result
);
PageResult
pageResult
=
PageUtil
.
getPageResult
(
pageList
,
pageNum
,
pageSize
);
return
pageResult
;
...
...
@@ -91,9 +109,13 @@ public class QueryLoanUserDataServiceImpl implements QueryLoanUserDataService {
*/
if
(
status
==
4
)
{
List
<
String
>
userIdList
=
basicLoanStatusDataService
.
queryAuthAndUnWithdraw
(
namespace
,
channel
,
fundId
);
if
(
userIdList
.
isEmpty
())
{
log
.
info
(
namespace
+
"环境,"
+
"渠道:"
+
channel
+
", 资方:"
+
fundId
+
"【审核通过未提现】的人数为空!"
);
return
null
;
}
PageHelper
.
startPage
(
pageNum
,
pageSize
);
result
=
basicLoanStatusDataService
.
getUserDataListByUserIdList
(
namespace
,
userIdList
);
result
.
forEach
((
item
)
->
item
.
setFundId
(
fundId
));
result
.
forEach
((
item
)
->
item
.
setFundId
(
fundId
));
PageInfo
<
LoanUser
>
pageList
=
new
PageInfo
<>(
result
);
PageResult
pageResult
=
PageUtil
.
getPageResult
(
pageList
,
pageNum
,
pageSize
);
return
pageResult
;
...
...
@@ -104,9 +126,13 @@ public class QueryLoanUserDataServiceImpl implements QueryLoanUserDataService {
*/
if
(
status
==
5
)
{
List
<
String
>
userIdList
=
basicLoanStatusDataService
.
getLoanStatusUserIdList
(
namespace
,
1
,
channel
,
fundId
);
if
(
userIdList
.
isEmpty
())
{
log
.
info
(
namespace
+
"环境,"
+
"渠道:"
+
channel
+
", 资方:"
+
fundId
+
"【放款成功】的人数为空!"
);
return
null
;
}
PageHelper
.
startPage
(
pageNum
,
pageSize
);
result
=
basicLoanStatusDataService
.
getUserDataListByUserIdList
(
namespace
,
userIdList
);
result
.
forEach
((
item
)
->
item
.
setFundId
(
fundId
));
result
.
forEach
((
item
)
->
item
.
setFundId
(
fundId
));
PageInfo
<
LoanUser
>
pageList
=
new
PageInfo
<>(
result
);
PageResult
pageResult
=
PageUtil
.
getPageResult
(
pageList
,
pageNum
,
pageSize
);
return
pageResult
;
...
...
@@ -118,20 +144,25 @@ public class QueryLoanUserDataServiceImpl implements QueryLoanUserDataService {
if
(
status
==
6
)
{
List
<
String
>
userIdList
=
basicLoanStatusDataService
.
getLoanStatusUserIdList
(
namespace
,
0
,
channel
,
fundId
);
if
(
userIdList
.
isEmpty
())
{
log
.
info
(
namespace
+
"环境,"
+
"渠道:"
+
channel
+
", 资方:"
+
fundId
+
"【放款失败】的人数为空!"
);
return
null
;
}
PageHelper
.
startPage
(
pageNum
,
pageSize
);
result
=
basicLoanStatusDataService
.
getUserDataListByUserIdList
(
namespace
,
userIdList
);
result
.
forEach
((
item
)
->
item
.
setFundId
(
fundId
));
result
.
forEach
((
item
)
->
item
.
setFundId
(
fundId
));
PageInfo
<
LoanUser
>
pageList
=
new
PageInfo
<>(
result
);
PageResult
pageResult
=
PageUtil
.
getPageResult
(
pageList
,
pageNum
,
pageSize
);
return
pageResult
;
}
/**
* 7-多订单
* 7-多订单
白名单
*/
if
(
status
==
7
)
{
List
<
String
>
uuidList
=
basicLoanStatusDataService
.
getMultiOrderUserDataList
(
namespace
);
if
(
uuidList
.
isEmpty
())
{
log
.
info
(
namespace
+
"环境,多订单白名单的用户数为0!"
);
return
null
;
}
PageHelper
.
startPage
(
pageNum
,
pageSize
);
...
...
@@ -140,11 +171,13 @@ public class QueryLoanUserDataServiceImpl implements QueryLoanUserDataService {
PageResult
pageResult
=
PageUtil
.
getPageResult
(
pageList
,
pageNum
,
pageSize
);
return
pageResult
;
}
log
.
info
(
"status="
+
status
+
"状态不存在!"
);
return
null
;
}
/**
* 清除数据源并重置为默认数据源
*
* @throws Throwable
*/
protected
void
finalize
()
throws
Throwable
{
...
...
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