Compare commits

...

2 Commits

2 changed files with 4 additions and 5 deletions

View File

@ -25,11 +25,7 @@ func (this *apiComp) Refuse(session comm.IUserSession, req *pb.SmithyRefuseReq)
if err != nil { if err != nil {
var errCustom = new(comm.CustomError) var errCustom = new(comm.CustomError)
if errors.As(err, &errCustom) { if errors.As(err, &errCustom) {
errdata = &pb.ErrorData{ this.module.Debug(errCustom.Code.String())
Code: errCustom.Code,
Title: errCustom.Code.ToString(),
Message: err.Error(),
}
} else { } else {
errdata = &pb.ErrorData{ errdata = &pb.ErrorData{
Code: pb.ErrorCode_DBError, Code: pb.ErrorCode_DBError,

View File

@ -9,6 +9,7 @@ import (
"go_dreamfactory/sys/configure" "go_dreamfactory/sys/configure"
"math/rand" "math/rand"
uuid "github.com/satori/go.uuid"
"go.mongodb.org/mongo-driver/bson/primitive" "go.mongodb.org/mongo-driver/bson/primitive"
"go.mongodb.org/mongo-driver/mongo" "go.mongodb.org/mongo-driver/mongo"
"go.mongodb.org/mongo-driver/x/bsonx" "go.mongodb.org/mongo-driver/x/bsonx"
@ -106,6 +107,7 @@ func (s *modelTrade) addCustomer(uid string, num int32) (*pb.DBCustomer, error)
CustomerId: randCustomerId, CustomerId: randCustomerId,
SuitId: suitId, SuitId: suitId,
EquipCount: s.module.modelStove.StoveSkillBuyEquip(uid), EquipCount: s.module.modelStove.StoveSkillBuyEquip(uid),
Uuid: uuid.NewV4().String(),
}) })
} }
@ -160,6 +162,7 @@ func (s *modelTrade) updateCustomer(uid string, customerId int32) (*pb.DBCustome
CustomerId: randCustomerId, CustomerId: randCustomerId,
SuitId: suiteId, SuitId: suiteId,
EquipCount: s.module.modelStove.StoveSkillBuyEquip(uid), EquipCount: s.module.modelStove.StoveSkillBuyEquip(uid),
Uuid: uuid.NewV4().String(),
}) })
} }