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
b0caebeb
Commit
b0caebeb
authored
Nov 19, 2018
by
liuyuzhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
组合销售增加是否在服务范围内
parent
057e80a4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
3 deletions
+10
-3
Store.php
application/controllers/Store.php
+2
-1
GroupSaleService.php
application/models/Business/Goods/GroupSaleService.php
+8
-2
No files found.
application/controllers/Store.php
View file @
b0caebeb
...
@@ -89,7 +89,8 @@ class StoreController extends \Our\Controller_AbstractIndex {
...
@@ -89,7 +89,8 @@ class StoreController extends \Our\Controller_AbstractIndex {
$pageSize
=
$this
->
getPageSize
(
\Our\PageConst
::
pBlPage
);
$pageSize
=
$this
->
getPageSize
(
\Our\PageConst
::
pBlPage
);
$data
[
'pageIndex'
]
=
$pageIndex
;
$data
[
'pageIndex'
]
=
$pageIndex
;
$data
[
'pageSize'
]
=
$pageSize
;
$data
[
'pageSize'
]
=
$pageSize
;
$info
=
\Business\Goods\GroupSaleServiceModel
::
getInstance
()
->
getGroupSaleGoodsList
(
$data
);
$currentAddress
=
$this
->
sess
->
get
(
'currentAddress'
);
$info
=
\Business\Goods\GroupSaleServiceModel
::
getInstance
()
->
getGroupSaleGoodsList
(
$data
,
$currentAddress
);
$this
->
success
(
$info
);
$this
->
success
(
$info
);
}
}
...
...
application/models/Business/Goods/GroupSaleService.php
View file @
b0caebeb
...
@@ -429,11 +429,17 @@ class GroupSaleServiceModel extends \Business\AbstractModel {
...
@@ -429,11 +429,17 @@ class GroupSaleServiceModel extends \Business\AbstractModel {
* @throws \Exception
* @throws \Exception
* @throws \Our\Exception
* @throws \Our\Exception
*/
*/
public
function
getGroupSaleGoodsList
(
$param
){
public
function
getGroupSaleGoodsList
(
$param
,
$address
=
array
()
){
$storeId
=
(
int
)
$param
[
'storeId'
];
$storeId
=
(
int
)
$param
[
'storeId'
];
if
(
!
$storeId
){
if
(
!
$storeId
){
\Error\ErrorModel
::
throwException
(
\Error\CodeConfigModel
::
emptyStoreId
);
\Error\ErrorModel
::
throwException
(
\Error\CodeConfigModel
::
emptyStoreId
);
}
}
if
(
!
$address
){
$inServiceAreaFlag
=
\Our\ApiConst
::
one
;
}
else
{
$inAreaFlag
=
\Store\StoreUtil
::
getInstance
()
->
checkAddressInServiceArea
(
$address
,
$storeId
);
$inServiceAreaFlag
=
$inAreaFlag
?
\Our\ApiConst
::
one
:
\Our\ApiConst
::
zero
;
}
$pageSize
=
(
int
)
$param
[
'pageSize'
];
$pageSize
=
(
int
)
$param
[
'pageSize'
];
$pageIndex
=
(
int
)
$param
[
'pageIndex'
];
$pageIndex
=
(
int
)
$param
[
'pageIndex'
];
if
(
$pageSize
===
0
){
if
(
$pageSize
===
0
){
...
@@ -488,7 +494,7 @@ class GroupSaleServiceModel extends \Business\AbstractModel {
...
@@ -488,7 +494,7 @@ class GroupSaleServiceModel extends \Business\AbstractModel {
}
else
{
}
else
{
$totalCount
=
0
;
$totalCount
=
0
;
}
}
return
array
(
'totalCount'
=>
$totalCount
,
'groupGoods'
=>
array_values
(
$group
));
return
array
(
'totalCount'
=>
$totalCount
,
'groupGoods'
=>
array_values
(
$group
)
,
'inServiceAreaFlag'
=>
$inServiceAreaFlag
);
}
}
public
function
getPBundlingList
(
$groupList
,
$dbName
=
\Our\DbNameConst
::
salveDBConnectName
,
$withKeyFlag
=
false
){
public
function
getPBundlingList
(
$groupList
,
$dbName
=
\Our\DbNameConst
::
salveDBConnectName
,
$withKeyFlag
=
false
){
...
...
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