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
c10e3e67
Commit
c10e3e67
authored
Feb 09, 2023
by
caiyt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
支持测试中的店铺和机器可下单的操作
parent
09788544
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
soss-admin/src/main/java/com/soss/web/controller/coffee/OrderController.java
+1
-1
soss-system/src/main/java/com/soss/system/service/impl/OrderServiceImpl.java
+2
-2
No files found.
soss-admin/src/main/java/com/soss/web/controller/coffee/OrderController.java
View file @
c10e3e67
...
...
@@ -136,7 +136,7 @@ public class OrderController extends BaseController {
List
<
Machine
>
machines
=
machineService
.
selectMachineList
(
machine
);
if
(
machines
!=
null
&&
!
machines
.
isEmpty
())
{
Machine
machine1
=
machines
.
get
(
0
);
if
(!
MachineState
.
RUNNING
.
getState
().
equals
(
machine1
.
getState
()))
{
if
(!
MachineState
.
RUNNING
.
getState
().
equals
(
machine1
.
getState
())
&&
!
MachineState
.
TO_BE_TEST
.
getState
().
equals
(
machine1
.
getState
())
)
{
return
AjaxResult
.
error
(
"机器暂时不可用"
);
}
String
machineId
=
machine1
.
getId
();
...
...
soss-system/src/main/java/com/soss/system/service/impl/OrderServiceImpl.java
View file @
c10e3e67
...
...
@@ -225,8 +225,8 @@ public class OrderServiceImpl implements IOrderService {
if
(
startBusiness
.
getTimeInMillis
()
>
l
||
endBusiness
.
getTimeInMillis
()
<
l
)
{
throw
new
ServiceException
(
"当前时间本店休息中,暂停点单~"
);
}
if
(!
Objects
.
equals
(
ShopState
.
OPEN
.
getState
(),
shop
.
getState
()))
{
throw
new
ServiceException
(
"店铺
非营业
状态不能下单"
);
if
(!
Objects
.
equals
(
ShopState
.
OPEN
.
getState
(),
shop
.
getState
())
&&
!
Objects
.
equals
(
ShopState
.
TESTING
.
getState
(),
shop
.
getState
())
)
{
throw
new
ServiceException
(
"店铺
当前
状态不能下单"
);
}
if
(
shop
.
getDistanceLimit
()
!=
null
&&
shop
.
getDistanceLimit
()
>
0
)
{
double
distance
=
DistanceUtil
.
getRealDistance
(
order
.
getLng
().
doubleValue
(),
order
.
getLat
().
doubleValue
(),
Double
.
parseDouble
(
shop
.
getLng
()),
Double
.
parseDouble
(
shop
.
getLat
()));
...
...
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