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
19552d0b
Commit
19552d0b
authored
Mar 02, 2023
by
weijiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化店铺距离限制
parent
bc98754f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
soss-system/src/main/java/com/soss/system/service/impl/AppServiceImpl.java
+7
-2
No files found.
soss-system/src/main/java/com/soss/system/service/impl/AppServiceImpl.java
View file @
19552d0b
...
...
@@ -109,8 +109,13 @@ public class AppServiceImpl {
if
(!
StringUtils
.
isEmpty
(
lng
)
&&
!
StringUtils
.
isEmpty
(
lat
))
{
double
realDistance
=
DistanceUtil
.
getRealDistance
(
Double
.
parseDouble
(
lng
),
Double
.
parseDouble
(
lat
),
Double
.
parseDouble
(
shop
.
getLng
()),
Double
.
parseDouble
(
shop
.
getLat
()));
double
realKm
=
realDistance
/
1000
;
double
shopLimit
=
shop
.
getDistanceLimit
()
==
null
?
0
:
shop
.
getDistanceLimit
();
if
(
realKm
>
10
||
realKm
>
shopLimit
)
{
if
(
realKm
>
10
)
{
shop
.
setOrderState
(
0
);
shop
.
setStateDesc
(
"距离较远,门店暂停接单"
);
return
false
;
}
Double
shopLimit
=
shop
.
getDistanceLimit
();
if
(
shopLimit
!=
null
&&
shopLimit
>
0
&&
realKm
>
shopLimit
)
{
shop
.
setOrderState
(
0
);
shop
.
setStateDesc
(
"距离较远,门店暂停接单"
);
return
false
;
...
...
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