Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-api-boot-master
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
lanbaoming
jiedao-api-boot-master
Commits
c9f8bdc8
Commit
c9f8bdc8
authored
Nov 09, 2024
by
zhengyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
客户列表相关查询返回客户最新跟进记录
parent
1ac03b4d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
83 additions
and
21 deletions
+83
-21
CustomerServiceImpl.java
...module/customer/service/customer/CustomerServiceImpl.java
+0
-14
CustomerController.java
...ustomer/controller/admin/customer/CustomerController.java
+83
-7
No files found.
yudao-module-customer/yudao-module-customer-core/src/main/java/cn/iocoder/yudao/module/customer/service/customer/CustomerServiceImpl.java
View file @
c9f8bdc8
...
...
@@ -118,9 +118,6 @@ public class CustomerServiceImpl extends AbstractService<CustomerMapper,
@Resource
private
CustomerMapper
customerMapper
;
@Resource
private
CustomerFollowupService
customerFollowupService
;
@Resource
private
ParamValidatorService
paramValidatorService
;
...
...
@@ -1183,17 +1180,6 @@ public class CustomerServiceImpl extends AbstractService<CustomerMapper,
int
start
=
(
page
.
getPage
()
-
1
)
*
page
.
getRows
();
int
size
=
page
.
getRows
();
List
<
CustomerDO
>
list
=
customerMapper
.
getMyPage
(
start
,
size
,
pageReqVO
);
if
(
CollectionUtil
.
isNotEmpty
(
list
))
{
for
(
CustomerDO
customerDO
:
list
)
{
CustomerFollowupDO
customerFollowupDO
=
customerFollowupService
.
getOne
(
new
LambdaQueryWrapperX
<
CustomerFollowupDO
>()
.
eq
(
CustomerFollowupDO:
:
getCustomerId
,
customerDO
.
getId
())
.
orderByDesc
(
CustomerFollowupDO:
:
getId
)
.
last
(
"limit 1"
));
if
(
Objects
.
nonNull
(
customerFollowupDO
))
{
customerDO
.
setFollowupBackVO
(
CustomerFollowupConvert
.
INSTANCE
.
convert
(
customerFollowupDO
));
}
}
}
long
total
=
customerMapper
.
getMyPageCount
(
pageReqVO
);
return
new
PageResult
<>(
list
,
total
,
mpPage
.
getSize
(),
page
.
getPage
(),
...
...
yudao-module-customer/yudao-module-customer-rest/src/main/java/cn/iocoder/yudao/module/customer/controller/admin/customer/CustomerController.java
View file @
c9f8bdc8
...
...
@@ -20,12 +20,14 @@ import cn.iocoder.yudao.framework.web.core.util.WebFrameworkUtils;
import
cn.iocoder.yudao.module.customer.convert.customer.CustomerConvert
;
import
cn.iocoder.yudao.module.customer.convert.customerBank.CustomerBankConvert
;
import
cn.iocoder.yudao.module.customer.convert.customerContacts.CustomerContactsConvert
;
import
cn.iocoder.yudao.module.customer.convert.customerFollowup.CustomerFollowupConvert
;
import
cn.iocoder.yudao.module.customer.dal.dataobject.customer.CustomerDO
;
import
cn.iocoder.yudao.module.customer.dal.dataobject.customer.commission.CustomerCommissionDO
;
import
cn.iocoder.yudao.module.customer.dal.dataobject.customer.complaint.CustomerComplaintDO
;
import
cn.iocoder.yudao.module.customer.dal.dataobject.customer.follow.CustomerFollowDO
;
import
cn.iocoder.yudao.module.customer.dal.dataobject.customerBank.CustomerBankDO
;
import
cn.iocoder.yudao.module.customer.dal.dataobject.customerContacts.CustomerContactsDO
;
import
cn.iocoder.yudao.module.customer.dal.dataobject.customerFollowup.CustomerFollowupDO
;
import
cn.iocoder.yudao.module.customer.dal.mysql.customerDetail.CustomerDetailMapper
;
import
cn.iocoder.yudao.module.customer.dto.CustomerDelayApprovalInfoDto
;
import
cn.iocoder.yudao.module.customer.dto.CustomerExportReqDTO
;
...
...
@@ -38,6 +40,7 @@ import cn.iocoder.yudao.module.customer.service.customer.complaint.follow.Custom
import
cn.iocoder.yudao.module.customer.service.customerBank.CustomerBankService
;
import
cn.iocoder.yudao.module.customer.service.customerContacts.CustomerContactsService
;
import
cn.iocoder.yudao.module.customer.service.customerCredit.CustomerCreditService
;
import
cn.iocoder.yudao.module.customer.service.customerFollowup.CustomerFollowupService
;
import
cn.iocoder.yudao.module.customer.service.customerLevel.CustomerLevelService
;
import
cn.iocoder.yudao.module.customer.service.customerLevelLog.CustomerLevelLogServiceImpl
;
import
cn.iocoder.yudao.module.customer.service.customerOperateLog.CustomerOperateLogService
;
...
...
@@ -117,7 +120,8 @@ public class CustomerController {
@Resource
private
CustomerService
customerService
;
@Resource
private
CustomerFollowupService
customerFollowupService
;
@Resource
private
CustomerMergeService
customerMergeService
;
...
...
@@ -528,7 +532,19 @@ public class CustomerController {
PageResult
<
CustomerDO
>
pageResult
=
customerService
.
getWaitToConfirmCustomerPageReq
(
customerPageReqVO
,
page
);
return
success
(
CustomerConvert
.
INSTANCE
.
convertPage
(
pageResult
));
PageResult
<
CustomerRespVO
>
respVOPageResult
=
CustomerConvert
.
INSTANCE
.
convertPage
(
pageResult
);
if
(
CollectionUtil
.
isNotEmpty
(
respVOPageResult
.
getList
()))
{
for
(
CustomerRespVO
respVO
:
respVOPageResult
.
getList
())
{
CustomerFollowupDO
customerFollowupDO
=
customerFollowupService
.
getOne
(
new
LambdaQueryWrapperX
<
CustomerFollowupDO
>()
.
eq
(
CustomerFollowupDO:
:
getCustomerId
,
respVO
.
getId
())
.
orderByDesc
(
CustomerFollowupDO:
:
getId
)
.
last
(
"limit 1"
));
if
(
Objects
.
nonNull
(
customerFollowupDO
))
{
respVO
.
setFollowupBackVO
(
CustomerFollowupConvert
.
INSTANCE
.
convert
(
customerFollowupDO
));
}
}
}
return
success
(
respVOPageResult
);
}
private
Integer
getCustomerTime
(
String
customers_to_be_assigned
,
int
i
)
{
...
...
@@ -552,7 +568,19 @@ public class CustomerController {
//PageResult<CustomerDO> pageResult = customerService.getCustomerPage(pageVO);
PageResult
<
CustomerDO
>
pageResult
=
customerService
.
getMyCustomerPage
(
pageVO
,
page
);
return
success
(
CustomerConvert
.
INSTANCE
.
convertPage
(
pageResult
));
PageResult
<
CustomerRespVO
>
respVOPageResult
=
CustomerConvert
.
INSTANCE
.
convertPage
(
pageResult
);
if
(
CollectionUtil
.
isNotEmpty
(
respVOPageResult
.
getList
()))
{
for
(
CustomerRespVO
respVO
:
respVOPageResult
.
getList
())
{
CustomerFollowupDO
customerFollowupDO
=
customerFollowupService
.
getOne
(
new
LambdaQueryWrapperX
<
CustomerFollowupDO
>()
.
eq
(
CustomerFollowupDO:
:
getCustomerId
,
respVO
.
getId
())
.
orderByDesc
(
CustomerFollowupDO:
:
getId
)
.
last
(
"limit 1"
));
if
(
Objects
.
nonNull
(
customerFollowupDO
))
{
respVO
.
setFollowupBackVO
(
CustomerFollowupConvert
.
INSTANCE
.
convert
(
customerFollowupDO
));
}
}
}
return
success
(
respVOPageResult
);
}
@GetMapping
(
"/get-wait-for-distribution"
)
...
...
@@ -562,7 +590,19 @@ public class CustomerController {
//
PageResult
<
CustomerDO
>
pageResult
=
customerService
.
getWaitToAssignedCustomerPageReq
(
customerPageReqVO
,
page
);
return
success
(
CustomerConvert
.
INSTANCE
.
convertPage
(
pageResult
));
PageResult
<
CustomerRespVO
>
respVOPageResult
=
CustomerConvert
.
INSTANCE
.
convertPage
(
pageResult
);
if
(
CollectionUtil
.
isNotEmpty
(
respVOPageResult
.
getList
()))
{
for
(
CustomerRespVO
respVO
:
respVOPageResult
.
getList
())
{
CustomerFollowupDO
customerFollowupDO
=
customerFollowupService
.
getOne
(
new
LambdaQueryWrapperX
<
CustomerFollowupDO
>()
.
eq
(
CustomerFollowupDO:
:
getCustomerId
,
respVO
.
getId
())
.
orderByDesc
(
CustomerFollowupDO:
:
getId
)
.
last
(
"limit 1"
));
if
(
Objects
.
nonNull
(
customerFollowupDO
))
{
respVO
.
setFollowupBackVO
(
CustomerFollowupConvert
.
INSTANCE
.
convert
(
customerFollowupDO
));
}
}
}
return
success
(
respVOPageResult
);
}
@GetMapping
(
"/get-public"
)
...
...
@@ -572,7 +612,19 @@ public class CustomerController {
PageResult
<
CustomerDO
>
pageResult
=
customerService
.
getOpenSeaCustomerPageReq
(
customerPageReqVO
,
page
);
return
success
(
CustomerConvert
.
INSTANCE
.
convertPage
(
pageResult
));
PageResult
<
CustomerRespVO
>
respVOPageResult
=
CustomerConvert
.
INSTANCE
.
convertPage
(
pageResult
);
if
(
CollectionUtil
.
isNotEmpty
(
respVOPageResult
.
getList
()))
{
for
(
CustomerRespVO
respVO
:
respVOPageResult
.
getList
())
{
CustomerFollowupDO
customerFollowupDO
=
customerFollowupService
.
getOne
(
new
LambdaQueryWrapperX
<
CustomerFollowupDO
>()
.
eq
(
CustomerFollowupDO:
:
getCustomerId
,
respVO
.
getId
())
.
orderByDesc
(
CustomerFollowupDO:
:
getId
)
.
last
(
"limit 1"
));
if
(
Objects
.
nonNull
(
customerFollowupDO
))
{
respVO
.
setFollowupBackVO
(
CustomerFollowupConvert
.
INSTANCE
.
convert
(
customerFollowupDO
));
}
}
}
return
success
(
respVOPageResult
);
}
@GetMapping
(
"/delay/approval/info"
)
...
...
@@ -673,7 +725,19 @@ public class CustomerController {
// customerPageReqVO.setFlag4QueryCondition("Y");
PageResult
<
CustomerDO
>
pageResult
=
customerService
.
getMyCustomerPage
(
customerPageReqVO
,
page
);
return
success
(
CustomerConvert
.
INSTANCE
.
convertPage
(
pageResult
));
PageResult
<
CustomerRespVO
>
respVOPageResult
=
CustomerConvert
.
INSTANCE
.
convertPage
(
pageResult
);
if
(
CollectionUtil
.
isNotEmpty
(
respVOPageResult
.
getList
()))
{
for
(
CustomerRespVO
respVO
:
respVOPageResult
.
getList
())
{
CustomerFollowupDO
customerFollowupDO
=
customerFollowupService
.
getOne
(
new
LambdaQueryWrapperX
<
CustomerFollowupDO
>()
.
eq
(
CustomerFollowupDO:
:
getCustomerId
,
respVO
.
getId
())
.
orderByDesc
(
CustomerFollowupDO:
:
getId
)
.
last
(
"limit 1"
));
if
(
Objects
.
nonNull
(
customerFollowupDO
))
{
respVO
.
setFollowupBackVO
(
CustomerFollowupConvert
.
INSTANCE
.
convert
(
customerFollowupDO
));
}
}
}
return
success
(
respVOPageResult
);
}
@PutMapping
(
"/confirm"
)
...
...
@@ -752,7 +816,19 @@ public class CustomerController {
//PageResult<CustomerDO> pageResult = customerService.getCustomerPage(pageVO);
PageResult
<
CustomerDO
>
pageResult
=
customerService
.
getMyCustomerPage
(
pageVO
,
page
);
return
success
(
CustomerConvert
.
INSTANCE
.
convertPage
(
pageResult
));
PageResult
<
CustomerRespVO
>
respVOPageResult
=
CustomerConvert
.
INSTANCE
.
convertPage
(
pageResult
);
if
(
CollectionUtil
.
isNotEmpty
(
respVOPageResult
.
getList
()))
{
for
(
CustomerRespVO
respVO
:
respVOPageResult
.
getList
())
{
CustomerFollowupDO
customerFollowupDO
=
customerFollowupService
.
getOne
(
new
LambdaQueryWrapperX
<
CustomerFollowupDO
>()
.
eq
(
CustomerFollowupDO:
:
getCustomerId
,
respVO
.
getId
())
.
orderByDesc
(
CustomerFollowupDO:
:
getId
)
.
last
(
"limit 1"
));
if
(
Objects
.
nonNull
(
customerFollowupDO
))
{
respVO
.
setFollowupBackVO
(
CustomerFollowupConvert
.
INSTANCE
.
convert
(
customerFollowupDO
));
}
}
}
return
success
(
respVOPageResult
);
}
@GetMapping
(
"/deptPage"
)
...
...
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