Commit 55c522f0 authored by liuyuzhen's avatar liuyuzhen

优惠券领取问题q

parent 2e0e7825
......@@ -164,7 +164,7 @@ class CouponServiceModel extends \Business\AbstractModel{
}
$couponDao->db->doCommit();
\Our\RedisHelper::delCachedFunction(\Redis\Db13\MemberCouponRedisModel::getInstance(), array(&$memberCouponDao, 'getList'),array(),array($memberId));
\Our\RedisHelper::delCachedFunction(\Redis\Db13\CouponRedisModel::getInstance(), array(&$this, 'getStoreCouponsById'),array($coupon['store_id'],$memberId));
\Our\RedisHelper::delCachedFunction(\Redis\Db13\CouponRedisModel::getInstance(), array(&$this, 'getStoreCouponsById'),array(),array($coupon['store_id']."_".$memberId));
return true;
}
......@@ -278,7 +278,7 @@ class CouponServiceModel extends \Business\AbstractModel{
public function getStoreCoupons($where,$memberId = null){
$couponDao = \DAO\Coupon\CouponModel::getInstance();
$couponDao->validStoreCouponParam($where);
$couponList = \Our\RedisHelper::cachedFunction(\Redis\Db13\CouponRedisModel::getInstance(), array(&$this, 'getStoreCouponsById'),array($where['storeId'],$memberId),\Our\ApiConst::oneHour);
$couponList = \Our\RedisHelper::cachedFunction(\Redis\Db13\CouponRedisModel::getInstance(), array(&$this, 'getStoreCouponsById'),array($where['storeId'],$memberId),\Our\ApiConst::oneHour,array($where['storeId']."_".$memberId));
if($couponList){
$couponList = array_values($couponList);
}
......@@ -289,7 +289,7 @@ class CouponServiceModel extends \Business\AbstractModel{
$this->validCouponStore($where);
$couponDao = \DAO\Coupon\CouponModel::getInstance();
$couponDao->validStoreCouponParam($where);
$couponList = \Our\RedisHelper::cachedFunction(\Redis\Db13\CouponRedisModel::getInstance(), array(&$this, 'getStoreCouponsById'),array($where['storeId'],$memberId,true),\Our\ApiConst::oneHour,array($where['storeId']));
$couponList = \Our\RedisHelper::cachedFunction(\Redis\Db13\CouponRedisModel::getInstance(), array(&$this, 'getStoreCouponsById'),array($where['storeId'],$memberId,\Our\ApiConst::one),\Our\ApiConst::oneHour,array($where['storeId']."_".$memberId));
if($couponList){
$couponList = array_values($couponList);
if(count($couponList)>=\Our\ApiConst::defaultCouponTitleLength){
......@@ -325,7 +325,7 @@ class CouponServiceModel extends \Business\AbstractModel{
* @param $memberId 会员ID
* @return array|bool
*/
public function getStoreCouponsById($storeId,$memberId,$timeFlag = false){
public function getStoreCouponsById($storeId,$memberId,$timeFlag = \Our\ApiConst::zero){
$couponDao = \DAO\Coupon\CouponModel::getInstance();
$couponList = $couponDao->getStoreIndexCouponList($storeId,$timeFlag);
if(!$couponList){
......
......@@ -261,7 +261,7 @@ class CouponModel extends \DAO\AbstractModel {
* @param $storeId 店铺Id
* @return array
*/
public function getStoreIndexCouponList($storeId,$timeFlag= false){
public function getStoreIndexCouponList($storeId,$timeFlag= \Our\ApiConst::zero){
$coupons = $this->getStoreCouponList($storeId);
if($coupons){
$result = array();
......
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