上传日志输出规范调整

This commit is contained in:
liwei1dao 2022-08-11 09:59:25 +08:00
parent 55127dc69b
commit fe159fb96e
20 changed files with 175 additions and 116 deletions

View File

@ -60,7 +60,7 @@ func newOptions(config map[string]interface{}, opts ...Option) (options *Options
o(options) o(options)
} }
if options.Log = log.NewTurnlog(options.Debug, log.Clone("sys.discovery", 2)); options.Log == nil { if options.Log = log.NewTurnlog(options.Debug, log.Clone("sys.gin", 3)); options.Log == nil {
err = errors.New("log is nil") err = errors.New("log is nil")
} }
@ -78,7 +78,7 @@ func newOptionsByOption(opts ...Option) (options *Options, err error) {
o(options) o(options)
} }
if options.Log = log.NewTurnlog(options.Debug, log.Clone("sys.discovery", 2)); options.Log == nil { if options.Log = log.NewTurnlog(options.Debug, log.Clone("sys.gin", 3)); options.Log == nil {
err = errors.New("log is nil") err = errors.New("log is nil")
} }

View File

@ -52,6 +52,7 @@ func GetWriter() codecore.IWriter {
} }
func PutWriter(w codecore.IWriter) { func PutWriter(w codecore.IWriter) {
w.Reset()
writerPool.Put(w) writerPool.Put(w)
} }

View File

@ -35,8 +35,10 @@ func (this *apiComp) Send(session comm.IUserSession, req *pb.ChatSendReq) (code
Id: primitive.NewObjectID().Hex(), Id: primitive.NewObjectID().Hex(),
Channel: req.Channel, Channel: req.Channel,
Suid: session.GetUserId(), Suid: session.GetUserId(),
Stag: session.GetServiecTag(), Slv: req.Ulv,
Uname: req.Uname,
Avatar: req.Avatar, Avatar: req.Avatar,
Stag: session.GetServiecTag(),
Content: req.Content, Content: req.Content,
Ctime: time.Now().Unix(), Ctime: time.Now().Unix(),
} }

View File

@ -3,7 +3,6 @@ package mainline
import ( import (
"go_dreamfactory/lego/core" "go_dreamfactory/lego/core"
"go_dreamfactory/lego/core/cbase" "go_dreamfactory/lego/core/cbase"
"go_dreamfactory/lego/sys/log"
"go_dreamfactory/sys/configure" "go_dreamfactory/sys/configure"
cfg "go_dreamfactory/sys/configure/structs" cfg "go_dreamfactory/sys/configure/structs"
) )
@ -18,6 +17,7 @@ const (
///配置管理基础组件 ///配置管理基础组件
type configureComp struct { type configureComp struct {
cbase.ModuleCompBase cbase.ModuleCompBase
module *Mainline
} }
//组件初始化接口 //组件初始化接口
@ -29,7 +29,7 @@ func (this *configureComp) Init(service core.IService, module core.IModule, comp
game_mainlinehard: cfg.NewGame_mainlineHard, game_mainlinehard: cfg.NewGame_mainlineHard,
game_mainlinepurgatory: cfg.NewGame_mainlinePurgatory, game_mainlinepurgatory: cfg.NewGame_mainlinePurgatory,
}) })
this.module = module.(*Mainline)
return return
} }
@ -38,7 +38,7 @@ func (this *configureComp) LoadMultiConfigure(confs map[string]interface{}) (err
for k, v := range confs { for k, v := range confs {
err = configure.RegisterConfigure(k, v) err = configure.RegisterConfigure(k, v)
if err != nil { if err != nil {
log.Errorf("配置文件:%s解析失败!", k) this.module.Errorf("配置文件:%s解析失败!", k)
break break
} }
} }
@ -52,7 +52,7 @@ func (this *configureComp) GetConfigure(name string) (v interface{}, err error)
func (this *configureComp) GetMainlineChapter(id int32) (data *cfg.Game_mainlineChapterData) { func (this *configureComp) GetMainlineChapter(id int32) (data *cfg.Game_mainlineChapterData) {
if v, err := this.GetConfigure(game_mainlinechapter); err != nil { if v, err := this.GetConfigure(game_mainlinechapter); err != nil {
log.Errorf("get global conf err:%v", err) this.module.Errorf("get global conf err:%v", err)
return return
} else { } else {
var ( var (
@ -60,7 +60,7 @@ func (this *configureComp) GetMainlineChapter(id int32) (data *cfg.Game_mainline
ok bool ok bool
) )
if configure, ok = v.(*cfg.Game_mainlineChapter); !ok { if configure, ok = v.(*cfg.Game_mainlineChapter); !ok {
log.Errorf("%T no is *cfg.Game_mainlineChapterData", v) this.module.Errorf("%T no is *cfg.Game_mainlineChapterData", v)
return return
} }
@ -74,7 +74,7 @@ func (this *configureComp) GetMainlineChapter(id int32) (data *cfg.Game_mainline
// 获取简单的关卡配置信息 // 获取简单的关卡配置信息
func (this *configureComp) GetMainlineEasyChapter(id int32) (data *cfg.Game_mainlineEasyData) { func (this *configureComp) GetMainlineEasyChapter(id int32) (data *cfg.Game_mainlineEasyData) {
if v, err := this.GetConfigure(game_mainlineeasy); err != nil { if v, err := this.GetConfigure(game_mainlineeasy); err != nil {
log.Errorf("get global conf err:%v", err) this.module.Errorf("get global conf err:%v", err)
return return
} else { } else {
var ( var (
@ -82,7 +82,7 @@ func (this *configureComp) GetMainlineEasyChapter(id int32) (data *cfg.Game_main
ok bool ok bool
) )
if configure, ok = v.(*cfg.Game_mainlineEasy); !ok { if configure, ok = v.(*cfg.Game_mainlineEasy); !ok {
log.Errorf("%T no is *cfg.Game_mainlineEasyData", v) this.module.Errorf("%T no is *cfg.Game_mainlineEasyData", v)
return return
} }
@ -96,7 +96,7 @@ func (this *configureComp) GetMainlineEasyChapter(id int32) (data *cfg.Game_main
// 获取炼狱级别难度的关卡配置 // 获取炼狱级别难度的关卡配置
func (this *configureComp) GetMainlinePurgatoryChapter(id int32) (data *cfg.Game_mainlinePurgatoryData) { func (this *configureComp) GetMainlinePurgatoryChapter(id int32) (data *cfg.Game_mainlinePurgatoryData) {
if v, err := this.GetConfigure(game_mainlinepurgatory); err != nil { if v, err := this.GetConfigure(game_mainlinepurgatory); err != nil {
log.Errorf("get global conf err:%v", err) this.module.Errorf("get global conf err:%v", err)
return return
} else { } else {
var ( var (
@ -104,7 +104,7 @@ func (this *configureComp) GetMainlinePurgatoryChapter(id int32) (data *cfg.Game
ok bool ok bool
) )
if configure, ok = v.(*cfg.Game_mainlinePurgatory); !ok { if configure, ok = v.(*cfg.Game_mainlinePurgatory); !ok {
log.Errorf("%T no is *cfg.Game_mainlinePurgatoryData", v) this.module.Errorf("%T no is *cfg.Game_mainlinePurgatoryData", v)
return return
} }
@ -118,7 +118,7 @@ func (this *configureComp) GetMainlinePurgatoryChapter(id int32) (data *cfg.Game
// 获取困难的关卡配置 // 获取困难的关卡配置
func (this *configureComp) GetMainlineHardChapter(id int32) (data *cfg.Game_mainlineHardData) { func (this *configureComp) GetMainlineHardChapter(id int32) (data *cfg.Game_mainlineHardData) {
if v, err := this.GetConfigure(game_mainlinehard); err != nil { if v, err := this.GetConfigure(game_mainlinehard); err != nil {
log.Errorf("get global conf err:%v", err) this.module.Errorf("get global conf err:%v", err)
return return
} else { } else {
var ( var (
@ -126,7 +126,7 @@ func (this *configureComp) GetMainlineHardChapter(id int32) (data *cfg.Game_main
ok bool ok bool
) )
if configure, ok = v.(*cfg.Game_mainlineHard); !ok { if configure, ok = v.(*cfg.Game_mainlineHard); !ok {
log.Errorf("%T no is *cfg.Game_mainlineHardData", v) this.module.Errorf("%T no is *cfg.Game_mainlineHardData", v)
return return
} }

View File

@ -2,7 +2,6 @@ package task
import ( import (
"go_dreamfactory/comm" "go_dreamfactory/comm"
"go_dreamfactory/lego/sys/log"
"go_dreamfactory/pb" "go_dreamfactory/pb"
"google.golang.org/protobuf/proto" "google.golang.org/protobuf/proto"
@ -72,7 +71,7 @@ func (this *apiComp) ActiveReceive(session comm.IUserSession, req *pb.TaskActive
ua.Id, ua.Id,
comm.TaskTag(req.TaskTag), comm.TaskTag(req.TaskTag),
update); err != nil { update); err != nil {
log.Errorf("updateReceive err %v", err) this.moduleTask.Errorf("updateReceive err %v", err)
code = pb.ErrorCode_DBError code = pb.ErrorCode_DBError
return return
} }

View File

@ -3,7 +3,6 @@ package task
import ( import (
"go_dreamfactory/comm" "go_dreamfactory/comm"
"go_dreamfactory/lego/core" "go_dreamfactory/lego/core"
"go_dreamfactory/lego/sys/log"
"go_dreamfactory/modules" "go_dreamfactory/modules"
"go_dreamfactory/pb" "go_dreamfactory/pb"
@ -35,7 +34,7 @@ func (this *ModelTaskActive) initActiveReward(uid string) {
RId: conf.Key, RId: conf.Key,
} }
if err := this.moduleTask.modelTaskActive.AddList(uid, ta.Id, ta); err != nil { if err := this.moduleTask.modelTaskActive.AddList(uid, ta.Id, ta); err != nil {
log.Errorf("uid:%v tag:%v initActiv add err %v", uid, err) this.moduleTask.Errorf("uid:%v tag:%v initActiv add err %v", uid, err)
return return
} }
} }
@ -45,7 +44,7 @@ func (this *ModelTaskActive) initActiveReward(uid string) {
func (this *ModelTaskActive) getActiveListByTag(uid string, taskTag comm.TaskTag) (list []*pb.DBTaskActive) { func (this *ModelTaskActive) getActiveListByTag(uid string, taskTag comm.TaskTag) (list []*pb.DBTaskActive) {
al := []*pb.DBTaskActive{} al := []*pb.DBTaskActive{}
if err := this.GetList(uid, &al); err != nil { if err := this.GetList(uid, &al); err != nil {
log.Errorf("getUserActiveList err:%v", err) this.moduleTask.Errorf("getUserActiveList err:%v", err)
return al return al
} }
@ -79,13 +78,13 @@ func (this *ModelTaskActive) updateReceive(uid, id string, taskTag comm.TaskTag,
//清空任务 //清空任务
func (this *ModelTaskActive) clearTask(uid string, taskTag ...comm.TaskTag) { func (this *ModelTaskActive) clearTask(uid string, taskTag ...comm.TaskTag) {
if len(taskTag) == 0 { if len(taskTag) == 0 {
log.Errorf("least one param for taskTag") this.moduleTask.Errorf("least one param for taskTag")
return return
} }
data := this.getActiveListByTag(uid, taskTag[0]) data := this.getActiveListByTag(uid, taskTag[0])
for _, v := range data { for _, v := range data {
if err := this.moduleTask.modelTaskActive.DelListlds(uid, v.Id); err != nil { if err := this.moduleTask.modelTaskActive.DelListlds(uid, v.Id); err != nil {
log.Errorf("uid: %v err:%v", uid, err) this.moduleTask.Errorf("uid: %v err:%v", uid, err)
return return
} }
} }

View File

@ -27,7 +27,7 @@ func (this *ModelTask) Init(service core.IService, module core.IModule, comp cor
func (this *ModelTask) getTaskListByTag(uid string, taskTag comm.TaskTag) (newlist []*pb.DBTask) { func (this *ModelTask) getTaskListByTag(uid string, taskTag comm.TaskTag) (newlist []*pb.DBTask) {
list := []*pb.DBTask{} list := []*pb.DBTask{}
if err := this.GetList(uid, &list); err != nil { if err := this.GetList(uid, &list); err != nil {
log.Errorf("getTaskList err %v", err) this.moduleTask.Errorf("getTaskList err %v", err)
return return
} }
@ -96,7 +96,7 @@ func (this *ModelTask) getTaskListByTag(uid string, taskTag comm.TaskTag) (newli
func (this *ModelTask) getTaskById(uid string, taskId int32) (newlist []*pb.DBTask) { func (this *ModelTask) getTaskById(uid string, taskId int32) (newlist []*pb.DBTask) {
list := []*pb.DBTask{} list := []*pb.DBTask{}
if err := this.GetList(uid, &list); err != nil { if err := this.GetList(uid, &list); err != nil {
log.Errorf("getTaskById err %v", err) this.moduleTask.Errorf("getTaskById err %v", err)
return return
} }
@ -124,7 +124,7 @@ func (this *ModelTask) initTask(uid string) error {
Sort: cnf.IdList, Sort: cnf.IdList,
} }
if err := this.AddList(uid, task.Id, task); err != nil { if err := this.AddList(uid, task.Id, task); err != nil {
log.Errorf("initTask addlists err %v", err) this.moduleTask.Errorf("initTask addlists err %v", err)
return err return err
} }
} }
@ -136,7 +136,7 @@ func (this *ModelTask) initTask(uid string) error {
func (this *ModelTask) getUserTask(uid string, taskId string) *pb.DBTask { func (this *ModelTask) getUserTask(uid string, taskId string) *pb.DBTask {
userTask := &pb.DBTask{} userTask := &pb.DBTask{}
if err := this.moduleTask.modelTask.GetListObj(uid, taskId, userTask); err != nil { if err := this.moduleTask.modelTask.GetListObj(uid, taskId, userTask); err != nil {
log.Errorf("getUserTask err:%v", err) this.moduleTask.Errorf("getUserTask err:%v", err)
return nil return nil
} }
return userTask return userTask
@ -167,7 +167,7 @@ func (this *ModelTask) checkTask(uid string, taskId int32) (*pb.DBTask, bool) {
//更改用户任务 //更改用户任务
func (this *ModelTask) modifyUserTask(uid string, taskId string, data map[string]interface{}) error { func (this *ModelTask) modifyUserTask(uid string, taskId string, data map[string]interface{}) error {
if err := this.ChangeList(uid, taskId, data); err != nil { if err := this.ChangeList(uid, taskId, data); err != nil {
log.Errorf("err %v", err) this.moduleTask.Errorf("err %v", err)
return err return err
} }
return nil return nil
@ -176,13 +176,13 @@ func (this *ModelTask) modifyUserTask(uid string, taskId string, data map[string
//清空任务 //清空任务
func (this *ModelTask) clearTask(uid string, taskTag ...comm.TaskTag) { func (this *ModelTask) clearTask(uid string, taskTag ...comm.TaskTag) {
if len(taskTag) == 0 { if len(taskTag) == 0 {
log.Errorf("least one param for taskTag") this.moduleTask.Errorf("least one param for taskTag")
return return
} }
taskList := this.getTaskListByTag(uid, taskTag[0]) taskList := this.getTaskListByTag(uid, taskTag[0])
for _, v := range taskList { for _, v := range taskList {
if err := this.moduleTask.modelTask.DelListlds(uid, v.Id); err != nil { if err := this.moduleTask.modelTask.DelListlds(uid, v.Id); err != nil {
log.Errorf("uid: %v err:%v", uid, err) this.moduleTask.Errorf("uid: %v err:%v", uid, err)
return return
} }
} }
@ -260,7 +260,7 @@ func (this *ModelTask) UpHeroLevel(uid string, taskId int32, tp *pb.TaskParam) *
"progress": progress, "progress": progress,
} }
if err := this.modifyUserTask(task.Uid, task.Id, update); err != nil { if err := this.modifyUserTask(task.Uid, task.Id, update); err != nil {
log.Errorf("err %v", err) this.moduleTask.Errorf("err %v", err)
return nil return nil
} }
task.Progress = progress task.Progress = progress
@ -274,7 +274,7 @@ func (this *ModelTask) UpHeroLevel(uid string, taskId int32, tp *pb.TaskParam) *
func (this *ModelTask) doTaskHandle(uid string, taskType comm.TaskType, taskParam *pb.TaskParam) (tasks []*pb.DBTask, err error) { func (this *ModelTask) doTaskHandle(uid string, taskType comm.TaskType, taskParam *pb.TaskParam) (tasks []*pb.DBTask, err error) {
data, err := this.moduleTask.configure.getTasks(int32(taskType)) data, err := this.moduleTask.configure.getTasks(int32(taskType))
if err != nil { if err != nil {
log.Errorf("taskHandle err %v", err) this.moduleTask.Errorf("taskHandle err %v", err)
return nil, err return nil, err
} }

View File

@ -3,7 +3,6 @@ package user
import ( import (
"go_dreamfactory/comm" "go_dreamfactory/comm"
"go_dreamfactory/lego/core" "go_dreamfactory/lego/core"
"go_dreamfactory/lego/sys/log"
"go_dreamfactory/lego/sys/redis" "go_dreamfactory/lego/sys/redis"
"go_dreamfactory/modules" "go_dreamfactory/modules"
"go_dreamfactory/pb" "go_dreamfactory/pb"
@ -26,7 +25,7 @@ func (this *ModelExpand) Init(service core.IService, module core.IModule, comp c
func (this *ModelExpand) getUserSession(uid string) (cuser *pb.CacheUser) { func (this *ModelExpand) getUserSession(uid string) (cuser *pb.CacheUser) {
cuser = &pb.CacheUser{} cuser = &pb.CacheUser{}
if err := this.Get(uid, cuser); err != nil { if err := this.Get(uid, cuser); err != nil {
log.Errorf("GetUserSession err:%v", err) this.moduleUser.Errorf("GetUserSession err:%v", err)
return return
} }
return return

View File

@ -3,18 +3,19 @@ package user
import ( import (
"go_dreamfactory/comm" "go_dreamfactory/comm"
"go_dreamfactory/lego/core" "go_dreamfactory/lego/core"
"go_dreamfactory/lego/sys/log"
"go_dreamfactory/modules" "go_dreamfactory/modules"
"go_dreamfactory/pb" "go_dreamfactory/pb"
) )
type ModelSession struct { type ModelSession struct {
modules.MCompModel modules.MCompModel
module *User
} }
func (this *ModelSession) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) { func (this *ModelSession) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
this.TableName = comm.TableSession this.TableName = comm.TableSession
err = this.MCompModel.Init(service, module, comp, options) err = this.MCompModel.Init(service, module, comp, options)
this.module = module.(*User)
return return
} }
@ -22,7 +23,7 @@ func (this *ModelSession) Init(service core.IService, module core.IModule, comp
func (this *ModelSession) getUserSession(uid string) (cuser *pb.CacheUser) { func (this *ModelSession) getUserSession(uid string) (cuser *pb.CacheUser) {
cuser = &pb.CacheUser{} cuser = &pb.CacheUser{}
if err := this.Get(uid, cuser); err != nil { if err := this.Get(uid, cuser); err != nil {
log.Errorf("GetUserSession err:%v", err) this.module.Errorf("GetUserSession err:%v", err)
return return
} }
return return

View File

@ -72,7 +72,7 @@ func (this *ModelUser) User_Create(user *pb.DBUser) (err error) {
func (this *ModelUser) GetUser(uid string) (user *pb.DBUser) { func (this *ModelUser) GetUser(uid string) (user *pb.DBUser) {
user = &pb.DBUser{} user = &pb.DBUser{}
if err := this.Get(uid, user); err != nil { if err := this.Get(uid, user); err != nil {
log.Errorf("getUser err:%v", err) this.moduleUser.Errorf("getUser err:%v", err)
return return
} }
return return
@ -87,7 +87,7 @@ func (this *ModelUser) updateUserAttr(uid string, data map[string]interface{}) e
func (this *ModelUser) isLoginFirst(timestamp int64) bool { func (this *ModelUser) isLoginFirst(timestamp int64) bool {
now := time.Now() now := time.Now()
if timestamp == 0 || timestamp > now.Unix() { if timestamp == 0 || timestamp > now.Unix() {
log.Debugf("lastlogin time great now") this.moduleUser.Debugf("lastlogin time great now")
return false return false
} }
tt := time.Unix(timestamp, 0) tt := time.Unix(timestamp, 0)

View File

@ -8,7 +8,6 @@ import (
"go_dreamfactory/lego/core" "go_dreamfactory/lego/core"
"go_dreamfactory/lego/sys/event" "go_dreamfactory/lego/sys/event"
"go_dreamfactory/lego/sys/log"
) )
func NewModule() core.IModule { func NewModule() core.IModule {
@ -97,7 +96,7 @@ func (this *User) QueryAttributeValue(uid string, attr string) (value int32) {
//用户资源 //用户资源
func (this *User) AddAttributeValue(session comm.IUserSession, attr string, add int32, bPush bool) (code pb.ErrorCode) { func (this *User) AddAttributeValue(session comm.IUserSession, attr string, add int32, bPush bool) (code pb.ErrorCode) {
if add == 0 { if add == 0 {
log.Errorf("attr no changed,uid: %s attr: %s add: %d", session.GetUserId(), attr, add) this.Errorf("attr no changed,uid: %s attr: %s add: %d", session.GetUserId(), attr, add)
return return
} }
user := this.GetUser(session.GetUserId()) user := this.GetUser(session.GetUserId())
@ -147,11 +146,11 @@ func (this *User) AddAttributeValue(session comm.IUserSession, attr string, add
} }
if len(update) == 0 { if len(update) == 0 {
log.Warn("AddAttributeValue param is empty") this.Warn("AddAttributeValue param is empty")
return return
} }
if err := this.modelUser.updateUserAttr(session.GetUserId(), update); err != nil { if err := this.modelUser.updateUserAttr(session.GetUserId(), update); err != nil {
log.Errorf("AddAttributeValue err:%v", err) this.Errorf("AddAttributeValue err:%v", err)
code = pb.ErrorCode_DBError code = pb.ErrorCode_DBError
} }
@ -178,7 +177,7 @@ func (this *User) AddAttributeValues(session comm.IUserSession, attrs map[string
update := make(map[string]interface{}) update := make(map[string]interface{})
for key, add := range attrs { for key, add := range attrs {
if add == 0 { if add == 0 {
log.Errorf("attr no changed,uid: %s attr: %s add: %d", session.GetUserId(), key, add) this.Errorf("attr no changed,uid: %s attr: %s add: %d", session.GetUserId(), key, add)
continue continue
} }
switch key { switch key {
@ -215,11 +214,11 @@ func (this *User) AddAttributeValues(session comm.IUserSession, attrs map[string
} }
if len(update) == 0 { if len(update) == 0 {
log.Warn("AddAttributeValue param is empty") this.Warn("AddAttributeValue param is empty")
return return
} }
if err := this.modelUser.updateUserAttr(session.GetUserId(), update); err != nil { if err := this.modelUser.updateUserAttr(session.GetUserId(), update); err != nil {
log.Errorf("AddAttributeValue err:%v", err) this.Errorf("AddAttributeValue err:%v", err)
code = pb.ErrorCode_DBError code = pb.ErrorCode_DBError
} }

View File

@ -3,7 +3,6 @@ package web
import ( import (
"go_dreamfactory/lego/sys/gin" "go_dreamfactory/lego/sys/gin"
"go_dreamfactory/lego/sys/gin/engine" "go_dreamfactory/lego/sys/gin/engine"
"go_dreamfactory/lego/sys/log"
"go_dreamfactory/pb" "go_dreamfactory/pb"
"net/http" "net/http"
) )
@ -25,7 +24,7 @@ func (this *Api_Comp) CreateNotify(c *engine.Context) {
) )
defer c.JSON(http.StatusOK, &Respond{Code: code, Message: msg, Data: data}) defer c.JSON(http.StatusOK, &Respond{Code: code, Message: msg, Data: data})
if sign := gin.ParamSign(this.options.Key, map[string]interface{}{"Title": req.Title, "Ctime": req.Ctime, "Rtime": req.Rtime}); sign != req.Sign { if sign := gin.ParamSign(this.options.Key, map[string]interface{}{"Title": req.Title, "Ctime": req.Ctime, "Rtime": req.Rtime}); sign != req.Sign {
log.Errorf("LoginByCaptchaReq SignError sgin:%s", sign) this.module.Errorf("LoginByCaptchaReq SignError sgin:%s", sign)
code = pb.ErrorCode_SignError code = pb.ErrorCode_SignError
msg = pb.GetErrorCodeMsg(code) msg = pb.GetErrorCodeMsg(code)
return return
@ -36,7 +35,7 @@ func (this *Api_Comp) CreateNotify(c *engine.Context) {
return return
} }
if err = this.module.modelNotify.CreateSystemNotify(&req.DBSystemNotify); err != nil { if err = this.module.modelNotify.CreateSystemNotify(&req.DBSystemNotify); err != nil {
log.Errorf("LoginByCaptchaReq CreateSystemNotify err:%v", err) this.module.Errorf("LoginByCaptchaReq CreateSystemNotify err:%v", err)
code = pb.ErrorCode_DBError code = pb.ErrorCode_DBError
msg = pb.GetErrorCodeMsg(code) msg = pb.GetErrorCodeMsg(code)
return return

View File

@ -3,7 +3,6 @@ package web
import ( import (
"go_dreamfactory/lego/sys/gin" "go_dreamfactory/lego/sys/gin"
"go_dreamfactory/lego/sys/gin/engine" "go_dreamfactory/lego/sys/gin/engine"
"go_dreamfactory/lego/sys/log"
"go_dreamfactory/pb" "go_dreamfactory/pb"
"net/http" "net/http"
) )
@ -34,7 +33,7 @@ func (this *Api_Comp) CreateMail(c *engine.Context) {
"Reward": req.Reward, "Reward": req.Reward,
"Items": req.Items, "Items": req.Items,
}); sign != req.Sign { }); sign != req.Sign {
log.Errorf("LoginByCaptchaReq SignError sgin:%s", sign) this.module.Errorf("LoginByCaptchaReq SignError sgin:%s", sign)
code = pb.ErrorCode_SignError code = pb.ErrorCode_SignError
msg = pb.GetErrorCodeMsg(code) msg = pb.GetErrorCodeMsg(code)
return return
@ -45,7 +44,7 @@ func (this *Api_Comp) CreateMail(c *engine.Context) {
return return
} }
if err = this.module.modelMail.CreateGMMail(&req.DBMailData); err != nil { if err = this.module.modelMail.CreateGMMail(&req.DBMailData); err != nil {
log.Errorf("LoginByCaptchaReq CreateMail err:%v", err) this.module.Errorf("LoginByCaptchaReq CreateMail err:%v", err)
code = pb.ErrorCode_DBError code = pb.ErrorCode_DBError
msg = pb.GetErrorCodeMsg(code) msg = pb.GetErrorCodeMsg(code)
return return

View File

@ -2,7 +2,6 @@ package web
import ( import (
"go_dreamfactory/lego/sys/gin/engine" "go_dreamfactory/lego/sys/gin/engine"
"go_dreamfactory/lego/sys/log"
"go_dreamfactory/pb" "go_dreamfactory/pb"
"net/http" "net/http"
) )
@ -19,7 +18,7 @@ func (this *Api_Comp) Register(c *engine.Context) {
Sid: req.Sid, Sid: req.Sid,
}) })
if err != nil { if err != nil {
log.Errorf("create user err: %v", err) this.module.Errorf("create user err: %v", err)
rsp.Code = pb.ErrorCode_SqlExecutionError rsp.Code = pb.ErrorCode_SqlExecutionError
} }
rsp.Account = req.Account rsp.Account = req.Account

View File

@ -3,7 +3,6 @@ package web
import ( import (
"errors" "errors"
"go_dreamfactory/lego/core" "go_dreamfactory/lego/core"
"go_dreamfactory/lego/sys/log"
"go_dreamfactory/modules" "go_dreamfactory/modules"
"go_dreamfactory/pb" "go_dreamfactory/pb"
@ -30,7 +29,7 @@ func (this *modelMailComp) CreateGMMail(mail *pb.DBMailData) (err error) {
} }
mail.ObjId = primitive.NewObjectID().Hex() mail.ObjId = primitive.NewObjectID().Hex()
if _, err = this.DB.InsertOne(core.SqlTable(this.TableName), mail); err != nil { if _, err = this.DB.InsertOne(core.SqlTable(this.TableName), mail); err != nil {
log.Errorf("CreateGMMail err:%v", err) this.module.Errorln(err)
return return
} }
return return

View File

@ -2,7 +2,6 @@ package web
import ( import (
"go_dreamfactory/lego/core" "go_dreamfactory/lego/core"
"go_dreamfactory/lego/sys/log"
"go_dreamfactory/modules" "go_dreamfactory/modules"
"go_dreamfactory/pb" "go_dreamfactory/pb"
@ -26,11 +25,11 @@ func (this *modelNotifyComp) Init(service core.IService, module core.IModule, co
func (this *modelNotifyComp) CreateSystemNotify(notify *pb.DBSystemNotify) (err error) { func (this *modelNotifyComp) CreateSystemNotify(notify *pb.DBSystemNotify) (err error) {
notify.Id = primitive.NewObjectID().Hex() notify.Id = primitive.NewObjectID().Hex()
if _, err = this.DB.InsertOne(core.SqlTable(this.TableName), notify); err != nil { if _, err = this.DB.InsertOne(core.SqlTable(this.TableName), notify); err != nil {
log.Errorf("CreateSystemNotify err:%v", err) this.module.Errorf("CreateSystemNotify err:%v", err)
return return
} }
if err = this.Redis.HSet(this.TableName, notify.Id, notify); err != nil { if err = this.Redis.HSet(this.TableName, notify.Id, notify); err != nil {
log.Errorf("CreateSystemNotify err:%v", err) this.module.Errorf("CreateSystemNotify err:%v", err)
return return
} }
return return

View File

@ -29,7 +29,7 @@ func (this *modelUserComp) User_Create(user *pb.DBUser) (err error) {
now := time.Now().Unix() now := time.Now().Unix()
_id := primitive.NewObjectID().Hex() _id := primitive.NewObjectID().Hex()
user.Id = _id user.Id = _id
user.Uid = fmt.Sprintf("%d_%s", user.Sid, _id) user.Uid = fmt.Sprintf("%s_%s", user.Sid, _id)
user.Uuid = uuid.NewV4().String() user.Uuid = uuid.NewV4().String()
user.Lv = 1 //初始等级 user.Lv = 1 //初始等级
user.Ctime = now user.Ctime = now

View File

@ -1,11 +1,11 @@
package web package web
import ( import (
"fmt"
"go_dreamfactory/comm" "go_dreamfactory/comm"
"go_dreamfactory/lego/core" "go_dreamfactory/lego/core"
"go_dreamfactory/lego/core/cbase" "go_dreamfactory/lego/core/cbase"
"go_dreamfactory/lego/sys/log"
) )
/* /*
@ -54,33 +54,69 @@ func (this *Web) OnInstallComp() {
} }
//日志 //日志
func (this *Web) Debugf(format string, a ...interface{}) { //日志接口
if this.options.GetDebug() { func (this *Web) Debug(msg string, args ...log.Field) {
this.options.GetLog().Debugf(fmt.Sprintf("[Module:%s] ", this.GetType())+format, a...) this.options.GetLog().Debug(msg, args...)
} }
func (this *Web) Info(msg string, args ...log.Field) {
this.options.GetLog().Info(msg, args...)
} }
func (this *Web) Infof(format string, a ...interface{}) { func (this *Web) Print(msg string, args ...log.Field) {
if this.options.GetDebug() { this.options.GetLog().Print(msg, args...)
this.options.GetLog().Infof(fmt.Sprintf("[Module:%s] ", this.GetType())+format, a...)
} }
func (this *Web) Warn(msg string, args ...log.Field) {
this.options.GetLog().Warn(msg, args...)
} }
func (this *Web) Warnf(format string, a ...interface{}) { func (this *Web) Error(msg string, args ...log.Field) {
if this.options.Debug { this.options.GetLog().Error(msg, args...)
this.options.GetLog().Warnf(fmt.Sprintf("[Module:%s] ", this.GetType())+format, a...)
} }
func (this *Web) Panic(msg string, args ...log.Field) {
this.options.GetLog().Panic(msg, args...)
} }
func (this *Web) Errorf(format string, a ...interface{}) { func (this *Web) Fatal(msg string, args ...log.Field) {
if this.options.GetLog() != nil { this.options.GetLog().Fatal(msg, args...)
this.options.GetLog().Errorf(fmt.Sprintf("[Module:%s] ", this.GetType())+format, a...)
} }
func (this *Web) Debugf(format string, args ...interface{}) {
this.options.GetLog().Debugf(format, args...)
} }
func (this *Web) Panicf(format string, a ...interface{}) { func (this *Web) Infof(format string, args ...interface{}) {
if this.options.GetLog() != nil { this.options.GetLog().Infof(format, args...)
this.options.GetLog().Panicf(fmt.Sprintf("[Module:%s] ", this.GetType())+format, a...)
} }
func (this *Web) Printf(format string, args ...interface{}) {
this.options.GetLog().Printf(format, args...)
} }
func (this *Web) Fatalf(format string, a ...interface{}) { func (this *Web) Warnf(format string, args ...interface{}) {
if this.options.GetLog() != nil { this.options.GetLog().Warnf(format, args...)
this.options.GetLog().Fatalf(fmt.Sprintf("[Module:%s] ", this.GetType())+format, a...)
} }
func (this *Web) Errorf(format string, args ...interface{}) {
this.options.GetLog().Errorf(format, args...)
}
func (this *Web) Fatalf(format string, args ...interface{}) {
this.options.GetLog().Fatalf(format, args...)
}
func (this *Web) Panicf(format string, args ...interface{}) {
this.options.GetLog().Panicf(format, args...)
}
func (this *Web) Debugln(args ...interface{}) {
this.options.GetLog().Debugln(args...)
}
func (this *Web) Infoln(args ...interface{}) {
this.options.GetLog().Infoln(args...)
}
func (this *Web) Println(args ...interface{}) {
this.options.GetLog().Println(args...)
}
func (this *Web) Warnln(args ...interface{}) {
this.options.GetLog().Warnln(args...)
}
func (this *Web) Errorln(args ...interface{}) {
this.options.GetLog().Errorln(args...)
}
func (this *Web) Fatalln(args ...interface{}) {
this.options.GetLog().Fatalln(args...)
}
func (this *Web) Panicln(args ...interface{}) {
this.options.GetLog().Panicln(args...)
} }

View File

@ -83,7 +83,8 @@ type DBChat struct {
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id"` //主键id Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id"` //主键id
Channel ChatChannel `protobuf:"varint,2,opt,name=channel,proto3,enum=ChatChannel" json:"channel"` //频道 Channel ChatChannel `protobuf:"varint,2,opt,name=channel,proto3,enum=ChatChannel" json:"channel"` //频道
Suid string `protobuf:"bytes,3,opt,name=suid,proto3" json:"suid"` //发送用户id Suid string `protobuf:"bytes,3,opt,name=suid,proto3" json:"suid"` //发送用户id
Ruid string `protobuf:"bytes,4,opt,name=ruid,proto3" json:"ruid"` //接收用户id channel == Private 有效 Slv int32 `protobuf:"varint,4,opt,name=slv,proto3" json:"slv"` //发送者等级
Ruid string `protobuf:"bytes,5,opt,name=ruid,proto3" json:"ruid"` //接收用户id channel == Private 有效
ChannelId int32 `protobuf:"varint,6,opt,name=channelId,proto3" json:"channelId"` //跨服频道 频道Id ChannelId int32 `protobuf:"varint,6,opt,name=channelId,proto3" json:"channelId"` //跨服频道 频道Id
UnionId string `protobuf:"bytes,7,opt,name=unionId,proto3" json:"unionId"` //工会id UnionId string `protobuf:"bytes,7,opt,name=unionId,proto3" json:"unionId"` //工会id
Stag string `protobuf:"bytes,8,opt,name=stag,proto3" json:"stag"` //区服id Stag string `protobuf:"bytes,8,opt,name=stag,proto3" json:"stag"` //区服id
@ -146,6 +147,13 @@ func (x *DBChat) GetSuid() string {
return "" return ""
} }
func (x *DBChat) GetSlv() int32 {
if x != nil {
return x.Slv
}
return 0
}
func (x *DBChat) GetRuid() string { func (x *DBChat) GetRuid() string {
if x != nil { if x != nil {
return x.Ruid return x.Ruid
@ -206,30 +214,31 @@ var File_chat_chat_db_proto protoreflect.FileDescriptor
var file_chat_chat_db_proto_rawDesc = []byte{ var file_chat_chat_db_proto_rawDesc = []byte{
0x0a, 0x12, 0x63, 0x68, 0x61, 0x74, 0x2f, 0x63, 0x68, 0x61, 0x74, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x0a, 0x12, 0x63, 0x68, 0x61, 0x74, 0x2f, 0x63, 0x68, 0x61, 0x74, 0x5f, 0x64, 0x62, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x22, 0x92, 0x02, 0x0a, 0x06, 0x44, 0x42, 0x43, 0x68, 0x61, 0x74, 0x12, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa4, 0x02, 0x0a, 0x06, 0x44, 0x42, 0x43, 0x68, 0x61, 0x74, 0x12,
0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12,
0x26, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x26, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e,
0x32, 0x0c, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x07, 0x32, 0x0c, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x07,
0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x75, 0x69, 0x64, 0x18, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x75, 0x69, 0x64, 0x18,
0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x75, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x75, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x73,
0x75, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x72, 0x75, 0x69, 0x64, 0x12, 0x6c, 0x76, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x73, 0x6c, 0x76, 0x12, 0x12, 0x0a,
0x1c, 0x0a, 0x09, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x18, 0x06, 0x20, 0x01, 0x04, 0x72, 0x75, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x72, 0x75, 0x69,
0x28, 0x05, 0x52, 0x09, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x18, 0x06,
0x07, 0x75, 0x6e, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x12,
0x75, 0x6e, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x74, 0x61, 0x67, 0x18, 0x18, 0x0a, 0x07, 0x75, 0x6e, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09,
0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x74, 0x61, 0x67, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x52, 0x07, 0x75, 0x6e, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x74, 0x61,
0x76, 0x61, 0x74, 0x61, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x76, 0x61, 0x67, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x74, 0x61, 0x67, 0x12, 0x16, 0x0a,
0x74, 0x61, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x75, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61,
0x28, 0x09, 0x52, 0x05, 0x75, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x76, 0x61, 0x74, 0x61, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x75, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0a,
0x74, 0x65, 0x6e, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x75, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63,
0x65, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f,
0x28, 0x03, 0x52, 0x05, 0x63, 0x74, 0x69, 0x6d, 0x65, 0x2a, 0x4d, 0x0a, 0x0b, 0x43, 0x68, 0x61, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0c,
0x74, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x09, 0x0a, 0x05, 0x57, 0x6f, 0x72, 0x6c, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x74, 0x69, 0x6d, 0x65, 0x2a, 0x4d, 0x0a, 0x0b, 0x43,
0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x55, 0x6e, 0x69, 0x6f, 0x6e, 0x10, 0x01, 0x12, 0x0b, 0x68, 0x61, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x09, 0x0a, 0x05, 0x57, 0x6f,
0x0a, 0x07, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x10, 0x02, 0x12, 0x0f, 0x0a, 0x0b, 0x43, 0x72, 0x6c, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x55, 0x6e, 0x69, 0x6f, 0x6e, 0x10, 0x01,
0x72, 0x6f, 0x73, 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x10, 0x02, 0x12, 0x0f, 0x0a,
0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x10, 0x04, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x0b, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x10, 0x03, 0x12, 0x0a,
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x0a, 0x06, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x10, 0x04, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b,
0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
} }
var ( var (

View File

@ -371,9 +371,10 @@ type ChatSendReq struct {
Avatar string `protobuf:"bytes,1,opt,name=avatar,proto3" json:"avatar"` //用户头像 Avatar string `protobuf:"bytes,1,opt,name=avatar,proto3" json:"avatar"` //用户头像
Uname string `protobuf:"bytes,2,opt,name=uname,proto3" json:"uname"` //用户名 Uname string `protobuf:"bytes,2,opt,name=uname,proto3" json:"uname"` //用户名
Channel ChatChannel `protobuf:"varint,3,opt,name=channel,proto3,enum=ChatChannel" json:"channel"` //频道 Ulv int32 `protobuf:"varint,3,opt,name=ulv,proto3" json:"ulv"` //用户等级
TargetId string `protobuf:"bytes,4,opt,name=targetId,proto3" json:"targetId"` //目标用户id Channel ChatChannel `protobuf:"varint,4,opt,name=channel,proto3,enum=ChatChannel" json:"channel"` //频道
Content string `protobuf:"bytes,5,opt,name=content,proto3" json:"content"` //内容 TargetId string `protobuf:"bytes,5,opt,name=targetId,proto3" json:"targetId"` //目标用户id
Content string `protobuf:"bytes,6,opt,name=content,proto3" json:"content"` //内容
} }
func (x *ChatSendReq) Reset() { func (x *ChatSendReq) Reset() {
@ -422,6 +423,13 @@ func (x *ChatSendReq) GetUname() string {
return "" return ""
} }
func (x *ChatSendReq) GetUlv() int32 {
if x != nil {
return x.Ulv
}
return 0
}
func (x *ChatSendReq) GetChannel() ChatChannel { func (x *ChatSendReq) GetChannel() ChatChannel {
if x != nil { if x != nil {
return x.Channel return x.Channel
@ -448,6 +456,8 @@ type ChatSendResp struct {
state protoimpl.MessageState state protoimpl.MessageState
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
Issucc bool `protobuf:"varint,1,opt,name=issucc,proto3" json:"issucc"` //是否成功
} }
func (x *ChatSendResp) Reset() { func (x *ChatSendResp) Reset() {
@ -482,6 +492,13 @@ func (*ChatSendResp) Descriptor() ([]byte, []int) {
return file_chat_chat_msg_proto_rawDescGZIP(), []int{8} return file_chat_chat_msg_proto_rawDescGZIP(), []int{8}
} }
func (x *ChatSendResp) GetIssucc() bool {
if x != nil {
return x.Issucc
}
return false
}
var File_chat_chat_msg_proto protoreflect.FileDescriptor var File_chat_chat_msg_proto protoreflect.FileDescriptor
var file_chat_chat_msg_proto_rawDesc = []byte{ var file_chat_chat_msg_proto_rawDesc = []byte{
@ -512,19 +529,21 @@ var file_chat_chat_msg_proto_rawDesc = []byte{
0x6e, 0x65, 0x6c, 0x49, 0x64, 0x22, 0x30, 0x0a, 0x0f, 0x43, 0x68, 0x61, 0x74, 0x47, 0x65, 0x74, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x22, 0x30, 0x0a, 0x0f, 0x43, 0x68, 0x61, 0x74, 0x47, 0x65, 0x74,
0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x05, 0x63, 0x68, 0x61, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x05, 0x63, 0x68, 0x61, 0x74,
0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x44, 0x42, 0x43, 0x68, 0x61, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x44, 0x42, 0x43, 0x68, 0x61, 0x74,
0x52, 0x05, 0x63, 0x68, 0x61, 0x74, 0x73, 0x22, 0x99, 0x01, 0x0a, 0x0b, 0x43, 0x68, 0x61, 0x74, 0x52, 0x05, 0x63, 0x68, 0x61, 0x74, 0x73, 0x22, 0xab, 0x01, 0x0a, 0x0b, 0x43, 0x68, 0x61, 0x74,
0x53, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x53, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61,
0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x12, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x12,
0x14, 0x0a, 0x05, 0x75, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x14, 0x0a, 0x05, 0x75, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05,
0x75, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x75, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x6c, 0x76, 0x18, 0x03, 0x20, 0x01,
0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0c, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x43, 0x68, 0x61, 0x28, 0x05, 0x52, 0x03, 0x75, 0x6c, 0x76, 0x12, 0x26, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x6e,
0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x1a, 0x0a, 0x65, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0c, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x43,
0x08, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x12,
0x08, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x1a, 0x0a, 0x08, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x49, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28,
0x74, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x09, 0x52, 0x08, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x63,
0x65, 0x6e, 0x74, 0x22, 0x0e, 0x0a, 0x0c, 0x43, 0x68, 0x61, 0x74, 0x53, 0x65, 0x6e, 0x64, 0x52, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f,
0x65, 0x73, 0x70, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x26, 0x0a, 0x0c, 0x43, 0x68, 0x61, 0x74, 0x53, 0x65, 0x6e,
0x74, 0x6f, 0x33, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, 0x73, 0x75, 0x63, 0x63, 0x18,
0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x73, 0x75, 0x63, 0x63, 0x42, 0x06, 0x5a,
0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
} }
var ( var (