fix: 多语言字典数据源同步更新

This commit is contained in:
TsMask
2024-01-10 12:05:14 +08:00
parent 44ddbd7892
commit c2aa5b4a27
9 changed files with 134 additions and 19 deletions

View File

@@ -201,6 +201,13 @@ func (s *SysDeptController) Edit(c *gin.Context) {
}
}
// 多语言非原始值
i18nValue := i18n.TKey(language, deptInfo.DeptName)
if i18nValue != deptInfo.DeptName {
i18n.UpdateKeyValue(language, deptInfo.DeptName, body.DeptName)
body.DeptName = deptInfo.DeptName
}
body.UpdateBy = ctx.LoginUserToUserName(c)
rows := s.sysDeptService.UpdateDept(body)
if rows > 0 {