|
@@ -152,7 +152,7 @@ class GoodStockInfo extends Model
|
|
|
* @throws \think\Exception
|
|
|
*/
|
|
|
static function bnStock(int $stockid,string $bnCode,int $num,int $flag=0,float $origin_price=0){
|
|
|
- $stock =self::where(["stockid"=>$stockid,"bnCode"=>$bnCode])->lock(true)->findOrEmpty()->toArray();
|
|
|
+ $stock =self::where(["stockid"=>$stockid,"bnCode"=>$bnCode])->findOrEmpty()->toArray();
|
|
|
if($flag==1) {
|
|
|
if(empty($stock)|| $stock['balance_num']< $num)
|
|
|
throw new Exception("bn库存数不足",1006);
|