feat:完善项目

This commit is contained in:
henry
2021-11-12 14:08:42 +08:00
parent a8259f53a2
commit a22029f4a3
9 changed files with 102 additions and 34 deletions

View File

@ -44,11 +44,12 @@ func (m *SysUser) GetByAccountOrMobile(param string) (bool, error) {
return true, nil
}
// Users 用户信息
func (m *SysUser) Users(page, pageSize int, count *int64, where ...*model.ModelWhere) ([]*SysUserInfo, error) {
mSysTenant := model.NewSysTenant()
db := orm.GetDB().Table(m.TableName()+" As u").Select("u.id", "u.uuid", "u.name", "u.avatar",
"u.mobile", "u.email", "u.status", "t.name AS tenant_name").
db := orm.GetDB().Table(m.TableName()+" As u").Select("u.id", "u.uuid", "account", "u.name", "u.avatar",
"u.mobile", "u.email", "u.status", "t.name AS tenant_name", "u.created_at").
Joins(fmt.Sprintf("LEFT JOIN %s AS t ON u.tenant_id = t.id", mSysTenant.TableName())).
Where("u.is_deleted = ?", model.DeleteStatusForNot)