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
ced767b8
Commit
ced767b8
authored
Sep 15, 2018
by
liuyuzhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
首页附近的店铺
parent
52e8330c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
6 deletions
+1
-6
GoodsClassService.php
application/models/Business/Goods/GoodsClassService.php
+1
-5
QmStoreClass.php
application/models/DAO/QmStoreClass.php
+0
-1
No files found.
application/models/Business/Goods/GoodsClassService.php
View file @
ced767b8
...
...
@@ -191,7 +191,6 @@ class GoodsClassServiceModel extends \Business\AbstractModel{
$signStoreClasses
=
$this
->
getSignClassesByCityCode
(
$cityCode
);
\Our\Log
::
getInstance
()
->
write
(
json_encode
(
$signStoreClasses
));
if
(
$signStoreClasses
){
$returnClass
=
array
();
$newStoreIds
=
array
();
...
...
@@ -199,23 +198,20 @@ class GoodsClassServiceModel extends \Business\AbstractModel{
$class_distance
=
\Our\CommonExtension
::
getDistance
(
$lat
,
$lng
,
$signClass
[
'latitude'
],
$signClass
[
'longitude'
],
1
);
//判断签约分类是否可以为当前用户提供服务,并且记录这些店铺对应的store_id
if
(
$class_distance
<=
$signClass
[
'sign_rang'
]){
\Our\Log
::
getInstance
()
->
write
(
json_encode
(
$class_distance
));
$class
[
'class_distance'
]
=
$class_distance
;
$returnClass
[
$class_distance
]
=
$class
;
if
(
!
(
$newStoreIds
&&
in_array
(
$signClass
[
'store_id'
],
$newStoreIds
))){
$newStoreIds
[]
=
$signClass
[
'store_id'
];
}
}
}
ksort
(
$returnClass
);
\Our\Log
::
getInstance
()
->
write
(
json_encode
(
$returnClass
));
$signParentClassIds
=
array_unique
(
array_column
(
$returnClass
,
'gc_parent_id'
));
//$signStoreIds = array_unique(array_column($returnClass,'store_id'));
$signStoreIds
=
$newStoreIds
;
\Our\Log
::
getInstance
()
->
write
(
json_encode
(
$signStoreIds
));
//将当前位置对应签约店铺存入缓存
$position
[
'lat'
]
=
$where
[
'lat'
];
$position
[
'lng'
]
=
$where
[
'lng'
];
...
...
application/models/DAO/QmStoreClass.php
View file @
ced767b8
...
...
@@ -89,7 +89,6 @@ 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