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
ac9ca032
Commit
ac9ca032
authored
Dec 17, 2018
by
liuyuzhen
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master_dev' of git.shenbd.com:qm-develop/shenbd into lyz_version1
parents
4e8bcf8d
6eb4cac7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
6 deletions
+16
-6
ShopkeeperService.php
application/models/Business/Store/ShopkeeperService.php
+15
-5
Shopkeeper.php
application/modules/Client/controllers/Shopkeeper.php
+1
-1
No files found.
application/models/Business/Store/ShopkeeperService.php
View file @
ac9ca032
...
@@ -293,15 +293,20 @@ class ShopkeeperServiceModel extends \Business\AbstractModel
...
@@ -293,15 +293,20 @@ class ShopkeeperServiceModel extends \Business\AbstractModel
}
}
}
}
public
function
getStoreOrders
(
$memberId
,
$pageIndex
,
$pageSize
,
$orderState
,
$keyword
)
public
function
getStoreOrders
(
$memberId
,
$pageIndex
,
$pageSize
,
$orderState
,
$keyword
,
$isStoreId
=
false
)
{
{
$storeId
=
$this
->
_getStoreByMemberId
(
$memberId
);
if
(
$isStoreId
){
$storeId
=
$memberId
;
}
else
{
$storeId
=
$this
->
_getStoreByMemberId
(
$memberId
);
}
$storeStatisticsDao
=
\DAO\StoreStatisticsModel
::
getInstance
();
$storeStatisticsDao
=
\DAO\StoreStatisticsModel
::
getInstance
();
//获取店铺数据统计
//获取店铺数据统计
$storeStats
=
$storeStatisticsDao
->
find
(
array
(
'store_id'
=>
$storeId
));
$storeStats
=
$storeStatisticsDao
->
find
(
array
(
'store_id'
=>
$storeId
));
$data
[
'orderTotal'
]
=
$storeStats
[
'order_total'
];
$data
[
'orderTotal'
]
=
$storeStats
[
'order_total'
];
$data
[
'orderCount'
]
=
$storeStats
[
'order_count'
];
$data
[
'orderCount'
]
=
$storeStats
[
'order_count'
];
$result
=
$this
->
getOrders
(
$memberId
,
$pageIndex
,
$pageSize
,
$orderState
,
$keyword
);
$result
=
$this
->
getOrders
(
$memberId
,
$pageIndex
,
$pageSize
,
$orderState
,
$keyword
,
$isStoreId
);
$data
[
'orders'
]
=
$result
[
'orders'
];
$data
[
'orders'
]
=
$result
[
'orders'
];
return
$data
;
return
$data
;
}
}
...
@@ -414,12 +419,17 @@ class ShopkeeperServiceModel extends \Business\AbstractModel
...
@@ -414,12 +419,17 @@ class ShopkeeperServiceModel extends \Business\AbstractModel
return
$where
;
return
$where
;
}
}
public
function
getOrders
(
$memberId
,
$pageIndex
,
$pageSize
,
$orderState
,
$keyword
)
public
function
getOrders
(
$memberId
,
$pageIndex
,
$pageSize
,
$orderState
,
$keyword
,
$isstoreId
=
false
)
{
{
$order
=
array
(
'gmt_update'
=>
'desc'
);
$order
=
array
(
'gmt_update'
=>
'desc'
);
$orderDao
=
\DAO\Order\OrderModel
::
getInstance
();
$orderDao
=
\DAO\Order\OrderModel
::
getInstance
();
$storeId
=
$this
->
_getStoreByMemberId
(
$memberId
);
if
(
$isstoreId
){
$storeId
=
$memberId
;
}
else
{
$storeId
=
$this
->
_getStoreByMemberId
(
$memberId
);
}
if
(
empty
(
$storeId
))
{
if
(
empty
(
$storeId
))
{
ErrorModel
::
throwException
(
CodeConfigModel
::
paramsError
);
ErrorModel
::
throwException
(
CodeConfigModel
::
paramsError
);
}
}
...
...
application/modules/Client/controllers/Shopkeeper.php
View file @
ac9ca032
...
@@ -128,7 +128,7 @@ class ShopkeeperController extends \Our\Controller_AbstractClient {
...
@@ -128,7 +128,7 @@ class ShopkeeperController extends \Our\Controller_AbstractClient {
$pageSize
=
isset
(
$this
->
req
[
'data'
][
'pageSize'
])
?
$this
->
req
[
'data'
][
'pageSize'
]
:
10
;
$pageSize
=
isset
(
$this
->
req
[
'data'
][
'pageSize'
])
?
$this
->
req
[
'data'
][
'pageSize'
]
:
10
;
$orderState
=
isset
(
$this
->
req
[
'data'
][
'orderState'
])
?
$this
->
req
[
'data'
][
'orderState'
]
:
''
;
$orderState
=
isset
(
$this
->
req
[
'data'
][
'orderState'
])
?
$this
->
req
[
'data'
][
'orderState'
]
:
''
;
$keyword
=
isset
(
$this
->
req
[
'data'
][
'keyword'
])
?
$this
->
req
[
'data'
][
'keyword'
]
:
''
;
$keyword
=
isset
(
$this
->
req
[
'data'
][
'keyword'
])
?
$this
->
req
[
'data'
][
'keyword'
]
:
''
;
$result
=
$this
->
shopkeeperService
->
getStoreOrders
(
$this
->
memberId
,
$pageIndex
,
$pageSize
,
$orderState
,
$keyword
);
$result
=
$this
->
shopkeeperService
->
getStoreOrders
(
$this
->
storeId
,
$pageIndex
,
$pageSize
,
$orderState
,
$keyword
,
true
);
$this
->
success
(
$result
);
$this
->
success
(
$result
);
if
(
$result
){
if
(
$result
){
$this
->
success
(
array
(),
\Our\DescribeConst
::
successMessage
,
\Our\DescribeConst
::
successMessage
);
$this
->
success
(
array
(),
\Our\DescribeConst
::
successMessage
,
\Our\DescribeConst
::
successMessage
);
...
...
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