Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tl_estate
Project
Project
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
hujun
tl_estate
Commits
dfd4efc6
Commit
dfd4efc6
authored
Sep 18, 2019
by
clone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
18d19cbe
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
Location.php
application/api_broker/controller/Location.php
+3
-1
No files found.
application/api_broker/controller/Location.php
View file @
dfd4efc6
...
@@ -78,9 +78,10 @@ class Location extends Basic
...
@@ -78,9 +78,10 @@ class Location extends Basic
$s_redis
=
new
RedisCacheService
();
$s_redis
=
new
RedisCacheService
();
$where
[
'agent_id'
]
=
$params
[
'agent_id'
];
$where
[
'agent_id'
]
=
$params
[
'agent_id'
];
$where
[
'location_date'
]
=
date
(
"Y-m-d"
,
time
());
$data
=
$m_location
->
findData
(
'longitude,latitude'
,
$where
,
'id desc'
);
$data
=
$m_location
->
findData
(
'longitude,latitude'
,
$where
,
'id desc'
);
if
(
$params
[
'longitude'
]
.
$params
[
'latitude'
]
==
$data
[
'longitude'
]
.
$data
[
'latitude'
])
{
if
(
$params
[
'longitude'
]
.
$params
[
'latitude'
]
==
$data
[
'longitude'
]
.
$data
[
'latitude'
])
{
return
$this
->
response
(
101
,
'经纬度重复'
);
return
$this
->
response
(
101
,
'经纬度重复'
);
}
}
...
@@ -105,6 +106,7 @@ class Location extends Basic
...
@@ -105,6 +106,7 @@ class Location extends Basic
$save_data
[
"store_id"
]
=
$agent_data
[
'store_id'
];
$save_data
[
"store_id"
]
=
$agent_data
[
'store_id'
];
$save_data
[
"district_id"
]
=
$agent_data
[
'district_id'
];
$save_data
[
"district_id"
]
=
$agent_data
[
'district_id'
];
$save_data
[
"location_time"
]
=
date
(
'Y-m-d H:i:s'
);
$save_data
[
"location_time"
]
=
date
(
'Y-m-d H:i:s'
);
$save_data
[
"location_date"
]
=
date
(
'Y-m-d'
);
$save_data
[
"longitude"
]
=
$params
[
'longitude'
];
$save_data
[
"longitude"
]
=
$params
[
'longitude'
];
$save_data
[
"latitude"
]
=
$params
[
'latitude'
];
$save_data
[
"latitude"
]
=
$params
[
'latitude'
];
$num
=
$m_location
->
insertData
(
$data
);
$num
=
$m_location
->
insertData
(
$data
);
...
...
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