加一些日志打印

This commit is contained in:
meixiongfeng 2022-10-20 11:08:57 +08:00
parent 800d0203d1
commit 50b4710e89
6 changed files with 932 additions and 48 deletions

View File

@ -17,7 +17,7 @@
3
],
"startid": 10001,
"rightend": 10008,
"rightend": 10001008,
"special_stroyprize": [
{
"a": "attr",
@ -26,9 +26,9 @@
}
],
"endid": [
10009,
10010,
10011
10001009,
10001013,
10001014
],
"stroyprize": [
{
@ -65,7 +65,7 @@
3
],
"startid": 10001,
"rightend": 10008,
"rightend": 10001008,
"special_stroyprize": [
{
"a": "attr",
@ -74,9 +74,9 @@
}
],
"endid": [
10009,
10010,
10011
10001009,
10001013,
10001014
],
"stroyprize": [
{
@ -113,7 +113,7 @@
3
],
"startid": 10001,
"rightend": 10008,
"rightend": 10001008,
"special_stroyprize": [
{
"a": "attr",
@ -122,9 +122,9 @@
}
],
"endid": [
10009,
10010,
10011
10001009,
10001013,
10001014
],
"stroyprize": [
{
@ -161,7 +161,7 @@
3
],
"startid": 10001,
"rightend": 10008,
"rightend": 10001008,
"special_stroyprize": [
{
"a": "attr",
@ -170,9 +170,9 @@
}
],
"endid": [
10009,
10010,
10011
10001009,
10001013,
10001014
],
"stroyprize": [
{

View File

@ -1,46 +1,46 @@
[
{
"startid": 10008,
"startid": 10001008,
"library_title": {
"key": "library_title_10008",
"text": "library_title_library_title_10008"
"key": "library_title_10001008",
"text": "library_title_library_title_10001008"
},
"library_outcome": {
"key": "library_outcome_10008",
"text": "library_outcome_library_title_10008"
"key": "library_outcome_10001008",
"text": "library_outcome_library_title_10001008"
}
},
{
"startid": 10009,
"startid": 10001009,
"library_title": {
"key": "library_title_10009",
"text": "library_title_library_title_10009"
"key": "library_title_10001009",
"text": "library_title_library_title_10001009"
},
"library_outcome": {
"key": "library_outcome_10009",
"text": "library_outcome_library_title_10009"
"key": "library_outcome_10001009",
"text": "library_outcome_library_title_10001009"
}
},
{
"startid": 10010,
"startid": 10001013,
"library_title": {
"key": "library_title_10010",
"text": "library_title_library_title_10010"
"key": "library_title_10001013",
"text": "library_title_library_title_10001013"
},
"library_outcome": {
"key": "library_outcome_10010",
"text": "library_outcome_library_title_10010"
"key": "library_outcome_10001013",
"text": "library_outcome_library_title_10001013"
}
},
{
"startid": 10011,
"startid": 10001014,
"library_title": {
"key": "library_title_10011",
"text": "library_title_library_title_10011"
"key": "library_title_10001014",
"text": "library_title_library_title_10001014"
},
"library_outcome": {
"key": "library_outcome_10011",
"text": "library_outcome_library_title_10011"
"key": "library_outcome_10001014",
"text": "library_outcome_library_title_10001014"
}
}
]

View File

@ -70,5 +70,89 @@
"open": true,
"routrules": "~/worker",
"describe": "拒绝"
},
{
"msgid": "friend.list",
"open": true,
"routrules": "~/worker",
"describe": "好友列表"
},
{
"msgid": "friend.applylist",
"open": true,
"routrules": "~/worker",
"describe": "好友申请列表"
},
{
"msgid": "friend.addblack",
"open": true,
"routrules": "~/worker",
"describe": "加黑名单"
},
{
"msgid": "friend.delblack",
"open": true,
"routrules": "~/worker",
"describe": "删除黑名单"
},
{
"msgid": "friend.blacklist",
"open": true,
"routrules": "~/worker",
"describe": "黑名单列表"
},
{
"msgid": "friend.zan",
"open": true,
"routrules": "~/worker",
"describe": "好友点赞"
},
{
"msgid": "friend.zanreceive",
"open": true,
"routrules": "~/worker",
"describe": "接收点赞"
},
{
"msgid": "friend.zanlist",
"open": true,
"routrules": "~/worker",
"describe": "点赞列表"
},
{
"msgid": "friend.assisthero",
"open": true,
"routrules": "~/worker",
"describe": "英雄助战"
},
{
"msgid": "friend.assistlist",
"open": true,
"routrules": "~/worker",
"describe": "助战列表"
},
{
"msgid": "friend.getreward",
"open": true,
"routrules": "~/worker",
"describe": "获取奖励"
},
{
"msgid": "friend.del",
"open": true,
"routrules": "~/worker",
"describe": "删除好友"
},
{
"msgid": "friend.search",
"open": true,
"routrules": "~/worker",
"describe": "搜索好友"
},
{
"msgid": "friend.randlist",
"open": true,
"routrules": "~/worker",
"describe": "好友推荐"
}
]

View File

@ -12206,5 +12206,798 @@
"perf": "",
"cg": "",
"skip": true
},
{
"id": 10001001,
"groupid": 10001,
"before": -1,
"next": 10001002,
"type": 2,
"bg": "jqdh_bg01",
"place": 0,
"speak": "14007",
"listen": "",
"des": "什么?你找我聊天?",
"modelstatetarget": "",
"modelstate": 0,
"modelaction": "",
"speakstate": "",
"listenstate": "",
"chose": [],
"turn": 0,
"show": 0,
"move": "",
"action": "",
"sound": "",
"positionR": {
"x": 0.5,
"y": 0.5,
"z": 0
},
"positionL": {
"x": 0,
"y": 0,
"z": 0
},
"revolveR": {
"x": 0,
"y": -180,
"z": 0
},
"revolveL": {
"x": 0,
"y": -180,
"z": 0
},
"sizeR": {
"x": 0.8,
"y": 0.8,
"z": 0.8
},
"sizeL": {
"x": 0.8,
"y": 0.8,
"z": 0.8
},
"perf": "",
"cg": "",
"skip": true
},
{
"id": 10001002,
"groupid": 10001,
"before": 10001001,
"next": -1,
"type": 2,
"bg": "jqdh_bg01",
"place": 0,
"speak": "14007",
"listen": "",
"des": "现在没空。我有别的事,你一会来找我吧。",
"modelstatetarget": "",
"modelstate": 0,
"modelaction": "",
"speakstate": "",
"listenstate": "",
"chose": [
10001003,
10001004
],
"turn": 0,
"show": 0,
"move": "",
"action": "",
"sound": "",
"positionR": {
"x": 0.5,
"y": 0.5,
"z": 0
},
"positionL": {
"x": 0,
"y": 0,
"z": 0
},
"revolveR": {
"x": 0,
"y": -180,
"z": 0
},
"revolveL": {
"x": 0,
"y": -180,
"z": 0
},
"sizeR": {
"x": 0.8,
"y": 0.8,
"z": 0.8
},
"sizeL": {
"x": 0.8,
"y": 0.8,
"z": 0.8
},
"perf": "",
"cg": "",
"skip": true
},
{
"id": 10001003,
"groupid": 10001,
"before": 10001002,
"next": 10001005,
"type": 5,
"bg": "jqdh_bg01",
"place": 0,
"speak": "14007",
"listen": "",
"des": "别的事是什么事?",
"modelstatetarget": "",
"modelstate": 0,
"modelaction": "",
"speakstate": "",
"listenstate": "",
"chose": [],
"turn": 0,
"show": 0,
"move": "",
"action": "",
"sound": "",
"positionR": {
"x": 0.5,
"y": 0.5,
"z": 0
},
"positionL": {
"x": 0,
"y": 0,
"z": 0
},
"revolveR": {
"x": 0,
"y": -180,
"z": 0
},
"revolveL": {
"x": 0,
"y": -180,
"z": 0
},
"sizeR": {
"x": 0.8,
"y": 0.8,
"z": 0.8
},
"sizeL": {
"x": 0.8,
"y": 0.8,
"z": 0.8
},
"perf": "",
"cg": "",
"skip": true
},
{
"id": 10001004,
"groupid": 10001,
"before": 10001002,
"next": 10001010,
"type": 5,
"bg": "jqdh_bg01",
"place": 0,
"speak": "14007",
"listen": "",
"des": "你个卖面条的能有啥事?",
"modelstatetarget": "",
"modelstate": 0,
"modelaction": "",
"speakstate": "",
"listenstate": "",
"chose": [],
"turn": 0,
"show": 0,
"move": "",
"action": "",
"sound": "",
"positionR": {
"x": 0.5,
"y": 0.5,
"z": 0
},
"positionL": {
"x": 0,
"y": 0,
"z": 0
},
"revolveR": {
"x": 0,
"y": -180,
"z": 0
},
"revolveL": {
"x": 0,
"y": -180,
"z": 0
},
"sizeR": {
"x": 0.8,
"y": 0.8,
"z": 0.8
},
"sizeL": {
"x": 0.8,
"y": 0.8,
"z": 0.8
},
"perf": "",
"cg": "",
"skip": true
},
{
"id": 10001005,
"groupid": 10001,
"before": 10001003,
"next": -1,
"type": 2,
"bg": "jqdh_bg01",
"place": 0,
"speak": "14007",
"listen": "",
"des": "我正要去翡翠宫看乌龟大师选神龙大侠,你可以去翡翠宫找我。",
"modelstatetarget": "",
"modelstate": 0,
"modelaction": "",
"speakstate": "",
"listenstate": "",
"chose": [
10001006,
10001007
],
"turn": 0,
"show": 0,
"move": "",
"action": "",
"sound": "",
"positionR": {
"x": 0.5,
"y": 0.5,
"z": 0
},
"positionL": {
"x": 0,
"y": 0,
"z": 0
},
"revolveR": {
"x": 0,
"y": -180,
"z": 0
},
"revolveL": {
"x": 0,
"y": -180,
"z": 0
},
"sizeR": {
"x": 0.8,
"y": 0.8,
"z": 0.8
},
"sizeL": {
"x": 0.8,
"y": 0.8,
"z": 0.8
},
"perf": "",
"cg": "",
"skip": true
},
{
"id": 10001006,
"groupid": 10001,
"before": 10001005,
"next": 10001008,
"type": 5,
"bg": "jqdh_bg01",
"place": 0,
"speak": "14007",
"listen": "",
"des": "我和你一起去。",
"modelstatetarget": "",
"modelstate": 0,
"modelaction": "",
"speakstate": "",
"listenstate": "",
"chose": [],
"turn": 0,
"show": 0,
"move": "",
"action": "",
"sound": "",
"positionR": {
"x": 0.5,
"y": 0.5,
"z": 0
},
"positionL": {
"x": 0,
"y": 0,
"z": 0
},
"revolveR": {
"x": 0,
"y": -180,
"z": 0
},
"revolveL": {
"x": 0,
"y": -180,
"z": 0
},
"sizeR": {
"x": 0.8,
"y": 0.8,
"z": 0.8
},
"sizeL": {
"x": 0.8,
"y": 0.8,
"z": 0.8
},
"perf": "",
"cg": "",
"skip": true
},
{
"id": 10001007,
"groupid": 10001,
"before": 10001005,
"next": 10001009,
"type": 5,
"bg": "jqdh_bg01",
"place": 0,
"speak": "14007",
"listen": "",
"des": "等你回来。",
"modelstatetarget": "",
"modelstate": 0,
"modelaction": "",
"speakstate": "",
"listenstate": "",
"chose": [],
"turn": 0,
"show": 0,
"move": "",
"action": "",
"sound": "",
"positionR": {
"x": 0.5,
"y": 0.5,
"z": 0
},
"positionL": {
"x": 0,
"y": 0,
"z": 0
},
"revolveR": {
"x": 0,
"y": -180,
"z": 0
},
"revolveL": {
"x": 0,
"y": -180,
"z": 0
},
"sizeR": {
"x": 0.8,
"y": 0.8,
"z": 0.8
},
"sizeL": {
"x": 0.8,
"y": 0.8,
"z": 0.8
},
"perf": "",
"cg": "",
"skip": true
},
{
"id": 10001008,
"groupid": 10001,
"before": 10001006,
"next": -1,
"type": 2,
"bg": "jqdh_bg01",
"place": 0,
"speak": "14007",
"listen": "",
"des": "那一起去吧。",
"modelstatetarget": "",
"modelstate": 0,
"modelaction": "",
"speakstate": "",
"listenstate": "",
"chose": [],
"turn": 0,
"show": 0,
"move": "",
"action": "",
"sound": "",
"positionR": {
"x": 0.5,
"y": 0.5,
"z": 0
},
"positionL": {
"x": 0,
"y": 0,
"z": 0
},
"revolveR": {
"x": 0,
"y": -180,
"z": 0
},
"revolveL": {
"x": 0,
"y": -180,
"z": 0
},
"sizeR": {
"x": 0.8,
"y": 0.8,
"z": 0.8
},
"sizeL": {
"x": 0.8,
"y": 0.8,
"z": 0.8
},
"perf": "",
"cg": "",
"skip": true
},
{
"id": 10001009,
"groupid": 10001,
"before": 10001006,
"next": -1,
"type": 2,
"bg": "jqdh_bg01",
"place": 0,
"speak": "14007",
"listen": "",
"des": "一会儿见。",
"modelstatetarget": "",
"modelstate": 0,
"modelaction": "",
"speakstate": "",
"listenstate": "",
"chose": [],
"turn": 0,
"show": 0,
"move": "",
"action": "",
"sound": "",
"positionR": {
"x": 0.5,
"y": 0.5,
"z": 0
},
"positionL": {
"x": 0,
"y": 0,
"z": 0
},
"revolveR": {
"x": 0,
"y": -180,
"z": 0
},
"revolveL": {
"x": 0,
"y": -180,
"z": 0
},
"sizeR": {
"x": 0.8,
"y": 0.8,
"z": 0.8
},
"sizeL": {
"x": 0.8,
"y": 0.8,
"z": 0.8
},
"perf": "",
"cg": "",
"skip": true
},
{
"id": 10001010,
"groupid": 10001,
"before": 10001004,
"next": -1,
"type": 2,
"bg": "jqdh_bg01",
"place": 0,
"speak": "14007",
"listen": "",
"des": "卖面条也是非常高尚的职业!",
"modelstatetarget": "",
"modelstate": 0,
"modelaction": "",
"speakstate": "",
"listenstate": "",
"chose": [
10001011,
10001012
],
"turn": 0,
"show": 0,
"move": "",
"action": "",
"sound": "",
"positionR": {
"x": 0.5,
"y": 0.5,
"z": 0
},
"positionL": {
"x": 0,
"y": 0,
"z": 0
},
"revolveR": {
"x": 0,
"y": -180,
"z": 0
},
"revolveL": {
"x": 0,
"y": -180,
"z": 0
},
"sizeR": {
"x": 0.8,
"y": 0.8,
"z": 0.8
},
"sizeL": {
"x": 0.8,
"y": 0.8,
"z": 0.8
},
"perf": "",
"cg": "",
"skip": true
},
{
"id": 10001011,
"groupid": 10001,
"before": 10001010,
"next": 10001013,
"type": 5,
"bg": "jqdh_bg01",
"place": 0,
"speak": "14007",
"listen": "",
"des": "别卖面条了,你是神龙大侠!",
"modelstatetarget": "",
"modelstate": 0,
"modelaction": "",
"speakstate": "",
"listenstate": "",
"chose": [],
"turn": 0,
"show": 0,
"move": "",
"action": "",
"sound": "",
"positionR": {
"x": 0.5,
"y": 0.5,
"z": 0
},
"positionL": {
"x": 0,
"y": 0,
"z": 0
},
"revolveR": {
"x": 0,
"y": -180,
"z": 0
},
"revolveL": {
"x": 0,
"y": -180,
"z": 0
},
"sizeR": {
"x": 0.8,
"y": 0.8,
"z": 0.8
},
"sizeL": {
"x": 0.8,
"y": 0.8,
"z": 0.8
},
"perf": "",
"cg": "",
"skip": true
},
{
"id": 10001012,
"groupid": 10001,
"before": 10001010,
"next": 10001014,
"type": 5,
"bg": "jqdh_bg01",
"place": 0,
"speak": "14007",
"listen": "",
"des": "啊对对对。",
"modelstatetarget": "",
"modelstate": 0,
"modelaction": "",
"speakstate": "",
"listenstate": "",
"chose": [],
"turn": 0,
"show": 0,
"move": "",
"action": "",
"sound": "",
"positionR": {
"x": 0.5,
"y": 0.5,
"z": 0
},
"positionL": {
"x": 0,
"y": 0,
"z": 0
},
"revolveR": {
"x": 0,
"y": -180,
"z": 0
},
"revolveL": {
"x": 0,
"y": -180,
"z": 0
},
"sizeR": {
"x": 0.8,
"y": 0.8,
"z": 0.8
},
"sizeL": {
"x": 0.8,
"y": 0.8,
"z": 0.8
},
"perf": "",
"cg": "",
"skip": true
},
{
"id": 10001013,
"groupid": 10001,
"before": 10001011,
"next": -1,
"type": 2,
"bg": "jqdh_bg01",
"place": 0,
"speak": "14007",
"listen": "",
"des": "你怎么剧透呢!",
"modelstatetarget": "",
"modelstate": 0,
"modelaction": "",
"speakstate": "",
"listenstate": "",
"chose": [],
"turn": 0,
"show": 0,
"move": "",
"action": "",
"sound": "",
"positionR": {
"x": 0.5,
"y": 0.5,
"z": 0
},
"positionL": {
"x": 0,
"y": 0,
"z": 0
},
"revolveR": {
"x": 0,
"y": -180,
"z": 0
},
"revolveL": {
"x": 0,
"y": -180,
"z": 0
},
"sizeR": {
"x": 0.8,
"y": 0.8,
"z": 0.8
},
"sizeL": {
"x": 0.8,
"y": 0.8,
"z": 0.8
},
"perf": "",
"cg": "",
"skip": true
},
{
"id": 10001014,
"groupid": 10001,
"before": 10001012,
"next": -1,
"type": 2,
"bg": "jqdh_bg01",
"place": 0,
"speak": "14007",
"listen": "",
"des": "你小子是来搞事的吧...",
"modelstatetarget": "",
"modelstate": 0,
"modelaction": "",
"speakstate": "",
"listenstate": "",
"chose": [],
"turn": 0,
"show": 0,
"move": "",
"action": "",
"sound": "",
"positionR": {
"x": 0.5,
"y": 0.5,
"z": 0
},
"positionL": {
"x": 0,
"y": 0,
"z": 0
},
"revolveR": {
"x": 0,
"y": -180,
"z": 0
},
"revolveL": {
"x": 0,
"y": -180,
"z": 0
},
"sizeR": {
"x": 0.8,
"y": 0.8,
"z": 0.8
},
"sizeL": {
"x": 0.8,
"y": 0.8,
"z": 0.8
},
"perf": "",
"cg": "",
"skip": true
}
]

View File

@ -11,7 +11,6 @@ import (
"go_dreamfactory/utils"
"go.mongodb.org/mongo-driver/bson"
"go.mongodb.org/mongo-driver/mongo"
)
func NewModule() core.IModule {
@ -356,10 +355,10 @@ func (this *Hero) QueryCrossHeroinfo(oid string) (hero *pb.DBHero, err error) {
"_id": oid,
})
hero = &pb.DBHero{}
if err = sr.Decode(hero); err != nil {
if err != mongo.ErrNoDocuments {
return
}
if err = sr.Decode(hero); err == nil {
return
} else {
this.modelHero.moduleHero.Errorf("find hero error: %v", err)
}
}
} else { // 不是跨服就查本服
@ -368,9 +367,8 @@ func (this *Hero) QueryCrossHeroinfo(oid string) (hero *pb.DBHero, err error) {
}); res == nil {
hero = &pb.DBHero{}
if err = res.Decode(hero); err != nil {
if err != mongo.ErrNoDocuments {
return
}
this.modelHero.moduleHero.Errorf("find hero error: %v", err)
return
}
}
}

View File

@ -3,6 +3,7 @@ package timer
import (
"go_dreamfactory/comm"
"go_dreamfactory/modules"
"time"
"go_dreamfactory/lego/core"
"go_dreamfactory/lego/sys/cron"
@ -12,6 +13,7 @@ type SeasonPagoda struct {
modules.MCompModel
service core.IService
dbName string
module *Timer
}
//组件初始化接口
@ -19,16 +21,23 @@ func (this *SeasonPagoda) Init(service core.IService, module core.IModule, comp
this.TableName = comm.TableSeasonPagoda
this.MCompModel.Init(service, module, comp, options)
this.service = service
this.module = module.(*Timer)
return
}
func (this *SeasonPagoda) Start() (err error) {
err = this.MCompModel.Start()
cron.AddFunc("0 0 23 L * ?", this.Timer) //每月最后一天23点执行一次
cron.AddFunc("0 0 23 L * ?", this.TimerSeasonOver) //每月最后一天23点执行一次
cron.AddFunc("0 0 5 /* * ?", this.TimerSeasonStar) //每月第一天5点执行一次
return
}
// 处理排行榜排序
func (this *SeasonPagoda) Timer() {
// // 赛季塔结束
func (this *SeasonPagoda) TimerSeasonOver() {
this.module.Debugf("TimerSeasonOver:%d", time.Now().Unix())
}
// 赛季塔开始
func (this *SeasonPagoda) TimerSeasonStar() {
this.module.Debugf("TimerSeasonStar:%d", time.Now().Unix())
}