in dubbogo/multi/server/app/student.go [61:74]
func (db *StudentDB) Add(u *Student) bool {
db.lock.Lock()
defer db.lock.Unlock()
if u.Name == "" || u.Code <= 0 {
return false
}
if !db.existName(u.Name) && !db.existCode(u.Code) {
return db.AddForName(u) && db.AddForCode(u)
}
return false
}