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
f00dcd2c
Commit
f00dcd2c
authored
Nov 16, 2024
by
zhengyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
补充完善跟进记录的数据权限业务
parent
62f37383
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
38 additions
and
4 deletions
+38
-4
20241116.sql
sql/v2.1/20241116.sql
+6
-0
CustomerFollowupDO.java
...r/dal/dataobject/customerFollowup/CustomerFollowupDO.java
+4
-0
CustomerFollowupServiceImpl.java
...service/customerFollowup/CustomerFollowupServiceImpl.java
+12
-2
CustomerFollowupBackVO.java
.../customer/vo/customerFollowup/CustomerFollowupBackVO.java
+8
-1
CustomerFollowupBaseVO.java
.../customer/vo/customerFollowup/CustomerFollowupBaseVO.java
+3
-0
CustomerFollowupMapper.xml
...main/resources/mapper/customer/CustomerFollowupMapper.xml
+4
-0
CustomerFollowupController.java
...er/admin/customerFollowup/CustomerFollowupController.java
+1
-1
No files found.
sql/v2.1/20241116.sql
0 → 100644
View file @
f00dcd2c
-- 补充跟进记录列表的客户经理所属部门id
alter
table
ecw_customer_followup
add
COLUMN
`dept_id`
bigint
DEFAULT
NULL
COMMENT
'客户经理/跟进业务员所属部门id'
after
`follow_user_id`
;
update
`ecw_customer_followup`
f
left
join
`system_user`
u
on
f
.
follow_user_id
=
u
.
id
set
f
.
dept_id
=
u
.
dept_id
;
\ No newline at end of file
yudao-module-customer/yudao-module-customer-core/src/main/java/cn/iocoder/yudao/module/customer/dal/dataobject/customerFollowup/CustomerFollowupDO.java
View file @
f00dcd2c
...
...
@@ -75,6 +75,10 @@ public class CustomerFollowupDO extends BaseDO {
* 客户经理/跟进业务员id
*/
private
Long
followUserId
;
@ApiModelProperty
(
value
=
"客户经理/跟进业务员所属部门id"
)
private
Long
deptId
;
/**
* 目的
*/
...
...
yudao-module-customer/yudao-module-customer-core/src/main/java/cn/iocoder/yudao/module/customer/service/customerFollowup/CustomerFollowupServiceImpl.java
View file @
f00dcd2c
...
...
@@ -22,6 +22,7 @@ import cn.iocoder.yudao.module.customer.vo.customerFollowup.*;
import
cn.iocoder.yudao.module.customer.vo.customerOperateLog.CustomerOperateLogCreateReqVO
;
import
cn.iocoder.yudao.module.ecw.enums.CustomerFollowupStatusEnum
;
import
cn.iocoder.yudao.module.ecw.enums.CustomerOperateTypeEnum
;
import
cn.iocoder.yudao.module.system.api.user.AdminUserApi
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
org.springframework.context.ApplicationContext
;
import
org.springframework.stereotype.Service
;
...
...
@@ -32,6 +33,7 @@ import javax.annotation.Resource;
import
java.util.Collection
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Objects
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
exception
.
util
.
ServiceExceptionUtil
.
exception
;
import
static
cn
.
iocoder
.
yudao
.
module
.
customer
.
enums
.
ErrorCodeConstants
.
FOLLOWUP_ALREADY_SUBMITTED
;
...
...
@@ -49,7 +51,8 @@ public class CustomerFollowupServiceImpl extends AbstractService<CustomerFollowu
@Resource
private
CustomerFollowupMapper
followupMapper
;
@Resource
private
AdminUserApi
adminUserApi
;
@Resource
private
CustomerOperateLogService
customerOperateLogService
;
...
...
@@ -107,6 +110,10 @@ public class CustomerFollowupServiceImpl extends AbstractService<CustomerFollowu
// 设置联系人名称
setContactName
(
followup
);
followup
.
setNumber
(
newNumber
);
if
(
Objects
.
nonNull
(
followup
.
getFollowUserId
())){
// 获取客户经理的部门id
followup
.
setDeptId
(
adminUserApi
.
getUserDeptId
(
followup
.
getFollowUserId
()));
}
followupMapper
.
insert
(
followup
);
Long
customerId
=
createReqVO
.
getCustomerId
();
...
...
@@ -164,7 +171,10 @@ public class CustomerFollowupServiceImpl extends AbstractService<CustomerFollowu
// 设置联系人名称
setContactName
(
updateObj
);
if
(
Objects
.
nonNull
(
updateObj
.
getFollowUserId
())){
// 获取客户经理的部门id
updateObj
.
setDeptId
(
adminUserApi
.
getUserDeptId
(
updateObj
.
getFollowUserId
()));
}
followupMapper
.
updateById
(
updateObj
);
Long
customerId
=
updateReqVO
.
getCustomerId
();
...
...
yudao-module-customer/yudao-module-customer-core/src/main/java/cn/iocoder/yudao/module/customer/vo/customerFollowup/CustomerFollowupBackVO.java
View file @
f00dcd2c
...
...
@@ -57,9 +57,16 @@ public class CustomerFollowupBackVO {
@ApiModelProperty
(
value
=
"客户经理/跟进业务员id"
)
private
Long
followUserId
;
@ExcelProperty
(
"客户经理"
)
@ApiModelProperty
(
"客户经理"
)
private
String
followUserName
;
@ApiModelProperty
(
value
=
"客户经理/跟进业务员所属部门id"
)
private
Long
deptId
;
@ApiModelProperty
(
"部门名称"
)
private
String
deptName
;
...
...
yudao-module-customer/yudao-module-customer-core/src/main/java/cn/iocoder/yudao/module/customer/vo/customerFollowup/CustomerFollowupBaseVO.java
View file @
f00dcd2c
...
...
@@ -50,6 +50,9 @@ public class CustomerFollowupBaseVO {
@ApiModelProperty
(
value
=
"客户经理/跟进业务员id"
)
private
Long
followUserId
;
@ApiModelProperty
(
value
=
"客户经理/跟进业务员所属部门id"
)
private
Long
deptId
;
@ApiModelProperty
(
value
=
"目的"
)
private
String
purpose
;
...
...
yudao-module-customer/yudao-module-customer-core/src/main/resources/mapper/customer/CustomerFollowupMapper.xml
View file @
f00dcd2c
...
...
@@ -24,6 +24,10 @@
AND a.offer_id in
<foreach
item=
'item'
index=
"index"
collection=
'query.offerIds'
open=
'('
separator=
','
close=
')'
>
#{item}
</foreach>
</if>
<if
test=
"query.deptIdList != null and query.deptIdList.size() > 0"
>
AND a.dept_id in
<foreach
item=
'deptId'
index=
"index"
collection=
'query.deptIdList'
open=
'('
separator=
','
close=
')'
>
#{deptId}
</foreach>
</if>
<if
test=
"query.followType != null"
>
AND a.follow_type = #{query.followType}
...
...
yudao-module-customer/yudao-module-customer-rest/src/main/java/cn/iocoder/yudao/module/customer/controller/admin/customerFollowup/CustomerFollowupController.java
View file @
f00dcd2c
...
...
@@ -228,7 +228,7 @@ public class CustomerFollowupController {
// 非全部数据权限时查询限制条件
if
(
CollectionUtil
.
isEmpty
(
deptIdList
)
||
deptIdList
.
size
()
==
0
){
// 没有部门限制条件时,只查询当前用户自己的
query
.
setFollowUserId
(
String
.
valueOf
(
loginUser
.
getId
()
));
query
.
setFollowUserId
(
loginUser
.
getId
(
));
}
else
{
// 查询限定部门的数据
query
.
setDeptIdList
(
deptIdList
);
...
...
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