fix: error message and kpi ws
This commit is contained in:
@@ -232,6 +232,7 @@ func PostKPIReportFromNF(w http.ResponseWriter, r *http.Request) {
|
|||||||
// kip_id ...
|
// kip_id ...
|
||||||
"neType": kpiReport.Task.NE.NeType,
|
"neType": kpiReport.Task.NE.NeType,
|
||||||
"neName": kpiReport.Task.NE.NEName,
|
"neName": kpiReport.Task.NE.NEName,
|
||||||
|
"rmUID": kpiReport.Task.NE.RmUID,
|
||||||
"startIndex": kpiIndex,
|
"startIndex": kpiIndex,
|
||||||
"timeGroup": startTime,
|
"timeGroup": startTime,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -136,7 +136,7 @@ func (s *SysTenantController) Add(c *gin.Context) {
|
|||||||
uniqueTenantName := s.sysTenantService.CheckUniqueTenantName(body.TenantName, body.ParentID, "")
|
uniqueTenantName := s.sysTenantService.CheckUniqueTenantName(body.TenantName, body.ParentID, "")
|
||||||
if !uniqueTenantName {
|
if !uniqueTenantName {
|
||||||
// 租户新增【%s】失败,租户名称已存在
|
// 租户新增【%s】失败,租户名称已存在
|
||||||
msg := i18n.TTemplate(language, "tenant.errNameExists", map[string]any{"name": body.TenantName})
|
msg := i18n.TTemplate(language, "ERROR: tenant name already exists", map[string]any{"name": body.TenantName})
|
||||||
c.JSON(200, result.ErrMsg(msg))
|
c.JSON(200, result.ErrMsg(msg))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -144,7 +144,7 @@ func (s *SysTenantController) Add(c *gin.Context) {
|
|||||||
uniqueTenancy := s.sysTenantService.IsUniqueTenancy(body.TenantID, body.TenancyType, body.TenancyKey)
|
uniqueTenancy := s.sysTenantService.IsUniqueTenancy(body.TenantID, body.TenancyType, body.TenancyKey)
|
||||||
if !uniqueTenancy {
|
if !uniqueTenancy {
|
||||||
// 租赁对象添加失败,租赁对象已存在
|
// 租赁对象添加失败,租赁对象已存在
|
||||||
msg := i18n.TTemplate(language, "Tenancy object is exist", map[string]any{"key": body.TenancyKey})
|
msg := i18n.TTemplate(language, "ERROR: tenancy key already exists", map[string]any{"key": body.TenancyKey})
|
||||||
c.JSON(200, result.ErrMsg(msg))
|
c.JSON(200, result.ErrMsg(msg))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -201,7 +201,7 @@ func (s *SysTenantController) Edit(c *gin.Context) {
|
|||||||
uniqueTenantName := s.sysTenantService.CheckUniqueTenantName(body.TenantName, body.ParentID, body.TenantID)
|
uniqueTenantName := s.sysTenantService.CheckUniqueTenantName(body.TenantName, body.ParentID, body.TenantID)
|
||||||
if !uniqueTenantName {
|
if !uniqueTenantName {
|
||||||
// 租户修改【%s】失败,租户名称已存在
|
// 租户修改【%s】失败,租户名称已存在
|
||||||
msg := i18n.TTemplate(language, "tenant.errNameExists", map[string]any{"name": body.TenantName})
|
msg := i18n.TTemplate(language, "ERROR: tenant name already exists", map[string]any{"name": body.TenantName})
|
||||||
c.JSON(200, result.ErrMsg(msg))
|
c.JSON(200, result.ErrMsg(msg))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -209,7 +209,7 @@ func (s *SysTenantController) Edit(c *gin.Context) {
|
|||||||
uniqueTenancy := s.sysTenantService.IsUniqueTenancy(body.TenantID, body.TenancyType, body.TenancyKey)
|
uniqueTenancy := s.sysTenantService.IsUniqueTenancy(body.TenantID, body.TenancyType, body.TenancyKey)
|
||||||
if !uniqueTenancy {
|
if !uniqueTenancy {
|
||||||
// 租赁对象添加失败,租赁对象已存在
|
// 租赁对象添加失败,租赁对象已存在
|
||||||
msg := i18n.TTemplate(language, "Tenancy object is exist", map[string]any{"key": body.TenancyKey})
|
msg := i18n.TTemplate(language, "ERROR: tenancy key already exists", map[string]any{"key": body.TenancyKey})
|
||||||
c.JSON(200, result.ErrMsg(msg))
|
c.JSON(200, result.ErrMsg(msg))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user