Finish the basic feature of Propfind.

This commit is contained in:
zicla
2019-04-21 02:50:17 +08:00
parent 466e406f74
commit 8461218d63
4 changed files with 72 additions and 13 deletions

View File

@ -49,12 +49,23 @@ func (this *UserDao) CheckByUuid(uuid string) *User {
}
// Read
var user *User = &User{}
var user = &User{}
db := CONTEXT.DB.Where(&User{Base: Base{Uuid: uuid}}).First(user)
this.PanicError(db.Error)
return user
}
//按照邮箱查询用户。
func (this *UserDao) FindByUsername(username string) *User {
var user = &User{}
db := CONTEXT.DB.Where(&User{Username: username}).First(user)
if db.Error != nil {
return nil
}
return user
}
//按照邮箱查询用户。
func (this *UserDao) FindByEmail(email string) *User {