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
2f3902f1
Commit
2f3902f1
authored
Aug 20, 2018
by
wwccw0591
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master_dev' of git.shenbd.com:qm-develop/shenbd into ccw
parents
70490af8
d3d44322
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
14 deletions
+19
-14
Goods.php
application/controllers/Goods.php
+2
-2
Store.php
application/controllers/Store.php
+2
-2
GoodsCommonService.php
application/models/Business/Goods/GoodsCommonService.php
+15
-10
No files found.
application/controllers/Goods.php
View file @
2f3902f1
...
...
@@ -22,10 +22,10 @@ class GoodsController extends \Our\Controller_AbstractIndex {
$groups
=
\Business\Goods\GroupSaleServiceModel
::
getInstance
()
->
getGroupByCommonId
(
$this
->
req
[
\Our\NameConst
::
data
][
'goodsCommonId'
],
$goodsInfo
[
'storeId'
]);
$couponService
=
\Business\Coupon\CouponServiceModel
::
getInstance
();
$coupons
=
$couponService
->
getGoodsCoupons
(
array
(
'storeId'
=>
$goodsInfo
[
'storeId'
]),
$this
->
memberId
);
//
$share = \Business\Common\CommonServiceModel::getInstance()->getShareInfo(\Our\ApiConst::shareGoods,$this->req[\Our\NameConst::data]['goodsCommonId']);
$share
=
\Business\Common\CommonServiceModel
::
getInstance
()
->
getShareInfo
(
\Our\ApiConst
::
shareGoods
,
$this
->
req
[
\Our\NameConst
::
data
][
'goodsCommonId'
]);
unset
(
$store
[
'freeShippingPrice'
]);
unset
(
$store
[
'isQuality'
]);
unset
(
$store
[
'shareDesc'
]);
$this
->
goodsService
->
addBrowseRecord
(
$this
->
req
[
\Our\NameConst
::
data
],
$this
->
memberId
);
$this
->
success
(
array_merge
(
$goodsInfo
,
array
(
'store'
=>
$store
,
'recomndGoods'
=>
$recomndGoods
,
'evaluation'
=>
$evaluation
,
'groups'
=>
$groups
),
$coupons
));
$this
->
success
(
array_merge
(
$goodsInfo
,
array
(
'store'
=>
$store
,
'recomndGoods'
=>
$recomndGoods
,
'evaluation'
=>
$evaluation
,
'groups'
=>
$groups
,
'share'
=>
$share
),
$coupons
));
}
/**
* 获取商品列表
...
...
application/controllers/Store.php
View file @
2f3902f1
...
...
@@ -16,7 +16,7 @@ class StoreController extends \Our\Controller_AbstractIndex {
$storeInfo
=
$this
->
storeService
->
getStoreInfo
(
$this
->
req
[
\Our\NameConst
::
data
],
$this
->
memberId
);
//.
$storeInfo
[
'adv'
]
=
array
(
'href'
=>
'http://qm.22ca.com/qm/tmpl/goods.html?goods_commonid=101654'
,
'imageUrl'
=>
'http://qmoss-01.oss-cn-hangzhou.aliyuncs.com/data/upload/mall/adv/05715960161498410.jpg'
);
//
$storeInfo['share'] = \Business\Common\CommonServiceModel::getInstance()->getShareInfo(\Our\ApiConst::shareStore,$this->req[\Our\NameConst::data]['storeId']);
$storeInfo
[
'share'
]
=
\Business\Common\CommonServiceModel
::
getInstance
()
->
getShareInfo
(
\Our\ApiConst
::
shareStore
,
$this
->
req
[
\Our\NameConst
::
data
][
'storeId'
]);
$this
->
success
(
$storeInfo
);
}
/**
...
...
@@ -24,7 +24,7 @@ class StoreController extends \Our\Controller_AbstractIndex {
*/
public
function
indexAction
(){
$recommendGoods
=
$this
->
storeService
->
getRecommendGoodsCache
(
$this
->
req
[
\Our\NameConst
::
data
],
$this
->
memberId
);
$adv
=
array
(
'href'
=>
'http://qm.22ca.com/qm/tmpl/goods.html?goods_commonid=101654'
,
'imageUrl'
=>
'http://qmoss-01.oss-cn-hangzhou.aliyuncs.com/data/upload/mall/adv/05715960161498410.jpg'
);
//
$adv = array('href'=>'http://qm.22ca.com/qm/tmpl/goods.html?goods_commonid=101654','imageUrl'=>'http://qmoss-01.oss-cn-hangzhou.aliyuncs.com/data/upload/mall/adv/05715960161498410.jpg');
$adv
=
\Business\Common\AdvServiceModel
::
getInstance
()
->
getStoreAdvs
(
$this
->
req
[
\Our\NameConst
::
data
],
\Our\AdvConst
::
storePageMid
);
$hotSale
=
$this
->
storeService
->
getHotSaleGoods
(
$this
->
req
[
\Our\NameConst
::
data
],
$this
->
memberId
);
$recommendGoodsClasses
=
$this
->
storeService
->
getRecommendClassCache
(
$this
->
req
[
\Our\NameConst
::
data
]);
...
...
application/models/Business/Goods/GoodsCommonService.php
View file @
2f3902f1
...
...
@@ -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