Commit b7225da1 authored by 734642908@qq.com's avatar 734642908@qq.com

添加兑换次数限制

parent c7c3689c
......@@ -152,6 +152,14 @@ class ShopController extends BaseController
echo $this->formatRes($result);exit;
}
$num = M("yl_goods_order","",C("LEWAN_HEZI"))->where(array('uid'=>$token['uid'],'create_time'=>array('gt',date('Y-m-d'))))->count();
if($num > 2) {
$result = array(
'c'=>2
,'msg'=>'今天兑换次数已达上限'
);
echo $this->formatRes($result);exit;
}
$model= new \Home\Model\ShopModel();
$result = $model->goodsChange($token['uid'],$goodsId,$changeWay);
......
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