完善条件

This commit is contained in:
lai
2024-12-13 16:03:29 +08:00
parent 3dc6c09d73
commit c40feee2bb

View File

@@ -174,7 +174,7 @@ func (k *KpiCTitle) Post(c *gin.Context) {
}
userName := ctx.LoginUserToUserName(c)
title.CreatedBy = &userName
result := dborm.DefaultDB().Where("ne_type=? and (kpi_id=? or title=?) and stauts!='Deleted'", title.NeType, title.KpiID, title.Title).First(&title)
result := dborm.DefaultDB().Where("ne_type=? and (kpi_id=? or title=?) and status!='Deleted'", title.NeType, title.KpiID, title.Title).First(&title)
if result.RowsAffected > 0 {
c.JSON(http.StatusOK, services.ErrResp("custom indicator already exist"))
return