Remove useless field in user. Use default utf8 when installing.
This commit is contained in:
@ -72,7 +72,7 @@ func (this *UserDao) FindByUsername(username string) *User {
|
||||
return user
|
||||
}
|
||||
|
||||
func (this *UserDao) Page(page int, pageSize int, username string, email string, phone string, status string, sortArray []builder.OrderPair) *Pager {
|
||||
func (this *UserDao) Page(page int, pageSize int, username string, status string, sortArray []builder.OrderPair) *Pager {
|
||||
|
||||
var wp = &builder.WherePair{}
|
||||
|
||||
@ -80,14 +80,6 @@ func (this *UserDao) Page(page int, pageSize int, username string, email string,
|
||||
wp = wp.And(&builder.WherePair{Query: "username LIKE ?", Args: []interface{}{"%" + username + "%"}})
|
||||
}
|
||||
|
||||
if email != "" {
|
||||
wp = wp.And(&builder.WherePair{Query: "email LIKE ?", Args: []interface{}{"%" + email + "%"}})
|
||||
}
|
||||
|
||||
if phone != "" {
|
||||
wp = wp.And(&builder.WherePair{Query: "phone = ?", Args: []interface{}{phone}})
|
||||
}
|
||||
|
||||
if status != "" {
|
||||
wp = wp.And(&builder.WherePair{Query: "status = ?", Args: []interface{}{status}})
|
||||
}
|
||||
|
Reference in New Issue
Block a user