in dubbogo/multi/server/app/student.go [227:240]
func (s *StudentProvider) UpdateStudent(ctx context.Context, student *Student) (bool, error) {
outLn("Req UpdateStudent data:%#v", student)
r, ok := studentCache.GetByName(student.Name)
if !ok {
return false, errors.New("not found")
}
if len(student.ID) != 0 {
r.ID = student.ID
}
if student.Age >= 0 {
r.Age = student.Age
}
return true, nil
}