|
|
|
@ -28,12 +28,13 @@ type AppUserReq struct {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type AppUserInfo struct {
|
|
|
|
|
Mobile string `json:"mobile"`
|
|
|
|
|
Nickname string `json:"nickname"`
|
|
|
|
|
Level uint `json:"level"`
|
|
|
|
|
IsOffline bool `json:"is_offline"`
|
|
|
|
|
CreatedAt formatime.Second `json:"created_at"`
|
|
|
|
|
TaxType string `json:"tax_type"`
|
|
|
|
|
Mobile string `json:"mobile"`
|
|
|
|
|
Nickname string `json:"nickname"`
|
|
|
|
|
Level uint `json:"level"`
|
|
|
|
|
IsOffline bool `json:"is_offline"`
|
|
|
|
|
CreatedAt formatime.Second `json:"created_at"`
|
|
|
|
|
TaxType string `json:"tax_type"`
|
|
|
|
|
IsEnterprise bool `json:"is_enterprise"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (o logic) AppUser(args AppUserReq) (res []AppUserInfo, total int64, err error) {
|
|
|
|
@ -42,6 +43,7 @@ func (o logic) AppUser(args AppUserReq) (res []AppUserInfo, total int64, err err
|
|
|
|
|
if args.Mobile != "" {
|
|
|
|
|
query = query.Where("mobile = ?", args.Mobile)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if args.Nickname != "" {
|
|
|
|
|
query = query.Where("nickname = ?", args.Nickname)
|
|
|
|
|
}
|
|
|
|
@ -81,12 +83,13 @@ func (o logic) AppUser(args AppUserReq) (res []AppUserInfo, total int64, err err
|
|
|
|
|
query.Preload("CompanyInfo").Offset(args.GetStart()).Limit(args.GetLimit()).Find(&temp)
|
|
|
|
|
for _, v := range temp {
|
|
|
|
|
res = append(res, AppUserInfo{
|
|
|
|
|
Mobile: v.Mobile,
|
|
|
|
|
Nickname: v.Nickname,
|
|
|
|
|
Level: uint(v.Level),
|
|
|
|
|
IsOffline: v.IsOffline,
|
|
|
|
|
CreatedAt: v.CreatedAt,
|
|
|
|
|
TaxType: v.CompanyInfo.TaxType,
|
|
|
|
|
Mobile: v.Mobile,
|
|
|
|
|
Nickname: v.Nickname,
|
|
|
|
|
Level: uint(v.Level),
|
|
|
|
|
IsOffline: v.IsOffline,
|
|
|
|
|
CreatedAt: v.CreatedAt,
|
|
|
|
|
TaxType: v.CompanyInfo.TaxType,
|
|
|
|
|
IsEnterprise: v.IsEnterprise,
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
return
|
|
|
|
|