review gdeposit

This commit is contained in:
shoopea 2019-08-21 11:54:01 +08:00
parent 52b36b763b
commit 68935f7132
3 changed files with 3 additions and 3 deletions

2
def.go
View File

@ -208,7 +208,7 @@ type BotMsg struct {
type Job struct { type Job struct {
ID64 int64 ID64 int64
JobTypeID int32 JobTypeID int32
Status int32 Trigger int64
UserID64 int64 UserID64 int64
Payload []byte Payload []byte
} }

2
job.go
View File

@ -719,7 +719,7 @@ func jobGDeposit(j Job) {
p2 := JobPayloadGDeposit{ p2 := JobPayloadGDeposit{
MsgID64: p.MsgID64, MsgID64: p.MsgID64,
ChatID64: p.ChatID64, ChatID64: p.ChatID64,
ResObjID64: [1]int64{obj.ObjID64}, ResObjID64: []int64{obj.ObjID64},
Status: 1, Status: 1,
} }
err = createJobCallback(objSubTypeJobGDeposit, j.UserID64, objSubTypeMessageOrderbookAck, p2) err = createJobCallback(objSubTypeJobGDeposit, j.UserID64, objSubTypeMessageOrderbookAck, p2)

2
obj.go
View File

@ -707,7 +707,7 @@ func getObjItem(objItemID64 int64) (*ChatWarsItem, error) {
defer muxObjItem.Unlock() defer muxObjItem.Unlock()
if obj, ok := cacheObjItemId[objItemID64]; ok { if obj, ok := cacheObjItemId[objItemID64]; ok {
//log.Printf("Matching item name %s with %s.\n", name, obj.Name) //log.Printf("Matching item name %s with %s.\n", name, obj.Name)
return obj, nil return &obj, nil
} else { } else {
return nil, errors.New("Item not found.") return nil, errors.New("Item not found.")
} }