Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
soss
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
hooloo
ms
soss
Commits
cc4348c3
Commit
cc4348c3
authored
Jul 04, 2022
by
张新旗
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
前进前进,继续上代码
parent
48f263f1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
1 deletions
+29
-1
soss-system/src/main/java/com/soss/system/service/impl/OrderOperationLogServiceImpl.java
+1
-1
soss-system/src/main/java/com/soss/system/service/impl/OrderServiceImpl.java
+28
-0
No files found.
soss-system/src/main/java/com/soss/system/service/impl/OrderOperationLogServiceImpl.java
View file @
cc4348c3
...
...
@@ -170,7 +170,7 @@ public class OrderOperationLogServiceImpl implements IOrderOperationLogService
operationLog
.
setOperationUser
(
"系统"
);
operationLog
.
setContent
(
"用户完成退款"
);
}
else
{
operationLog
.
setStatus
(
"已
完成
"
);
operationLog
.
setStatus
(
"已
退款
"
);
operationLog
.
setOperation
(
"售后"
);
operationLog
.
setOperationUser
(
orderRefund
.
getCreateUserName
());
operationLog
.
setContent
(
orderRefund
.
getDesc
());
...
...
soss-system/src/main/java/com/soss/system/service/impl/OrderServiceImpl.java
View file @
cc4348c3
...
...
@@ -136,6 +136,14 @@ public class OrderServiceImpl implements IOrderService
if
(
HttpStatus
.
SUCCESS
!=
(
int
)
result
.
get
(
result
.
CODE_TAG
)){
return
result
;
}
try
{
checkBusinessTime
(
order
.
getShopId
());
}
catch
(
ServiceException
e
){
return
AjaxResult
.
error
(
e
.
getMessage
());
}
order
.
setState
(
OrderStatusConstant
.
Unpaid
);
order
.
setUserId
(
loginUser
.
getOpenId
());
order
.
setUserName
(
loginUser
.
getUsername
());
...
...
@@ -189,6 +197,26 @@ public class OrderServiceImpl implements IOrderService
}
private
void
checkBusinessTime
(
String
shopId
)
{
Shop
shop
=
shopMapper
.
selectShopById
(
shopId
);
String
startTime
=
shop
.
getStartTime
();
String
endTime
=
shop
.
getEndTime
();
String
[]
split
=
startTime
.
split
(
":"
);
String
[]
split1
=
endTime
.
split
(
":"
);
Calendar
startBusiness
=
Calendar
.
getInstance
();
startBusiness
.
set
(
Calendar
.
HOUR_OF_DAY
,
Integer
.
parseInt
(
split
[
0
]));
startBusiness
.
set
(
Calendar
.
MINUTE
,
Integer
.
parseInt
(
split
[
1
]));
Calendar
endBusiness
=
Calendar
.
getInstance
();
endBusiness
.
set
(
Calendar
.
HOUR_OF_DAY
,
Integer
.
parseInt
(
split1
[
0
]));
endBusiness
.
set
(
Calendar
.
MINUTE
,
Integer
.
parseInt
(
split1
[
1
]));
long
l
=
System
.
currentTimeMillis
();
if
(
startBusiness
.
getTimeInMillis
()>
l
||
endBusiness
.
getTimeInMillis
()<
l
){
throw
new
ServiceException
(
"当前时间本店休息中,暂停点单~"
);
}
}
/**
*订单重写从这里开始,这里要承担大部分的业务逻辑,逻辑集中化处理
*/
...
...
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