Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
my-yaf-project
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
chenchuanwen
my-yaf-project
Commits
91a4f6b3
Commit
91a4f6b3
authored
Sep 15, 2018
by
liuyuzhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
首页附近的店铺
parent
fa9432b3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
0 deletions
+5
-0
GoodsClassService.php
application/models/Business/Goods/GoodsClassService.php
+4
-0
QmStoreClass.php
application/models/DAO/QmStoreClass.php
+1
-0
No files found.
application/models/Business/Goods/GoodsClassService.php
100755 → 100644
View file @
91a4f6b3
...
...
@@ -191,11 +191,14 @@ class GoodsClassServiceModel extends \Business\AbstractModel{
$signStoreClasses
=
$this
->
getSignClassesByCityCode
(
$cityCode
);
\Our\Log
::
getInstance
()
->
write
(
json_encode
(
$signStoreClasses
));
if
(
$signStoreClasses
){
$returnClass
=
array
();
foreach
(
$signStoreClasses
as
$signClass
){
$class_distance
=
\Our\CommonExtension
::
getDistance
(
$lat
,
$lng
,
$signClass
[
'latitude'
],
$signClass
[
'longitude'
],
1
);
\Our\Log
::
getInstance
()
->
write
(
json_encode
(
$class_distance
));
//判断签约分类是否可以为当前用户提供服务,并且记录这些店铺对应的store_id
if
(
$class_distance
<=
$signClass
[
'sign_rang'
]){
$class
[
'class_distance'
]
=
$class_distance
;
...
...
@@ -211,6 +214,7 @@ class GoodsClassServiceModel extends \Business\AbstractModel{
$position
[
'lng'
]
=
$where
[
'lng'
];
$position
[
'cityCode'
]
=
$where
[
'cityCode'
];
$storeRedis
=
\Redis\Db6\StoreRedisModel
::
getInstance
();
\Our\Log
::
getInstance
()
->
write
(
json_encode
(
$signStoreIds
));
if
(
$signStoreIds
){
$signStoreKey
=
\Our\NameConst
::
signStoreIdsPrefix
.
crc32
(
serialize
(
ksort
(
$position
)));
$storeRedis
->
update
(
$signStoreKey
,
$signStoreIds
,
\Our\ApiConst
::
oneHour
);
...
...
application/models/DAO/QmStoreClass.php
100755 → 100644
View file @
91a4f6b3
...
...
@@ -89,6 +89,7 @@ class QmStoreClassModel extends \DAO\AbstractModel{
public
function
getStoreClasses
(
$where
,
$field
=
'*'
){
$this
->
setDb
();
$result
=
$this
->
db
->
select
(
$field
)
->
from
(
$this
->
_tableName
)
->
where
(
$where
)
->
fetchAll
();
\Our\Log
::
getInstance
()
->
write
(
$this
->
db
->
getLastSql
());
return
$result
;
}
...
...
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