| @@ -393,8 +393,6 @@ func ShowSingleModel(ctx *context.Context) { | |||||
| userIds := make([]int64, len(models)) | userIds := make([]int64, len(models)) | ||||
| for i, model := range models { | for i, model := range models { | ||||
| log.Info("model=" + model.Name) | |||||
| log.Info("model.UserId=" + fmt.Sprint(model.UserId)) | |||||
| model.IsCanOper = isOper(ctx, model.UserId) | model.IsCanOper = isOper(ctx, model.UserId) | ||||
| userIds[i] = model.UserId | userIds[i] = model.UserId | ||||
| } | } | ||||
| @@ -419,13 +417,11 @@ func queryUserName(intSlice []int64) map[int64]*models.User { | |||||
| uniqueElements = append(uniqueElements, entry) | uniqueElements = append(uniqueElements, entry) | ||||
| } | } | ||||
| } | } | ||||
| uniqueElementsJson, _ := json.Marshal(uniqueElements) | |||||
| log.Info("uniqueElementsJson=" + string(uniqueElementsJson)) | |||||
| result := make(map[int64]*models.User) | result := make(map[int64]*models.User) | ||||
| userLists, err := models.GetUsersByIDs(uniqueElements) | userLists, err := models.GetUsersByIDs(uniqueElements) | ||||
| if err == nil { | if err == nil { | ||||
| for i, user := range userLists { | |||||
| result[uniqueElements[i]] = user | |||||
| for _, user := range userLists { | |||||
| result[user.ID] = user | |||||
| } | } | ||||
| } | } | ||||
| @@ -439,8 +435,6 @@ func ShowOneVersionOtherModel(ctx *context.Context) { | |||||
| userIds := make([]int64, len(aimodels)) | userIds := make([]int64, len(aimodels)) | ||||
| for i, model := range aimodels { | for i, model := range aimodels { | ||||
| log.Info("model=" + model.Name) | |||||
| log.Info("model.UserId=" + fmt.Sprint(model.UserId)) | |||||
| model.IsCanOper = isOper(ctx, model.UserId) | model.IsCanOper = isOper(ctx, model.UserId) | ||||
| userIds[i] = model.UserId | userIds[i] = model.UserId | ||||
| } | } | ||||
| @@ -527,9 +521,6 @@ func ShowModelPageInfo(ctx *context.Context) { | |||||
| userNameMap := queryUserName(userIds) | userNameMap := queryUserName(userIds) | ||||
| userNameMapJson, _ := json.Marshal(userNameMap) | |||||
| log.Info("userNameMapJson=" + string(userNameMapJson)) | |||||
| for _, model := range modelResult { | for _, model := range modelResult { | ||||
| value := userNameMap[model.UserId] | value := userNameMap[model.UserId] | ||||
| if value != nil { | if value != nil { | ||||