修改时不翻译

This commit is contained in:
2025-07-01 09:59:36 +08:00
parent 1a72b2a94e
commit 9d5796c3a9
4 changed files with 272 additions and 24 deletions
+8
View File
@@ -3,6 +3,7 @@
namespace app\console\service;
use app\console\model\ModelModel;
use app\console\model\ModelTranslationModel;
use app\mzl\common\services\BaseService;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Model;
@@ -122,6 +123,13 @@ class ModelService extends BaseService
$sourceLocale,
$sourceFields
);
ModelTranslationModel::updateOrCreate(
[
'model_id' => $id,
'locale' => $sourceLocale,
],
$sourceFields
);
Db::commit();
return true;