Authored by whb

商品图片有问题

... ... @@ -77,6 +77,16 @@ class YHMApi_App_V2_Goods extends YHMApi_App_V1_Goods
if(!empty($productInfo))
{
$goodsImages = YHMProduct_Models_Goodsimages_Client::getByProductSkc($skc);
// 是否收藏商品
if (!empty($params ['uid']))
{
$favorite = YHMPassport_Models_Favorite_Goods_Client::findIsFavoriteBySkc($params ['uid'], $params ['product_skc']);
}
$favorite_num = YHMPassport_Models_Favorite_Goods_Client::getFavoriteTotal($skc);
$is_favorite = 'N';
if (!empty($favorite)) {
$is_favorite = 'Y';
}
//商品描述 goods_describe
$goods_describe = YHMProduct_Models_Goods_Client::getGoodsDescribeBySkc($skc);
$imageList = array();
... ... @@ -98,7 +108,10 @@ class YHMApi_App_V2_Goods extends YHMApi_App_V1_Goods
$resultList[] = array(
'image_list' => $imageList,
'product_skc' => $skc,
'is_favorite' => $is_favorite, // 是否已收藏,
'favorite_num'=> $favorite_num,//收藏数
'area_code'=> $productInfo['area_code'],
'goods_name'=> $productInfo['goods_name'],
'goods_describe' => $goods_describe['goods_describe'],
'create_time' => $productInfo['create_time'],
'sale_price' => $productInfo['sale_price'],
... ...
... ... @@ -43,7 +43,7 @@ class YHMProduct_Models_Goodsimages_Dao extends YHMProduct_Dao
*/
public function getOneImagesBySkc($product_skc)
{
return $this->dao()->tag($this->_tag . $product_skc)->fetchAssoc(Goodsimages\Goodsimages::SELECT_ONE_IMAGES, array(
return $this->dao()->tag($this->_tag . $product_skc)->fetchOne(Goodsimages\Goodsimages::SELECT_ONE_IMAGES, array(
'product_skc' => $product_skc,
'size' => 1
));
... ...
ALTER TABLE `yhm_shops`.`goods`ADD COLUMN `area_code` INT(11) NULL COMMENT '地理位置' AFTER `selling_point`;
ALTER TABLE `yhm_shops`.`goods`ADD COLUMN `area_code` INT(11) DEFAULT '0' NULL COMMENT '地理位置' AFTER `selling_point`;
... ...