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
d6a97012
Commit
d6a97012
authored
Feb 24, 2023
by
weijiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
下单时校验订单中sku数量
parent
770c75ff
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
9 deletions
+11
-9
soss-admin/src/main/java/com/soss/web/controller/coffee/WeixinController.java
+2
-2
soss-system/src/main/java/com/soss/system/service/impl/AppServiceImpl.java
+9
-7
No files found.
soss-admin/src/main/java/com/soss/web/controller/coffee/WeixinController.java
View file @
d6a97012
...
@@ -109,7 +109,7 @@ public class WeixinController {
...
@@ -109,7 +109,7 @@ public class WeixinController {
boolean
testFlag
=
false
;
boolean
testFlag
=
false
;
if
(
loginUser
!=
null
)
{
if
(
loginUser
!=
null
)
{
Customer
customer
=
customerService
.
selectCustById
(
loginUser
.
getOpenId
());
Customer
customer
=
customerService
.
selectCustById
(
loginUser
.
getOpenId
());
if
(
customer
!=
null
)
{
if
(
customer
!=
null
)
{
testFlag
=
customer
.
getTestFlag
();
testFlag
=
customer
.
getTestFlag
();
}
}
}
}
...
@@ -123,7 +123,7 @@ public class WeixinController {
...
@@ -123,7 +123,7 @@ public class WeixinController {
boolean
testFlag
=
false
;
boolean
testFlag
=
false
;
if
(
loginUser
!=
null
)
{
if
(
loginUser
!=
null
)
{
Customer
customer
=
customerService
.
selectCustById
(
loginUser
.
getOpenId
());
Customer
customer
=
customerService
.
selectCustById
(
loginUser
.
getOpenId
());
if
(
customer
!=
null
)
{
if
(
customer
!=
null
)
{
testFlag
=
customer
.
getTestFlag
();
testFlag
=
customer
.
getTestFlag
();
}
}
}
}
...
...
soss-system/src/main/java/com/soss/system/service/impl/AppServiceImpl.java
View file @
d6a97012
...
@@ -95,13 +95,15 @@ public class AppServiceImpl {
...
@@ -95,13 +95,15 @@ public class AppServiceImpl {
}
}
// 超出最大配送距离10KM 或 超出店铺设置最大距离
// 超出最大配送距离10KM 或 超出店铺设置最大距离
double
realDistance
=
DistanceUtil
.
getRealDistance
(
Double
.
parseDouble
(
lng
),
Double
.
parseDouble
(
lat
),
Double
.
parseDouble
(
shop
.
getLng
()),
Double
.
parseDouble
(
shop
.
getLat
()));
if
(!
StringUtils
.
isEmpty
(
lng
)
&&
!
StringUtils
.
isEmpty
(
lat
))
{
double
realKm
=
realDistance
/
1000
;
double
realDistance
=
DistanceUtil
.
getRealDistance
(
Double
.
parseDouble
(
lng
),
Double
.
parseDouble
(
lat
),
Double
.
parseDouble
(
shop
.
getLng
()),
Double
.
parseDouble
(
shop
.
getLat
()));
double
shopLimit
=
shop
.
getDistanceLimit
()
==
null
?
0
:
shop
.
getDistanceLimit
();
double
realKm
=
realDistance
/
1000
;
if
(
realKm
>
10
||
realKm
>
shopLimit
)
{
double
shopLimit
=
shop
.
getDistanceLimit
()
==
null
?
0
:
shop
.
getDistanceLimit
();
shop
.
setOrderState
(
0
);
if
(
realKm
>
10
||
realKm
>
shopLimit
)
{
shop
.
setStateDesc
(
"距离较远,门店暂停接单"
);
shop
.
setOrderState
(
0
);
return
false
;
shop
.
setStateDesc
(
"距离较远,门店暂停接单"
);
return
false
;
}
}
}
shop
.
setOrderState
(
1
);
shop
.
setOrderState
(
1
);
...
...
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