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
6e53359f
Commit
6e53359f
authored
Aug 29, 2018
by
zhz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fans
parent
dabb4e97
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
MemberCenterService.php
application/models/Business/User/MemberCenterService.php
+2
-2
FavoritesStore.php
application/models/DAO/FavoritesStore.php
+1
-1
No files found.
application/models/Business/User/MemberCenterService.php
View file @
6e53359f
...
@@ -112,7 +112,7 @@ class MemberCenterServiceModel extends \Business\AbstractModel
...
@@ -112,7 +112,7 @@ class MemberCenterServiceModel extends \Business\AbstractModel
$memberCenter
=
$this
->
getStatistics
(
$memberId
);
$memberCenter
=
$this
->
getStatistics
(
$memberId
);
$totalCount
=
(
int
)
$memberCenter
[
'storeCollection'
];
$totalCount
=
(
int
)
$memberCenter
[
'storeCollection'
];
$field
=
'evaluation_score,evaluation_number,
han_store_score_statistics.store_collect,
store_name,store_label,han_store.store_id,favid'
;
$field
=
'evaluation_score,evaluation_number,store_name,store_label,han_store.store_id,favid'
;
$param
[
'keyword'
]
&&
$where
=
"store_name like '%
{
$param
[
'keyword'
]
}
%'"
;
$param
[
'keyword'
]
&&
$where
=
"store_name like '%
{
$param
[
'keyword'
]
}
%'"
;
//$list = \DAO\FavoritesStoreModel::getInstance()->getList($where,$field,$pageIndex,$pageSize,$memberId);
//$list = \DAO\FavoritesStoreModel::getInstance()->getList($where,$field,$pageIndex,$pageSize,$memberId);
$favoritesInstance
=
\DAO\FavoritesStoreModel
::
getInstance
();
$favoritesInstance
=
\DAO\FavoritesStoreModel
::
getInstance
();
...
@@ -121,7 +121,7 @@ class MemberCenterServiceModel extends \Business\AbstractModel
...
@@ -121,7 +121,7 @@ class MemberCenterServiceModel extends \Business\AbstractModel
if
(
is_array
(
$list
)
&&
!
empty
(
$list
)){
if
(
is_array
(
$list
)
&&
!
empty
(
$list
)){
foreach
(
$list
as
$v
){
foreach
(
$list
as
$v
){
$v
[
'evaluation_score'
]
?
$grade
=
number_format
((
$v
[
'evaluation_score'
]
/
3
/
$v
[
'evaluation_number'
]),
1
,
'.'
,
''
)
:
$grade
=
'5.0'
;
$v
[
'evaluation_score'
]
?
$grade
=
number_format
((
$v
[
'evaluation_score'
]
/
3
/
$v
[
'evaluation_number'
]),
1
,
'.'
,
''
)
:
$grade
=
'5.0'
;
$stores
[]
=
array
(
'favid'
=>
$v
[
'favid'
],
'storeId'
=>
$v
[
'store_id'
],
'storeLabel'
=>
\DAO\StoreModel
::
getInstance
()
->
getStoreLabelSrc
(
$v
[
'store_label'
]),
'storeName'
=>
$v
[
'store_name'
],
'grade'
=>
$grade
,
'collectCount'
=>
$
v
[
'store_collect'
]
?
$v
[
'store_collect'
]
:
0
);
$stores
[]
=
array
(
'favid'
=>
$v
[
'favid'
],
'storeId'
=>
$v
[
'store_id'
],
'storeLabel'
=>
\DAO\StoreModel
::
getInstance
()
->
getStoreLabelSrc
(
$v
[
'store_label'
]),
'storeName'
=>
$v
[
'store_name'
],
'grade'
=>
$grade
,
'collectCount'
=>
$
favoritesInstance
->
getFavoritesStoreCountByStoreId
(
$v
[
'store_id'
])
);
}
}
}
}
return
array
(
'stores'
=>
$stores
,
'totalCount'
=>
$totalCount
);
return
array
(
'stores'
=>
$stores
,
'totalCount'
=>
$totalCount
);
...
...
application/models/DAO/FavoritesStore.php
View file @
6e53359f
...
@@ -26,7 +26,7 @@ class FavoritesStoreModel extends \DAO\AbstractModel {
...
@@ -26,7 +26,7 @@ class FavoritesStoreModel extends \DAO\AbstractModel {
}
}
public
function
getList
(
$where
,
$field
,
$pageIndex
,
$pageSize
,
$memberId
){
public
function
getList
(
$where
,
$field
,
$pageIndex
,
$pageSize
,
$memberId
){
$this
->
setDb
(
$this
->
dbName
);
$this
->
setDb
(
$this
->
dbName
);
return
$this
->
db
->
select
(
$field
)
->
from
(
$this
->
_tableName
)
->
join
(
'han_store'
,
"han_favorites_store.store_id = han_store.store_id"
,
'inner'
)
->
join
(
'han_store_score_statistics'
,
"han_favorites_store.store_id = han_store_score_statistics.store_id"
,
'left'
)
->
where
([
'han_favorites_store.member_id'
=>
$memberId
,
'fav_type'
=>
1
])
->
where
(
$where
)
->
page
(
$pageIndex
,
$pageSize
)
->
order
(
'fav_time'
,
'DESC'
)
->
fetchAll
();
return
$this
->
db
->
select
(
$field
)
->
from
(
$this
->
_tableName
)
->
join
(
'han_store'
,
"han_favorites_store.store_id = han_store.store_id"
,
'inner'
)
->
where
([
'han_favorites_store.member_id'
=>
$memberId
,
'fav_type'
=>
1
])
->
where
(
$where
)
->
page
(
$pageIndex
,
$pageSize
)
->
order
(
'fav_time'
,
'DESC'
)
->
fetchAll
();
}
}
public
function
selectList
(
$where
,
$field
=
\Our\NameConst
::
allField
){
public
function
selectList
(
$where
,
$field
=
\Our\NameConst
::
allField
){
...
...
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