feat:优化信息

This commit is contained in:
henry
2021-11-23 09:38:59 +08:00
parent 7eacb35ae8
commit ee5a4b9cf6
5 changed files with 10 additions and 2 deletions

View File

@ -32,7 +32,9 @@ func (m *SysUser) IsAdminUser() bool {
}
func (m *SysUser) GetByAccountOrMobile(param string) (bool, error) {
db := orm.GetDB().Table(m.TableName()).Where("(account = ? OR mobile = ?)", param, param).
db := orm.GetDB().Table(m.TableName()).Select("id", "tenant_id", "uuid", "name", "account", "avatar", "mobile",
"password", "salt", "is_admin", "status").
Where("(account = ? OR mobile = ?)", param, param).
Where("is_deleted = ?", model.DeleteStatusForNot)
if err := db.First(m.SysUser).Error; err != nil {