feat: apply

master
howell 3 years ago
parent 5d1f1e3d5a
commit 7112d4457a

@ -41,9 +41,9 @@ func (o logic) DepositList(args ArgsDeposit) (data []jyy.UserWalletApply, total
}
if args.IsCompany != nil {
if *args.IsCompany {
query = query.Where("company_id <> 1")
query = query.Where("company_id <> 0")
} else {
query = query.Where("company_id = 1")
query = query.Where("company_id = 0")
}
}
}

@ -155,6 +155,7 @@ type UserWalletApply struct {
Nickname string `json:"nickname,omitempty" gorm:"-"`
Mobile string `json:"mobile,omitempty" gorm:"-"`
Reason string `json:"reason"`
IsCompany bool `json:"is_company" gorm:"-"`
}
func (o UserWalletApply) TableName() string {
@ -166,5 +167,6 @@ func (o *UserWalletApply) AfterFind(db *gorm.DB) error {
o.Nickname = o.User.Nickname
o.Mobile = o.User.Nickname
}
o.IsCompany = o.CompanyID != 0
return nil
}

Loading…
Cancel
Save