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
ba7a8458
Commit
ba7a8458
authored
May 28, 2024
by
liuzeheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
我的客户列表支持多选
parent
f43a292e
Changes
12
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
584 additions
and
11 deletions
+584
-11
CustomerMapper.java
...ao/module/customer/dal/mysql/customer/CustomerMapper.java
+9
-0
CustomerExportReqDTO.java
...coder/yudao/module/customer/dto/CustomerExportReqDTO.java
+90
-0
CustomerPageReqDTO.java
...iocoder/yudao/module/customer/dto/CustomerPageReqDTO.java
+95
-0
CustomerService.java
...dao/module/customer/service/customer/CustomerService.java
+7
-0
CustomerServiceImpl.java
...module/customer/service/customer/CustomerServiceImpl.java
+19
-4
CustomerMapper.xml
...ore/src/main/resources/mapper/customer/CustomerMapper.xml
+266
-0
CustomerController.java
...ustomer/controller/admin/customer/CustomerController.java
+4
-2
ProductMapper.java
...yudao/module/product/dal/mysql/product/ProductMapper.java
+74
-0
ProductExcelExportListener.java
...o/module/product/listener/ProductExcelExportListener.java
+5
-3
ProductService.java
.../yudao/module/product/service/product/ProductService.java
+2
-0
ProductServiceImpl.java
...dule/product/service/product/impl/ProductServiceImpl.java
+10
-0
CustomerExcelExportListener.java
...dao/module/sale/listener/CustomerExcelExportListener.java
+3
-2
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 @
ba7a8458
...
@@ -2,7 +2,9 @@ package cn.iocoder.yudao.module.customer.dal.mysql.customer;
...
@@ -2,7 +2,9 @@ package cn.iocoder.yudao.module.customer.dal.mysql.customer;
import
cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX
;
import
cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX
;
import
cn.iocoder.yudao.module.customer.dal.dataobject.customer.CustomerDO
;
import
cn.iocoder.yudao.module.customer.dal.dataobject.customer.CustomerDO
;
import
cn.iocoder.yudao.module.customer.dto.CustomerExportReqDTO
;
import
cn.iocoder.yudao.module.customer.dto.CustomerOrderQueryDTO
;
import
cn.iocoder.yudao.module.customer.dto.CustomerOrderQueryDTO
;
import
cn.iocoder.yudao.module.customer.dto.CustomerPageReqDTO
;
import
cn.iocoder.yudao.module.customer.vo.customer.vo.CustomerDetailRespVO
;
import
cn.iocoder.yudao.module.customer.vo.customer.vo.CustomerDetailRespVO
;
import
cn.iocoder.yudao.module.customer.vo.customer.vo.CustomerSelectReqVO
;
import
cn.iocoder.yudao.module.customer.vo.customer.vo.CustomerSelectReqVO
;
import
cn.iocoder.yudao.module.customer.vo.customerDetail.CustomerOrderBackPageVO
;
import
cn.iocoder.yudao.module.customer.vo.customerDetail.CustomerOrderBackPageVO
;
...
@@ -25,8 +27,14 @@ public interface CustomerMapper extends BaseMapperX<CustomerDO> {
...
@@ -25,8 +27,14 @@ 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
);
long
getMyPageCount
(
@Param
(
"query"
)
CustomerPageReqDTO
pageReqVO
);
List
<
CustomerDO
>
getCustomerExcelVoList
(
@Param
(
Constants
.
WRAPPER
)
Wrapper
<
CustomerDO
>
queryWrapper
);
List
<
CustomerDO
>
getCustomerExcelVoList
(
@Param
(
Constants
.
WRAPPER
)
Wrapper
<
CustomerDO
>
queryWrapper
);
List
<
CustomerDO
>
getMyCustomerExcelVoList
(
@Param
(
"query"
)
CustomerExportReqDTO
pageReqVO
);
List
<
CustomerDO
>
getList
(
@Param
(
Constants
.
WRAPPER
)
Wrapper
<
CustomerDO
>
queryWrapper
);
List
<
CustomerDO
>
getList
(
@Param
(
Constants
.
WRAPPER
)
Wrapper
<
CustomerDO
>
queryWrapper
);
List
<
CustomerDO
>
searchCustomer
(
@Param
(
"reqVO"
)
CustomerSelectReqVO
customerSelectReqVO
);
List
<
CustomerDO
>
searchCustomer
(
@Param
(
"reqVO"
)
CustomerSelectReqVO
customerSelectReqVO
);
...
@@ -182,4 +190,5 @@ public interface CustomerMapper extends BaseMapperX<CustomerDO> {
...
@@ -182,4 +190,5 @@ public interface CustomerMapper extends BaseMapperX<CustomerDO> {
List
<
CustomerOrderBackPageVO
>
orderList
(
@Param
(
"start"
)
int
start
,
@Param
(
"size"
)
int
size
,
@Param
(
"query"
)
CustomerOrderQueryDTO
query
);
List
<
CustomerOrderBackPageVO
>
orderList
(
@Param
(
"start"
)
int
start
,
@Param
(
"size"
)
int
size
,
@Param
(
"query"
)
CustomerOrderQueryDTO
query
);
}
}
yudao-module-customer/yudao-module-customer-core/src/main/java/cn/iocoder/yudao/module/customer/dto/CustomerExportReqDTO.java
0 → 100644
View file @
ba7a8458
package
cn
.
iocoder
.
yudao
.
module
.
customer
.
dto
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
java.util.Date
;
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
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
;
}
yudao-module-customer/yudao-module-customer-core/src/main/java/cn/iocoder/yudao/module/customer/dto/CustomerPageReqDTO.java
0 → 100644
View file @
ba7a8458
package
cn
.
iocoder
.
yudao
.
module
.
customer
.
dto
;
import
cn.iocoder.yudao.framework.common.pojo.PageParam
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.ToString
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
java.util.Date
;
import
java.util.List
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
util
.
date
.
DateUtils
.
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
;
@ApiModel
(
"管理后台 - 客户分页 Request DTO"
)
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@ToString
(
callSuper
=
true
)
public
class
CustomerPageReqDTO
extends
PageParam
{
@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
=
"市场获客"
,
notes
=
"参见customer_market_type数据字典"
)
private
List
<
Integer
>
marketType
;
@ApiModelProperty
(
value
=
"跟进客服"
)
private
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
;
//api不显示此3个字段
//是否接收,后台使用
@JsonIgnore
private
Boolean
isCustomerServiceConfirmed
;
//因接口公用方法新增:24小时内数据查询条件标识
private
String
flag4QueryCondition
;
@ApiModelProperty
(
value
=
"是否在公海"
)
private
Boolean
isInOpenSea
;
@ApiModelProperty
(
value
=
"是否潜在客户"
)
private
Boolean
isPotential
;
}
yudao-module-customer/yudao-module-customer-core/src/main/java/cn/iocoder/yudao/module/customer/service/customer/CustomerService.java
View file @
ba7a8458
...
@@ -2,10 +2,13 @@ package cn.iocoder.yudao.module.customer.service.customer;
...
@@ -2,10 +2,13 @@ package cn.iocoder.yudao.module.customer.service.customer;
import
cn.iocoder.yudao.framework.common.pojo.PageResult
;
import
cn.iocoder.yudao.framework.common.pojo.PageResult
;
import
cn.iocoder.yudao.framework.mybatis.core.service.IService
;
import
cn.iocoder.yudao.framework.mybatis.core.service.IService
;
import
cn.iocoder.yudao.framework.mybatis.core.vo.PageVO
;
import
cn.iocoder.yudao.module.customer.dal.dataobject.customer.CustomerDO
;
import
cn.iocoder.yudao.module.customer.dal.dataobject.customer.CustomerDO
;
import
cn.iocoder.yudao.module.customer.dal.dataobject.customerContacts.CustomerContactsDO
;
import
cn.iocoder.yudao.module.customer.dal.dataobject.customerContacts.CustomerContactsDO
;
import
cn.iocoder.yudao.module.customer.dto.CustomerDelayApprovalInfoDto
;
import
cn.iocoder.yudao.module.customer.dto.CustomerDelayApprovalInfoDto
;
import
cn.iocoder.yudao.module.customer.dto.CustomerExportReqDTO
;
import
cn.iocoder.yudao.module.customer.dto.CustomerHandoverApprovalInfoDto
;
import
cn.iocoder.yudao.module.customer.dto.CustomerHandoverApprovalInfoDto
;
import
cn.iocoder.yudao.module.customer.dto.CustomerPageReqDTO
;
import
cn.iocoder.yudao.module.customer.vo.customer.vo.*
;
import
cn.iocoder.yudao.module.customer.vo.customer.vo.*
;
import
cn.iocoder.yudao.module.ecw.enums.CustomerOperateTypeEnum
;
import
cn.iocoder.yudao.module.ecw.enums.CustomerOperateTypeEnum
;
import
cn.iocoder.yudao.module.ecw.enums.CustomerStatusEnum
;
import
cn.iocoder.yudao.module.ecw.enums.CustomerStatusEnum
;
...
@@ -96,6 +99,8 @@ public interface CustomerService extends IService<CustomerDO> {
...
@@ -96,6 +99,8 @@ public interface CustomerService extends IService<CustomerDO> {
*/
*/
PageResult
<
CustomerDO
>
getCustomerPage
(
CustomerPageReqVO
pageReqVO
);
PageResult
<
CustomerDO
>
getCustomerPage
(
CustomerPageReqVO
pageReqVO
);
PageResult
<
CustomerDO
>
getMyCustomerPage
(
CustomerPageReqDTO
pageReqVO
,
PageVO
page
);
/**
/**
* 获得部门客户分页
* 获得部门客户分页
*
*
...
@@ -170,6 +175,8 @@ public interface CustomerService extends IService<CustomerDO> {
...
@@ -170,6 +175,8 @@ public interface CustomerService extends IService<CustomerDO> {
*/
*/
List
<
CustomerDO
>
getCustomerExcelVoList
(
CustomerExportReqVO
exportReqVO
);
List
<
CustomerDO
>
getCustomerExcelVoList
(
CustomerExportReqVO
exportReqVO
);
List
<
CustomerDO
>
getMyCustomerExcelVoList
(
CustomerExportReqDTO
exportReqVO
);
/**
/**
* 获得客户列表, 用于 Excel 导出
* 获得客户列表, 用于 Excel 导出
*
*
...
...
yudao-module-customer/yudao-module-customer-core/src/main/java/cn/iocoder/yudao/module/customer/service/customer/CustomerServiceImpl.java
View file @
ba7a8458
...
@@ -25,6 +25,7 @@ import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
...
@@ -25,6 +25,7 @@ import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
import
cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX
;
import
cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX
;
import
cn.iocoder.yudao.framework.mybatis.core.service.AbstractService
;
import
cn.iocoder.yudao.framework.mybatis.core.service.AbstractService
;
import
cn.iocoder.yudao.framework.mybatis.core.util.MyBatisUtils
;
import
cn.iocoder.yudao.framework.mybatis.core.util.MyBatisUtils
;
import
cn.iocoder.yudao.framework.mybatis.core.vo.PageVO
;
import
cn.iocoder.yudao.framework.security.core.LoginUser
;
import
cn.iocoder.yudao.framework.security.core.LoginUser
;
import
cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils
;
import
cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils
;
import
cn.iocoder.yudao.framework.web.core.util.WebFrameworkUtils
;
import
cn.iocoder.yudao.framework.web.core.util.WebFrameworkUtils
;
...
@@ -47,10 +48,7 @@ import cn.iocoder.yudao.module.customer.dal.mysql.customerAirLog.CustomerAirLogM
...
@@ -47,10 +48,7 @@ import cn.iocoder.yudao.module.customer.dal.mysql.customerAirLog.CustomerAirLogM
import
cn.iocoder.yudao.module.customer.dal.mysql.customerBank.CustomerBankMapper
;
import
cn.iocoder.yudao.module.customer.dal.mysql.customerBank.CustomerBankMapper
;
import
cn.iocoder.yudao.module.customer.dal.mysql.customerContacts.CustomerContactsMapper
;
import
cn.iocoder.yudao.module.customer.dal.mysql.customerContacts.CustomerContactsMapper
;
import
cn.iocoder.yudao.module.customer.dal.mysql.customerPublicCatchLog.CustomerPublicCatchLogMapper
;
import
cn.iocoder.yudao.module.customer.dal.mysql.customerPublicCatchLog.CustomerPublicCatchLogMapper
;
import
cn.iocoder.yudao.module.customer.dto.CustomerDelayApprovalInfoDto
;
import
cn.iocoder.yudao.module.customer.dto.*
;
import
cn.iocoder.yudao.module.customer.dto.CustomerHandoverApprovalInfoDto
;
import
cn.iocoder.yudao.module.customer.dto.CustomerHandoverDetailDto
;
import
cn.iocoder.yudao.module.customer.dto.CustomerOrderQueryDTO
;
import
cn.iocoder.yudao.module.customer.service.customerApproval.CustomerApprovalService
;
import
cn.iocoder.yudao.module.customer.service.customerApproval.CustomerApprovalService
;
import
cn.iocoder.yudao.module.customer.service.customerContacts.CustomerContactsService
;
import
cn.iocoder.yudao.module.customer.service.customerContacts.CustomerContactsService
;
import
cn.iocoder.yudao.module.customer.service.customerOperateLog.CustomerOperateLogService
;
import
cn.iocoder.yudao.module.customer.service.customerOperateLog.CustomerOperateLogService
;
...
@@ -1118,6 +1116,18 @@ public class CustomerServiceImpl extends AbstractService<CustomerMapper, Custome
...
@@ -1118,6 +1116,18 @@ public class CustomerServiceImpl extends AbstractService<CustomerMapper, Custome
return
new
PageResult
<>(
mpPage
.
getRecords
(),
mpPage
.
getTotal
());
return
new
PageResult
<>(
mpPage
.
getRecords
(),
mpPage
.
getTotal
());
}
}
@Override
public
PageResult
<
CustomerDO
>
getMyCustomerPage
(
CustomerPageReqDTO
pageReqVO
,
PageVO
page
)
{
IPage
<
CustomerDO
>
mpPage
=
MyBatisUtils
.
buildPage
(
page
);
log
.
warn
(
I18nMessage
.
getLang
().
toString
());
int
start
=
(
page
.
getPage
()
-
1
)
*
page
.
getRows
();
int
size
=
page
.
getRows
();
List
<
CustomerDO
>
list
=
customerMapper
.
getMyPage
(
start
,
size
,
pageReqVO
);
long
total
=
customerMapper
.
getMyPageCount
(
pageReqVO
)
;
return
new
PageResult
<>(
list
,
total
,
mpPage
.
getSize
(),
page
.
getPage
(),
(
total
+
mpPage
.
getSize
()
-
1
)
/
mpPage
.
getSize
());
}
@Override
@Override
public
PageResult
<
CustomerDO
>
getDeptCustomerPage
(
CustomerPageReqVO
reqVO
)
{
public
PageResult
<
CustomerDO
>
getDeptCustomerPage
(
CustomerPageReqVO
reqVO
)
{
IPage
<
CustomerDO
>
mpPage
=
MyBatisUtils
.
buildPage
(
reqVO
);
IPage
<
CustomerDO
>
mpPage
=
MyBatisUtils
.
buildPage
(
reqVO
);
...
@@ -1572,6 +1582,11 @@ public class CustomerServiceImpl extends AbstractService<CustomerMapper, Custome
...
@@ -1572,6 +1582,11 @@ public class CustomerServiceImpl extends AbstractService<CustomerMapper, Custome
return
customerMapper
.
getCustomerExcelVoList
(
customerDOLambdaQueryWrapperX
);
return
customerMapper
.
getCustomerExcelVoList
(
customerDOLambdaQueryWrapperX
);
}
}
@Override
public
List
<
CustomerDO
>
getMyCustomerExcelVoList
(
CustomerExportReqDTO
reqVO
)
{
return
customerMapper
.
getMyCustomerExcelVoList
(
reqVO
);
}
@Override
@Override
public
PageResult
<
CustomerDO
>
searchCustomer
(
CustomerSelectReqVO
customerSelectReqVO
)
{
public
PageResult
<
CustomerDO
>
searchCustomer
(
CustomerSelectReqVO
customerSelectReqVO
)
{
...
...
yudao-module-customer/yudao-module-customer-core/src/main/resources/mapper/customer/CustomerMapper.xml
View file @
ba7a8458
This diff is collapsed.
Click to expand it.
yudao-module-customer/yudao-module-customer-rest/src/main/java/cn/iocoder/yudao/module/customer/controller/admin/customer/CustomerController.java
View file @
ba7a8458
...
@@ -11,6 +11,7 @@ import cn.iocoder.yudao.framework.i18n.core.I18nMessage;
...
@@ -11,6 +11,7 @@ import cn.iocoder.yudao.framework.i18n.core.I18nMessage;
import
cn.iocoder.yudao.framework.idempotent.core.annotation.Idempotent
;
import
cn.iocoder.yudao.framework.idempotent.core.annotation.Idempotent
;
import
cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO
;
import
cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO
;
import
cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX
;
import
cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX
;
import
cn.iocoder.yudao.framework.mybatis.core.vo.PageVO
;
import
cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog
;
import
cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog
;
import
cn.iocoder.yudao.framework.web.core.util.WebFrameworkUtils
;
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.customer.CustomerConvert
;
...
@@ -21,6 +22,7 @@ import cn.iocoder.yudao.module.customer.dal.dataobject.customerBank.CustomerBank
...
@@ -21,6 +22,7 @@ import cn.iocoder.yudao.module.customer.dal.dataobject.customerBank.CustomerBank
import
cn.iocoder.yudao.module.customer.dal.dataobject.customerContacts.CustomerContactsDO
;
import
cn.iocoder.yudao.module.customer.dal.dataobject.customerContacts.CustomerContactsDO
;
import
cn.iocoder.yudao.module.customer.dto.CustomerDelayApprovalInfoDto
;
import
cn.iocoder.yudao.module.customer.dto.CustomerDelayApprovalInfoDto
;
import
cn.iocoder.yudao.module.customer.dto.CustomerHandoverApprovalInfoDto
;
import
cn.iocoder.yudao.module.customer.dto.CustomerHandoverApprovalInfoDto
;
import
cn.iocoder.yudao.module.customer.dto.CustomerPageReqDTO
;
import
cn.iocoder.yudao.module.customer.service.customer.CustomerService
;
import
cn.iocoder.yudao.module.customer.service.customer.CustomerService
;
import
cn.iocoder.yudao.module.customer.service.customer.commission.CustomerCommissionService
;
import
cn.iocoder.yudao.module.customer.service.customer.commission.CustomerCommissionService
;
import
cn.iocoder.yudao.module.customer.service.customerBank.CustomerBankService
;
import
cn.iocoder.yudao.module.customer.service.customerBank.CustomerBankService
;
...
@@ -493,7 +495,7 @@ public class CustomerController {
...
@@ -493,7 +495,7 @@ public class CustomerController {
@GetMapping
(
"/get-mine"
)
@GetMapping
(
"/get-mine"
)
@ApiOperation
(
"获得我的客户列表"
)
@ApiOperation
(
"获得我的客户列表"
)
// @PreAuthorize("@ss.hasPermission('ecw:customer:query')")
// @PreAuthorize("@ss.hasPermission('ecw:customer:query')")
public
CommonResult
<
PageResult
<
CustomerRespVO
>>
getMine
(
@Valid
CustomerPageReq
VO
customerPageReqVO
)
{
public
CommonResult
<
PageResult
<
CustomerRespVO
>>
getMine
(
@Valid
CustomerPageReq
DTO
customerPageReqVO
,
PageVO
page
)
{
customerPageReqVO
.
setCustomerService
(
WebFrameworkUtils
.
getLoginUserId
());
customerPageReqVO
.
setCustomerService
(
WebFrameworkUtils
.
getLoginUserId
());
...
@@ -502,7 +504,7 @@ public class CustomerController {
...
@@ -502,7 +504,7 @@ public class CustomerController {
// customerPageReqVO.setFlag4QueryCondition("Y");
// customerPageReqVO.setFlag4QueryCondition("Y");
PageResult
<
CustomerDO
>
pageResult
=
customerService
.
get
CustomerPage
(
customerPageReqVO
);
PageResult
<
CustomerDO
>
pageResult
=
customerService
.
get
MyCustomerPage
(
customerPageReqVO
,
page
);
return
success
(
CustomerConvert
.
INSTANCE
.
convertPage
(
pageResult
));
return
success
(
CustomerConvert
.
INSTANCE
.
convertPage
(
pageResult
));
}
}
...
...
yudao-module-product/yudao-module-product-core/src/main/java/cn/iocoder/yudao/module/product/dal/mysql/product/ProductMapper.java
View file @
ba7a8458
...
@@ -195,6 +195,79 @@ public interface ProductMapper extends BaseMapperX<ProductDO> {
...
@@ -195,6 +195,79 @@ public interface ProductMapper extends BaseMapperX<ProductDO> {
;
;
}
}
@ResultType
(
ProductDO
.
class
)
@Select
({
"<script>"
,
"select t.*, c.nickname as creator_name, u.nickname as updater_name "
,
"from ecw_product t "
,
"left join system_user c on t.creator = c.id "
,
"left join system_user u on t.updater = u.id "
,
"where t.deleted = 0 "
,
"<when test = 'query.productCode != null and query.productCode != \"\"'>"
,
"AND t.`product_code` like concat('%',concat(#{query.productCode},'%'))"
,
"</when>"
,
"<when test = 'query.customsCode != null and query.customsCode != \"\"'>"
,
"AND t.`customs_code` like concat('%',concat(#{query.customsCode},'%'))"
,
"</when>"
,
/* "<when test = 'query.typeId != null'>",
"AND t.`type_id` = #{query.typeId}",
"</when>",*/
"<when test=\"query.typeId != null and query.typeId.size()>0\">"
+
" <when test=\"query.typeId != null and query.typeId != '' and query.typeId.size()==1 \">"
+
" AND t.`type_id` =\n"
+
" <foreach item='typeId' index='index' collection='query.typeId' >\n"
+
" #{typeId}"
+
" </foreach>"
+
" </when>"
+
" <when test=\"query.typeId != null and query.typeId != '' and query.typeId.size()>1 \">"
+
" AND t.`type_id` in "
+
" <foreach item='typeId' index='index' collection='query.typeId' open='(' separator=',' close=')'>"
+
" #{typeId}"
+
" </foreach>"
+
" </when>"
+
"</when>"
,
"<when test = 'query.status != null'>"
,
"AND t.`status` = #{query.status}"
,
"</when>"
,
"<when test = 'query.auditStatus != null'>"
,
"AND t.`audit_status` = #{query.auditStatus}"
,
"</when>"
,
"<when test = 'query.titleZh != null and query.titleZh != \"\"'>"
,
"AND (t.`title_zh` like concat('%',concat(#{query.titleZh},'%')) or t.`title_en` like concat('%',concat(#{query.titleZh},'%')))"
,
"</when>"
,
// "<when test = 'query.attrId != null and query.attrId != \"\" '>",
"<when test=\"query.attrId != null and query.attrId.size()>0\">"
,
"<when test=\"query.attrId != null and query.attrId != '' and query.attrId.size()==1 \">"
+
"<foreach item='attrId' index=\"index\" collection='query.attrId' >"
+
"AND t.`attr_id` = #{attrId}"
+
"</foreach>"
+
"</when>"
,
"<when test=\"query.attrId != null and query.attrId != '' and query.attrId.size()>1 \">"
+
"AND (1!=1 "
+
" <foreach item='attrId' index='index' collection='query.attrId'>"
+
" OR FIND_IN_SET(t.`attr_id`, #{attrId})"
+
"</foreach>"
+
" )"
+
"</when>"
,
// "AND FIND_IN_SET(t.`attr_id`, #{query.attrId})",
"</when>"
,
"order by t.id desc"
,
"</script>"
})
List
<
ProductDO
>
selectListReq
(
@Param
(
"query"
)
ProductReqDTO
reqVO
)
;
default
List
<
ProductDO
>
selectIdList
(
ProductPageReqVO
reqVO
)
{
default
List
<
ProductDO
>
selectIdList
(
ProductPageReqVO
reqVO
)
{
return
selectList
(
new
LambdaQueryWrapperX
<
ProductDO
>()
return
selectList
(
new
LambdaQueryWrapperX
<
ProductDO
>()
.
likeIfPresent
(
ProductDO:
:
getProductCode
,
reqVO
.
getProductCode
())
.
likeIfPresent
(
ProductDO:
:
getProductCode
,
reqVO
.
getProductCode
())
...
@@ -240,6 +313,7 @@ public interface ProductMapper extends BaseMapperX<ProductDO> {
...
@@ -240,6 +313,7 @@ public interface ProductMapper extends BaseMapperX<ProductDO> {
}
}
List
<
ProductTypeNumVO
>
getProductTypeNumList
(
List
<
Long
>
list
);
List
<
ProductTypeNumVO
>
getProductTypeNumList
(
List
<
Long
>
list
);
...
...
yudao-module-product/yudao-module-product-core/src/main/java/cn/iocoder/yudao/module/product/listener/ProductExcelExportListener.java
View file @
ba7a8458
...
@@ -10,6 +10,7 @@ import cn.iocoder.yudao.module.product.convert.product.ProductConvert;
...
@@ -10,6 +10,7 @@ import cn.iocoder.yudao.module.product.convert.product.ProductConvert;
import
cn.iocoder.yudao.module.product.dal.dataobject.product.ProductAttrDO
;
import
cn.iocoder.yudao.module.product.dal.dataobject.product.ProductAttrDO
;
import
cn.iocoder.yudao.module.product.dal.dataobject.product.ProductDO
;
import
cn.iocoder.yudao.module.product.dal.dataobject.product.ProductDO
;
import
cn.iocoder.yudao.module.product.dal.dataobject.product.ProductTypeDO
;
import
cn.iocoder.yudao.module.product.dal.dataobject.product.ProductTypeDO
;
import
cn.iocoder.yudao.module.product.dto.ProductReqDTO
;
import
cn.iocoder.yudao.module.product.enums.AuditEnum
;
import
cn.iocoder.yudao.module.product.enums.AuditEnum
;
import
cn.iocoder.yudao.module.product.service.product.ProductAttrService
;
import
cn.iocoder.yudao.module.product.service.product.ProductAttrService
;
import
cn.iocoder.yudao.module.product.service.product.ProductService
;
import
cn.iocoder.yudao.module.product.service.product.ProductService
;
...
@@ -81,10 +82,11 @@ public class ProductExcelExportListener {
...
@@ -81,10 +82,11 @@ public class ProductExcelExportListener {
}
}
String
fileName
=
event
.
getUserId
().
toString
().
concat
(
StrUtil
.
DASHED
).
concat
(
event
.
getUserType
().
toString
()).
concat
(
StrUtil
.
DASHED
).
concat
(
nowTime
).
concat
(
"product.xlsx"
);
String
fileName
=
event
.
getUserId
().
toString
().
concat
(
StrUtil
.
DASHED
).
concat
(
event
.
getUserType
().
toString
()).
concat
(
StrUtil
.
DASHED
).
concat
(
nowTime
).
concat
(
"product.xlsx"
);
ProductExportReqVO
exportReqVO
=
JSONObject
.
parseObject
(
event
.
getRequestParams
(),
ProductExportReqVO
.
class
);
//ProductExportReqVO exportReqVO = JSONObject.parseObject(event.getRequestParams(), ProductExportReqVO.class);
ProductReqDTO
exportReqVO
=
JSONObject
.
parseObject
(
event
.
getRequestParams
(),
ProductReqDTO
.
class
);
exportReqVO
.
setFilter
(
false
);
exportReqVO
.
setFilter
(
false
);
List
<
ProductDO
>
list
=
productService
.
getProductList
(
exportReqVO
);
//
List<ProductDO> list = productService.getProductList(exportReqVO);
List
<
ProductDO
>
list
=
productService
.
getProductListResp
(
exportReqVO
);
if
(
CollectionUtil
.
isEmpty
(
list
))
return
;
if
(
CollectionUtil
.
isEmpty
(
list
))
return
;
List
<
ProductAttrDO
>
attrList
=
productAttrService
.
getProductAttrList
(
new
ProductAttrExportReqVO
());
List
<
ProductAttrDO
>
attrList
=
productAttrService
.
getProductAttrList
(
new
ProductAttrExportReqVO
());
...
...
yudao-module-product/yudao-module-product-core/src/main/java/cn/iocoder/yudao/module/product/service/product/ProductService.java
View file @
ba7a8458
...
@@ -70,6 +70,7 @@ public interface ProductService {
...
@@ -70,6 +70,7 @@ public interface ProductService {
*/
*/
List
<
ProductDO
>
getProductList
();
List
<
ProductDO
>
getProductList
();
/**
/**
* 获得产品分页
* 获得产品分页
*
*
...
@@ -82,6 +83,7 @@ public interface ProductService {
...
@@ -82,6 +83,7 @@ public interface ProductService {
List
<
ProductDO
>
getProductList
(
ProductPageReqVO
pageReqVO
);
List
<
ProductDO
>
getProductList
(
ProductPageReqVO
pageReqVO
);
List
<
ProductDO
>
getProductListResp
(
ProductReqDTO
pageReqVO
);
/**
/**
* 获得产品列表, 用于 Excel 导出
* 获得产品列表, 用于 Excel 导出
*
*
...
...
yudao-module-product/yudao-module-product-core/src/main/java/cn/iocoder/yudao/module/product/service/product/impl/ProductServiceImpl.java
View file @
ba7a8458
...
@@ -352,6 +352,8 @@ public class ProductServiceImpl implements ProductService {
...
@@ -352,6 +352,8 @@ public class ProductServiceImpl implements ProductService {
);
);
}
}
@Override
@Override
public
List
<
ProductDO
>
getProductList
(
List
<
Long
>
idList
)
{
public
List
<
ProductDO
>
getProductList
(
List
<
Long
>
idList
)
{
return
productMapper
.
selectList
(
return
productMapper
.
selectList
(
...
@@ -427,6 +429,14 @@ public class ProductServiceImpl implements ProductService {
...
@@ -427,6 +429,14 @@ public class ProductServiceImpl implements ProductService {
return
productMapper
.
selectList
(
pageReqVO
);
return
productMapper
.
selectList
(
pageReqVO
);
}
}
@Override
public
List
<
ProductDO
>
getProductListResp
(
ProductReqDTO
pageReqVO
)
{
if
(
pageReqVO
.
isFilter
())
{
pageReqVO
.
setAuditStatus
(
2
);
}
return
productMapper
.
selectListReq
(
pageReqVO
);
}
@Override
@Override
public
List
<
ProductDO
>
getProductList
(
ProductExportReqVO
exportReqVO
)
{
public
List
<
ProductDO
>
getProductList
(
ProductExportReqVO
exportReqVO
)
{
if
(
exportReqVO
.
isFilter
())
{
if
(
exportReqVO
.
isFilter
())
{
...
...
yudao-module-sale/yudao-module-sale-core/src/main/java/cn/iocoder/yudao/module/sale/listener/CustomerExcelExportListener.java
View file @
ba7a8458
...
@@ -7,6 +7,7 @@ import cn.iocoder.yudao.framework.apollo.core.event.export.base.CustomerExportEv
...
@@ -7,6 +7,7 @@ import cn.iocoder.yudao.framework.apollo.core.event.export.base.CustomerExportEv
import
cn.iocoder.yudao.framework.excel.util.ExcelUtils
;
import
cn.iocoder.yudao.framework.excel.util.ExcelUtils
;
import
cn.iocoder.yudao.module.customer.convert.customer.CustomerConvert
;
import
cn.iocoder.yudao.module.customer.convert.customer.CustomerConvert
;
import
cn.iocoder.yudao.module.customer.dal.dataobject.customer.CustomerDO
;
import
cn.iocoder.yudao.module.customer.dal.dataobject.customer.CustomerDO
;
import
cn.iocoder.yudao.module.customer.dto.CustomerExportReqDTO
;
import
cn.iocoder.yudao.module.customer.service.customer.CustomerService
;
import
cn.iocoder.yudao.module.customer.service.customer.CustomerService
;
import
cn.iocoder.yudao.module.customer.service.indirectCustomer.IndirectCustomerService
;
import
cn.iocoder.yudao.module.customer.service.indirectCustomer.IndirectCustomerService
;
import
cn.iocoder.yudao.module.customer.vo.customer.vo.CustomerExcelVO
;
import
cn.iocoder.yudao.module.customer.vo.customer.vo.CustomerExcelVO
;
...
@@ -67,8 +68,8 @@ public class CustomerExcelExportListener {
...
@@ -67,8 +68,8 @@ public class CustomerExcelExportListener {
*/
*/
@EventListener
(
CustomerMineExcelExportPushEvent
.
class
)
@EventListener
(
CustomerMineExcelExportPushEvent
.
class
)
public
void
customerMineExcelExportPushEvent
(
CustomerMineExcelExportPushEvent
event
)
{
public
void
customerMineExcelExportPushEvent
(
CustomerMineExcelExportPushEvent
event
)
{
CustomerExportReq
VO
exportReqVO
=
JSONObject
.
parseObject
(
event
.
getRequestParams
(),
CustomerExportReqV
O
.
class
);
CustomerExportReq
DTO
exportReqVO
=
JSONObject
.
parseObject
(
event
.
getRequestParams
(),
CustomerExportReqDT
O
.
class
);
List
<
CustomerDO
>
list
=
customerService
.
getCustomerExcelVoList
(
exportReqVO
);
List
<
CustomerDO
>
list
=
customerService
.
get
My
CustomerExcelVoList
(
exportReqVO
);
makeExcelUpload
(
event
,
list
);
makeExcelUpload
(
event
,
list
);
}
}
...
...
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