修改用户初始
This commit is contained in:
parent
2250c07da4
commit
9989b8376f
@ -4,7 +4,6 @@ import (
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/pb"
|
||||
|
||||
"github.com/spf13/cast"
|
||||
"google.golang.org/protobuf/proto"
|
||||
)
|
||||
|
||||
@ -54,13 +53,7 @@ func (this *apiComp) Create(session comm.IUserSession, req *pb.UserCreateReq) (c
|
||||
"created": true, //创角标识
|
||||
}
|
||||
|
||||
//设置初始金币
|
||||
if val := this.module.configure.GetGlobalConf("init_gold"); val != "" {
|
||||
update["gold"] = cast.ToInt32(val)
|
||||
}
|
||||
|
||||
err := this.module.modelUser.Change(session.GetUserId(), update)
|
||||
if err != nil {
|
||||
if err := this.module.modelUser.Change(session.GetUserId(), update); err != nil {
|
||||
code = pb.ErrorCode_DBError
|
||||
return
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user