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 {
var errCustom = new(comm.CustomError)
if errors.As(err, &errCustom) {
errdata = &pb.ErrorData{
Code: errCustom.Code,
Title: errCustom.Code.ToString(),
Message: err.Error(),
}
this.module.Debug(errCustom.Code.String())
} else {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_DBError,

View File

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