Commit 54ca1383 authored by zhz's avatar zhz

goods

parent 6d271329
......@@ -932,13 +932,13 @@ class GoodsCommonServiceModel extends \Business\AbstractModel
$goodsCommonRedis->tableDel('weekSales:' . $storeId);
$goodsCommonRedis->tableDel('weekSaleGoods:' . $storeId);
$goodsCommonRedis->tableDel('recommendGoods:' . $storeId);
$goodsCommonids = $orderDAO->getOrderAndOrderGoods("han_order.store_id={$storeId} AND han_order.payment_time between ".(time()-\Our\ApiConst::sevenDaySecond)." AND ".time(), 'sum(goods_num) as num,goods_commonid', 'goods_commonid', [0, 3], ['num', 'DESC']);
$goodsCommonids = $orderDAO->getOrderAndOrderGoods("han_order.store_id={$storeId} AND han_order_goods.goods_commonid > 0 AND han_order.payment_time between ".(time()-\Our\ApiConst::sevenDaySecond)." AND ".time(), 'sum(goods_num) as num,goods_commonid', 'goods_commonid', [0, 3], ['num', 'DESC']);
if ($goodsCommonids) {
foreach ($goodsCommonids as $v) {
$goodsCommonRedis->tableSAdd('weekSales:' . $storeId, $v['goods_commonid']);
}
}
$goodsCommonids = $orderDAO->getOrderAndOrderGoods("han_order.store_id={$storeId} AND han_order.payment_time between ".(time()-\Our\ApiConst::sevenDaySecond)." AND ".time(), 'distinct goods_commonid');
$goodsCommonids = $orderDAO->getOrderAndOrderGoods("han_order.store_id={$storeId} AND han_order_goods.goods_commonid > 0 AND han_order.payment_time between ".(time()-\Our\ApiConst::sevenDaySecond)." AND ".time(), 'distinct goods_commonid');
if ($goodsCommonids) {
foreach ($goodsCommonids as $v) {
$goodsCommonRedis->tableSAdd('weekSaleGoods:' . $storeId, $v['goods_commonid']);
......
......@@ -123,7 +123,7 @@ class StoreServiceModel extends \Business\AbstractModel{
$favType = 1;
}
}
return array('storeLabel'=>$storeLabel,'storeName'=>$storeInfo['store_name'],'grade'=>$grade,'fansCount'=>\DAO\FavoritesStoreModel::getInstance()->getFavoritesStoreCountByStoreId($storeId),'favType'=>$favType,'monthlySalesCount'=>$monthlySalesCount,'defaultDeliveryTime'=>$defaultDeliveryTime,'freeShippingPrice'=>$storeInfo['free_shipping_price'],'storeDistance'=>$distince,'storeNotice'=>$storeInfo['store_notice'],'startShippingPrice'=>$storeInfo['start_shipping_price'],'memberId'=>$storeInfo['member_id'],'inStoreService'=>$in_store_service_flag,'adv'=>$adv,'memberId'=>$storeInfo['member_id']);
return array('storeLabel'=>$storeLabel,'storeName'=>$storeInfo['store_name'],'grade'=>$grade,'fansCount'=>\DAO\FavoritesStoreModel::getInstance()->getFavoritesStoreCountByStoreId($storeId),'favType'=>$favType,'monthlySalesCount'=>$monthlySalesCount,'defaultDeliveryTime'=>$defaultDeliveryTime,'freeShippingPrice'=>$storeInfo['free_shipping_price'] * 100,'storeDistance'=>$distince,'storeNotice'=>$storeInfo['store_notice'],'startShippingPrice'=>$storeInfo['start_shipping_price'] * 100,'memberId'=>$storeInfo['member_id'],'inStoreService'=>$in_store_service_flag,'adv'=>$adv,'memberId'=>$storeInfo['member_id']);
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment