Browse Source

余额表加创建时间

master
huangjiajun 2 weeks ago
parent
commit
fdac2df953
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      src/implement/user_wallet_implement.go

+ 3
- 1
src/implement/user_wallet_implement.go View File

@@ -1,4 +1,4 @@
package implement
package implement


import ( import (
"code.fnuoos.com/EggPlanet/egg_models.git/src/dao" "code.fnuoos.com/EggPlanet/egg_models.git/src/dao"
@@ -7,6 +7,7 @@ import (
zhios_order_relate_logx "code.fnuoos.com/EggPlanet/egg_models.git/utils/logx" zhios_order_relate_logx "code.fnuoos.com/EggPlanet/egg_models.git/utils/logx"
"fmt" "fmt"
"reflect" "reflect"
"time"
"xorm.io/xorm" "xorm.io/xorm"
) )


@@ -29,6 +30,7 @@ func (u UserWalletDb) GetUserVirtualWallet(uid int64) (*model.UserWallet, error)
} else { } else {
userWallet.Amount = "0" userWallet.Amount = "0"
userWallet.Uid = uid userWallet.Uid = uid
userWallet.CreateAt = time.Now().Format("2006-01-02 15:04:05")
one, err1 := u.Db.InsertOne(&userWallet) one, err1 := u.Db.InsertOne(&userWallet)
if err1 != nil || one == 0 { if err1 != nil || one == 0 {
return nil, err1 return nil, err1


Loading…
Cancel
Save