上传bug修复代码
This commit is contained in:
parent
10c5a1d705
commit
355df5e380
@ -5,9 +5,7 @@ import (
|
||||
"go_dreamfactory/lego/sys/mgo"
|
||||
"go_dreamfactory/pb"
|
||||
cfg "go_dreamfactory/sys/configure/structs"
|
||||
"go_dreamfactory/sys/db"
|
||||
"math/rand"
|
||||
"time"
|
||||
)
|
||||
|
||||
// 参数校验
|
||||
@ -22,23 +20,14 @@ func (this *apiComp) Info(session comm.IUserSession, req *pb.ArenaInfoReq) (errd
|
||||
global *cfg.GameGlobalData
|
||||
info *pb.DBArenaUser
|
||||
user *pb.DBUser
|
||||
model *db.DBModel
|
||||
err error
|
||||
)
|
||||
|
||||
if errdata = this.InfoCheck(session, req); errdata != nil {
|
||||
return
|
||||
}
|
||||
if model, err = this.module.GetDBNodule(session, comm.TableUser, time.Hour); err != nil {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_DBError,
|
||||
Title: pb.ErrorCode_DBError.ToString(),
|
||||
Message: err.Error(),
|
||||
}
|
||||
return
|
||||
}
|
||||
user = &pb.DBUser{}
|
||||
if err = model.Get(session.GetUserId(), user); err != nil {
|
||||
user = this.module.ModuleUser.GetUser(session.GetUserId())
|
||||
if user == nil {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_DBError,
|
||||
Title: pb.ErrorCode_DBError.ToString(),
|
||||
|
@ -109,7 +109,7 @@ func (this *apiComp) Getlist(session comm.IUserSession, req *pb.ShopGetListReq)
|
||||
leftrefnum = shopconf.Rnum
|
||||
}
|
||||
|
||||
tdata = time.Since(time.Unix(sdata.LastRefreshTime, 0))
|
||||
tdata = configure.Now().Sub((time.Unix(sdata.LastRefreshTime, 0)))
|
||||
switch shopconf.Rtype {
|
||||
case 1:
|
||||
ltime = time.Hour * time.Duration(shopconf.Rtime)
|
||||
|
Loading…
Reference in New Issue
Block a user