正在显示
1 个修改的文件
包含
2 行增加
和
2 行删除
@@ -84,8 +84,8 @@ class GoodsController extends RestBaseController | @@ -84,8 +84,8 @@ class GoodsController extends RestBaseController | ||
84 | 'address_id'=>$param['address_id'] | 84 | 'address_id'=>$param['address_id'] |
85 | ]); | 85 | ]); |
86 | if ($re) { | 86 | if ($re) { |
87 | - Db::name('user')->where('id',$this->getUserId())->setDec('score',$param['score']); | ||
88 | - Db::name('user_score_log')->insert(['user_id'=>$this->getUserId(),'score'=>-$param['score'],'action'=>'消费','now_score'=>$user_score-$param['score']]); | 87 | + Db::name('user')->where('id',$this->getUserId())->setDec('score',$param['price']); |
88 | + Db::name('user_score_log')->insert(['user_id'=>$this->getUserId(),'score'=>-$param['price'],'action'=>'消费','now_score'=>$user_score-$param['price']]); | ||
89 | Db::name('goods')->where('id',$param['goods_id'])->setDec('stock',$param['count']); | 89 | Db::name('goods')->where('id',$param['goods_id'])->setDec('stock',$param['count']); |
90 | $this->success('兑换成功'); | 90 | $this->success('兑换成功'); |
91 | }else{ | 91 | }else{ |
-
请 注册 或 登录 后发表评论