feat:完善项目
This commit is contained in:
@ -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()
|
||||
|
||||
Reference in New Issue
Block a user