From a54dcebfe9cadf96c203a26483d69eae7de9a586 Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Fri, 17 Jun 2022 14:11:12 +0800 Subject: [PATCH] =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E5=90=8C=E6=AD=A5=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lego/sys/redis/sys_test.go | 23 ++++++----------------- modules/mail/api_delmail.go | 4 ++-- modules/mail/api_getAttachment.go | 4 ++-- modules/mail/api_getmail.go | 4 ++-- modules/mail/api_readmail.go | 4 ++-- modules/pack/api_useItem.go | 2 +- 6 files changed, 15 insertions(+), 26 deletions(-) diff --git a/lego/sys/redis/sys_test.go b/lego/sys/redis/sys_test.go index 9627590f2..b1619f261 100644 --- a/lego/sys/redis/sys_test.go +++ b/lego/sys/redis/sys_test.go @@ -190,12 +190,12 @@ func Test_Redis_Encoder_Hash(t *testing.T) { // fmt.Printf("data:%v err:%v\n", data, err) // redis.HSet("test:1003", "Name", "eeee") - // name := "" - // err := redis.HGet("test:103", "name", &name) - // if err != nil { - // fmt.Println(err) - // } - // fmt.Println(name) + name := "" + err := redis.HGet("test:103", "name", &name) + if err != nil { + fmt.Println(err) + } + fmt.Println(name) // data1 := map[string]*TestData{"li_1": {Name: "liwei2dao", Agr: 56}, "li_2": {Name: "liwei3dao", Agr: 78}} // err := redis.HMSet("test:1004", data1) @@ -203,15 +203,4 @@ func Test_Redis_Encoder_Hash(t *testing.T) { // data2 := make(map[string]*TestData) // err = redis.HGetAll("test:1004", data2) // fmt.Printf("data2:%v err:%v\n", data2, err) - - // d1 := map[string]interface{}{"ll": "1", "age": 20} - // err := redis.HMSet("test:104", d1) - // fmt.Printf("err:%v\n", err) - // d2 := make(map[string]interface{}) - // err := redis.HGetAll("test:105", d2) - // fmt.Printf("data2:%v err:%v\n", d2, err) - - iskeep, err := redis.ExistsKey("test:105") - fmt.Printf("ok:%v err:%v\n", iskeep, err) - } diff --git a/modules/mail/api_delmail.go b/modules/mail/api_delmail.go index 395e112b6..5e2343302 100644 --- a/modules/mail/api_delmail.go +++ b/modules/mail/api_delmail.go @@ -7,12 +7,12 @@ import ( ) //参数校验 -func (this *Api_Comp) DelUserMailReq_Check(session comm.IUserSession, req *pb.Mail_DelMail_Req) (result map[string]interface{}, code comm.ErrorCode) { +func (this *Api_Comp) DelMail_Check(session comm.IUserSession, req *pb.Mail_DelMail_Req) (result map[string]interface{}, code comm.ErrorCode) { return } // 删除邮件 -func (this *Api_Comp) DelUserMailReq(session comm.IUserSession, agrs map[string]interface{}, req *pb.Mail_DelMail_Req) (code pb.ErrorCode) { +func (this *Api_Comp) DelMail(session comm.IUserSession, agrs map[string]interface{}, req *pb.Mail_DelMail_Req) (code pb.ErrorCode) { var err error mailinfo := make([]*pb.DB_MailData, 0) defer func() { diff --git a/modules/mail/api_getAttachment.go b/modules/mail/api_getAttachment.go index 84541379f..d76a91677 100644 --- a/modules/mail/api_getAttachment.go +++ b/modules/mail/api_getAttachment.go @@ -5,12 +5,12 @@ import ( "go_dreamfactory/pb" ) -func (this *Api_Comp) Mail_GetUserMailAttachment_Req_Check(session comm.IUserSession, req *pb.Mail_GetUserMailAttachment_Req) (result map[string]interface{}, code comm.ErrorCode) { +func (this *Api_Comp) GetUserMailAttachment_Check(session comm.IUserSession, req *pb.Mail_GetUserMailAttachment_Req) (result map[string]interface{}, code comm.ErrorCode) { return } // 领取附件 -func (this *Api_Comp) Mail_GetUserMailAttachment_Req(session comm.IUserSession, agrs map[string]interface{}, req *pb.Mail_GetUserMailAttachment_Req) (code pb.ErrorCode) { +func (this *Api_Comp) GetUserMailAttachment(session comm.IUserSession, agrs map[string]interface{}, req *pb.Mail_GetUserMailAttachment_Req) (code pb.ErrorCode) { var ( mail *pb.DB_MailData diff --git a/modules/mail/api_getmail.go b/modules/mail/api_getmail.go index ad82017c3..710a084a9 100644 --- a/modules/mail/api_getmail.go +++ b/modules/mail/api_getmail.go @@ -6,12 +6,12 @@ import ( "go_dreamfactory/pb" ) -func (this *Api_Comp) Mail_GetList_Req_Check(session comm.IUserSession, req *pb.Mail_GetList_Req) (result map[string]interface{}, code comm.ErrorCode) { +func (this *Api_Comp) GetList_Check(session comm.IUserSession, req *pb.Mail_GetList_Req) (result map[string]interface{}, code comm.ErrorCode) { return } // 查看所有邮件信息 -func (this *Api_Comp) Mail_GetList_Req(session comm.IUserSession, agrs map[string]interface{}, req *pb.Mail_GetList_Req) (code pb.ErrorCode) { +func (this *Api_Comp) GetList(session comm.IUserSession, agrs map[string]interface{}, req *pb.Mail_GetList_Req) (code pb.ErrorCode) { var err error mailinfo := make([]*pb.DB_MailData, 0) diff --git a/modules/mail/api_readmail.go b/modules/mail/api_readmail.go index 99d6bdeec..9dec2823c 100644 --- a/modules/mail/api_readmail.go +++ b/modules/mail/api_readmail.go @@ -5,12 +5,12 @@ import ( "go_dreamfactory/pb" ) -func (this *Api_Comp) Mail_ReadMail_Req_Check(session comm.IUserSession, req *pb.Mail_ReadMail_Req) (result map[string]interface{}, code comm.ErrorCode) { +func (this *Api_Comp) ReadMail_Check(session comm.IUserSession, req *pb.Mail_ReadMail_Req) (result map[string]interface{}, code comm.ErrorCode) { return } // 查看某一封邮件 -func (this *Api_Comp) Mail_ReadMail_Req(session comm.IUserSession, agrs map[string]interface{}, req *pb.Mail_ReadMail_Req) (code pb.ErrorCode) { +func (this *Api_Comp) ReadMail(session comm.IUserSession, agrs map[string]interface{}, req *pb.Mail_ReadMail_Req) (code pb.ErrorCode) { var ( err error mail *pb.DB_MailData diff --git a/modules/pack/api_useItem.go b/modules/pack/api_useItem.go index 6d0810a6e..6267039cb 100644 --- a/modules/pack/api_useItem.go +++ b/modules/pack/api_useItem.go @@ -12,7 +12,7 @@ func (this *Api_Comp) Useitem_Check(session comm.IUserSession, req *pb.Pack_UseI } //使用道具 -func (this *Api_Comp) Useitem(session comm.IUserSession, agrs map[string]interface{}, req *pb.Pack_UseItem_Resp) (code pb.ErrorCode) { +func (this *Api_Comp) Useitem(session comm.IUserSession, agrs map[string]interface{}, req *pb.Pack_UseItem_Req) (code pb.ErrorCode) { defer func() { session.SendMsg(string(this.module.GetType()), UseItemResp, &pb.Pack_UseItem_Resp{}) }()