|
|
|
@ -27,12 +27,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 uint `json:"isEnterprise"` // 1 公司 0 个人
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (o logic) AppUser(args AppUserReq) (res []AppUserInfo, total int64, err error) {
|
|
|
|
@ -67,6 +68,9 @@ func (o logic) AppUser(args AppUserReq) (res []AppUserInfo, total int64, err err
|
|
|
|
|
if args.TaxType != "" {
|
|
|
|
|
query = query.Where("id in (?)", mysql.Db.Select("user_id").Model(&company.Info{}).Where("tax_type = ?", args.TaxType))
|
|
|
|
|
}
|
|
|
|
|
if args.IsEnterprise == 0 || args.IsEnterprise == 1 {
|
|
|
|
|
query = query.Where("is_enterprise = ? ", args.IsEnterprise)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
query.Count(&total)
|
|
|
|
|
var temp []user.RecookUserInfoModel
|
|
|
|
|