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 {
|
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,
|
||||||
|
@ -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(),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user