Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
yangxiujun
/
paidan_demo
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit a64f3bc9
authored
Nov 03, 2023
by
huangjinxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:不允许改约到当前时间之前
1 parent
b814811a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletions
project-interface/src/main/java/com/dituhui/pea/enums/StatusCodeEnum.java
project-order/src/main/java/com/dituhui/pea/order/service/impl/OrderInfoServiceImpl.java
project-interface/src/main/java/com/dituhui/pea/enums/StatusCodeEnum.java
View file @
a64f3bc
...
...
@@ -138,7 +138,9 @@ public enum StatusCodeEnum {
ORDER_EXISTS
(
"026"
,
"订单已存在"
,
false
),
ORDER_SKILL_NOT_EXISTS
(
"027"
,
"订单所需技能不存在,请核对!"
,
false
);
ORDER_SKILL_NOT_EXISTS
(
"027"
,
"订单所需技能不存在,请核对!"
,
false
),
ORDER_RESCHEDULE_BEFORE_TIME
(
"028"
,
"订单不能改约到当前时间以前!"
,
false
);
/**
* 状态码
...
...
project-order/src/main/java/com/dituhui/pea/order/service/impl/OrderInfoServiceImpl.java
View file @
a64f3bc
...
...
@@ -204,6 +204,9 @@ public class OrderInfoServiceImpl implements OrderInfoService {
public
Result
<?>
orderReschedule
(
OrderReschedule
req
)
throws
BusinessException
{
// 判断是否分配到人和是否是今天
LocalDateTime
expectBegin
=
TimeUtils
.
IsoDateTime2LocalDateTime
(
req
.
getExpectBegin
());
if
(
expectBegin
.
isBefore
(
LocalDateTime
.
now
()))
{
return
Result
.
failed
(
StatusCodeEnum
.
ORDER_RESCHEDULE_BEFORE_TIME
);
}
LocalDateTime
expectEnd
=
TimeUtils
.
IsoDateTime2LocalDateTime
(
req
.
getExpectEnd
());
OrderInfoEntity
order
=
orderInfoDao
.
getByOrderId
(
req
.
getOrderId
());
order
.
setDt
(
expectBegin
.
toLocalDate
());
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment