Compare commits
2 Commits
fe029e048e
...
be474a1442
Author | SHA1 | Date | |
---|---|---|---|
be474a1442 | |||
f9e4ae25e2 |
@ -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,
|
||||
|
@ -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(),
|
||||
})
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user