From 85e8a8c9805a13431a65ea67be2a3377eb539b02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Wed, 6 Jul 2022 17:11:53 +0800 Subject: [PATCH] 1 --- business/model/dao/dao_user.go | 2 +- business/model/user.go | 22 +++++++++++++--------- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/business/model/dao/dao_user.go b/business/model/dao/dao_user.go index 22d3c09c0..f6ddad51f 100644 --- a/business/model/dao/dao_user.go +++ b/business/model/dao/dao_user.go @@ -116,7 +116,7 @@ func GetUsers(db *DaoDB, userType int, keyword, popUser string, userIDs, userID2 func GetUsers2(db *DaoDB, keyword string, userID string, pop int, mobile string, fromTime, toTime time.Time, timeType int, cityCodes, consumeTypes []int, offset, pageSize int) (pageInfo *model.PagedInfo, err error) { var ( - userList []*model.User + userList []*model.UserBalance ) offset = jxutils.FormalizePageOffset(offset) pageSize = jxutils.FormalizePageSize(pageSize) diff --git a/business/model/user.go b/business/model/user.go index 1ca48f318..e625e7d74 100644 --- a/business/model/user.go +++ b/business/model/user.go @@ -54,15 +54,19 @@ type User struct { IDCardNo string `orm:"size(18);column(id_card_no)" json:"idCardNo" compact:"idCardNo"` // 身份证号 Remark string `orm:"size(255)" json:"remark"` - LastLoginAt *time.Time `orm:"null" json:"lastLoginAt"` - LastLoginIP string `orm:"size(64);column(last_login_ip)" json:"lastLoginIP"` - LastLoginType string `orm:"size(16)" json:"lastLoginType"` - PopCode string `json:"popCode"` //推广码 - PopUser string `json:"popUser"` //推广人 - PopCount int `json:"popCount"` //推荐人数 - PopFlag int `json:"popFlag"` //是否已通过推荐获得免费会员 - PopedFlag int `json:"popedFlag"` //被邀请标志(弹框) - AccountBalance int64 `json:"-"` // 银行余额 + LastLoginAt *time.Time `orm:"null" json:"lastLoginAt"` + LastLoginIP string `orm:"size(64);column(last_login_ip)" json:"lastLoginIP"` + LastLoginType string `orm:"size(16)" json:"lastLoginType"` + PopCode string `json:"popCode"` //推广码 + PopUser string `json:"popUser"` //推广人 + PopCount int `json:"popCount"` //推荐人数 + PopFlag int `json:"popFlag"` //是否已通过推荐获得免费会员 + PopedFlag int `json:"popedFlag"` //被邀请标志(弹框) +} + +type UserBalance struct { + User + AccountBalance int64 `json:"account_balance"` // 银行余额 } func (*User) TableUnique() [][]string {