fix: tip for tenant management
This commit is contained in:
@@ -137,7 +137,7 @@ func (s *SysTenantController) Add(c *gin.Context) {
|
||||
uniqueTenantName := s.sysTenantService.CheckUniqueTenantName(body.TenantName, body.ParentID, "")
|
||||
if !uniqueTenantName {
|
||||
// 租户新增【%s】失败,租户名称已存在
|
||||
msg := i18n.TTemplate(language, "ERROR: tenant name already exists", map[string]any{"name": body.TenantName})
|
||||
msg := i18n.TTemplate(language, "tenant.errNameExists", map[string]any{"name": body.TenantName})
|
||||
c.JSON(200, result.ErrMsg(msg))
|
||||
return
|
||||
}
|
||||
@@ -145,7 +145,7 @@ func (s *SysTenantController) Add(c *gin.Context) {
|
||||
uniqueTenancy := s.sysTenantService.IsUniqueTenancy(body.TenantID, body.TenancyType, body.TenancyKey)
|
||||
if !uniqueTenancy {
|
||||
// 租赁对象添加失败,租赁对象已存在
|
||||
msg := i18n.TTemplate(language, "ERROR: tenancy asset already exists", map[string]any{"key": body.TenancyKey})
|
||||
msg := i18n.TTemplate(language, "tenant.errAssetExists", map[string]any{"type": body.TenancyType, "key": body.TenancyKey})
|
||||
c.JSON(200, result.ErrMsg(msg))
|
||||
return
|
||||
}
|
||||
@@ -209,7 +209,7 @@ func (s *SysTenantController) Edit(c *gin.Context) {
|
||||
uniqueTenantName := s.sysTenantService.CheckUniqueTenantName(body.TenantName, body.ParentID, body.TenantID)
|
||||
if !uniqueTenantName {
|
||||
// 租户修改【%s】失败,租户名称已存在
|
||||
msg := i18n.TTemplate(language, "ERROR: tenant name already exists", map[string]any{"name": body.TenantName})
|
||||
msg := i18n.TTemplate(language, "tenant.errNameExists", map[string]any{"name": body.TenantName})
|
||||
c.JSON(200, result.ErrMsg(msg))
|
||||
return
|
||||
}
|
||||
@@ -217,7 +217,7 @@ func (s *SysTenantController) Edit(c *gin.Context) {
|
||||
uniqueTenancy := s.sysTenantService.IsUniqueTenancy(body.TenantID, body.TenancyType, body.TenancyKey)
|
||||
if !uniqueTenancy {
|
||||
// 租赁对象添加失败,租赁对象已存在
|
||||
msg := i18n.TTemplate(language, "ERROR: tenancy asset already exists", map[string]any{"key": body.TenancyKey})
|
||||
msg := i18n.TTemplate(language, "tenant.errAssetExists", map[string]any{"type": body.TenancyType, "key": body.TenancyKey})
|
||||
c.JSON(200, result.ErrMsg(msg))
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user