Commit 5d113cbf by 冷斌

fix bug

parent 35087e78
......@@ -279,9 +279,9 @@ class MallController extends HomebaseController {
$addtime=time();
$showid=0;
$giftcount=1;
$consumption = $total * 10;
/* 更新用户余额 消费 */
$ifok=M()->execute("update __PREFIX__users set coin=coin-{$total},consumption=consumption+{$total} where id='{$uid}' and coin >= {$total}");
$ifok=M()->execute("update __PREFIX__users set coin=coin-{$total},consumption=consumption+{$consumption} where id='{$uid}' and coin >= {$total}");
if(!$ifok){
$rs['code']=1002;
$rs['msg']='余额不足';
......@@ -338,9 +338,9 @@ class MallController extends HomebaseController {
$addtime=time();
$showid=0;
$giftcount=1;
$consumption = $total * 10;
/* 更新用户余额 消费 */
$ifok=M()->execute("update __PREFIX__users set coin=coin-{$total},consumption=consumption+{$total} where id='{$uid}' and coin >= {$total}");
$ifok=M()->execute("update __PREFIX__users set coin=coin-{$total},consumption=consumption+{$consumption} where id='{$uid}' and coin >= {$total}");
if(!$ifok){
$rs['code']=1002;
$rs['msg']='余额不足';
......
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