stanley-king 8 tahun lalu
induk
melakukan
bd4842cb36
2 mengubah file dengan 3 tambahan dan 3 penghapusan
  1. 2 2
      data/model/goods_fcode.model.php
  2. 1 1
      helper/fcode/operator.php

+ 2 - 2
data/model/goods_fcode.model.php

@@ -43,8 +43,8 @@ class goods_fcodeModel extends Model {
     /**
      * 取得F码
      */
-    public function getGoodsFCode($condition) {
-        return $this->where($condition)->find();
+    public function getGoodsFCode($condition,$master=false) {
+        return $this->where($condition)->lock($master)->find();
     }
 
     /**

+ 1 - 1
helper/fcode/operator.php

@@ -47,7 +47,7 @@ class operator
             $cond['mobile|session_id'] = array('_multi'=>true,$mobile,session_helper::session_id());
         }
 
-        $fcode = $this->mod_fcode->getGoodsFCode($cond);
+        $fcode = $this->mod_fcode->getGoodsFCode($cond,true);
         if(empty($fcode)) {
             return false;
         }