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