feat:完善项目

This commit is contained in:
henry
2021-11-10 15:09:31 +08:00
parent 095bdcfe4c
commit 863edee71c
6 changed files with 161 additions and 5 deletions

View File

@ -30,6 +30,11 @@ type (
Account, Name, Avatar, Mobile, Password, Remark string
Gender int
}
// InstanceBasicInfo 基本信息
InstanceBasicInfo struct {
UUID string `json:"id"` // 别名更改为ID
Name string `json:"name"`
}
)
// Info 基本信息
@ -37,6 +42,18 @@ func (c *Instance) Info() *InstanceBasic {
return &InstanceBasic{Name: c.Name, Avatar: c.Avatar}
}
// Select 筛选信息
func (c *Instance) Select() ([]*InstanceBasicInfo, error) {
mSysUser := model.NewSysUser()
out := make([]*InstanceBasicInfo, 0)
if err := model2.ScanFields(mSysUser.SysUser, &out, []string{"uuid", "name"}); err != nil {
return nil, err
}
return out, nil
}
// List 列表信息
func (c *Instance) List(name, mobile string, tenantID uint64, page, pageSize int) (*basic.PageDataResponse, error) {
mSysUser := model.NewSysUser()