This commit is contained in:
2025-05-30 16:58:03 +08:00
parent 4c4e1a70cf
commit 9e1cc5a804
2 changed files with 1 additions and 2 deletions
+1 -1
View File
@@ -69,7 +69,7 @@ class BrandTranslationModel extends Model
static::saved(function ($model) { static::saved(function ($model) {
// 业务逻辑 // 业务逻辑
if($model->locale == 'en'){ if($model->locale == 'en'){
BrandModel::updateOrCreate(['id' => $model->id],['letter' => mb_substr($model->name, 0, 1, 'UTF-8')]); BrandModel::updateOrCreate(['id' => $model->brand_id],['letter' => mb_substr($model->name, 0, 1, 'UTF-8')]);
} }
}); });
} }
-1
View File
@@ -167,7 +167,6 @@ class BrandService extends BaseService
Db::beginTransaction(); Db::beginTransaction();
try { try {
$info = $this->update($id, $params); $info = $this->update($id, $params);
log::info($info);
if (!$info) { if (!$info) {
throw new BusinessException('提交失败'); throw new BusinessException('提交失败');
} }