Commit 03688496 authored by christ's avatar christ

Merge branch 'master_dev' of git.shenbd.com:qm-develop/shenbd into ccw

parents 3e890db6 97729cad
...@@ -720,7 +720,11 @@ class OrderConfirmUtil { ...@@ -720,7 +720,11 @@ class OrderConfirmUtil {
public function delCouponCahce(){ public function delCouponCahce(){
$memberCouponDao = \DAO\Coupon\MemberCouponModel::getInstance(); $memberCouponDao = \DAO\Coupon\MemberCouponModel::getInstance();
$couponService = \Business\Coupon\CouponServiceModel::getInstance();
\Our\RedisHelper::delCachedFunction(\Redis\Db13\MemberCouponRedisModel::getInstance(),array(&$memberCouponDao, 'getList'),array(),array($this->memberId)); \Our\RedisHelper::delCachedFunction(\Redis\Db13\MemberCouponRedisModel::getInstance(),array(&$memberCouponDao, 'getList'),array(),array($this->memberId));
foreach($this->storeIds as $tempStoreId){
\Our\RedisHelper::delCachedFunction(\Redis\Db13\CouponRedisModel::getInstance(), array(&$couponService, 'getStoreCouponsById'),array(),array($tempStoreId."_".$this->memberId));
}
} }
public function delCartCache(){ public function delCartCache(){
......
...@@ -406,14 +406,14 @@ class CouponServiceModel extends \Business\AbstractModel{ ...@@ -406,14 +406,14 @@ class CouponServiceModel extends \Business\AbstractModel{
if($coupon['is_overlay'] == \Our\ApiConst::zero){ //不允许领用多张 if($coupon['is_overlay'] == \Our\ApiConst::zero){ //不允许领用多张
$coupon['isGet'] = \Our\ApiConst::one; $coupon['isGet'] = \Our\ApiConst::one;
}else if($coupon['is_overlay'] == \Our\ApiConst::one){//允许领用多张 }else if($coupon['is_overlay'] == \Our\ApiConst::one){//允许领用多张
if($coupon['get_ticket_num']>\Our\ApiConst::zero&&$coupon['get_ticket_num']>=count($memberTempCoupons)){ //领取张数超过上限 if($coupon['get_ticket_num']>\Our\ApiConst::zero&&count($memberTempCoupons)>=$coupon['get_ticket_num']){ //领取张数超过上限
$coupon['isGet'] = \Our\ApiConst::zero; $coupon['isGet'] = \Our\ApiConst::one;
}else{ }else{
$couponStates = array_column($memberTempCoupons,'coupon_state'); $couponStates = array_column($memberTempCoupons,'coupon_state');
if(in_array(\Our\ApiConst::availCouponState,$couponStates)){//存在可使用的优惠券 ,则不能重复领用 if(in_array(\Our\ApiConst::availCouponState,$couponStates)){//存在可使用的优惠券 ,则不能重复领用
$coupon['isGet'] = \Our\ApiConst::zero;
}else{
$coupon['isGet'] = \Our\ApiConst::one; $coupon['isGet'] = \Our\ApiConst::one;
}else{
$coupon['isGet'] = \Our\ApiConst::zero;
} }
} }
} }
......
...@@ -148,7 +148,7 @@ class StoreServiceModel extends \Business\AbstractModel{ ...@@ -148,7 +148,7 @@ class StoreServiceModel extends \Business\AbstractModel{
//处理新店铺信息 //处理新店铺信息
$where = 'store_id not in (select ss.store_id from han_stat_store ss) and is_own_shop=0'; $where = 'store_id not in (select ss.store_id from han_stat_store ss) and is_own_shop=0';
$field = 'store_id,store_state,store_time,store_end_time,province_id,city_id,area_id,(select se.cashed_deposit from han_store_extend se where se.store_id=han_store.store_id) cashed_deposit'; $field = 'store_id, store_name, store_state,store_time,store_end_time,province_id,city_id,area_id,(select se.cashed_deposit from han_store_extend se where se.store_id=han_store.store_id) cashed_deposit';
$field .= ',(select count(qs.store_id) from han_qm_store_class qs where qs.is_charged<>0 and qs.store_id=han_store.store_id) class_style1_count, (select count(qs.store_id) from han_qm_store_class qs where qs.is_charged<>0 and qs.class_style=2 and qs.store_id=han_store.store_id) class_style2_count, if((store_state=1 and store_end_time>=0), ifnull((select sum(qs.service_fee) from han_qm_store_class qs where qs.is_charged<>0 and qs.class_style=2 and qs.store_id=han_store.store_id), 0), ifnull((select sum(qs.service_fee) from han_qm_store_class qs where qs.is_charged<>0 and qs.class_style=2 and qs.store_id=han_store.store_id and qs.deadline>=0), 0)) service_fee'; $field .= ',(select count(qs.store_id) from han_qm_store_class qs where qs.is_charged<>0 and qs.store_id=han_store.store_id) class_style1_count, (select count(qs.store_id) from han_qm_store_class qs where qs.is_charged<>0 and qs.class_style=2 and qs.store_id=han_store.store_id) class_style2_count, if((store_state=1 and store_end_time>=0), ifnull((select sum(qs.service_fee) from han_qm_store_class qs where qs.is_charged<>0 and qs.class_style=2 and qs.store_id=han_store.store_id), 0), ifnull((select sum(qs.service_fee) from han_qm_store_class qs where qs.is_charged<>0 and qs.class_style=2 and qs.store_id=han_store.store_id and qs.deadline>=0), 0)) service_fee';
$field .= ',(select count(fs.store_id) from han_favorites_store fs where fs.fav_type=1 and fs.store_id=han_store.store_id) fav_total,(select count(fs.store_id) from han_favorites_store fs where fs.fav_type=1 and fs.fav_from=3 and fs.store_id=han_store.store_id) fav3_total'; $field .= ',(select count(fs.store_id) from han_favorites_store fs where fs.fav_type=1 and fs.store_id=han_store.store_id) fav_total,(select count(fs.store_id) from han_favorites_store fs where fs.fav_type=1 and fs.fav_from=3 and fs.store_id=han_store.store_id) fav3_total';
$field .= ',(select t.order_count from han_store_statistics t where t.store_id=han_store.store_id limit 1) order_count,(select t.order_total from han_store_statistics t where t.store_id=han_store.store_id limit 1) order_total'; $field .= ',(select t.order_count from han_store_statistics t where t.store_id=han_store.store_id limit 1) order_count,(select t.order_total from han_store_statistics t where t.store_id=han_store.store_id limit 1) order_total';
......
...@@ -301,6 +301,7 @@ class CouponModel extends \DAO\AbstractModel { ...@@ -301,6 +301,7 @@ class CouponModel extends \DAO\AbstractModel {
$temp['type'] = $coupon['coupon_type']; $temp['type'] = $coupon['coupon_type'];
$temp['couponId'] = $coupon['id']; $temp['couponId'] = $coupon['id'];
$temp['is_overlay'] = $coupon['is_overlay']; $temp['is_overlay'] = $coupon['is_overlay'];
$temp['get_ticket_num'] = $coupon['get_ticket_num']?$coupon['get_ticket_num']:\Our\ApiConst::zero;
$orderAmount = (int)$coupon['order_amount']; $orderAmount = (int)$coupon['order_amount'];
if($coupon['type'] == \Our\ApiConst::noLimitCoupon){//无门槛优惠券 if($coupon['type'] == \Our\ApiConst::noLimitCoupon){//无门槛优惠券
$temp['type'] = \Our\ApiConst::noLimitCouponType; $temp['type'] = \Our\ApiConst::noLimitCouponType;
......
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