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
fa434cfb
Commit
fa434cfb
authored
Aug 30, 2024
by
yanghao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: 客户补充修改默认付款和修改控货无收货人的接口
parent
9a492f87
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
141 additions
and
2 deletions
+141
-2
CustomerDO.java
...o/module/customer/dal/dataobject/customer/CustomerDO.java
+1
-1
CustomerService.java
...dao/module/customer/service/customer/CustomerService.java
+4
-0
CustomerServiceImpl.java
...module/customer/service/customer/CustomerServiceImpl.java
+53
-0
CustomerChangeDefaultPayReqVO.java
...ustomer/vo/customer/vo/CustomerChangeDefaultPayReqVO.java
+28
-0
CustomerChangeNoConsigneeReqVO.java
...stomer/vo/customer/vo/CustomerChangeNoConsigneeReqVO.java
+28
-0
CustomerController.java
...ustomer/controller/admin/customer/CustomerController.java
+22
-0
CustomerOperateTypeEnum.java
...coder/yudao/module/ecw/enums/CustomerOperateTypeEnum.java
+3
-0
CustomerRoleEnum.java
...a/cn/iocoder/yudao/module/ecw/enums/CustomerRoleEnum.java
+2
-1
No files found.
yudao-module-customer/yudao-module-customer-core/src/main/java/cn/iocoder/yudao/module/customer/dal/dataobject/customer/CustomerDO.java
View file @
fa434cfb
...
@@ -383,7 +383,7 @@ public class CustomerDO extends BaseDO {
...
@@ -383,7 +383,7 @@ public class CustomerDO extends BaseDO {
/**
/**
* 创建入口
* 创建入口
* <p>
* <p>
* 枚举 {@link TODO customer_
create_
from 字典}
* 枚举 {@link TODO customer_from 字典}
*/
*/
private
Integer
createFrom
;
private
Integer
createFrom
;
...
...
yudao-module-customer/yudao-module-customer-core/src/main/java/cn/iocoder/yudao/module/customer/service/customer/CustomerService.java
View file @
fa434cfb
...
@@ -416,6 +416,10 @@ public interface CustomerService extends IService<CustomerDO> {
...
@@ -416,6 +416,10 @@ public interface CustomerService extends IService<CustomerDO> {
*/
*/
void
changeCustomerFcl
(
CustomerChangeFclReqVO
customerChangeFclReqVO
);
void
changeCustomerFcl
(
CustomerChangeFclReqVO
customerChangeFclReqVO
);
void
changeCustomerNoConsignee
(
CustomerChangeNoConsigneeReqVO
customerChangeNoConsigneeReqVO
);
void
changeCustomerDefaultPay
(
CustomerChangeDefaultPayReqVO
customerChangeDefaultPayReqVO
);
/**
/**
* @param areaCode 区号 eg: 86
* @param areaCode 区号 eg: 86
* @param phone 电话 eg: 13233334444
* @param phone 电话 eg: 13233334444
...
...
yudao-module-customer/yudao-module-customer-core/src/main/java/cn/iocoder/yudao/module/customer/service/customer/CustomerServiceImpl.java
View file @
fa434cfb
...
@@ -3474,6 +3474,59 @@ public class CustomerServiceImpl extends AbstractService<CustomerMapper,
...
@@ -3474,6 +3474,59 @@ public class CustomerServiceImpl extends AbstractService<CustomerMapper,
}
}
}
}
@Override
public
void
changeCustomerNoConsignee
(
CustomerChangeNoConsigneeReqVO
customerChangeNoConsigneeReqVO
)
{
List
<
CustomerDO
>
customerDOList
=
customerMapper
.
selectBatchIds
(
customerChangeNoConsigneeReqVO
.
getCustomerIdList
());
if
(
CollectionUtil
.
isNotEmpty
(
customerDOList
))
{
Boolean
noConsigee
=
customerChangeNoConsigneeReqVO
.
getNoConsigee
();
customerDOList
.
stream
()
.
filter
(
t
->
t
.
getNoConsignee
()
==
null
||
!
t
.
getNoConsignee
().
equals
(
noConsigee
))
.
forEach
(
customerDO
->
{
customerDO
.
setNoConsignee
(
noConsigee
);
customerMapper
.
updateById
(
customerDO
);
LoginUser
loginUser
=
SecurityFrameworkUtils
.
getLoginUser
();
CustomerOperateLogCreateReqVO
customerOperateLogCreateReqVO
=
new
CustomerOperateLogCreateReqVO
()
.
setOperator
(
loginUser
==
null
?
null
:
loginUser
.
getId
())
.
setOperatorName
(
loginUser
==
null
?
null
:
loginUser
.
getNickname
())
.
setCustomerId
(
customerDO
.
getId
())
.
setNumber
(
customerDO
.
getNumber
())
.
setName
(
customerDO
.
getName
())
.
setOperateType
(
CustomerOperateTypeEnum
.
CHANGE_NO_CONSIGNEE
.
getValue
())
.
setRemark
(
"设置客户的控货无收货人为:"
+
(
noConsigee
?
"【是】"
:
"【否】"
));
customerOperateLogService
.
createOperateLog
(
customerOperateLogCreateReqVO
);
});
}
}
@Override
public
void
changeCustomerDefaultPay
(
CustomerChangeDefaultPayReqVO
customerChangeDefaultPayReqVO
)
{
List
<
CustomerDO
>
customerDOList
=
customerMapper
.
selectBatchIds
(
customerChangeDefaultPayReqVO
.
getCustomerIdList
());
if
(
CollectionUtil
.
isNotEmpty
(
customerDOList
))
{
Boolean
defaultPay
=
customerChangeDefaultPayReqVO
.
getDefaultPay
();
customerDOList
.
stream
()
.
filter
(
t
->
t
.
getDefaultPay
()
==
null
||
!
t
.
getDefaultPay
().
equals
(
defaultPay
))
.
forEach
(
customerDO
->
{
customerDO
.
setDefaultPay
(
defaultPay
);
customerMapper
.
updateById
(
customerDO
);
LoginUser
loginUser
=
SecurityFrameworkUtils
.
getLoginUser
();
CustomerOperateLogCreateReqVO
customerOperateLogCreateReqVO
=
new
CustomerOperateLogCreateReqVO
()
.
setOperator
(
loginUser
==
null
?
null
:
loginUser
.
getId
())
.
setOperatorName
(
loginUser
==
null
?
null
:
loginUser
.
getNickname
())
.
setCustomerId
(
customerDO
.
getId
())
.
setNumber
(
customerDO
.
getNumber
())
.
setName
(
customerDO
.
getName
())
.
setOperateType
(
CustomerOperateTypeEnum
.
CHANGE_DEFAULT_PAY
.
getValue
())
.
setRemark
(
"设置客户的默认付款为:"
+
(
defaultPay
?
"【是】"
:
"【否】"
));
customerOperateLogService
.
createOperateLog
(
customerOperateLogCreateReqVO
);
});
}
}
@Override
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
...
...
yudao-module-customer/yudao-module-customer-core/src/main/java/cn/iocoder/yudao/module/customer/vo/customer/vo/CustomerChangeDefaultPayReqVO.java
0 → 100644
View file @
fa434cfb
package
cn
.
iocoder
.
yudao
.
module
.
customer
.
vo
.
customer
.
vo
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.ToString
;
import
javax.validation.constraints.NotEmpty
;
import
javax.validation.constraints.NotNull
;
import
java.util.List
;
@ApiModel
(
"管理后台 - 默认付款切换 Request VO"
)
@Data
@EqualsAndHashCode
@ToString
public
class
CustomerChangeDefaultPayReqVO
{
@ApiModelProperty
(
value
=
"客户ID列表"
,
required
=
true
)
@NotEmpty
(
message
=
"客户ID列表不能为空"
)
private
List
<
Long
>
customerIdList
;
@ApiModelProperty
(
value
=
"是否默认付款"
,
required
=
true
)
@NotNull
(
message
=
"默认付款值不能为空"
)
private
Boolean
defaultPay
;
}
yudao-module-customer/yudao-module-customer-core/src/main/java/cn/iocoder/yudao/module/customer/vo/customer/vo/CustomerChangeNoConsigneeReqVO.java
0 → 100644
View file @
fa434cfb
package
cn
.
iocoder
.
yudao
.
module
.
customer
.
vo
.
customer
.
vo
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.ToString
;
import
javax.validation.constraints.NotEmpty
;
import
javax.validation.constraints.NotNull
;
import
java.util.List
;
@ApiModel
(
"管理后台 - 控货无收货人切换 Request VO"
)
@Data
@EqualsAndHashCode
@ToString
public
class
CustomerChangeNoConsigneeReqVO
{
@ApiModelProperty
(
value
=
"客户ID列表"
,
required
=
true
)
@NotEmpty
(
message
=
"客户ID列表不能为空"
)
private
List
<
Long
>
customerIdList
;
@ApiModelProperty
(
value
=
"是否控货无收货人"
,
required
=
true
)
@NotNull
(
message
=
"控货无收货人值不能为空"
)
private
Boolean
noConsigee
;
}
yudao-module-customer/yudao-module-customer-rest/src/main/java/cn/iocoder/yudao/module/customer/controller/admin/customer/CustomerController.java
View file @
fa434cfb
...
@@ -1125,6 +1125,28 @@ public class CustomerController {
...
@@ -1125,6 +1125,28 @@ public class CustomerController {
}
}
@PutMapping
(
"/change-customer-no-consignee"
)
@ApiOperation
(
"设置客户是否是默认付款无收货人"
)
@PreAuthorize
(
"@ss.hasPermission('ecw:customer:noconsignee')"
)
@Idempotent
(
timeout
=
5
)
public
CommonResult
<
Boolean
>
changeCustomerNoConsignee
(
@Valid
@RequestBody
CustomerChangeNoConsigneeReqVO
customerChangeNoConsigneeReqVO
)
{
customerService
.
changeCustomerNoConsignee
(
customerChangeNoConsigneeReqVO
);
return
success
(
true
);
}
@PutMapping
(
"/change-customer-default-pay"
)
@ApiOperation
(
"设置客户是否是默认侍"
)
@PreAuthorize
(
"@ss.hasPermission('ecw:customer:defaultpay')"
)
@Idempotent
(
timeout
=
5
)
public
CommonResult
<
Boolean
>
changeCustomerDefaultPay
(
@Valid
@RequestBody
CustomerChangeDefaultPayReqVO
customerChangeDefaultPayReqVO
)
{
customerService
.
changeCustomerDefaultPay
(
customerChangeDefaultPayReqVO
);
return
success
(
true
);
}
@PutMapping
(
"/recycle-unconfirmed-customer"
)
@PutMapping
(
"/recycle-unconfirmed-customer"
)
@ApiOperation
(
"回收已分配未接收的客户"
)
@ApiOperation
(
"回收已分配未接收的客户"
)
// @PreAuthorize("@ss.hasPermission('ecw:customer:recycle:unconfirmed')")
// @PreAuthorize("@ss.hasPermission('ecw:customer:recycle:unconfirmed')")
...
...
yudao-module-ecw/yudao-module-ecw-api/src/main/java/cn/iocoder/yudao/module/ecw/enums/CustomerOperateTypeEnum.java
View file @
fa434cfb
...
@@ -49,6 +49,9 @@ public enum CustomerOperateTypeEnum {
...
@@ -49,6 +49,9 @@ public enum CustomerOperateTypeEnum {
UPDATE_CUSTOMER_TO_OLD_BY_CUSTOMER_SERVICE
(
20
,
"修改客户经理下成交客户的业绩类型"
),
UPDATE_CUSTOMER_TO_OLD_BY_CUSTOMER_SERVICE
(
20
,
"修改客户经理下成交客户的业绩类型"
),
UPDATE_CUSTOMER_NEW_OR_OLD
(
21
,
"修改客户业绩类型"
),
UPDATE_CUSTOMER_NEW_OR_OLD
(
21
,
"修改客户业绩类型"
),
CHANGE_NO_CONSIGNEE
(
22
,
"设置控货无收货人"
),
CHANGE_DEFAULT_PAY
(
23
,
"设置默认付款"
),
DELETE
(
100
,
"删除"
),
DELETE
(
100
,
"删除"
),
...
...
yudao-module-ecw/yudao-module-ecw-api/src/main/java/cn/iocoder/yudao/module/ecw/enums/CustomerRoleEnum.java
View file @
fa434cfb
...
@@ -12,11 +12,12 @@ import java.util.Arrays;
...
@@ -12,11 +12,12 @@ import java.util.Arrays;
@Getter
@Getter
public
enum
CustomerRoleEnum
{
public
enum
CustomerRoleEnum
{
//0、CO 1、工程商 2、代理 6、集运
//0、CO 1、工程商 2、代理
3、同行
6、集运
C0
(
0
,
"C0"
),
C0
(
0
,
"C0"
),
CONTRACTOR
(
1
,
"工程商"
),
CONTRACTOR
(
1
,
"工程商"
),
PROXY
(
2
,
"代理"
),
PROXY
(
2
,
"代理"
),
COMPETITOR
(
3
,
"同行"
),
CONSOLIDATOR
(
6
,
"集运"
);
CONSOLIDATOR
(
6
,
"集运"
);
;
;
...
...
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