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
d3d44322
Commit
d3d44322
authored
Aug 19, 2018
by
zhz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
goods
parent
f75448ae
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
10 deletions
+15
-10
GoodsCommonService.php
application/models/Business/Goods/GoodsCommonService.php
+15
-10
No files found.
application/models/Business/Goods/GoodsCommonService.php
View file @
d3d44322
...
...
@@ -401,20 +401,25 @@ class GoodsCommonServiceModel extends \Business\AbstractModel
$goodsArr
[]
=
array
(
'goodsAttr'
=>
$spec
,
'goodsId'
=>
$v
[
'goods_id'
],
'goodsPrice'
=>
$v
[
'goods_price'
],
'goodsMarketPrice'
=>
$v
[
'goods_marketprice'
],
'goodsStorage'
=>
$onlineStorageGoods
?
unserialize
(
$onlineStorageGoods
[
$v
[
'goods_id'
]])[
'goodsStorage'
]
:
$v
[
'goods_storage'
]);
}
}
else
{
foreach
(
$goods
as
$v
){
$spec
=
[];
if
(
$activities
){
if
(
$data
=
\DAO\SaleGoodsModel
::
getInstance
()
->
getSaleGoods
(
$commonInfo
[
'store_id'
],
$goods
[
0
][
'goods_id'
])){
if
(
$price
=
\DAO\SaleGoodsModel
::
getInstance
()
->
getSalePrice
(
$data
,
$activities
)){
$commonInfo
[
'goods_price'
]
=
$price
;
$v
[
'goods_price'
]
=
$price
;
if
(
$goods
)
{
foreach
(
$goods
as
$v
){
$spec
=
[];
if
(
$activities
){
if
(
$data
=
\DAO\SaleGoodsModel
::
getInstance
()
->
getSaleGoods
(
$commonInfo
[
'store_id'
],
$goods
[
0
][
'goods_id'
])){
if
(
$price
=
\DAO\SaleGoodsModel
::
getInstance
()
->
getSalePrice
(
$data
,
$activities
)){
$commonInfo
[
'goods_price'
]
=
$price
;
$v
[
'goods_price'
]
=
$price
;
}
}
}
}
$commonInfo
[
'goodsId'
]
=
$v
[
'goods_id'
];
$sumStorage
=
$onlineStorageGoods
?
unserialize
(
$onlineStorageGoods
[
$v
[
'goods_id'
]])[
'goodsStorage'
]
:
$v
[
'goods_storage'
];
$commonInfo
[
'goodsId'
]
=
$v
[
'goods_id'
];
$sumStorage
=
$onlineStorageGoods
?
unserialize
(
$onlineStorageGoods
[
$v
[
'goods_id'
]])[
'goodsStorage'
]
:
$v
[
'goods_storage'
];
// $goodsArr[] = array('goodsAttr'=>$spec,'goodsId'=>$v['goods_id'],'goodsPrice'=>$v['goods_price'],'goodsMarketPrice'=>$v['goods_marketprice'],'goodsStorage'=>$sumStorage);
}
}
else
{
$commonInfo
[
'goodsId'
]
=
0
;
}
}
return
array
(
'goodsMarketPrice'
=>
$commonInfo
[
'goods_marketprice'
],
'goodsPrice'
=>
$commonInfo
[
'goods_price'
],
'goodsStorage'
=>
$sumStorage
,
'previewImage'
=>
$commonInfo
[
'goods_image'
],
'isNew'
=>
$commonInfo
[
'goods_new'
],
'attr'
=>
$attr
,
'goods'
=>
$goodsArr
,
'images'
=>
$images
,
'commonInfo'
=>
$commonInfo
);
}
...
...
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