瀏覽代碼

茶宝判断

afa 6 月之前
父節點
當前提交
46e38f11d7
共有 1 個文件被更改,包括 1 次插入3 次删除
  1. 1 3
      application/api/controller/Teac.php

+ 1 - 3
application/api/controller/Teac.php

@@ -150,9 +150,7 @@ class Teac extends Api
         if(empty($row) || $row['status'] != ProductTeac::Normal) $this->error('订单不存在');
         if($this->auth->id == $row['user_id']) $this->error('不能购买自己的订单');
         if($params['num'] > $row['stock'] - $row['num']) $this->error('库存不足');
-        $chabao = $ledgerWalletModel->getWalletChaBao(1044);
-        $tatal = bcmul($row['price'], $params['num'], 2);
-        if($chabao < $tatal) $this->error('您的钱包茶宝余额不足');
+        
         // 启动事务
         Db::startTrans();
         try {