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
3e71c660
Commit
3e71c660
authored
May 13, 2024
by
liuzeheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
二期申请延期掉入公海
parent
aa361efc
Changes
9
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
549 additions
and
8 deletions
+549
-8
CustomerDO.java
...o/module/customer/dal/dataobject/customer/CustomerDO.java
+3
-0
CustomerMapper.java
...ao/module/customer/dal/mysql/customer/CustomerMapper.java
+7
-0
CustomerServiceImpl.java
...module/customer/service/customer/CustomerServiceImpl.java
+24
-6
CustomerMapper.xml
...ore/src/main/resources/mapper/customer/CustomerMapper.xml
+506
-1
ErrorCodeConstants.java
...cn/iocoder/yudao/module/ecw/enums/ErrorCodeConstants.java
+3
-0
OrderMapper.xml
...rder-core/src/main/resources/mapper/order/OrderMapper.xml
+3
-1
messages.properties
yudao-server/src/main/resources/i18n/messages.properties
+1
-0
messages_en.properties
yudao-server/src/main/resources/i18n/messages_en.properties
+1
-0
messages_zh.properties
yudao-server/src/main/resources/i18n/messages_zh.properties
+1
-0
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 @
3e71c660
...
...
@@ -363,6 +363,9 @@ public class CustomerDO extends BaseDO {
*/
private
Boolean
noConsignee
;
@ApiModelProperty
(
"延期申请次数"
)
private
int
delayApprovalNum
;
/**
* vip等级-中文
*/
...
...
yudao-module-customer/yudao-module-customer-core/src/main/java/cn/iocoder/yudao/module/customer/dal/mysql/customer/CustomerMapper.java
View file @
3e71c660
...
...
@@ -2,8 +2,10 @@ package cn.iocoder.yudao.module.customer.dal.mysql.customer;
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.dto.CustomerOrderQueryDTO
;
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.customerDetail.CustomerOrderBackPageVO
;
import
com.baomidou.mybatisplus.core.conditions.Wrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.toolkit.Constants
;
...
...
@@ -175,4 +177,9 @@ public interface CustomerMapper extends BaseMapperX<CustomerDO> {
@Update
(
"update ecw_customer set is_new = #{isNew} where deleted = 0 and is_new != #{isNew} and id = #{customerId}"
)
void
updateCustomerNewOrOld
(
@Param
(
"customerId"
)
Long
customerId
,
@Param
(
"isNew"
)
Boolean
isNew
);
@Update
(
"update ecw_customer set delay_approval_num = #{delayApprovalNum} where deleted = 0 and id = #{customerId}"
)
void
updateCustomerDelayApprovalNum
(
@Param
(
"customerId"
)
Long
customerId
,
@Param
(
"delayApprovalNum"
)
int
delayApprovalNum
);
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/service/customer/CustomerServiceImpl.java
View file @
3e71c660
...
...
@@ -47,6 +47,7 @@ import cn.iocoder.yudao.module.customer.dal.mysql.customerPublicCatchLog.Custome
import
cn.iocoder.yudao.module.customer.dto.CustomerDelayApprovalInfoDto
;
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.customerContacts.CustomerContactsService
;
import
cn.iocoder.yudao.module.customer.service.customerOperateLog.CustomerOperateLogService
;
...
...
@@ -58,6 +59,7 @@ import cn.iocoder.yudao.module.customer.vo.customer.line.CustomerLineUpdateReqVO
import
cn.iocoder.yudao.module.customer.vo.customer.vo.*
;
import
cn.iocoder.yudao.module.customer.vo.customerBank.CustomerBankCreateReqVO
;
import
cn.iocoder.yudao.module.customer.vo.customerBank.CustomerBankUpdateReqVO
;
import
cn.iocoder.yudao.module.customer.vo.customerDetail.CustomerOrderBackPageVO
;
import
cn.iocoder.yudao.module.customer.vo.customerOperateLog.CustomerOperateLogCreateReqVO
;
import
cn.iocoder.yudao.module.ecw.dal.dataobject.country.CountryDO
;
import
cn.iocoder.yudao.module.ecw.enums.CustomerOperateTypeEnum
;
...
...
@@ -303,6 +305,8 @@ public class CustomerServiceImpl extends AbstractService<CustomerMapper, Custome
customer
.
setIsCustomerServiceConfirmed
(
false
);
customer
.
setIsInOpenSea
(
false
);
}
Date
estimateEnterOpenSeaTime
=
DateUtil
.
offsetMonth
(
new
Date
(),
3
).
toJdkDate
();
//改为3个月
customer
.
setEstimateEnterOpenSeaTime
(
estimateEnterOpenSeaTime
);
}
...
...
@@ -1781,6 +1785,9 @@ public class CustomerServiceImpl extends AbstractService<CustomerMapper, Custome
if
(
Objects
.
isNull
(
customerDO
))
{
throw
exception
(
CUSTOMER_NOT_EXISTS
);
}
if
(
customerDO
.
getDelayApprovalNum
()
>=
1
){
throw
exception
(
CUSTOMER_DELAY_APPROVAL_MORE_THEN_ONE
);
}
if
(
customerDO
.
getIsInOpenSea
())
{
throw
exception
(
CUSTOMER_HAS_IN_OPEN_SEA
);
}
...
...
@@ -1825,6 +1832,9 @@ public class CustomerServiceImpl extends AbstractService<CustomerMapper, Custome
customerApprovalDO
.
setFormId
(
formId
);
customerApprovalService
.
updateById
(
customerApprovalDO
);
//记录延期申请审核次数
customerMapper
.
updateCustomerDelayApprovalNum
(
customerDO
.
getId
(),
customerDO
.
getDelayApprovalNum
()+
1
)
;
//纪录日志
LoginUser
loginUser
=
SecurityFrameworkUtils
.
getLoginUser
();
CustomerOperateLogCreateReqVO
customerOperateLogCreateReqVO
=
new
CustomerOperateLogCreateReqVO
()
...
...
@@ -2488,12 +2498,20 @@ public class CustomerServiceImpl extends AbstractService<CustomerMapper, Custome
boolean
isFcl
=
isFcl
(
customer
);
//捞取后设置预计进入公海池时间
Date
estimateEnterOpenSeaTime
=
isFcl
?
null
:
DateUtil
.
offsetMonth
(
now
,
1
).
toJdkDate
();
if
(!
loginUserId
.
equals
(
customer
.
getCustomerService
())){
//如果捞取新旧客户经理不是同一个,
//Date estimateEnterOpenSeaTime = isFcl ? null : DateUtil.offsetMonth(now, 1).toJdkDate();
Date
estimateEnterOpenSeaTime
=
isFcl
?
null
:
DateUtil
.
offsetMonth
(
now
,
3
).
toJdkDate
();
if
(!
loginUserId
.
equals
(
customer
.
getCustomerService
()))
{
//如果捞取新旧客户经理不是同一个,
estimateEnterOpenSeaTime
=
isFcl
?
null
:
DateUtil
.
offsetMonth
(
now
,
3
).
toJdkDate
();
//改为3个月
}
if
(
loginUserId
.
equals
(
customer
.
getCustomerService
()))
{
//如果捞取新旧客户经理是同一个,且客户的最后一次成交订单归属当前客户经理,延期6个月
if
(
loginUserId
.
equals
(
customer
.
getCustomerService
()))
{
//如果捞取新旧客户经理是同一个,且客户的最后一次成交订单归属当前客户经理,延期6个月
List
<
CustomerOrderBackPageVO
>
orderList
=
customerMapper
.
orderList
(
0
,
10
,
new
CustomerOrderQueryDTO
().
setCustomerId
(
customerId
));
if
(
CollectionUtil
.
isNotEmpty
(
orderList
)
&&
orderList
.
size
()
>
0
)
{
//客户成交的订单不为空
CustomerOrderBackPageVO
orderBackPageVO
=
orderList
.
get
(
0
);
if
(
loginUserId
.
equals
(
customer
.
getCustomerService
())
&&
orderBackPageVO
!=
null
&&
orderBackPageVO
.
getSalesmanId
().
equals
(
loginUserId
))
{
//订单的客户经理和当前是同一个
estimateEnterOpenSeaTime
=
isFcl
?
null
:
DateUtil
.
offsetMonth
(
now
,
6
).
toJdkDate
();
//改为6个月
}
}
}
...
...
yudao-module-customer/yudao-module-customer-core/src/main/resources/mapper/customer/CustomerMapper.xml
View file @
3e71c660
This diff is collapsed.
Click to expand it.
yudao-module-ecw/yudao-module-ecw-api/src/main/java/cn/iocoder/yudao/module/ecw/enums/ErrorCodeConstants.java
View file @
3e71c660
...
...
@@ -85,6 +85,8 @@ public interface ErrorCodeConstants {
ErrorCode
CUSTOMER_CONTACTS_USERID_ALREADY_BIND
=
new
ErrorCode
(
1004002016
,
"customer.contact.already.binding.others"
);
ErrorCode
MESSAGE_LEAVE_NOT_EXISTS
=
new
ErrorCode
(
1004002020
,
"message.leave.not.exists"
);
ErrorCode
COUNTRY_NOT_EXISTS
=
new
ErrorCode
(
1004002025
,
"country.not.exists"
);
...
...
@@ -173,6 +175,7 @@ public interface ErrorCodeConstants {
ErrorCode
CUSTOMER_IS_NEW_OR_OLD_NO_CHANGE
=
new
ErrorCode
(
1004006036
,
"customer.is.new.or.old.no.change"
);
ErrorCode
CUSTOMER_DELAY_APPROVAL_MORE_THEN_ONE
=
new
ErrorCode
(
1004006037
,
"customer.delay.approval.times.more.then.one"
)
;
}
yudao-module-order/yudao-module-order-core/src/main/resources/mapper/order/OrderMapper.xml
View file @
3e71c660
...
...
@@ -1913,7 +1913,9 @@
<if
test=
"query.userType == 2 "
>
AND ((o.user_id is not null AND o.user_id > 0 AND o.`status` != 0) or o.user_id is null or o.user_id = 0)
</if>
</sql><sql
id=
"issuedOrderQuery"
>
</sql>
<sql
id=
"issuedOrderQuery"
>
<if
test=
"query.type != null and query.type != '' and query.type == 0 "
>
AND (o.type is null or o.type = '' or o.type = '0')
</if>
...
...
yudao-server/src/main/resources/i18n/messages.properties
View file @
3e71c660
...
...
@@ -62,6 +62,7 @@ customer.contacts.already.bind=
customer.contacts.multi.default
=
customer.contacts.no.default
=
customer.not.exists
=
customer.delay.approval.times.more.then.one
=
zhong.pao.line.config.exists
=
zhong.pao.not.exists
=
currency.not.exists
=
...
...
yudao-server/src/main/resources/i18n/messages_en.properties
View file @
3e71c660
...
...
@@ -997,4 +997,5 @@ case.num.in.merge.pkg=This box has been packed, please scan the packing box numb
order.already.in.merge.pkg
=
The order has been placed under the packaging box
customer.is.new.or.old.no.change
=
customer current business type is {}, it's no change
order.is.pre.installed
=
Order pre installed
customer.delay.approval.times.more.then.one
=
delay approval times more then one
yudao-server/src/main/resources/i18n/messages_zh.properties
View file @
3e71c660
...
...
@@ -565,6 +565,7 @@ customer.contacts.already.bind=\u5BA2\u6237\u8054\u7CFB\u4EBA\u624B\u673A\u53F7{
customer.contacts.multi.default
=
\u
5BA2
\u6237\u8054\u
7CFB
\u
4EBA
\u
53EA
\u
80FD
\u
8BBE
\u
7F6E
\u
4E00
\u
4E2A
\u
9ED8
\u
8BA4
\u8054\u
7CFB
\u
4EBA
customer.contacts.no.default
=
\u
5BA2
\u6237\u8054\u
7CFB
\u
4EBA
\u
672A
\u
8BBE
\u
7F6E
\u
9ED8
\u
8BA4
\u8054\u
7CFB
\u
4EBA
customer.not.exists
=
\u
5BA2
\u6237\u
4E0D
\u
5B58
\u5728
customer.delay.approval.times.more.then.one
=
\u
5DF2
\u
7ECF
\u7533\u
8BF7
\u
8FC71
\u
6B21
\u
5EF6
\u
671F
\u
4E0D
\u
80FD
\u
518D
\u7533\u
8BF7
\u
4E86
zhong.pao.line.config.exists
=
\u
6B64
\u
7EBF
\u
8DEF
\u7684\u
91CD
\u
6CE1
\u
8D27
\u
914D
\u
7F6E
\u
5DF2
\u
5B58
\u5728
zhong.pao.not.exists
=
\u
91CD
\u
6CE1
\u
8D27
\u
914D
\u
7F6E
\u
4E0D
\u
5B58
\u5728
currency.not.exists
=
\u
8D27
\u
5E01
\u5355\u
4F4D
\u
4E0D
\u
5B58
\u5728
...
...
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