Commit aa258842 authored by liuyuzhen's avatar liuyuzhen

优惠券和购物车组合销售商品提交问题

parent 0d297654
......@@ -270,7 +270,8 @@ class CouponServiceModel extends \Business\AbstractModel{
public function getStorePromotionCouponTitles($where){
$this->validCouponStore($where);
$couponDao = \DAO\Coupon\CouponModel::getInstance();
$couponTitles = \Our\RedisHelper::cachedFunction(\Redis\Db13\CouponRedisModel::getInstance(), array(&$couponDao, 'getStorePromotionCouponList'),array($where['storeId']),\Our\ApiConst::oneHour,array($where['storeId']));
$couponTitles = $couponDao->getStorePromotionCouponList($where['storeId']);
//\Our\RedisHelper::cachedFunction(\Redis\Db13\CouponRedisModel::getInstance(), array(&$couponDao, 'getStorePromotionCouponList'),array($where['storeId']),\Our\ApiConst::oneHour,array($where['storeId']));
return $couponTitles?$couponTitles:array();
}
......
......@@ -604,7 +604,7 @@ class GroupSaleServiceModel extends \Business\AbstractModel {
/*foreach($blIds as $val){
$group[]['blId']=$val;
}*/
$pBundlingList = $this->getPBundlingListByBlIds($blIds,$dbName,true);
$pBundlingList = $this->getPBundlingListByBlIds($blIds,$dbName,array(),true);
}
$goodsCommonIds = $cartListData['goodsCommonIds'];
$goodsIds = $cartListData['goodsIds'];
......
......@@ -152,9 +152,9 @@ class CouponModel extends \DAO\AbstractModel {
$field = $this->availStoreIndexField;
$where = ' and store_id ='.$storeId.' and type<>1';
$this->setDb($this->dbName);
$coupons = $this->getOnlineCouponList($where,$field);
//$coupons = $this->getOnlineCouponList($where,$field);
//$coupons = \Our\RedisHelper::cachedFunction(\Redis\Db13\CouponRedisModel::getInstance(), array(&$this, 'getOnlineCouponList'),array($where,$field),\Our\ApiConst::oneHour);
$coupons = \Our\RedisHelper::cachedFunction(\Redis\Db13\CouponRedisModel::getInstance(), array(&$this, 'getOnlineCouponList'),array($where,$field),\Our\ApiConst::oneHour,array($storeId));
//$coupons = $this->getOnlineCouponList($where,$field);
if(!$coupons){
......@@ -169,6 +169,9 @@ class CouponModel extends \DAO\AbstractModel {
$storeCouponGoodsClassDao = \DAO\GoodsClass\StoreCouponGoodsClassModel::getInstance();
$result = array();
foreach($coupons as $coupon){
if(!($coupon['start_time']<=TIMESTAMP&&$coupon['end_time']>TIMESTAMP)){
continue;
}
if($coupon['type']==\Our\ApiConst::goodsClassCoupon){ //指定品类优惠券,需要判断该优惠券对应分类店铺是否在经营
if($storeClassIds){
$gcIds = $storeCouponGoodsClassDao->getGoodsClassIdsByCouponId($coupon['id']);
......@@ -524,8 +527,9 @@ class CouponModel extends \DAO\AbstractModel {
if($couponId){
\Our\RedisHelper::delCachedFunction(\Redis\Db13\MemberCouponRedisModel::getInstance(), array(&$memberCouponDao, 'getList'),array(),array($couponId));
}
\Our\RedisHelper::delCachedFunction(\Redis\Db13\CouponRedisModel::getInstance(), array(&$this, 'getStorePromotionCouponList'),array(),array($storeId));
//\Our\RedisHelper::delCachedFunction(\Redis\Db13\CouponRedisModel::getInstance(), array(&$this, 'getStorePromotionCouponList'),array(),array($storeId));
\Our\RedisHelper::delCachedFunction(\Redis\Db13\CouponRedisModel::getInstance(), array(&$couponService, 'getStoreCouponsById'),array(),array($storeId));
\Our\RedisHelper::delCachedFunction(\Redis\Db13\CouponRedisModel::getInstance(), array(&$this, 'getOnlineCouponList'),array(),array($storeId));
return true;
}
......
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