Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dsk-cr20g
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
Administrator
dsk-cr20g
Commits
b977e6ac
Commit
b977e6ac
authored
May 29, 2023
by
lcl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
字段补充
parent
9f02200d
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
85 additions
and
21 deletions
+85
-21
CustomerFollowRecordListVo.java
...system/domain/customer/vo/CustomerFollowRecordListVo.java
+63
-0
CustomerFollowRecordMapper.java
...ava/com/dsk/system/mapper/CustomerFollowRecordMapper.java
+2
-1
ICustomerFollowRecordService.java
.../com/dsk/system/service/ICustomerFollowRecordService.java
+2
-1
CustomerFollowRecordServiceImpl.java
.../system/service/impl/CustomerFollowRecordServiceImpl.java
+7
-12
CustomerFollowRecordMapper.xml
...ces/mapper/system/customer/CustomerFollowRecordMapper.xml
+11
-7
No files found.
dsk-system/src/main/java/com/dsk/system/domain/customer/vo/CustomerFollowRecordListVo.java
0 → 100644
View file @
b977e6ac
package
com
.
dsk
.
system
.
domain
.
customer
.
vo
;
import
com.baomidou.mybatisplus.annotation.FieldFill
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* 客户跟进记录列表
*
* @author makejava
* @since 2023-05-18 15:07:59
*/
@Data
public
class
CustomerFollowRecordListVo
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
17639570424991398L
;
private
Long
id
;
/**
* 客户id
*/
private
String
customerId
;
/**
* 客户名称
*/
private
String
companyName
;
/**
* 用户id
*/
private
Long
userId
;
/**
* 用户昵称
*/
private
String
nickName
;
/**
* 拜访方式(visit_mode_type)
*/
private
String
visitMode
;
/**
* 下次拜访时间
*/
private
Date
nextVisitTime
;
/**
* 拜访对象姓名
*/
private
String
name
;
/**
* 拜访对象职务
*/
private
String
position
;
/**
* 拜访内容
*/
private
String
content
;
@TableField
(
fill
=
FieldFill
.
INSERT
)
private
Date
createTime
;
}
dsk-system/src/main/java/com/dsk/system/mapper/CustomerFollowRecordMapper.java
View file @
b977e6ac
...
...
@@ -3,6 +3,7 @@ package com.dsk.system.mapper;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.dsk.system.domain.customer.CustomerFollowRecord
;
import
com.dsk.system.domain.customer.dto.CustomerFollowRecordSearchDto
;
import
com.dsk.system.domain.customer.vo.CustomerFollowRecordListVo
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
...
...
@@ -18,7 +19,7 @@ import java.util.List;
@Mapper
public
interface
CustomerFollowRecordMapper
extends
BaseMapper
<
CustomerFollowRecord
>
{
List
<
CustomerFollowRecord
>
selectAuthList
(
@Param
(
"dto"
)
CustomerFollowRecordSearchDto
dto
);
List
<
CustomerFollowRecord
ListVo
>
selectAuthList
(
@Param
(
"dto"
)
CustomerFollowRecordSearchDto
dto
);
}
dsk-system/src/main/java/com/dsk/system/service/ICustomerFollowRecordService.java
View file @
b977e6ac
...
...
@@ -3,6 +3,7 @@ package com.dsk.system.service;
import
com.dsk.system.domain.customer.CustomerFollowRecord
;
import
com.dsk.system.domain.customer.dto.CustomerFollowRecordSearchDto
;
import
com.dsk.system.domain.customer.vo.CustomerFollowRecordListVo
;
import
java.util.List
;
...
...
@@ -14,7 +15,7 @@ import java.util.List;
*/
public
interface
ICustomerFollowRecordService
{
List
<
CustomerFollowRecord
>
selectList
(
CustomerFollowRecordSearchDto
dto
);
List
<
CustomerFollowRecord
ListVo
>
selectList
(
CustomerFollowRecordSearchDto
dto
);
boolean
add
(
CustomerFollowRecord
followRecord
);
...
...
dsk-system/src/main/java/com/dsk/system/service/impl/CustomerFollowRecordServiceImpl.java
View file @
b977e6ac
...
...
@@ -7,6 +7,7 @@ import com.dsk.common.annotation.DataScope;
import
com.dsk.common.utils.SecurityUtils
;
import
com.dsk.system.domain.customer.CustomerFollowRecord
;
import
com.dsk.system.domain.customer.dto.CustomerFollowRecordSearchDto
;
import
com.dsk.system.domain.customer.vo.CustomerFollowRecordListVo
;
import
com.dsk.system.mapper.CustomerFollowRecordMapper
;
import
com.dsk.system.service.ICustomerFollowRecordService
;
import
lombok.extern.slf4j.Slf4j
;
...
...
@@ -30,19 +31,13 @@ public class CustomerFollowRecordServiceImpl implements ICustomerFollowRecordSer
private
CustomerFollowRecordMapper
baseMapper
;
@Override
// @DataScope(deptAlias = "d",userAlias = "u")
public
List
<
CustomerFollowRecord
>
selectList
(
CustomerFollowRecordSearchDto
dto
)
{
LambdaQueryWrapper
<
CustomerFollowRecord
>
wrapper
=
Wrappers
.
lambdaQuery
();
if
(!
ObjectUtils
.
isEmpty
(
dto
.
getCustomerId
()))
{
wrapper
.
eq
(
CustomerFollowRecord:
:
getCustomerId
,
dto
.
getCustomerId
());
}
else
{
wrapper
.
eq
(
CustomerFollowRecord:
:
getUserId
,
SecurityUtils
.
getUserId
());
@DataScope
(
deptAlias
=
"d"
,
userAlias
=
"u"
)
public
List
<
CustomerFollowRecordListVo
>
selectList
(
CustomerFollowRecordSearchDto
dto
)
{
if
(
ObjectUtils
.
isEmpty
(
dto
.
getCustomerId
()))
{
dto
.
setUserId
(
SecurityUtils
.
getUserId
());
}
wrapper
.
orderByDesc
(
CustomerFollowRecord:
:
getCreateTime
);
return
baseMapper
.
selectList
(
wrapper
);
// dto.setUserId(SecurityUtils.getUserId());
// return baseMapper.selectAuthList(dto);
// log.debug("dto.params.dataScope{}",dto.getParams().get("dataScope"));
return
baseMapper
.
selectAuthList
(
dto
);
}
@Override
...
...
dsk-system/src/main/resources/mapper/system/customer/CustomerFollowRecordMapper.xml
View file @
b977e6ac
...
...
@@ -7,16 +7,20 @@
cfr.content, cfr.create_time
</sql>
<select
id=
"selectAuthList"
resultType=
"com.dsk.system.domain.customer.
CustomerFollowRecord
"
>
<select
id=
"selectAuthList"
resultType=
"com.dsk.system.domain.customer.
vo.CustomerFollowRecordListVo
"
>
select
ct.company_name, u.nick_name,
<include
refid=
"Base_Bean"
></include>
from customer_follow_record cfr
join customer ct on ct.customer_id = cfr.customer_id
join sys_user u on u.user_id = cfr.user_id
join sys_dept d on d.dept_id = u.dept_id
where cfr.user_id = #{dto.userId}
left join sys_dept d on d.dept_id = u.dept_id
<where>
<if
test=
"dto.userId != null "
>
and cfr.user_id = #{dto.userId}
</if>
<if
test=
"dto.customerId != null and dto.customerId != '' "
>
and cfr.customer_id = #{dto.customerId}
</if>
<!-- 数据范围过滤 -->
${params.dataScope}
<if
test=
"dto.params.dataScope != null and dto.params.dataScope != '' "
>
${dto.params.dataScope}
</if>
</where>
order by cfr.create_time desc
</select>
...
...
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