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
8ff95974
Commit
8ff95974
authored
Sep 30, 2018
by
liuyuzhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
测试数据
parent
c3ef29a3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
98 additions
and
33 deletions
+98
-33
StoreService.php
application/models/Business/Store/StoreService.php
+88
-27
FavoritesStore.php
application/models/DAO/FavoritesStore.php
+6
-2
application.ini
conf/application.ini
+2
-2
index.php
public/index.php
+2
-2
No files found.
application/models/Business/Store/StoreService.php
View file @
8ff95974
This diff is collapsed.
Click to expand it.
application/models/DAO/FavoritesStore.php
View file @
8ff95974
...
...
@@ -33,12 +33,16 @@ class FavoritesStoreModel extends \DAO\AbstractModel {
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
();
}
public
function
selectList
(
$where
,
$field
=
\Our\NameConst
::
allField
){
public
function
selectList
(
$where
,
$field
=
\Our\NameConst
::
allField
,
$order
=
array
(
'fav_time'
=>
'desc'
)
){
$this
->
setDb
(
$this
->
dbName
);
if
(
is_array
(
$where
)){
$where
=
$this
->
db
->
getSqlWhereByArray
(
$where
);
}
return
$this
->
db
->
select
(
$field
)
->
from
(
$this
->
_tableName
)
->
where
(
$where
)
->
fetchAll
();
$this
->
db
->
select
(
$field
)
->
from
(
$this
->
_tableName
)
->
where
(
$where
);
foreach
(
$order
as
$key
=>
$val
){
$this
->
db
->
order
(
$key
,
$val
);
}
return
$this
->
db
->
fetchAll
();
}
public
function
getOne
(
$field
,
$where
){
...
...
conf/application.ini
View file @
8ff95974
...
...
@@ -277,7 +277,7 @@ resources.database.params.hostname = "127.0.0.1"
resources.database.params.port
=
3306
resources.database.params.database
=
"qmcs"
resources.database.params.username
=
"root"
resources.database.params.password
=
"
root
"
resources.database.params.password
=
"
123456
"
resources.database.params.charset
=
"UTF8"
resources.database.params.driver_options.1002
=
"SET NAMES utf8"
...
...
@@ -287,7 +287,7 @@ resources.database.slave.params.hostname = "127.0.0.1"
resources.database.slave.params.port
=
3306
resources.database.slave.params.database
=
"qmcs"
resources.database.slave.params.username
=
"root"
resources.database.slave.params.password
=
"
root
"
resources.database.slave.params.password
=
"
123456
"
resources.database.slave.params.charset
=
"UTF8"
resources.database.slave.params.driver_options.1002
=
"SET NAMES utf8"
...
...
public/index.php
View file @
8ff95974
...
...
@@ -3,11 +3,11 @@ date_default_timezone_set("Asia/Shanghai");
mb_internal_encoding
(
"UTF-8"
);
define
(
"TIMESTAMP"
,
time
());
define
(
"APPLICATION_PATH"
,
realpath
(
dirname
(
__FILE__
)
.
'/../'
));
define
(
"APP_ENV"
,
ini_get
(
'yaf.environ'
)
);
define
(
"APP_ENV"
,
'ccw'
);
if
(
APP_ENV
==
'develop'
){
error_reporting
(
E_ALL
);
}
if
(
APP_ENV
==
'test'
||
APP_ENV
==
'pre'
||
APP_ENV
==
'ccwdevelop'
){
if
(
APP_ENV
==
'test'
||
APP_ENV
==
'pre'
||
APP_ENV
==
'ccwdevelop'
||
APP_ENV
==
'ccw'
){
if
(
isset
(
$_POST
[
'data'
][
'debug'
])
&&!
empty
(
$_POST
[
'data'
][
'debug'
])){
// define("DEBUG",1);
error_reporting
(
E_ALL
);
...
...
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