!253 编辑问题修复

Merge pull request !253 from 杨建炊/fix-release-1.0.0/yjc-migrate
This commit is contained in:
杨建炊 2024-11-15 07:54:05 +00:00 committed by Gitee
commit 4ecc66eb32
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -159,7 +159,7 @@ class GoodsCombinationController extends Controller
$externalSkuId = $request->input('external_sku_id') ??
GeneratorUtils::generateCombinationGoodNumber($request->combination_goods);
$hasCodeSku = GoodsSku::query()->where("external_sku_id", $externalSkuId)->first();
if (!empty($hasCodeSku)) {
if (!empty($hasCodeSku) && $hasCodeSku->id != $request->input('id',0)) {
throw new \Exception("该组合商品编码已存在");
}
DB::beginTransaction();