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
2d917bd9
Commit
2d917bd9
authored
Sep 05, 2024
by
yanghao
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'release-fix' into release
parents
5e8d7644
10f2983e
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
154 additions
and
135 deletions
+154
-135
CustomerMapper.java
...ao/module/customer/dal/mysql/customer/CustomerMapper.java
+1
-1
CustomerExportReqDTO.java
...coder/yudao/module/customer/dto/CustomerExportReqDTO.java
+86
-86
CustomerServiceImpl.java
...module/customer/service/customer/CustomerServiceImpl.java
+61
-45
CustomerMapper.xml
...ore/src/main/resources/mapper/customer/CustomerMapper.xml
+6
-3
No files found.
yudao-module-customer/yudao-module-customer-core/src/main/java/cn/iocoder/yudao/module/customer/dal/mysql/customer/CustomerMapper.java
View file @
2d917bd9
...
...
@@ -36,7 +36,7 @@ public interface CustomerMapper extends BaseMapperX<CustomerDO> {
IPage
<
CustomerDO
>
getPage
(
IPage
<
CustomerDO
>
page
,
@Param
(
Constants
.
WRAPPER
)
Wrapper
<
CustomerDO
>
queryWrapper
);
List
<
CustomerDO
>
getMyPage
(
@Param
(
"start"
)
int
start
,
@Param
(
"size"
)
int
size
,
@Param
(
"query"
)
CustomerPageReqDTO
customerPageReqDTO
);
List
<
CustomerDO
>
getMyPage
(
@Param
(
"start"
)
Integer
start
,
@Param
(
"size"
)
Integer
size
,
@Param
(
"query"
)
CustomerPageReqDTO
customerPageReqDTO
);
List
<
CustomerDO
>
getWaitToAssignedCustomerPageReq
(
@Param
(
"start"
)
int
start
,
@Param
(
"size"
)
int
size
,
@Param
(
"query"
)
CustomerPageReqDTO
customerPageReqDTO
);
/**
...
...
yudao-module-customer/yudao-module-customer-core/src/main/java/cn/iocoder/yudao/module/customer/dto/CustomerExportReqDTO.java
View file @
2d917bd9
...
...
@@ -11,90 +11,90 @@ import java.util.List;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
util
.
date
.
DateUtils
.
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
;
@Data
public
class
CustomerExportReqDTO
{
@ApiModelProperty
(
value
=
"客户编号"
)
private
String
number
;
@ApiModelProperty
(
value
=
"客户名称"
)
private
String
name
;
@ApiModelProperty
(
value
=
"客户等级"
)
private
List
<
Integer
>
level
;
@ApiModelProperty
(
value
=
"客户来源"
)
private
List
<
Integer
>
source
;
@ApiModelProperty
(
value
=
"客户类别"
)
private
List
<
String
>
type
;
@ApiModelProperty
(
value
=
"客户货运类型"
,
notes
=
"参见customer_transport_type数据字典"
)
private
String
transportType
;
@ApiModelProperty
(
value
=
"客户资源类型"
,
notes
=
"参见customer_resource_type数据字典"
)
private
List
<
Integer
>
resourceType
;
@ApiModelProperty
(
value
=
"跟进客服"
)
private
List
<
Long
>
customerService
;
@ApiModelProperty
(
value
=
"客户状态"
)
private
List
<
Integer
>
status
;
@ApiModelProperty
(
value
=
"部门"
)
private
String
department
;
@DateTimeFormat
(
pattern
=
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
)
@ApiModelProperty
(
value
=
"开始创建时间"
)
private
Date
beginCreateTime
;
@DateTimeFormat
(
pattern
=
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
)
@ApiModelProperty
(
value
=
"结束创建时间"
)
private
Date
endCreateTime
;
@ApiModelProperty
(
value
=
"主联系人"
)
private
String
defaultContactName
;
@ApiModelProperty
(
value
=
"主联系电话"
)
private
String
defaultContactPhone
;
@ApiModelProperty
(
value
=
"信用等级"
)
private
List
<
Integer
>
creditLevel
;
@ApiModelProperty
(
value
=
"国家"
)
private
List
<
Integer
>
country
;
@ApiModelProperty
(
value
=
"是否在公海"
)
private
Boolean
isInOpenSea
;
@ApiModelProperty
(
value
=
"是否潜在客户"
)
private
Boolean
isPotential
;
//api不显示此3个字段
//是否接收,后台使用
@JsonIgnore
private
Boolean
isCustomerServiceConfirmed
;
//因接口公用方法新增:24小时内数据查询条件标识
private
String
flag4QueryCondition
;
private
List
<
Integer
>
marketType
;
private
int
deptId
;
@ApiModelProperty
(
value
=
"会员编号"
)
private
String
memberCode
;
@ApiModelProperty
(
value
=
"会员名称"
)
private
String
memberName
;
@ApiModelProperty
(
value
=
"会员手机"
)
private
String
memberMobile
;
@ApiModelProperty
(
value
=
"会员区号"
)
private
String
memberAreaCode
;
public
class
CustomerExportReqDTO
extends
CustomerPageReqDTO
{
//
@ApiModelProperty(value = "客户编号")
//
private String number;
//
//
@ApiModelProperty(value = "客户名称")
//
private String name;
//
//
@ApiModelProperty(value = "客户等级")
//
private List<Integer> level;
//
//
@ApiModelProperty(value = "客户来源")
//
private List<Integer> source;
//
//
@ApiModelProperty(value = "客户类别")
//
private List<String> type;
//
//
@ApiModelProperty(value = "客户货运类型", notes = "参见customer_transport_type数据字典")
//
private String transportType;
//
//
@ApiModelProperty(value = "客户资源类型", notes = "参见customer_resource_type数据字典")
//
private List<Integer> resourceType;
//
//
@ApiModelProperty(value = "跟进客服")
//
private List<Long> customerService;
//
//
@ApiModelProperty(value = "客户状态")
//
private List<Integer> status;
//
//
@ApiModelProperty(value = "部门")
//
private String department;
//
//
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
//
@ApiModelProperty(value = "开始创建时间")
//
private Date beginCreateTime;
//
//
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
//
@ApiModelProperty(value = "结束创建时间")
//
private Date endCreateTime;
//
//
//
//
@ApiModelProperty(value = "主联系人")
//
private String defaultContactName;
//
//
@ApiModelProperty(value = "主联系电话")
//
private String defaultContactPhone;
//
//
//
//
@ApiModelProperty(value = "信用等级")
//
private List<Integer> creditLevel;
//
//
@ApiModelProperty(value = "国家")
//
private List<Integer> country;
//
//
@ApiModelProperty(value = "是否在公海")
//
private Boolean isInOpenSea;
//
//
@ApiModelProperty(value = "是否潜在客户")
//
private Boolean isPotential;
//
//
//
//
//
api不显示此3个字段
//
//
是否接收,后台使用
//
@JsonIgnore
//
private Boolean isCustomerServiceConfirmed;
//
//
//
因接口公用方法新增:24小时内数据查询条件标识
//
private String flag4QueryCondition;
//
//
private List<Integer> marketType;
//
//
private int deptId ;
//
//
@ApiModelProperty(value = "会员编号")
//
private String memberCode;
//
@ApiModelProperty(value = "会员名称")
//
private String memberName;
//
@ApiModelProperty(value = "会员手机")
//
private String memberMobile;
//
@ApiModelProperty(value = "会员区号")
//
private String memberAreaCode;
}
yudao-module-customer/yudao-module-customer-core/src/main/java/cn/iocoder/yudao/module/customer/service/customer/CustomerServiceImpl.java
View file @
2d917bd9
...
...
@@ -1251,20 +1251,27 @@ public class CustomerServiceImpl extends AbstractService<CustomerMapper,
deptId
=
loginUser
.
getDeptId
();
}
List
<
CustomerDO
>
list
=
customerMapper
.
getDeptCustomerPageReq
(
start
,
size
,
pageReqVO
,
deptId
);
long
total
=
customerMapper
.
getDeptCustomerPageReqCount
(
pageReqVO
,
deptId
);
return
new
PageResult
<>(
list
,
total
,
mpPage
.
getSize
(),
page
.
getPage
(),
(
total
+
mpPage
.
getSize
()
-
1
)
/
mpPage
.
getSize
());
// List<CustomerDO> list =
// customerMapper.getDeptCustomerPageReq(start, size, pageReqVO, deptId);
// long total = customerMapper.getDeptCustomerPageReqCount(pageReqVO, deptId);
// return new PageResult<>(list, total, mpPage.getSize(), page.getPage(), (total + mpPage.getSize() - 1) / mpPage.getSize());
// 20240905 注释上面内容,调整使用全部客户分页查询语句
pageReqVO
.
setDeptIds
(
Arrays
.
asList
(
deptId
));
return
this
.
getMyCustomerPage
(
pageReqVO
,
page
);
}
@Override
public
List
<
CustomerDO
>
getDeptCustomerExcelVoListReq
(
CustomerExportReqDTO
exportR
eqVO
)
{
public
List
<
CustomerDO
>
getDeptCustomerExcelVoListReq
(
CustomerExportReqDTO
r
eqVO
)
{
LoginUser
loginUser
=
SecurityFrameworkUtils
.
getLoginUser
();
Long
deptId
=
null
;
if
(
null
!=
loginUser
&&
loginUser
.
getDeptId
()
>
0
)
{
deptId
=
loginUser
.
getDeptId
();
}
return
customerMapper
.
getDeptCustomerExcelVoListReq
(
exportReqVO
,
deptId
);
// return customerMapper.getDeptCustomerExcelVoListReq(reqVO, deptId);
reqVO
.
setDeptIds
(
Arrays
.
asList
(
deptId
));
return
customerMapper
.
getMyPage
(
null
,
null
,
reqVO
);
}
@Override
...
...
@@ -1384,18 +1391,19 @@ public class CustomerServiceImpl extends AbstractService<CustomerMapper,
pageReqVO
.
setIsInOpenSea
(
false
);
pageReqVO
.
setIsCustomerServiceConfirmed
(
false
);
pageReqVO
.
setCustomerService
(
null
);
IPage
<
CustomerDO
>
mpPage
=
MyBatisUtils
.
buildPage
(
page
);
log
.
warn
(
I18nMessage
.
getLang
().
toString
());
page
.
setPage
(
pageReqVO
.
getPageNo
());
page
.
setRows
(
pageReqVO
.
getPageSize
());
int
start
=
(
page
.
getPage
()
-
1
)
*
page
.
getRows
();
int
size
=
page
.
getRows
();
List
<
CustomerDO
>
list
=
customerMapper
.
getWaitToAssignedCustomerPageReq
(
start
,
size
,
pageReqVO
);
long
total
=
customerMapper
.
getWaitToAssignedCustomerPageReqCount
(
pageReqVO
);
return
new
PageResult
<>(
list
,
total
,
mpPage
.
getSize
(),
page
.
getPage
(),
(
total
+
mpPage
.
getSize
()
-
1
)
/
mpPage
.
getSize
());
// IPage<CustomerDO> mpPage = MyBatisUtils.buildPage(page);
// log.warn(I18nMessage.getLang().toString());
//
// page.setPage(pageReqVO.getPageNo());
// page.setRows(pageReqVO.getPageSize());
//
// int start = (page.getPage() - 1) * page.getRows();
// int size = page.getRows();
// List<CustomerDO> list =
// customerMapper.getWaitToAssignedCustomerPageReq(start, size, pageReqVO);
// long total = customerMapper.getWaitToAssignedCustomerPageReqCount(pageReqVO);
// return new PageResult<>(list, total, mpPage.getSize(), page.getPage(), (total + mpPage.getSize() - 1) / mpPage.getSize());
return
this
.
getMyCustomerPage
(
pageReqVO
,
page
);
}
@Override
...
...
@@ -1446,8 +1454,9 @@ public class CustomerServiceImpl extends AbstractService<CustomerMapper,
}
@Override
public
List
<
CustomerDO
>
getWaitToAssignedCustomerExcelVoListReq
(
CustomerExportReqDTO
exportReqVO
)
{
return
customerMapper
.
getWaitToAssignedCustomerListReq
(
exportReqVO
);
public
List
<
CustomerDO
>
getWaitToAssignedCustomerExcelVoListReq
(
CustomerExportReqDTO
reqVO
)
{
// return customerMapper.getWaitToAssignedCustomerListReq(reqVO);
return
customerMapper
.
getMyPage
(
null
,
null
,
reqVO
);
}
@Override
...
...
@@ -1509,18 +1518,20 @@ public class CustomerServiceImpl extends AbstractService<CustomerMapper,
public
PageResult
<
CustomerDO
>
getWaitToConfirmCustomerPageReq
(
CustomerPageReqDTO
pageReqVO
,
PageVO
page
)
{
pageReqVO
.
setIsCustomerServiceConfirmed
(
false
);
pageReqVO
.
setIsInOpenSea
(
false
);
IPage
<
CustomerDO
>
mpPage
=
MyBatisUtils
.
buildPage
(
page
);
log
.
warn
(
I18nMessage
.
getLang
().
toString
());
page
.
setPage
(
pageReqVO
.
getPageNo
());
page
.
setRows
(
pageReqVO
.
getPageSize
());
// IPage<CustomerDO> mpPage = MyBatisUtils.buildPage(page);
// log.warn(I18nMessage.getLang().toString());
//
// page.setPage(pageReqVO.getPageNo());
// page.setRows(pageReqVO.getPageSize());
//
// int start = (page.getPage() - 1) * page.getRows();
// int size = page.getRows();
// List<CustomerDO> list =
// customerMapper.getWaitToConfirmCustomerPageReq(start, size, pageReqVO);
// long total = customerMapper.getWaitToConfirmCustomerPageReqCount(pageReqVO);
// return new PageResult<>(list, total, mpPage.getSize(), page.getPage(), (total + mpPage.getSize() - 1) / mpPage.getSize());
int
start
=
(
page
.
getPage
()
-
1
)
*
page
.
getRows
();
int
size
=
page
.
getRows
();
List
<
CustomerDO
>
list
=
customerMapper
.
getWaitToConfirmCustomerPageReq
(
start
,
size
,
pageReqVO
);
long
total
=
customerMapper
.
getWaitToConfirmCustomerPageReqCount
(
pageReqVO
);
return
new
PageResult
<>(
list
,
total
,
mpPage
.
getSize
(),
page
.
getPage
(),
(
total
+
mpPage
.
getSize
()
-
1
)
/
mpPage
.
getSize
());
return
this
.
getMyCustomerPage
(
pageReqVO
,
page
);
}
@Override
...
...
@@ -1589,7 +1600,8 @@ public class CustomerServiceImpl extends AbstractService<CustomerMapper,
reqVO
.
setCustomerService
(
setCustomerService
);
}
return
customerMapper
.
getWaitToConfirmCustomerExcelVoListReq
(
reqVO
);
// return customerMapper.getWaitToConfirmCustomerExcelVoListReq(reqVO);
return
customerMapper
.
getMyPage
(
null
,
null
,
reqVO
);
}
@Override
...
...
@@ -1648,18 +1660,20 @@ public class CustomerServiceImpl extends AbstractService<CustomerMapper,
public
PageResult
<
CustomerDO
>
getOpenSeaCustomerPageReq
(
CustomerPageReqDTO
pageReqVO
,
PageVO
page
)
{
pageReqVO
.
setIsInOpenSea
(
true
);
IPage
<
CustomerDO
>
mpPage
=
MyBatisUtils
.
buildPage
(
page
);
log
.
warn
(
I18nMessage
.
getLang
().
toString
());
page
.
setPage
(
pageReqVO
.
getPageNo
());
page
.
setRows
(
pageReqVO
.
getPageSize
());
// IPage<CustomerDO> mpPage = MyBatisUtils.buildPage(page);
// log.warn(I18nMessage.getLang().toString());
//
// page.setPage(pageReqVO.getPageNo());
// page.setRows(pageReqVO.getPageSize());
//
// int start = (page.getPage() - 1) * page.getRows();
// int size = page.getRows();
// List<CustomerDO> list =
// customerMapper.getOpenSeaCustomerPageReq(start, size, pageReqVO);
// long total = customerMapper.getOpenSeaCustomerPageReqCount(pageReqVO);
// return new PageResult<>(list, total, mpPage.getSize(), page.getPage(), (total + mpPage.getSize() - 1) / mpPage.getSize());
int
start
=
(
page
.
getPage
()
-
1
)
*
page
.
getRows
();
int
size
=
page
.
getRows
();
List
<
CustomerDO
>
list
=
customerMapper
.
getOpenSeaCustomerPageReq
(
start
,
size
,
pageReqVO
);
long
total
=
customerMapper
.
getOpenSeaCustomerPageReqCount
(
pageReqVO
);
return
new
PageResult
<>(
list
,
total
,
mpPage
.
getSize
(),
page
.
getPage
(),
(
total
+
mpPage
.
getSize
()
-
1
)
/
mpPage
.
getSize
());
return
this
.
getMyCustomerPage
(
pageReqVO
,
page
);
}
@Override
...
...
@@ -1712,7 +1726,8 @@ public class CustomerServiceImpl extends AbstractService<CustomerMapper,
@Override
public
List
<
CustomerDO
>
getPublicCustomerExcelVoReqList
(
@Param
(
"query"
)
CustomerExportReqDTO
reqVO
)
{
reqVO
.
setIsInOpenSea
(
true
);
return
customerMapper
.
getPublicCustomerExcelVoReqList
(
reqVO
);
// return customerMapper.getPublicCustomerExcelVoReqList(reqVO);
return
customerMapper
.
getMyPage
(
null
,
null
,
reqVO
);
}
@Override
...
...
@@ -1760,7 +1775,8 @@ public class CustomerServiceImpl extends AbstractService<CustomerMapper,
@Override
public
List
<
CustomerDO
>
getMyCustomerExcelVoList
(
CustomerExportReqDTO
reqVO
)
{
return
customerMapper
.
getMyCustomerExcelVoList
(
reqVO
);
// return customerMapper.getMyCustomerExcelVoList(reqVO);
return
customerMapper
.
getMyPage
(
null
,
null
,
reqVO
);
}
@Override
...
...
yudao-module-customer/yudao-module-customer-core/src/main/resources/mapper/customer/CustomerMapper.xml
View file @
2d917bd9
...
...
@@ -97,7 +97,10 @@
GROUP BY contact.id
order by contact.id desc
<if
test=
"start != null and size != null"
>
limit #{start}, #{size}
</if>
</select>
<select
id=
"getWaitToAssignedCustomerPageReq"
...
...
@@ -656,8 +659,8 @@
</if>
<!--是否新客户-->
<if
test=
"query.is
InOpenSea
!= null"
>
AND contact.is_
in_open_sea = #{query.isInOpenSea
}
<if
test=
"query.is
New
!= null"
>
AND contact.is_
new = #{query.isNew
}
</if>
...
...
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