DB::beginTransaction();
$goodsInfo = Goods::where('seckill_goods_id',$gid)->lockForUpdate()->first();
$goodsInfo->seckill_stock-=1;
$goodsInfo->save();
DB::commit();
DB::beginTransaction();
$goodsInfo = Goods::where('seckill_goods_id',$gid)->lockForUpdate()->first();
$goodsInfo->seckill_stock-=1;
$goodsInfo->save();
DB::commit();