所有添加资源的地方打印日志,方便定位问题

This commit is contained in:
meixiongfeng 2022-07-18 17:09:12 +08:00
parent ac8e54f599
commit 73b72596fb
9 changed files with 16 additions and 15 deletions

View File

@ -3,7 +3,7 @@ package robot
import ( import (
"fmt" "fmt"
"go_dreamfactory/comm" "go_dreamfactory/comm"
"go_dreamfactory/modules/story" "go_dreamfactory/modules/mainline"
"go_dreamfactory/pb" "go_dreamfactory/pb"
"google.golang.org/protobuf/proto" "google.golang.org/protobuf/proto"
@ -14,7 +14,7 @@ var (
{ {
desc: "主线数据", desc: "主线数据",
mainType: string(comm.ModuleMainline), mainType: string(comm.ModuleMainline),
subType: story.MainlineGetListResp, subType: mainline.MainlineGetListResp,
req: &pb.MainlineGetListReq{}, req: &pb.MainlineGetListReq{},
rsp: &pb.MainlineGetListResp{}, rsp: &pb.MainlineGetListResp{},
print: func(rsp proto.Message) { print: func(rsp proto.Message) {
@ -27,7 +27,7 @@ var (
}, { }, {
desc: "主线详情", desc: "主线详情",
mainType: string(comm.ModuleMainline), mainType: string(comm.ModuleMainline),
subType: story.MainlineChallengeResp, subType: mainline.MainlineChallengeResp,
req: &pb.MainlineChallengeReq{ req: &pb.MainlineChallengeReq{
ChapterId: 1, ChapterId: 1,
MainlineId: 1, MainlineId: 1,

View File

@ -1,4 +1,4 @@
package story package mainline
import ( import (
"go_dreamfactory/lego/core" "go_dreamfactory/lego/core"

View File

@ -1,4 +1,4 @@
package story package mainline
import ( import (
"go_dreamfactory/comm" "go_dreamfactory/comm"
@ -92,7 +92,7 @@ func (this *apiComp) Challenge(session comm.IUserSession, req *pb.MainlineChalle
} }
if curChapter.ChapterId == int32(req.ChapterId) && curChapter.MainlineId == int32(req.MainlineId) { if curChapter.ChapterId == int32(req.ChapterId) && curChapter.MainlineId == int32(req.MainlineId) {
update := map[string]interface{}{ update := map[string]interface{}{
"storyId": req.MainlineId, "mainlineId": req.MainlineId,
"ChapterId": req.ChapterId, "ChapterId": req.ChapterId,
"branchID": curChapter.BranchID, "branchID": curChapter.BranchID,
} }

View File

@ -1,4 +1,4 @@
package story package mainline
import ( import (
"go_dreamfactory/comm" "go_dreamfactory/comm"

View File

@ -1,4 +1,4 @@
package story package mainline
import ( import (
"go_dreamfactory/lego/core" "go_dreamfactory/lego/core"

View File

@ -1,4 +1,4 @@
package story package mainline
import ( import (
"go_dreamfactory/lego/core" "go_dreamfactory/lego/core"
@ -7,7 +7,7 @@ import (
) )
const ( //Redis const ( //Redis
TableMainline core.SqlTable = "story" TableMainline core.SqlTable = "mainline"
) )
type ModelMainline struct { type ModelMainline struct {

View File

@ -1,4 +1,4 @@
package story package mainline
import ( import (
"go_dreamfactory/comm" "go_dreamfactory/comm"

View File

@ -223,6 +223,7 @@ func (this *ModuleBase) DispenseRes(uid string, res []*cfg.Game_atn, bPush bool)
Describe: "发放资源", Describe: "发放资源",
} }
for _, v := range res { for _, v := range res {
this.Debugf("发放资源 DispenseRes:A = %s, T:%s, N:%d", v.A, v.T, v.N)
if v.A == comm.AttrType { //用户属性资源 if v.A == comm.AttrType { //用户属性资源
code = this.ModuleUser.AddAttributeValue(uid, v.T, v.N, bPush) code = this.ModuleUser.AddAttributeValue(uid, v.T, v.N, bPush)

View File

@ -8,9 +8,9 @@ import (
"go_dreamfactory/modules/hero" "go_dreamfactory/modules/hero"
"go_dreamfactory/modules/items" "go_dreamfactory/modules/items"
"go_dreamfactory/modules/mail" "go_dreamfactory/modules/mail"
"go_dreamfactory/modules/mainline"
"go_dreamfactory/modules/notify" "go_dreamfactory/modules/notify"
"go_dreamfactory/modules/shop" "go_dreamfactory/modules/shop"
"go_dreamfactory/modules/story"
"go_dreamfactory/modules/task" "go_dreamfactory/modules/task"
"go_dreamfactory/modules/user" "go_dreamfactory/modules/user"
"go_dreamfactory/services" "go_dreamfactory/services"
@ -49,7 +49,7 @@ func main() {
hero.NewModule(), hero.NewModule(),
equipment.NewModule(), equipment.NewModule(),
task.NewModule(), task.NewModule(),
story.NewModule(), mainline.NewModule(),
shop.NewModule(), shop.NewModule(),
notify.NewModule(), notify.NewModule(),
) )