Merge branch 'dev' of http://git.legu.cc/liwei_3d/go_dreamfactory into liwei
This commit is contained in:
commit
ccbac50506
@ -2,9 +2,7 @@
|
||||
{
|
||||
"key": 1,
|
||||
"pagoda_type": 1,
|
||||
"layer_num": [
|
||||
10
|
||||
],
|
||||
"layer_num": 10,
|
||||
"reward": [
|
||||
{
|
||||
"a": "attr",
|
||||
@ -16,9 +14,7 @@
|
||||
{
|
||||
"key": 2,
|
||||
"pagoda_type": 1,
|
||||
"layer_num": [
|
||||
20
|
||||
],
|
||||
"layer_num": 20,
|
||||
"reward": [
|
||||
{
|
||||
"a": "attr",
|
||||
@ -30,9 +26,7 @@
|
||||
{
|
||||
"key": 3,
|
||||
"pagoda_type": 1,
|
||||
"layer_num": [
|
||||
30
|
||||
],
|
||||
"layer_num": 30,
|
||||
"reward": [
|
||||
{
|
||||
"a": "attr",
|
||||
@ -44,9 +38,7 @@
|
||||
{
|
||||
"key": 4,
|
||||
"pagoda_type": 1,
|
||||
"layer_num": [
|
||||
40
|
||||
],
|
||||
"layer_num": 40,
|
||||
"reward": [
|
||||
{
|
||||
"a": "attr",
|
||||
@ -58,9 +50,7 @@
|
||||
{
|
||||
"key": 5,
|
||||
"pagoda_type": 1,
|
||||
"layer_num": [
|
||||
50
|
||||
],
|
||||
"layer_num": 50,
|
||||
"reward": [
|
||||
{
|
||||
"a": "attr",
|
||||
@ -72,9 +62,7 @@
|
||||
{
|
||||
"key": 6,
|
||||
"pagoda_type": 1,
|
||||
"layer_num": [
|
||||
60
|
||||
],
|
||||
"layer_num": 60,
|
||||
"reward": [
|
||||
{
|
||||
"a": "attr",
|
||||
@ -86,9 +74,7 @@
|
||||
{
|
||||
"key": 7,
|
||||
"pagoda_type": 1,
|
||||
"layer_num": [
|
||||
70
|
||||
],
|
||||
"layer_num": 70,
|
||||
"reward": [
|
||||
{
|
||||
"a": "attr",
|
||||
@ -100,9 +86,7 @@
|
||||
{
|
||||
"key": 8,
|
||||
"pagoda_type": 1,
|
||||
"layer_num": [
|
||||
80
|
||||
],
|
||||
"layer_num": 80,
|
||||
"reward": [
|
||||
{
|
||||
"a": "attr",
|
||||
@ -114,9 +98,7 @@
|
||||
{
|
||||
"key": 9,
|
||||
"pagoda_type": 1,
|
||||
"layer_num": [
|
||||
90
|
||||
],
|
||||
"layer_num": 90,
|
||||
"reward": [
|
||||
{
|
||||
"a": "attr",
|
||||
@ -128,9 +110,7 @@
|
||||
{
|
||||
"key": 10,
|
||||
"pagoda_type": 1,
|
||||
"layer_num": [
|
||||
100
|
||||
],
|
||||
"layer_num": 100,
|
||||
"reward": [
|
||||
{
|
||||
"a": "attr",
|
||||
@ -142,9 +122,7 @@
|
||||
{
|
||||
"key": 11,
|
||||
"pagoda_type": 2,
|
||||
"layer_num": [
|
||||
5
|
||||
],
|
||||
"layer_num": 5,
|
||||
"reward": [
|
||||
{
|
||||
"a": "attr",
|
||||
@ -156,9 +134,7 @@
|
||||
{
|
||||
"key": 12,
|
||||
"pagoda_type": 2,
|
||||
"layer_num": [
|
||||
10
|
||||
],
|
||||
"layer_num": 10,
|
||||
"reward": [
|
||||
{
|
||||
"a": "attr",
|
||||
@ -170,9 +146,7 @@
|
||||
{
|
||||
"key": 13,
|
||||
"pagoda_type": 2,
|
||||
"layer_num": [
|
||||
15
|
||||
],
|
||||
"layer_num": 15,
|
||||
"reward": [
|
||||
{
|
||||
"a": "attr",
|
||||
@ -184,9 +158,7 @@
|
||||
{
|
||||
"key": 14,
|
||||
"pagoda_type": 2,
|
||||
"layer_num": [
|
||||
20
|
||||
],
|
||||
"layer_num": 20,
|
||||
"reward": [
|
||||
{
|
||||
"a": "attr",
|
||||
@ -198,9 +170,7 @@
|
||||
{
|
||||
"key": 15,
|
||||
"pagoda_type": 2,
|
||||
"layer_num": [
|
||||
25
|
||||
],
|
||||
"layer_num": 25,
|
||||
"reward": [
|
||||
{
|
||||
"a": "attr",
|
||||
@ -212,9 +182,7 @@
|
||||
{
|
||||
"key": 16,
|
||||
"pagoda_type": 2,
|
||||
"layer_num": [
|
||||
30
|
||||
],
|
||||
"layer_num": 30,
|
||||
"reward": [
|
||||
{
|
||||
"a": "attr",
|
||||
@ -226,9 +194,7 @@
|
||||
{
|
||||
"key": 17,
|
||||
"pagoda_type": 2,
|
||||
"layer_num": [
|
||||
35
|
||||
],
|
||||
"layer_num": 35,
|
||||
"reward": [
|
||||
{
|
||||
"a": "attr",
|
||||
@ -240,9 +206,7 @@
|
||||
{
|
||||
"key": 18,
|
||||
"pagoda_type": 2,
|
||||
"layer_num": [
|
||||
40
|
||||
],
|
||||
"layer_num": 40,
|
||||
"reward": [
|
||||
{
|
||||
"a": "attr",
|
||||
@ -254,9 +218,7 @@
|
||||
{
|
||||
"key": 19,
|
||||
"pagoda_type": 2,
|
||||
"layer_num": [
|
||||
45
|
||||
],
|
||||
"layer_num": 45,
|
||||
"reward": [
|
||||
{
|
||||
"a": "attr",
|
||||
@ -268,9 +230,7 @@
|
||||
{
|
||||
"key": 20,
|
||||
"pagoda_type": 2,
|
||||
"layer_num": [
|
||||
50
|
||||
],
|
||||
"layer_num": 50,
|
||||
"reward": [
|
||||
{
|
||||
"a": "attr",
|
||||
|
@ -1,13 +1,8 @@
|
||||
package bench
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"go_dreamfactory/sys/cache"
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"github.com/go-redis/redis/v8"
|
||||
)
|
||||
|
||||
var LusScriptgetList = `
|
||||
@ -26,35 +21,18 @@ return data
|
||||
var res string
|
||||
|
||||
func TestMain(m *testing.M) {
|
||||
if err := cache.OnInit(nil, cache.Set_Redis_Addr([]string{
|
||||
// "10.0.0.9:6986",
|
||||
"10.0.0.9:9001", "10.0.0.9:9002", "10.0.0.9:9003", "10.0.0.9:9004", "10.0.0.9:9005", "10.0.0.9:9006",
|
||||
}),
|
||||
cache.Set_Redis_Password(""),
|
||||
// cache.Set_Redis_Password("li13451234"),
|
||||
// cache.Set_Redis_DB(0),
|
||||
cache.Set_Redis_IsCluster(true)); err != nil {
|
||||
fmt.Printf("err:%v\n", err)
|
||||
return
|
||||
}
|
||||
var err error
|
||||
|
||||
res, err = cache.Redis().NewScript(LusScriptgetList).Result()
|
||||
if err != nil {
|
||||
fmt.Println("err:", err)
|
||||
}
|
||||
defer os.Exit(m.Run())
|
||||
}
|
||||
|
||||
func BenchmarkRedis(b *testing.B) {
|
||||
uid := "2_62ec8ab8828fb7bf67b220b6"
|
||||
heroRedisKey := fmt.Sprintf("hero_%s%s", uid, "{herotest}")
|
||||
// uid := "2_62ec8ab8828fb7bf67b220b6"
|
||||
// heroRedisKey := fmt.Sprintf("hero_%s%s", uid, "{herotest}")
|
||||
var (
|
||||
// ncpu = runtime.NumCPU()
|
||||
parallelisms = []int{4, 16, 64}
|
||||
dataSizes = []int{100, 1000, 10000}
|
||||
numKeys = 1024
|
||||
key = heroRedisKey
|
||||
// key = heroRedisKey
|
||||
// keys = []string{
|
||||
// "hero:0_62d6131a3a719b898a90b5fb-62d6131a3a719b898a90b5fe",
|
||||
// "hero:0_62d6131a3a719b898a90b5fb-62d6131a3a719b898a90b600",
|
||||
@ -72,17 +50,7 @@ func BenchmarkRedis(b *testing.B) {
|
||||
|
||||
return Target{
|
||||
Get: func() {
|
||||
ctx := context.Background()
|
||||
keys, _ := cache.Redis().HGetAllToMapString(key)
|
||||
// fmt.Println(keys)
|
||||
for _, v := range keys {
|
||||
cache.Redis().Pipelined(ctx, func(pipe redis.Pipeliner) error {
|
||||
pipe.HGetAll(ctx, v).Result()
|
||||
_, err := pipe.Exec(ctx)
|
||||
// fmt.Println(v)
|
||||
return err
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
}, nil
|
||||
},
|
||||
@ -92,13 +60,6 @@ func BenchmarkRedis(b *testing.B) {
|
||||
Make: func(bench Benchmark) (Target, error) {
|
||||
return Target{
|
||||
Get: func() {
|
||||
|
||||
if _, err := cache.Redis().EvalSha(context.Background(), res, []string{key}).Result(); err != nil {
|
||||
fmt.Println(err)
|
||||
} else {
|
||||
// fmt.Println(v)
|
||||
}
|
||||
|
||||
},
|
||||
}, nil
|
||||
},
|
||||
|
12
cmd/cmd.go
12
cmd/cmd.go
@ -3,10 +3,12 @@ package main
|
||||
import (
|
||||
"fmt"
|
||||
"go_dreamfactory/cmd/robot"
|
||||
"go_dreamfactory/pb"
|
||||
"os"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
flag "github.com/spf13/pflag"
|
||||
"go.mongodb.org/mongo-driver/bson/primitive"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
@ -34,12 +36,18 @@ func init() {
|
||||
}
|
||||
|
||||
var account = flag.String("account", "", "登录账号")
|
||||
var sid = flag.Int32("sid", 0, "区服ID")
|
||||
var sid = flag.String("sid", "0", "区服ID")
|
||||
var create = flag.Bool("create", false, "是否创建新账号") //false 不创建新账号
|
||||
var role = flag.Bool("role", false, "创角")
|
||||
|
||||
func CloneNewHero(hero *pb.DBHero) (newHero *pb.DBHero) {
|
||||
newHero = &*hero
|
||||
newHero.Id = primitive.NewObjectID().Hex()
|
||||
|
||||
return
|
||||
}
|
||||
func main() {
|
||||
Execute()
|
||||
//Execute()
|
||||
}
|
||||
|
||||
var runCmd = &cobra.Command{
|
||||
|
@ -17,7 +17,7 @@ import (
|
||||
|
||||
type LoginParam struct {
|
||||
Account string `json:"account"`
|
||||
ServerId int32 `json:"serverId"`
|
||||
ServerId string `json:"serverId"`
|
||||
TimeStamp int64 `json:"timestamp"`
|
||||
}
|
||||
|
||||
|
@ -6,7 +6,7 @@ type Options struct {
|
||||
Account string //玩家账号
|
||||
Create bool
|
||||
Secretkey string //秘钥串
|
||||
ServerId int32 //区服ID
|
||||
ServerId string //区服ID
|
||||
Role bool //是否创角
|
||||
}
|
||||
|
||||
@ -15,7 +15,7 @@ func DefaultOpts() *Options {
|
||||
WsUrl: "ws://localhost:7891/gateway",
|
||||
RegUrl: "http://localhost:8000/register",
|
||||
Create: false,
|
||||
ServerId: 1,
|
||||
ServerId: "1",
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -85,7 +85,7 @@ func (r *Robot) Run() {
|
||||
zlog.Infof("websocket %s ", r.opts.WsUrl)
|
||||
if r.opts.Create { //创建新用户
|
||||
r.enable = true
|
||||
r.AccountRegister(r.opts.Account, int32(r.opts.ServerId))
|
||||
r.AccountRegister(r.opts.Account, r.opts.ServerId)
|
||||
} else {
|
||||
if r.opts.Account == "" {
|
||||
zlog.Fatal("WARNNING: account is required !!!")
|
||||
@ -277,7 +277,7 @@ func (r *Robot) loginCallback(rsp proto.Message) {
|
||||
r.handleReq()
|
||||
} else {
|
||||
//请求Http接口,模拟创建新账号
|
||||
r.AccountRegister(r.opts.Account, int32(r.opts.ServerId))
|
||||
r.AccountRegister(r.opts.Account, r.opts.ServerId)
|
||||
}
|
||||
}
|
||||
|
||||
@ -293,7 +293,7 @@ func (r *Robot) SendToClient(msg *pb.UserMessage, rsp proto.Message) error {
|
||||
}
|
||||
|
||||
//注册账号
|
||||
func (r *Robot) AccountRegister(account string, sid int32) {
|
||||
func (r *Robot) AccountRegister(account string, sid string) {
|
||||
if account == "" {
|
||||
zlog.Fatal("account value is empty")
|
||||
}
|
||||
|
@ -10,7 +10,7 @@ import (
|
||||
"github.com/nacos-group/nacos-sdk-go/util"
|
||||
)
|
||||
|
||||
func BuildSecStr(sid int32, account string) string {
|
||||
func BuildSecStr(sid, account string) string {
|
||||
jsonByte, _ := jsoniter.Marshal(&model.LoginParam{
|
||||
Account: account,
|
||||
ServerId: sid,
|
||||
|
@ -2,6 +2,6 @@ package model
|
||||
|
||||
type LoginParam struct {
|
||||
Account string `json:"account"`
|
||||
ServerId int32 `json:"serverId"`
|
||||
ServerId string `json:"serverId"`
|
||||
TimeStamp int64 `json:"timestamp"`
|
||||
}
|
||||
|
@ -15,7 +15,7 @@ var (
|
||||
)
|
||||
|
||||
type PttService interface {
|
||||
Login(sid int32, account string) (code pb.ErrorCode, rsp *pb.UserLoginResp)
|
||||
Login(sid, account string) (code pb.ErrorCode, rsp *pb.UserLoginResp)
|
||||
CreateRole(nickName string) (code pb.ErrorCode, rsp *pb.UserCreateResp)
|
||||
GetUser() *UserInfo
|
||||
SetUser(dbUser *pb.DBUser, dbUserExpand *pb.DBUserExpand)
|
||||
@ -61,7 +61,7 @@ func (p *PttServiceImpl) SendToClient(mainType, subType string, rsp proto.Messag
|
||||
}
|
||||
|
||||
// Login
|
||||
func (p *PttServiceImpl) Login(sid int32, account string) (code pb.ErrorCode, rsp *pb.UserLoginResp) {
|
||||
func (p *PttServiceImpl) Login(sid, account string) (code pb.ErrorCode, rsp *pb.UserLoginResp) {
|
||||
head := &pb.UserMessage{MainType: string(comm.ModuleUser), SubType: user.UserSubTypeLogin}
|
||||
head.Sec = common.BuildSecStr(sid, account)
|
||||
if err := p.connService.SendMsg(head, &pb.UserLoginReq{
|
||||
|
104
cmd/v2/ui/formview/friend_zan.go
Normal file
104
cmd/v2/ui/formview/friend_zan.go
Normal file
@ -0,0 +1,104 @@
|
||||
package formview
|
||||
|
||||
import (
|
||||
"go_dreamfactory/cmd/v2/model"
|
||||
"go_dreamfactory/cmd/v2/service"
|
||||
"go_dreamfactory/cmd/v2/service/observer"
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/modules/friend"
|
||||
"go_dreamfactory/pb"
|
||||
|
||||
"fyne.io/fyne/v2"
|
||||
"fyne.io/fyne/v2/container"
|
||||
"fyne.io/fyne/v2/theme"
|
||||
"fyne.io/fyne/v2/widget"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
type FriendZanView struct {
|
||||
FriendListBaseView
|
||||
}
|
||||
|
||||
func (this *FriendZanView) CreateView(t *model.TestCase) fyne.CanvasObject {
|
||||
//init required
|
||||
this.initFriendList()
|
||||
|
||||
//点赞
|
||||
zanBtn := widget.NewButtonWithIcon("点赞", theme.ConfirmIcon(), func() {
|
||||
|
||||
if err := service.GetPttService().SendToClient(
|
||||
t.MainType,
|
||||
t.SubType,
|
||||
&pb.FriendZanReq{
|
||||
FriendId: this.selFriendIds[0],
|
||||
},
|
||||
); err != nil {
|
||||
logrus.Error(err)
|
||||
return
|
||||
}
|
||||
this.applyListBtnFun()
|
||||
})
|
||||
|
||||
receiveBtn := widget.NewButtonWithIcon("获赞", theme.ConfirmIcon(), func() {
|
||||
|
||||
if err := service.GetPttService().SendToClient(
|
||||
t.MainType,
|
||||
t.SubType,
|
||||
&pb.FriendZanreceiveReq{
|
||||
FriendId: this.selFriendIds[0],
|
||||
},
|
||||
); err != nil {
|
||||
logrus.Error(err)
|
||||
return
|
||||
}
|
||||
this.applyListBtnFun()
|
||||
})
|
||||
|
||||
// new zanlist btn
|
||||
zanList := func() {
|
||||
if err := service.GetPttService().SendToClient(
|
||||
string(comm.ModuleFriend),
|
||||
friend.FriendSubTypeZanList,
|
||||
&pb.FriendListReq{}); err != nil {
|
||||
logrus.Error(err)
|
||||
}
|
||||
this.friendData = model.NewFriendModelList()
|
||||
}
|
||||
zanListBtn := widget.NewButton("点赞列表", zanList)
|
||||
|
||||
// create friend list view
|
||||
this.createList()
|
||||
|
||||
// layout
|
||||
split := container.NewHSplit(this.dataList, container.NewVBox(zanListBtn, zanBtn, receiveBtn))
|
||||
split.Offset = 1
|
||||
|
||||
this.dataListener()
|
||||
return split
|
||||
}
|
||||
|
||||
func (this *FriendZanView) dataListener() {
|
||||
this.obs.AddListener(observer.EVENT_CASE_RSP, observer.Listener{
|
||||
OnNotify: func(d interface{}, args ...interface{}) {
|
||||
data := d.(*pb.UserMessage)
|
||||
if !(data.MainType == string(comm.ModuleFriend) &&
|
||||
data.SubType == friend.FriendSubTypeZanList) {
|
||||
return
|
||||
}
|
||||
rsp := &pb.FriendZanlistResp{}
|
||||
|
||||
if !comm.ProtoUnmarshal(data, rsp) {
|
||||
logrus.Error("unmarshal err")
|
||||
}
|
||||
|
||||
for _, v := range rsp.List {
|
||||
fm := &model.FriendModel{
|
||||
Uid: v.UserId,
|
||||
Name: v.NickName,
|
||||
}
|
||||
this.friendData.DataList = append(this.friendData.DataList, fm)
|
||||
}
|
||||
this.reloadFriendData()
|
||||
},
|
||||
})
|
||||
}
|
@ -15,7 +15,6 @@ import (
|
||||
"github.com/BabySid/gobase"
|
||||
"github.com/Pallinder/go-randomdata"
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/spf13/cast"
|
||||
)
|
||||
|
||||
var (
|
||||
@ -189,7 +188,7 @@ func (ui *MainWindowImpl) createChooseServerWindow(
|
||||
}
|
||||
|
||||
// createLoginWin
|
||||
func (ui *MainWindowImpl) createLoginWin(sid int32, sname string) {
|
||||
func (ui *MainWindowImpl) createLoginWin(sid, sname string) {
|
||||
//form
|
||||
account := widget.NewEntry()
|
||||
account.Text = "user8120" //default account
|
||||
@ -302,7 +301,7 @@ func (ui *MainWindowImpl) NewWelcomeLabel(data string) {
|
||||
fyne.TextStyle{Bold: true}),
|
||||
container.NewCenter(container.NewHBox(
|
||||
widget.NewButton(common.BUTTON_LOGIN, func() {
|
||||
ui.createLoginWin(cast.ToInt32(p[0]), p[1])
|
||||
ui.createLoginWin(p[0], p[1])
|
||||
}),
|
||||
)),
|
||||
))
|
||||
|
@ -48,6 +48,7 @@ var (
|
||||
ff(comm.ModuleFriend, friend.FriendSubTypeAddBlack): &formview.FriendAddBlackView{},
|
||||
ff(comm.ModuleFriend, friend.FriendSubTypeDelBlack): &formview.FriendDelblackView{},
|
||||
ff(comm.ModuleFriend, friend.FriendSubTypeSearch): &formview.FriendSearchView{},
|
||||
ff(comm.ModuleFriend, friend.FriendSubTypeZanList): &formview.FriendZanView{},
|
||||
}
|
||||
)
|
||||
|
||||
@ -86,6 +87,7 @@ var (
|
||||
ff(comm.ModuleFriend, friend.FriendSubTypeAddBlack),
|
||||
ff(comm.ModuleFriend, friend.FriendSubTypeDelBlack),
|
||||
ff(comm.ModuleFriend, friend.FriendSubTypeSearch),
|
||||
ff(comm.ModuleFriend, friend.FriendSubTypeZanList),
|
||||
},
|
||||
}
|
||||
)
|
||||
@ -270,6 +272,12 @@ var (
|
||||
Rsp: &pb.FriendSearchResp{},
|
||||
Enabled: true,
|
||||
},
|
||||
ff(comm.ModuleFriend, friend.FriendSubTypeZanList):{
|
||||
Desc: "点赞好友",
|
||||
MainType: string(comm.ModuleFriend),
|
||||
SubType: friend.FriendSubTypeSearch,
|
||||
Enabled: true,
|
||||
},
|
||||
}
|
||||
)
|
||||
|
||||
|
@ -88,6 +88,8 @@ const (
|
||||
TableEquipment = "equipment"
|
||||
///聊天数据表
|
||||
TableChat = "chat"
|
||||
// 爬塔数据表
|
||||
TablePagoda = "pagoda"
|
||||
)
|
||||
|
||||
//RPC服务接口定义处
|
||||
|
@ -6,24 +6,27 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
FriendSubTypeList = "list"
|
||||
FriendSubTypeApply = "apply"
|
||||
FriendSubTypeApplyList = "applylist"
|
||||
FriendSubTypeAddBlack = "addblack"
|
||||
FriendSubTypeDelBlack = "delblack"
|
||||
FriendSubTypeBlacklist = "blacklist"
|
||||
FriendSubTypeAgree = "agree"
|
||||
FriendSubTypeRefuse = "refuse"
|
||||
FriendSubTypeSearch = "search"
|
||||
FriendSubTypeList = "list"
|
||||
FriendSubTypeApply = "apply"
|
||||
FriendSubTypeApplyList = "applylist"
|
||||
FriendSubTypeAddBlack = "addblack"
|
||||
FriendSubTypeDelBlack = "delblack"
|
||||
FriendSubTypeBlacklist = "blacklist"
|
||||
FriendSubTypeAgree = "agree"
|
||||
FriendSubTypeRefuse = "refuse"
|
||||
FriendSubTypeSearch = "search"
|
||||
FriendSubTypeZan = "zan"
|
||||
FriendSubTypeZanreceive = "zanreceive"
|
||||
FriendSubTypeZanList = "zanlist"
|
||||
)
|
||||
|
||||
type apiComp struct {
|
||||
modules.MCompGate
|
||||
module *Friend
|
||||
moduleFriend *Friend
|
||||
}
|
||||
|
||||
func (this *apiComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
|
||||
this.MCompGate.Init(service, module, comp, options)
|
||||
this.module = module.(*Friend)
|
||||
_ = this.MCompGate.Init(service, module, comp, options)
|
||||
this.moduleFriend = module.(*Friend)
|
||||
return
|
||||
}
|
||||
|
@ -33,16 +33,19 @@ func (this *apiComp) Addblack(session comm.IUserSession, req *pb.FriendBlackAddR
|
||||
FriendId: req.FriendId,
|
||||
UserId: session.GetUserId(),
|
||||
}
|
||||
session.SendMsg(string(this.module.GetType()), FriendSubTypeAddBlack, Resp)
|
||||
if err = session.SendMsg(string(this.moduleFriend.GetType()), FriendSubTypeAddBlack, Resp); err != nil {
|
||||
code = pb.ErrorCode_SystemError
|
||||
return
|
||||
}
|
||||
}()
|
||||
|
||||
self = this.module.modelFriend.GetFriend(session.GetUserId())
|
||||
self = this.moduleFriend.modelFriend.GetFriend(session.GetUserId())
|
||||
if self == nil {
|
||||
code = pb.ErrorCode_FriendSelfNoData
|
||||
return
|
||||
}
|
||||
|
||||
target = this.module.modelFriend.GetFriend(req.FriendId)
|
||||
target = this.moduleFriend.modelFriend.GetFriend(req.FriendId)
|
||||
if target == nil {
|
||||
code = pb.ErrorCode_FriendTargetNoData
|
||||
return
|
||||
@ -67,7 +70,7 @@ func (this *apiComp) Addblack(session comm.IUserSession, req *pb.FriendBlackAddR
|
||||
}
|
||||
|
||||
// 判断是否黑名单人数已满
|
||||
if len(self.BlackIds) >= this.module.getBlackMax() {
|
||||
if len(self.BlackIds) >= this.moduleFriend.getBlackMax() {
|
||||
code = pb.ErrorCode_FriendBlackMax
|
||||
return
|
||||
}
|
||||
@ -76,7 +79,7 @@ func (this *apiComp) Addblack(session comm.IUserSession, req *pb.FriendBlackAddR
|
||||
self.BlackIds = append(self.BlackIds, req.FriendId)
|
||||
|
||||
//更新黑名单
|
||||
err = this.module.modelFriend.Change(self.Uid, map[string]interface{}{
|
||||
err = this.moduleFriend.modelFriend.Change(self.Uid, map[string]interface{}{
|
||||
"blackIds": self.BlackIds,
|
||||
})
|
||||
if err != nil {
|
||||
|
@ -33,7 +33,7 @@ func (this *apiComp) Agree(session comm.IUserSession, req *pb.FriendAgreeReq) (c
|
||||
Resp = &pb.FriendAgreeResp{
|
||||
Num: optNum,
|
||||
}
|
||||
err := session.SendMsg(string(this.module.GetType()), FriendSubTypeAgree, Resp)
|
||||
err := session.SendMsg(string(this.moduleFriend.GetType()), FriendSubTypeAgree, Resp)
|
||||
if err != nil {
|
||||
code = pb.ErrorCode_SystemError
|
||||
return
|
||||
@ -41,7 +41,7 @@ func (this *apiComp) Agree(session comm.IUserSession, req *pb.FriendAgreeReq) (c
|
||||
}()
|
||||
|
||||
//获取玩家自己好友数据
|
||||
self = this.module.modelFriend.GetFriend(session.GetUserId())
|
||||
self = this.moduleFriend.modelFriend.GetFriend(session.GetUserId())
|
||||
if self == nil {
|
||||
code = pb.ErrorCode_FriendSelfNoData
|
||||
return
|
||||
@ -66,7 +66,7 @@ func (this *apiComp) Agree(session comm.IUserSession, req *pb.FriendAgreeReq) (c
|
||||
}
|
||||
|
||||
//双向添加:将自己加入到申请人的好友列表中
|
||||
target = this.module.modelFriend.GetFriend(userId)
|
||||
target = this.moduleFriend.modelFriend.GetFriend(userId)
|
||||
if target == nil {
|
||||
code = pb.ErrorCode_FriendTargetNoData
|
||||
return
|
||||
@ -77,7 +77,7 @@ func (this *apiComp) Agree(session comm.IUserSession, req *pb.FriendAgreeReq) (c
|
||||
}
|
||||
target.FriendIds = append(target.FriendIds, self.Uid)
|
||||
}
|
||||
err = this.module.modelFriend.Change(target.Uid, map[string]interface{}{
|
||||
err = this.moduleFriend.modelFriend.Change(target.Uid, map[string]interface{}{
|
||||
"friendIds": target.FriendIds,
|
||||
})
|
||||
if err != nil {
|
||||
@ -90,7 +90,7 @@ func (this *apiComp) Agree(session comm.IUserSession, req *pb.FriendAgreeReq) (c
|
||||
}
|
||||
|
||||
//更新
|
||||
err = this.module.modelFriend.Change(self.Uid, map[string]interface{}{
|
||||
err = this.moduleFriend.modelFriend.Change(self.Uid, map[string]interface{}{
|
||||
"applyIds": self.ApplyIds,
|
||||
"friendIds": self.FriendIds,
|
||||
})
|
||||
|
@ -36,21 +36,21 @@ func (this *apiComp) Apply(session comm.IUserSession, req *pb.FriendApplyReq) (c
|
||||
FriendId: req.FriendId,
|
||||
}
|
||||
}
|
||||
if err := session.SendMsg(string(this.module.GetType()), FriendSubTypeApply, Resp); err != nil {
|
||||
if err := session.SendMsg(string(this.moduleFriend.GetType()), FriendSubTypeApply, Resp); err != nil {
|
||||
code = pb.ErrorCode_SystemError
|
||||
return
|
||||
}
|
||||
}()
|
||||
|
||||
//获取玩家自己好友数据
|
||||
self = this.module.modelFriend.GetFriend(session.GetUserId())
|
||||
self = this.moduleFriend.modelFriend.GetFriend(session.GetUserId())
|
||||
if self == nil {
|
||||
code = pb.ErrorCode_FriendSelfNoData
|
||||
return
|
||||
}
|
||||
|
||||
//获取好友数据
|
||||
target = this.module.modelFriend.GetFriend(req.FriendId)
|
||||
target = this.moduleFriend.modelFriend.GetFriend(req.FriendId)
|
||||
if target == nil {
|
||||
code = pb.ErrorCode_FriendTargetNoData
|
||||
return
|
||||
@ -63,13 +63,13 @@ func (this *apiComp) Apply(session comm.IUserSession, req *pb.FriendApplyReq) (c
|
||||
}
|
||||
|
||||
//判断是否超过最大好友数量
|
||||
if len(self.FriendIds) >= this.module.getFriendMax() {
|
||||
if len(self.FriendIds) >= this.moduleFriend.getFriendMax() {
|
||||
code = pb.ErrorCode_FriendSelfMax
|
||||
return
|
||||
}
|
||||
|
||||
//判断对方是否也超过最大好友数量
|
||||
if len(target.FriendIds) >= this.module.getFriendMax() {
|
||||
if len(target.FriendIds) >= this.moduleFriend.getFriendMax() {
|
||||
code = pb.ErrorCode_FriendTargetMax
|
||||
return
|
||||
}
|
||||
@ -104,7 +104,7 @@ func (this *apiComp) Apply(session comm.IUserSession, req *pb.FriendApplyReq) (c
|
||||
}
|
||||
target.ApplyIds = append(target.ApplyIds, session.GetUserId())
|
||||
|
||||
err = this.module.modelFriend.Change(req.FriendId, map[string]interface{}{
|
||||
err = this.moduleFriend.modelFriend.Change(req.FriendId, map[string]interface{}{
|
||||
"applyIds": target.ApplyIds,
|
||||
})
|
||||
if err != nil {
|
||||
|
@ -25,19 +25,19 @@ func (this *apiComp) ApplyList(session comm.IUserSession, req *pb.FriendApplyLis
|
||||
List: list,
|
||||
}
|
||||
}
|
||||
if err := session.SendMsg(string(this.module.GetType()), FriendSubTypeApplyList, Resp); err != nil {
|
||||
if err := session.SendMsg(string(this.moduleFriend.GetType()), FriendSubTypeApplyList, Resp); err != nil {
|
||||
code = pb.ErrorCode_SystemError
|
||||
}
|
||||
}()
|
||||
|
||||
self = this.module.modelFriend.GetFriend(session.GetUserId())
|
||||
self = this.moduleFriend.modelFriend.GetFriend(session.GetUserId())
|
||||
if self == nil {
|
||||
code = pb.ErrorCode_FriendSelfNoData
|
||||
return
|
||||
}
|
||||
|
||||
for _, userId := range self.ApplyIds {
|
||||
user := this.module.ModuleUser.GetUser(userId)
|
||||
user := this.moduleFriend.ModuleUser.GetUser(userId)
|
||||
if user == nil {
|
||||
continue
|
||||
}
|
||||
|
@ -24,21 +24,21 @@ func (this *apiComp) Blacklist(session comm.IUserSession, req *pb.FriendBlackLis
|
||||
Friends: list,
|
||||
}
|
||||
|
||||
err := session.SendMsg(string(this.module.GetType()), FriendSubTypeBlacklist, Resp)
|
||||
err := session.SendMsg(string(this.moduleFriend.GetType()), FriendSubTypeBlacklist, Resp)
|
||||
if err != nil {
|
||||
code = pb.ErrorCode_SystemError
|
||||
return
|
||||
}
|
||||
}()
|
||||
|
||||
self = this.module.modelFriend.GetFriend(session.GetUserId())
|
||||
self = this.moduleFriend.modelFriend.GetFriend(session.GetUserId())
|
||||
if self == nil {
|
||||
code = pb.ErrorCode_FriendSelfNoData
|
||||
return
|
||||
}
|
||||
|
||||
for _, userId := range self.BlackIds {
|
||||
user := this.module.ModuleUser.GetUser(userId)
|
||||
user := this.moduleFriend.ModuleUser.GetUser(userId)
|
||||
if user == nil {
|
||||
continue
|
||||
}
|
||||
|
@ -32,14 +32,14 @@ func (this *apiComp) Delblack(session comm.IUserSession, req *pb.FriendDelBlackR
|
||||
UserId: session.GetUserId(),
|
||||
}
|
||||
}
|
||||
err := session.SendMsg(string(this.module.GetType()), FriendSubTypeDelBlack, Resp)
|
||||
err := session.SendMsg(string(this.moduleFriend.GetType()), FriendSubTypeDelBlack, Resp)
|
||||
if err != nil {
|
||||
code = pb.ErrorCode_SystemError
|
||||
return
|
||||
}
|
||||
}()
|
||||
|
||||
self = this.module.modelFriend.GetFriend(session.GetUserId())
|
||||
self = this.moduleFriend.modelFriend.GetFriend(session.GetUserId())
|
||||
if self == nil {
|
||||
code = pb.ErrorCode_FriendSelfNoData
|
||||
return
|
||||
@ -48,7 +48,7 @@ func (this *apiComp) Delblack(session comm.IUserSession, req *pb.FriendDelBlackR
|
||||
//从黑名单列表中删除目标
|
||||
self.BlackIds = utils.DeleteString(self.BlackIds, req.FriendId)
|
||||
//更新黑名单
|
||||
err = this.module.modelFriend.Change(self.Uid, map[string]interface{}{
|
||||
err = this.moduleFriend.modelFriend.Change(self.Uid, map[string]interface{}{
|
||||
"blackIds": self.BlackIds,
|
||||
})
|
||||
if err != nil {
|
||||
|
@ -23,21 +23,21 @@ func (this *apiComp) List(session comm.IUserSession, req *pb.FriendListReq) (cod
|
||||
Resp = &pb.FriendListResp{
|
||||
List: list,
|
||||
}
|
||||
err := session.SendMsg(string(this.module.GetType()), FriendSubTypeList, Resp)
|
||||
err := session.SendMsg(string(this.moduleFriend.GetType()), FriendSubTypeList, Resp)
|
||||
if err != nil {
|
||||
code = pb.ErrorCode_SystemError
|
||||
return
|
||||
}
|
||||
}()
|
||||
|
||||
self = this.module.modelFriend.GetFriend(session.GetUserId())
|
||||
self = this.moduleFriend.modelFriend.GetFriend(session.GetUserId())
|
||||
if self == nil {
|
||||
code = pb.ErrorCode_FriendSelfNoData
|
||||
return
|
||||
}
|
||||
|
||||
for _, userId := range self.FriendIds {
|
||||
user := this.module.ModuleUser.GetUser(userId)
|
||||
user := this.moduleFriend.ModuleUser.GetUser(userId)
|
||||
if user == nil {
|
||||
continue
|
||||
}
|
||||
|
@ -32,7 +32,7 @@ func (this *apiComp) Refuse(session comm.IUserSession, req *pb.FriendRefuseReq)
|
||||
Num: optNum,
|
||||
}
|
||||
|
||||
err := session.SendMsg(string(this.module.GetType()), FriendSubTypeRefuse, Resp)
|
||||
err := session.SendMsg(string(this.moduleFriend.GetType()), FriendSubTypeRefuse, Resp)
|
||||
if err != nil {
|
||||
code = pb.ErrorCode_SystemError
|
||||
return
|
||||
@ -40,7 +40,7 @@ func (this *apiComp) Refuse(session comm.IUserSession, req *pb.FriendRefuseReq)
|
||||
}()
|
||||
|
||||
//获取玩家自己好友数据
|
||||
self = this.module.modelFriend.GetFriend(session.GetUserId())
|
||||
self = this.moduleFriend.modelFriend.GetFriend(session.GetUserId())
|
||||
if self == nil {
|
||||
code = pb.ErrorCode_FriendSelfNoData
|
||||
return
|
||||
@ -61,7 +61,7 @@ func (this *apiComp) Refuse(session comm.IUserSession, req *pb.FriendRefuseReq)
|
||||
}
|
||||
//更新
|
||||
if optNum > 0 {
|
||||
err := this.module.modelFriend.Change(self.Uid, map[string]interface{}{
|
||||
err := this.moduleFriend.modelFriend.Change(self.Uid, map[string]interface{}{
|
||||
"applyIds": self.ApplyIds,
|
||||
})
|
||||
if err != nil {
|
||||
|
@ -31,12 +31,12 @@ func (this *apiComp) Search(session comm.IUserSession, req *pb.FriendSearchReq)
|
||||
Friend: friend,
|
||||
}
|
||||
}
|
||||
if err := session.SendMsg(string(this.module.GetType()), FriendSubTypeSearch, Resp); err != nil {
|
||||
if err := session.SendMsg(string(this.moduleFriend.GetType()), FriendSubTypeSearch, Resp); err != nil {
|
||||
code = pb.ErrorCode_SystemError
|
||||
}
|
||||
}()
|
||||
|
||||
user := this.module.modelFriend.Frined_FindCond(req.NickName)
|
||||
user := this.moduleFriend.modelFriend.Frined_FindCond(req.NickName)
|
||||
if user != nil {
|
||||
friend = &pb.FriendBase{
|
||||
UserId: user.Uid,
|
||||
|
62
modules/friend/api_zan.go
Normal file
62
modules/friend/api_zan.go
Normal file
@ -0,0 +1,62 @@
|
||||
package friend
|
||||
|
||||
import (
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/pb"
|
||||
"go_dreamfactory/utils"
|
||||
|
||||
"google.golang.org/protobuf/proto"
|
||||
)
|
||||
|
||||
// 点赞
|
||||
|
||||
func (this *apiComp) ZanCheck(session comm.IUserSession, req *pb.FriendZanReq) (code pb.ErrorCode) {
|
||||
if req.FriendId == ""{
|
||||
code = pb.ErrorCode_ReqParameterError
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (this *apiComp) Zan(session comm.IUserSession, req *pb.FriendZanReq) (code pb.ErrorCode, data proto.Message) {
|
||||
if code = this.ZanCheck(session, req); code != pb.ErrorCode_Success {
|
||||
return
|
||||
}
|
||||
|
||||
var (
|
||||
self *pb.DBFriend
|
||||
err error
|
||||
)
|
||||
|
||||
self = this.moduleFriend.modelFriend.GetFriend(session.GetUserId())
|
||||
if self == nil {
|
||||
code = pb.ErrorCode_FriendSelfNoData
|
||||
return
|
||||
}
|
||||
|
||||
// 好友是否被点赞
|
||||
if _, ok := utils.Find(self.ZanIds, req.FriendId); ok {
|
||||
code = pb.ErrorCode_FriendZaned
|
||||
return
|
||||
}
|
||||
|
||||
//设置被点赞玩家
|
||||
self.ZanIds = append(self.ZanIds, req.FriendId)
|
||||
|
||||
if err = this.moduleFriend.modelFriend.Change(req.FriendId, map[string]interface{}{
|
||||
"zanIds": self.ZanIds,
|
||||
}); err != nil {
|
||||
code = pb.ErrorCode_DBError
|
||||
return
|
||||
}
|
||||
|
||||
rsp := &pb.FriendZanResp{
|
||||
Flag: true,
|
||||
}
|
||||
|
||||
if err := session.SendMsg(string(this.moduleFriend.GetType()), FriendSubTypeZan, rsp); err != nil {
|
||||
code = pb.ErrorCode_SystemError
|
||||
return
|
||||
}
|
||||
|
||||
return
|
||||
}
|
53
modules/friend/api_zanlist.go
Normal file
53
modules/friend/api_zanlist.go
Normal file
@ -0,0 +1,53 @@
|
||||
package friend
|
||||
|
||||
import (
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/pb"
|
||||
|
||||
"google.golang.org/protobuf/proto"
|
||||
)
|
||||
|
||||
// 点赞列表
|
||||
func (this *apiComp) ZanlistCheck(session comm.IUserSession, req *pb.FriendZanlistReq) (code pb.ErrorCode) {
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func (this *apiComp) Zanlist(session comm.IUserSession, req *pb.FriendZanlistReq) (code pb.ErrorCode, data proto.Message) {
|
||||
if code = this.ZanlistCheck(session, req); code != pb.ErrorCode_Success {
|
||||
return
|
||||
}
|
||||
|
||||
var (
|
||||
self *pb.DBFriend
|
||||
list []*pb.FriendBase
|
||||
)
|
||||
|
||||
self = this.moduleFriend.modelFriend.GetFriend(session.GetUserId())
|
||||
if self == nil {
|
||||
code = pb.ErrorCode_FriendSelfNoData
|
||||
return
|
||||
}
|
||||
|
||||
for _, v := range self.ZanIds {
|
||||
user := this.moduleFriend.ModuleUser.GetUser(v)
|
||||
if user == nil {
|
||||
continue
|
||||
}
|
||||
|
||||
list = append(list, &pb.FriendBase{
|
||||
UserId: v,
|
||||
NickName: user.Name,
|
||||
})
|
||||
}
|
||||
|
||||
rsp := &pb.FriendZanlistResp{
|
||||
List: list,
|
||||
}
|
||||
if err := session.SendMsg(string(this.moduleFriend.GetType()), FriendSubTypeZanList, rsp); err != nil {
|
||||
code = pb.ErrorCode_SystemError
|
||||
return
|
||||
}
|
||||
|
||||
return
|
||||
}
|
58
modules/friend/api_zanreceive.go
Normal file
58
modules/friend/api_zanreceive.go
Normal file
@ -0,0 +1,58 @@
|
||||
package friend
|
||||
|
||||
import (
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/pb"
|
||||
"go_dreamfactory/utils"
|
||||
|
||||
"google.golang.org/protobuf/proto"
|
||||
)
|
||||
|
||||
// 领取点赞奖励
|
||||
|
||||
func (this *apiComp) ZanreceiveCheck(session comm.IUserSession, req *pb.FriendZanreceiveReq) (code pb.ErrorCode) {
|
||||
if req.FriendId == "" {
|
||||
code = pb.ErrorCode_ReqParameterError
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (this *apiComp) Zanreceive(session comm.IUserSession, req *pb.FriendZanreceiveReq) (code pb.ErrorCode, data proto.Message) {
|
||||
if code = this.ZanreceiveCheck(session, req); code != pb.ErrorCode_Success {
|
||||
return
|
||||
}
|
||||
|
||||
var (
|
||||
self *pb.DBFriend
|
||||
err error
|
||||
)
|
||||
|
||||
self = this.moduleFriend.modelFriend.GetFriend(session.GetUserId())
|
||||
if self == nil {
|
||||
code = pb.ErrorCode_FriendSelfNoData
|
||||
return
|
||||
}
|
||||
|
||||
// 是否已领取点赞
|
||||
if _, ok := utils.Find(self.ZanIds, req.FriendId); !ok {
|
||||
code = pb.ErrorCode_FriendZanreceived
|
||||
return
|
||||
}
|
||||
|
||||
utils.DeleteString(self.ZanIds, req.FriendId)
|
||||
|
||||
if err = this.moduleFriend.modelFriend.Change(req.FriendId, map[string]interface{}{
|
||||
"zanIds": self.ZanIds,
|
||||
}); err != nil {
|
||||
code = pb.ErrorCode_DBError
|
||||
return
|
||||
}
|
||||
|
||||
if err := session.SendMsg(string(this.moduleFriend.GetType()), FriendSubTypeZanreceive,
|
||||
&pb.FriendZanreceiveResp{Flag: true}); err != nil {
|
||||
code = pb.ErrorCode_SystemError
|
||||
return
|
||||
}
|
||||
|
||||
return
|
||||
}
|
@ -22,6 +22,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/golang/protobuf/ptypes"
|
||||
"go.mongodb.org/mongo-driver/bson/primitive"
|
||||
)
|
||||
|
||||
var service core.IService
|
||||
@ -55,8 +56,19 @@ func (this *TestService) InitSys() {
|
||||
}
|
||||
|
||||
func TestMain(m *testing.M) {
|
||||
sz := GetMap()
|
||||
if len(sz) == 0 {
|
||||
sz = make(map[int32]int32, 0)
|
||||
}
|
||||
|
||||
sz[2] = 2
|
||||
hero := &pb.DBHero{}
|
||||
hero.Block = false
|
||||
hero.Lv = 12
|
||||
new := CloneNewHero(hero)
|
||||
fmt.Printf("%v", new)
|
||||
service = newService(
|
||||
rpcx.SetConfPath("../../bin/conf/worker_2.yaml"),
|
||||
rpcx.SetConfPath("../../bin/conf/worker_1.yaml"),
|
||||
)
|
||||
service.OnInstallComp( //装备组件
|
||||
s_gateComp, //此服务需要接受用户的消息 需要装备网关组件
|
||||
@ -73,7 +85,20 @@ func TestMain(m *testing.M) {
|
||||
time.Sleep(time.Second * 2)
|
||||
defer os.Exit(m.Run())
|
||||
}
|
||||
|
||||
func GetMap() map[int32]int32 {
|
||||
return nil
|
||||
}
|
||||
func CloneNewHero(hero *pb.DBHero) (newHero *pb.DBHero) {
|
||||
temp := *hero
|
||||
newHero = &temp
|
||||
newHero.Block = true
|
||||
newHero.Lv = 100
|
||||
newHero.Id = primitive.NewObjectID().Hex()
|
||||
return
|
||||
}
|
||||
func Test_Modules(t *testing.T) {
|
||||
|
||||
data, _ := ptypes.MarshalAny(&pb.HeroListReq{})
|
||||
reply := &pb.RPCMessageReply{}
|
||||
s_gateComp.ReceiveMsg(context.Background(), &pb.AgentMessage{UserId: "0_62c79d66acc7aa239b07c21e", MainType: "hero", SubType: "list", Message: data}, reply)
|
||||
|
@ -102,7 +102,8 @@ func (this *ModelHero) createOneHero(uid string, heroCfgId string) (hero *pb.DBH
|
||||
|
||||
// 克隆一个英雄
|
||||
func (this *ModelHero) CloneNewHero(hero *pb.DBHero) (newHero *pb.DBHero) {
|
||||
newHero = &*hero
|
||||
temp := *hero
|
||||
newHero = &temp
|
||||
newHero.Id = primitive.NewObjectID().Hex()
|
||||
this.AddList(newHero.Uid, newHero.Id, newHero)
|
||||
return
|
||||
@ -115,11 +116,12 @@ func (this *ModelHero) initHeroOverlying(uid string, heroCfgId string, count int
|
||||
// 添加图鉴
|
||||
go func(uid, heroCfgId string) { // 携程处理 图鉴数据
|
||||
if result, err1 := this.moduleHero.ModuleUser.GetUserExpand(uid); err1 == nil {
|
||||
sz := make(map[string]bool, 0)
|
||||
for k := range result.GetTujian() {
|
||||
sz[k] = true
|
||||
}
|
||||
|
||||
if _, ok := result.GetTujian()[heroCfgId]; !ok {
|
||||
sz := result.GetTujian()
|
||||
if len(sz) == 0 {
|
||||
sz = make(map[string]bool, 0)
|
||||
}
|
||||
sz[heroCfgId] = true
|
||||
initUpdate := map[string]interface{}{
|
||||
"tujian": sz,
|
||||
|
@ -4,6 +4,7 @@ import (
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/lego/core"
|
||||
"go_dreamfactory/lego/sys/log"
|
||||
"go_dreamfactory/lego/sys/redis"
|
||||
"go_dreamfactory/modules"
|
||||
"go_dreamfactory/pb"
|
||||
"time"
|
||||
@ -33,9 +34,10 @@ func (this *ModelRecord) getUserSession(uid string) (cuser *pb.CacheUser) {
|
||||
//获取用户通过扩展表
|
||||
func (this *ModelRecord) GetHeroRecord(uid string) (result *pb.DBHeroRecord, err error) {
|
||||
result = &pb.DBHeroRecord{}
|
||||
if err = this.Get(uid, result); err != nil {
|
||||
if err = this.Get(uid, result); err != nil && err != redis.RedisNil {
|
||||
return
|
||||
}
|
||||
err = nil
|
||||
return result, err
|
||||
}
|
||||
|
||||
|
@ -6,10 +6,9 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
MainlineGetListResp = "getlist"
|
||||
MainlineChallengeResp = "challenge"
|
||||
MainlineGetRewardResp = "getreward"
|
||||
MainlineNewChapterPush = "newchapter"
|
||||
PagodaGetListResp = "getlist"
|
||||
PagodaChallengeResp = "challenge"
|
||||
PagodaGetRewardResp = "getreward"
|
||||
)
|
||||
|
||||
type apiComp struct {
|
||||
|
@ -8,8 +8,8 @@ import (
|
||||
)
|
||||
|
||||
//参数校验
|
||||
func (this *apiComp) ChallengeCheck(session comm.IUserSession, req *pb.MainlineChallengeReq) (code pb.ErrorCode) {
|
||||
if req.MainlineId == 0 {
|
||||
func (this *apiComp) ChallengeCheck(session comm.IUserSession, req *pb.PagodaChallengeReq) (code pb.ErrorCode) {
|
||||
if req.LevelID <= 0 {
|
||||
code = pb.ErrorCode_ReqParameterError
|
||||
return
|
||||
}
|
||||
@ -17,7 +17,7 @@ func (this *apiComp) ChallengeCheck(session comm.IUserSession, req *pb.MainlineC
|
||||
}
|
||||
|
||||
///挑战主线关卡
|
||||
func (this *apiComp) Challenge(session comm.IUserSession, req *pb.MainlineChallengeReq) (code pb.ErrorCode, data proto.Message) {
|
||||
func (this *apiComp) Challenge(session comm.IUserSession, req *pb.PagodaChallengeReq) (code pb.ErrorCode, data proto.Message) {
|
||||
|
||||
code = this.ChallengeCheck(session, req)
|
||||
if code != pb.ErrorCode_Success {
|
||||
|
@ -8,15 +8,15 @@ import (
|
||||
)
|
||||
|
||||
//参数校验
|
||||
func (this *apiComp) GetRewardCheck(session comm.IUserSession, req *pb.MainlineGetRewardReq) (code pb.ErrorCode) {
|
||||
if req.ChapterObj == "" {
|
||||
func (this *apiComp) GetRewardCheck(session comm.IUserSession, req *pb.PagodaGetRewardReq) (code pb.ErrorCode) {
|
||||
if req.Id <= 0 {
|
||||
code = pb.ErrorCode_ReqParameterError
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
///获取主线关卡信息
|
||||
func (this *apiComp) GetReward(session comm.IUserSession, req *pb.MainlineGetRewardReq) (code pb.ErrorCode, data proto.Message) {
|
||||
func (this *apiComp) GetReward(session comm.IUserSession, req *pb.PagodaGetRewardReq) (code pb.ErrorCode, data proto.Message) {
|
||||
|
||||
code = this.GetRewardCheck(session, req)
|
||||
if code != pb.ErrorCode_Success {
|
||||
|
@ -9,15 +9,14 @@ import (
|
||||
)
|
||||
|
||||
//参数校验
|
||||
func (this *apiComp) GetListCheck(session comm.IUserSession, req *pb.MainlineGetListReq) (code pb.ErrorCode) {
|
||||
func (this *apiComp) GetListCheck(session comm.IUserSession, req *pb.PagodaGetListReq) (code pb.ErrorCode) {
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
///获取主线关卡信息
|
||||
func (this *apiComp) GetList(session comm.IUserSession, req *pb.MainlineGetListReq) (code pb.ErrorCode, data proto.Message) {
|
||||
rsp := &pb.MainlineGetListResp{}
|
||||
|
||||
func (this *apiComp) GetList(session comm.IUserSession, req *pb.PagodaGetListReq) (code pb.ErrorCode, data proto.Message) {
|
||||
_data := &pb.DBPagoda{}
|
||||
code = this.GetListCheck(session, req)
|
||||
if code != pb.ErrorCode_Success {
|
||||
return // 参数校验失败直接返回
|
||||
@ -28,19 +27,17 @@ func (this *apiComp) GetList(session comm.IUserSession, req *pb.MainlineGetListR
|
||||
code = pb.ErrorCode_DBError
|
||||
return
|
||||
}
|
||||
if len(list) == 0 { // 如果数量为0 则默认创建一条数据
|
||||
_data := &pb.DBMainline{}
|
||||
if list == nil { // redis没有数据
|
||||
|
||||
_data.Id = primitive.NewObjectID().Hex()
|
||||
_data.ChapterId = 1 // 默认第一章节
|
||||
|
||||
_mData := make(map[string]interface{}, 0)
|
||||
_data.Uid = session.GetUserId()
|
||||
_mData[_data.Id] = _data
|
||||
|
||||
this.module.modelPagoda.addNewPagoda(session.GetUserId(), _mData)
|
||||
list = append(list, _data)
|
||||
}
|
||||
rsp.Data = list
|
||||
|
||||
session.SendMsg(string(this.module.GetType()), MainlineGetListResp, &pb.MainlineGetListResp{Data: rsp.Data})
|
||||
}
|
||||
|
||||
session.SendMsg(string(this.module.GetType()), PagodaGetListResp, &pb.PagodaGetListResp{Data: _data})
|
||||
return
|
||||
}
|
||||
|
@ -1,32 +1,34 @@
|
||||
package pagoda
|
||||
|
||||
import (
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/lego/core"
|
||||
"go_dreamfactory/lego/sys/redis"
|
||||
"go_dreamfactory/modules"
|
||||
"go_dreamfactory/pb"
|
||||
)
|
||||
|
||||
const ( //Redis
|
||||
TablePagoda core.SqlTable = "pagoda"
|
||||
)
|
||||
|
||||
type ModelPagoda struct {
|
||||
modules.MCompModel
|
||||
module *Pagoda
|
||||
}
|
||||
|
||||
func (this *ModelPagoda) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
|
||||
this.TableName = string(comm.TablePagoda)
|
||||
err = this.MCompModel.Init(service, module, comp, options)
|
||||
this.module = module.(*Pagoda)
|
||||
this.TableName = string(TablePagoda)
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// 获取爬塔信息
|
||||
func (this *ModelPagoda) getPagodaList(uid string) (storys []*pb.DBMainline, err error) {
|
||||
storys = make([]*pb.DBMainline, 0)
|
||||
err = this.GetList(uid, &storys)
|
||||
return
|
||||
func (this *ModelPagoda) getPagodaList(uid string) (result *pb.DBPagoda, err error) {
|
||||
result = &pb.DBPagoda{}
|
||||
if err = this.Get(uid, result); err != nil && redis.RedisNil != err {
|
||||
return
|
||||
}
|
||||
err = nil
|
||||
return result, err
|
||||
}
|
||||
|
||||
// 修改爬塔数据信息
|
||||
@ -43,14 +45,3 @@ func (this *ModelPagoda) addNewPagoda(uId string, data map[string]interface{}) (
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// 获取指定塔数据
|
||||
func (this *ModelPagoda) getPagodaByObjId(uid, obj string) *pb.DBMainline {
|
||||
data := &pb.DBMainline{}
|
||||
err := this.GetListObj(uid, obj, data)
|
||||
if err != nil {
|
||||
this.module.Errorf("%v", err)
|
||||
return nil
|
||||
}
|
||||
return data
|
||||
}
|
||||
|
@ -4,6 +4,7 @@ import (
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/lego/core"
|
||||
"go_dreamfactory/lego/sys/log"
|
||||
"go_dreamfactory/lego/sys/redis"
|
||||
"go_dreamfactory/modules"
|
||||
"go_dreamfactory/pb"
|
||||
)
|
||||
@ -34,10 +35,10 @@ func (this *ModelExpand) getUserSession(uid string) (cuser *pb.CacheUser) {
|
||||
//获取用户通过扩展表
|
||||
func (this *ModelExpand) GetUserExpand(uid string) (result *pb.DBUserExpand, err error) {
|
||||
result = &pb.DBUserExpand{}
|
||||
if err = this.moduleUser.modelExpand.Get(uid, result); err != nil {
|
||||
if err = this.moduleUser.modelExpand.Get(uid, result); err != nil && redis.RedisNil != err {
|
||||
return
|
||||
}
|
||||
|
||||
err = nil
|
||||
return result, err
|
||||
}
|
||||
|
||||
|
@ -73,6 +73,8 @@ const (
|
||||
ErrorCode_FriendApplyError ErrorCode = 1109 //申请失败
|
||||
ErrorCode_FriendBlackMax ErrorCode = 1110 //黑名单最大数量
|
||||
ErrorCode_FriendSearchNameEmpty ErrorCode = 1111 //查询昵称为空
|
||||
ErrorCode_FriendZaned ErrorCode = 1112 //已点赞
|
||||
ErrorCode_FriendZanreceived ErrorCode = 1113 //已领取点赞
|
||||
// item
|
||||
ErrorCode_ItemsNoEnough ErrorCode = 1200 //背包物品不足
|
||||
ErrorCode_ItemsNoFoundGird ErrorCode = 1201 //背包未找到物品格子
|
||||
@ -186,6 +188,8 @@ var (
|
||||
1109: "FriendApplyError",
|
||||
1110: "FriendBlackMax",
|
||||
1111: "FriendSearchNameEmpty",
|
||||
1112: "FriendZaned",
|
||||
1113: "FriendZanreceived",
|
||||
1200: "ItemsNoEnough",
|
||||
1201: "ItemsNoFoundGird",
|
||||
1202: "ItemsGridNumUpper",
|
||||
@ -289,6 +293,8 @@ var (
|
||||
"FriendApplyError": 1109,
|
||||
"FriendBlackMax": 1110,
|
||||
"FriendSearchNameEmpty": 1111,
|
||||
"FriendZaned": 1112,
|
||||
"FriendZanreceived": 1113,
|
||||
"ItemsNoEnough": 1200,
|
||||
"ItemsNoFoundGird": 1201,
|
||||
"ItemsGridNumUpper": 1202,
|
||||
@ -376,7 +382,7 @@ var File_errorcode_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_errorcode_proto_rawDesc = []byte{
|
||||
0x0a, 0x0f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x2a, 0xdb, 0x10, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12,
|
||||
0x6f, 0x2a, 0x85, 0x11, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12,
|
||||
0x0b, 0x0a, 0x07, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d,
|
||||
0x4e, 0x6f, 0x46, 0x69, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x10, 0x0a, 0x12,
|
||||
0x1b, 0x0a, 0x17, 0x4e, 0x6f, 0x46, 0x69, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
|
||||
@ -438,79 +444,82 @@ var file_errorcode_proto_rawDesc = []byte{
|
||||
0x10, 0xd5, 0x08, 0x12, 0x13, 0x0a, 0x0e, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x42, 0x6c, 0x61,
|
||||
0x63, 0x6b, 0x4d, 0x61, 0x78, 0x10, 0xd6, 0x08, 0x12, 0x1a, 0x0a, 0x15, 0x46, 0x72, 0x69, 0x65,
|
||||
0x6e, 0x64, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x4e, 0x61, 0x6d, 0x65, 0x45, 0x6d, 0x70, 0x74,
|
||||
0x79, 0x10, 0xd7, 0x08, 0x12, 0x12, 0x0a, 0x0d, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x4e, 0x6f, 0x45,
|
||||
0x6e, 0x6f, 0x75, 0x67, 0x68, 0x10, 0xb0, 0x09, 0x12, 0x15, 0x0a, 0x10, 0x49, 0x74, 0x65, 0x6d,
|
||||
0x73, 0x4e, 0x6f, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x47, 0x69, 0x72, 0x64, 0x10, 0xb1, 0x09, 0x12,
|
||||
0x16, 0x0a, 0x11, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x47, 0x72, 0x69, 0x64, 0x4e, 0x75, 0x6d, 0x55,
|
||||
0x70, 0x70, 0x65, 0x72, 0x10, 0xb2, 0x09, 0x12, 0x19, 0x0a, 0x14, 0x49, 0x74, 0x65, 0x6d, 0x73,
|
||||
0x47, 0x69, 0x72, 0x64, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x55, 0x70, 0x70, 0x65, 0x72, 0x10,
|
||||
0xb3, 0x09, 0x12, 0x19, 0x0a, 0x14, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x55, 0x73, 0x65, 0x4e, 0x6f,
|
||||
0x74, 0x53, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x10, 0xb4, 0x09, 0x12, 0x10, 0x0a,
|
||||
0x0b, 0x48, 0x65, 0x72, 0x6f, 0x4e, 0x6f, 0x45, 0x78, 0x69, 0x73, 0x74, 0x10, 0x94, 0x0a, 0x12,
|
||||
0x11, 0x0a, 0x0c, 0x48, 0x65, 0x72, 0x6f, 0x4e, 0x6f, 0x45, 0x6e, 0x6f, 0x75, 0x67, 0x68, 0x10,
|
||||
0x95, 0x0a, 0x12, 0x0e, 0x0a, 0x09, 0x48, 0x65, 0x72, 0x6f, 0x4d, 0x61, 0x78, 0x4c, 0x76, 0x10,
|
||||
0x96, 0x0a, 0x12, 0x12, 0x0a, 0x0d, 0x48, 0x65, 0x72, 0x6f, 0x49, 0x6e, 0x69, 0x74, 0x43, 0x72,
|
||||
0x65, 0x61, 0x74, 0x10, 0x97, 0x0a, 0x12, 0x11, 0x0a, 0x0c, 0x48, 0x65, 0x72, 0x6f, 0x43, 0x6f,
|
||||
0x6c, 0x6f, 0x72, 0x45, 0x72, 0x72, 0x10, 0x98, 0x0a, 0x12, 0x13, 0x0a, 0x0e, 0x48, 0x65, 0x72,
|
||||
0x6f, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x55, 0x70, 0x45, 0x72, 0x72, 0x10, 0x99, 0x0a, 0x12, 0x14,
|
||||
0x0a, 0x0f, 0x48, 0x65, 0x72, 0x6f, 0x4d, 0x61, 0x78, 0x52, 0x65, 0x73, 0x6f, 0x6e, 0x61, 0x74,
|
||||
0x65, 0x10, 0x9a, 0x0a, 0x12, 0x13, 0x0a, 0x0e, 0x48, 0x65, 0x72, 0x6f, 0x4e, 0x6f, 0x52, 0x65,
|
||||
0x73, 0x6f, 0x6e, 0x61, 0x74, 0x65, 0x10, 0x9b, 0x0a, 0x12, 0x18, 0x0a, 0x13, 0x48, 0x65, 0x72,
|
||||
0x6f, 0x4e, 0x6f, 0x74, 0x4e, 0x65, 0x65, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x6e, 0x61, 0x74, 0x65,
|
||||
0x10, 0x9c, 0x0a, 0x12, 0x11, 0x0a, 0x0c, 0x48, 0x65, 0x72, 0x6f, 0x4e, 0x6f, 0x45, 0x6e, 0x65,
|
||||
0x72, 0x67, 0x79, 0x10, 0x9d, 0x0a, 0x12, 0x0f, 0x0a, 0x0a, 0x48, 0x65, 0x72, 0x6f, 0x43, 0x72,
|
||||
0x65, 0x61, 0x74, 0x65, 0x10, 0x9e, 0x0a, 0x12, 0x14, 0x0a, 0x0f, 0x48, 0x65, 0x72, 0x6f, 0x45,
|
||||
0x71, 0x75, 0x69, 0x70, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x10, 0x9f, 0x0a, 0x12, 0x12, 0x0a,
|
||||
0x0d, 0x48, 0x65, 0x72, 0x6f, 0x4d, 0x61, 0x78, 0x41, 0x77, 0x61, 0x6b, 0x65, 0x6e, 0x10, 0xa0,
|
||||
0x0a, 0x12, 0x0f, 0x0a, 0x0a, 0x48, 0x65, 0x72, 0x6f, 0x49, 0x73, 0x4c, 0x6f, 0x63, 0x6b, 0x10,
|
||||
0xa1, 0x0a, 0x12, 0x11, 0x0a, 0x0c, 0x48, 0x65, 0x72, 0x6f, 0x4d, 0x61, 0x78, 0x43, 0x6f, 0x75,
|
||||
0x6e, 0x74, 0x10, 0xa2, 0x0a, 0x12, 0x14, 0x0a, 0x0f, 0x48, 0x65, 0x72, 0x6f, 0x43, 0x6f, 0x73,
|
||||
0x74, 0x54, 0x79, 0x70, 0x65, 0x45, 0x72, 0x72, 0x10, 0xa3, 0x0a, 0x12, 0x10, 0x0a, 0x0b, 0x48,
|
||||
0x65, 0x72, 0x6f, 0x53, 0x74, 0x61, 0x72, 0x45, 0x72, 0x72, 0x10, 0xa4, 0x0a, 0x12, 0x10, 0x0a,
|
||||
0x0b, 0x48, 0x65, 0x72, 0x6f, 0x54, 0x79, 0x70, 0x65, 0x45, 0x72, 0x72, 0x10, 0xa5, 0x0a, 0x12,
|
||||
0x13, 0x0a, 0x0e, 0x48, 0x65, 0x72, 0x6f, 0x45, 0x78, 0x70, 0x54, 0x79, 0x70, 0x65, 0x45, 0x72,
|
||||
0x72, 0x10, 0xa6, 0x0a, 0x12, 0x12, 0x0a, 0x0d, 0x48, 0x65, 0x72, 0x6f, 0x41, 0x64, 0x64, 0x4d,
|
||||
0x61, 0x78, 0x45, 0x78, 0x70, 0x10, 0xa7, 0x0a, 0x12, 0x12, 0x0a, 0x0d, 0x48, 0x65, 0x72, 0x6f,
|
||||
0x53, 0x74, 0x61, 0x72, 0x4c, 0x76, 0x45, 0x72, 0x72, 0x10, 0xa8, 0x0a, 0x12, 0x12, 0x0a, 0x0d,
|
||||
0x48, 0x65, 0x72, 0x6f, 0x4d, 0x61, 0x78, 0x53, 0x74, 0x61, 0x72, 0x4c, 0x76, 0x10, 0xa9, 0x0a,
|
||||
0x12, 0x19, 0x0a, 0x14, 0x44, 0x72, 0x61, 0x77, 0x43, 0x61, 0x72, 0x64, 0x54, 0x79, 0x70, 0x65,
|
||||
0x4e, 0x6f, 0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x10, 0xaa, 0x0a, 0x12, 0x13, 0x0a, 0x0e, 0x48,
|
||||
0x65, 0x72, 0x6f, 0x4d, 0x61, 0x78, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x4c, 0x76, 0x10, 0xab, 0x0a,
|
||||
0x12, 0x1e, 0x0a, 0x19, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x4f, 0x6e, 0x46,
|
||||
0x6f, 0x75, 0x6e, 0x64, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0xf8, 0x0a,
|
||||
0x12, 0x1c, 0x0a, 0x17, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x76, 0x6c,
|
||||
0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x61, 0x63, 0x68, 0x65, 0x64, 0x10, 0xf9, 0x0a, 0x12, 0x14,
|
||||
0x0a, 0x0f, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x73, 0x57, 0x6f, 0x72,
|
||||
0x6e, 0x10, 0xfa, 0x0a, 0x12, 0x1b, 0x0a, 0x16, 0x4d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65,
|
||||
0x4e, 0x6f, 0x74, 0x46, 0x69, 0x6e, 0x64, 0x43, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x10, 0xdc,
|
||||
0x0b, 0x12, 0x15, 0x0a, 0x10, 0x4d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x49, 0x44, 0x46,
|
||||
0x61, 0x69, 0x6c, 0x65, 0x64, 0x10, 0xdd, 0x0b, 0x12, 0x15, 0x0a, 0x10, 0x4d, 0x61, 0x69, 0x6e,
|
||||
0x6c, 0x69, 0x6e, 0x65, 0x4e, 0x6f, 0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x10, 0xde, 0x0b, 0x12,
|
||||
0x18, 0x0a, 0x13, 0x4d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x50, 0x72, 0x65, 0x4e, 0x6f,
|
||||
0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x10, 0xdf, 0x0b, 0x12, 0x19, 0x0a, 0x14, 0x4d, 0x61, 0x69,
|
||||
0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x52, 0x65, 0x77, 0x61, 0x72,
|
||||
0x64, 0x10, 0xe0, 0x0b, 0x12, 0x1b, 0x0a, 0x16, 0x4d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65,
|
||||
0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x10, 0xe1,
|
||||
0x0b, 0x12, 0x0d, 0x0a, 0x08, 0x54, 0x61, 0x73, 0x6b, 0x49, 0x6e, 0x69, 0x74, 0x10, 0xc0, 0x0c,
|
||||
0x12, 0x0e, 0x0a, 0x09, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x65, 0x74, 0x10, 0xc1, 0x0c,
|
||||
0x12, 0x0f, 0x0a, 0x0a, 0x54, 0x61, 0x73, 0x6b, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x10, 0xc2,
|
||||
0x0c, 0x12, 0x11, 0x0a, 0x0c, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65,
|
||||
0x64, 0x10, 0xc3, 0x0c, 0x12, 0x13, 0x0a, 0x0e, 0x54, 0x61, 0x73, 0x6b, 0x41, 0x63, 0x74, 0x69,
|
||||
0x76, 0x65, 0x49, 0x6e, 0x69, 0x74, 0x10, 0xc4, 0x0c, 0x12, 0x16, 0x0a, 0x11, 0x54, 0x61, 0x73,
|
||||
0x6b, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x4e, 0x6f, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x10, 0xc5,
|
||||
0x0c, 0x12, 0x17, 0x0a, 0x12, 0x54, 0x61, 0x73, 0x6b, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x4e,
|
||||
0x6f, 0x65, 0x6e, 0x6f, 0x75, 0x67, 0x68, 0x10, 0xc6, 0x0c, 0x12, 0x13, 0x0a, 0x0e, 0x54, 0x61,
|
||||
0x73, 0x6b, 0x4e, 0x6f, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x10, 0xc7, 0x0c, 0x12,
|
||||
0x11, 0x0a, 0x0c, 0x54, 0x61, 0x73, 0x6b, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x10,
|
||||
0xc8, 0x0c, 0x12, 0x11, 0x0a, 0x0c, 0x54, 0x61, 0x73, 0x6b, 0x54, 0x61, 0x67, 0x45, 0x6d, 0x70,
|
||||
0x74, 0x79, 0x10, 0xc9, 0x0c, 0x12, 0x10, 0x0a, 0x0b, 0x54, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x45,
|
||||
0x6d, 0x70, 0x74, 0x79, 0x10, 0xca, 0x0c, 0x12, 0x11, 0x0a, 0x0c, 0x54, 0x61, 0x73, 0x6b, 0x4e,
|
||||
0x6f, 0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x10, 0xcb, 0x0c, 0x12, 0x17, 0x0a, 0x12, 0x53, 0x68,
|
||||
0x6f, 0x70, 0x47, 0x6f, 0x6f, 0x64, 0x73, 0x49, 0x73, 0x53, 0x6f, 0x6c, 0x64, 0x4f, 0x75, 0x74,
|
||||
0x10, 0xa4, 0x0d, 0x12, 0x1c, 0x0a, 0x17, 0x53, 0x68, 0x6f, 0x70, 0x4e, 0x6f, 0x53, 0x75, 0x72,
|
||||
0x70, 0x6c, 0x75, 0x73, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x4e, 0x75, 0x6d, 0x10, 0xa5,
|
||||
0x0d, 0x12, 0x0c, 0x0a, 0x07, 0x4d, 0x61, 0x69, 0x6c, 0x45, 0x72, 0x72, 0x10, 0x88, 0x0e, 0x42,
|
||||
0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x79, 0x10, 0xd7, 0x08, 0x12, 0x10, 0x0a, 0x0b, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x5a, 0x61,
|
||||
0x6e, 0x65, 0x64, 0x10, 0xd8, 0x08, 0x12, 0x16, 0x0a, 0x11, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64,
|
||||
0x5a, 0x61, 0x6e, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x10, 0xd9, 0x08, 0x12, 0x12,
|
||||
0x0a, 0x0d, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x4e, 0x6f, 0x45, 0x6e, 0x6f, 0x75, 0x67, 0x68, 0x10,
|
||||
0xb0, 0x09, 0x12, 0x15, 0x0a, 0x10, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x4e, 0x6f, 0x46, 0x6f, 0x75,
|
||||
0x6e, 0x64, 0x47, 0x69, 0x72, 0x64, 0x10, 0xb1, 0x09, 0x12, 0x16, 0x0a, 0x11, 0x49, 0x74, 0x65,
|
||||
0x6d, 0x73, 0x47, 0x72, 0x69, 0x64, 0x4e, 0x75, 0x6d, 0x55, 0x70, 0x70, 0x65, 0x72, 0x10, 0xb2,
|
||||
0x09, 0x12, 0x19, 0x0a, 0x14, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x47, 0x69, 0x72, 0x64, 0x41, 0x6d,
|
||||
0x6f, 0x75, 0x6e, 0x74, 0x55, 0x70, 0x70, 0x65, 0x72, 0x10, 0xb3, 0x09, 0x12, 0x19, 0x0a, 0x14,
|
||||
0x49, 0x74, 0x65, 0x6d, 0x73, 0x55, 0x73, 0x65, 0x4e, 0x6f, 0x74, 0x53, 0x75, 0x70, 0x70, 0x6f,
|
||||
0x72, 0x74, 0x65, 0x64, 0x10, 0xb4, 0x09, 0x12, 0x10, 0x0a, 0x0b, 0x48, 0x65, 0x72, 0x6f, 0x4e,
|
||||
0x6f, 0x45, 0x78, 0x69, 0x73, 0x74, 0x10, 0x94, 0x0a, 0x12, 0x11, 0x0a, 0x0c, 0x48, 0x65, 0x72,
|
||||
0x6f, 0x4e, 0x6f, 0x45, 0x6e, 0x6f, 0x75, 0x67, 0x68, 0x10, 0x95, 0x0a, 0x12, 0x0e, 0x0a, 0x09,
|
||||
0x48, 0x65, 0x72, 0x6f, 0x4d, 0x61, 0x78, 0x4c, 0x76, 0x10, 0x96, 0x0a, 0x12, 0x12, 0x0a, 0x0d,
|
||||
0x48, 0x65, 0x72, 0x6f, 0x49, 0x6e, 0x69, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x10, 0x97, 0x0a,
|
||||
0x12, 0x11, 0x0a, 0x0c, 0x48, 0x65, 0x72, 0x6f, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x45, 0x72, 0x72,
|
||||
0x10, 0x98, 0x0a, 0x12, 0x13, 0x0a, 0x0e, 0x48, 0x65, 0x72, 0x6f, 0x53, 0x6b, 0x69, 0x6c, 0x6c,
|
||||
0x55, 0x70, 0x45, 0x72, 0x72, 0x10, 0x99, 0x0a, 0x12, 0x14, 0x0a, 0x0f, 0x48, 0x65, 0x72, 0x6f,
|
||||
0x4d, 0x61, 0x78, 0x52, 0x65, 0x73, 0x6f, 0x6e, 0x61, 0x74, 0x65, 0x10, 0x9a, 0x0a, 0x12, 0x13,
|
||||
0x0a, 0x0e, 0x48, 0x65, 0x72, 0x6f, 0x4e, 0x6f, 0x52, 0x65, 0x73, 0x6f, 0x6e, 0x61, 0x74, 0x65,
|
||||
0x10, 0x9b, 0x0a, 0x12, 0x18, 0x0a, 0x13, 0x48, 0x65, 0x72, 0x6f, 0x4e, 0x6f, 0x74, 0x4e, 0x65,
|
||||
0x65, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x6e, 0x61, 0x74, 0x65, 0x10, 0x9c, 0x0a, 0x12, 0x11, 0x0a,
|
||||
0x0c, 0x48, 0x65, 0x72, 0x6f, 0x4e, 0x6f, 0x45, 0x6e, 0x65, 0x72, 0x67, 0x79, 0x10, 0x9d, 0x0a,
|
||||
0x12, 0x0f, 0x0a, 0x0a, 0x48, 0x65, 0x72, 0x6f, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x10, 0x9e,
|
||||
0x0a, 0x12, 0x14, 0x0a, 0x0f, 0x48, 0x65, 0x72, 0x6f, 0x45, 0x71, 0x75, 0x69, 0x70, 0x55, 0x70,
|
||||
0x64, 0x61, 0x74, 0x65, 0x10, 0x9f, 0x0a, 0x12, 0x12, 0x0a, 0x0d, 0x48, 0x65, 0x72, 0x6f, 0x4d,
|
||||
0x61, 0x78, 0x41, 0x77, 0x61, 0x6b, 0x65, 0x6e, 0x10, 0xa0, 0x0a, 0x12, 0x0f, 0x0a, 0x0a, 0x48,
|
||||
0x65, 0x72, 0x6f, 0x49, 0x73, 0x4c, 0x6f, 0x63, 0x6b, 0x10, 0xa1, 0x0a, 0x12, 0x11, 0x0a, 0x0c,
|
||||
0x48, 0x65, 0x72, 0x6f, 0x4d, 0x61, 0x78, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x10, 0xa2, 0x0a, 0x12,
|
||||
0x14, 0x0a, 0x0f, 0x48, 0x65, 0x72, 0x6f, 0x43, 0x6f, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x45,
|
||||
0x72, 0x72, 0x10, 0xa3, 0x0a, 0x12, 0x10, 0x0a, 0x0b, 0x48, 0x65, 0x72, 0x6f, 0x53, 0x74, 0x61,
|
||||
0x72, 0x45, 0x72, 0x72, 0x10, 0xa4, 0x0a, 0x12, 0x10, 0x0a, 0x0b, 0x48, 0x65, 0x72, 0x6f, 0x54,
|
||||
0x79, 0x70, 0x65, 0x45, 0x72, 0x72, 0x10, 0xa5, 0x0a, 0x12, 0x13, 0x0a, 0x0e, 0x48, 0x65, 0x72,
|
||||
0x6f, 0x45, 0x78, 0x70, 0x54, 0x79, 0x70, 0x65, 0x45, 0x72, 0x72, 0x10, 0xa6, 0x0a, 0x12, 0x12,
|
||||
0x0a, 0x0d, 0x48, 0x65, 0x72, 0x6f, 0x41, 0x64, 0x64, 0x4d, 0x61, 0x78, 0x45, 0x78, 0x70, 0x10,
|
||||
0xa7, 0x0a, 0x12, 0x12, 0x0a, 0x0d, 0x48, 0x65, 0x72, 0x6f, 0x53, 0x74, 0x61, 0x72, 0x4c, 0x76,
|
||||
0x45, 0x72, 0x72, 0x10, 0xa8, 0x0a, 0x12, 0x12, 0x0a, 0x0d, 0x48, 0x65, 0x72, 0x6f, 0x4d, 0x61,
|
||||
0x78, 0x53, 0x74, 0x61, 0x72, 0x4c, 0x76, 0x10, 0xa9, 0x0a, 0x12, 0x19, 0x0a, 0x14, 0x44, 0x72,
|
||||
0x61, 0x77, 0x43, 0x61, 0x72, 0x64, 0x54, 0x79, 0x70, 0x65, 0x4e, 0x6f, 0x74, 0x46, 0x6f, 0x75,
|
||||
0x6e, 0x64, 0x10, 0xaa, 0x0a, 0x12, 0x13, 0x0a, 0x0e, 0x48, 0x65, 0x72, 0x6f, 0x4d, 0x61, 0x78,
|
||||
0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x4c, 0x76, 0x10, 0xab, 0x0a, 0x12, 0x1e, 0x0a, 0x19, 0x45, 0x71,
|
||||
0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x4f, 0x6e, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x45, 0x71,
|
||||
0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0xf8, 0x0a, 0x12, 0x1c, 0x0a, 0x17, 0x45, 0x71,
|
||||
0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x76, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65,
|
||||
0x61, 0x63, 0x68, 0x65, 0x64, 0x10, 0xf9, 0x0a, 0x12, 0x14, 0x0a, 0x0f, 0x45, 0x71, 0x75, 0x69,
|
||||
0x70, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x73, 0x57, 0x6f, 0x72, 0x6e, 0x10, 0xfa, 0x0a, 0x12, 0x1b,
|
||||
0x0a, 0x16, 0x4d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x4e, 0x6f, 0x74, 0x46, 0x69, 0x6e,
|
||||
0x64, 0x43, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x10, 0xdc, 0x0b, 0x12, 0x15, 0x0a, 0x10, 0x4d,
|
||||
0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x49, 0x44, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x10,
|
||||
0xdd, 0x0b, 0x12, 0x15, 0x0a, 0x10, 0x4d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x4e, 0x6f,
|
||||
0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x10, 0xde, 0x0b, 0x12, 0x18, 0x0a, 0x13, 0x4d, 0x61, 0x69,
|
||||
0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x50, 0x72, 0x65, 0x4e, 0x6f, 0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64,
|
||||
0x10, 0xdf, 0x0b, 0x12, 0x19, 0x0a, 0x14, 0x4d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x52,
|
||||
0x65, 0x70, 0x65, 0x61, 0x74, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x10, 0xe0, 0x0b, 0x12, 0x1b,
|
||||
0x0a, 0x16, 0x4d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65,
|
||||
0x74, 0x65, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x10, 0xe1, 0x0b, 0x12, 0x0d, 0x0a, 0x08, 0x54,
|
||||
0x61, 0x73, 0x6b, 0x49, 0x6e, 0x69, 0x74, 0x10, 0xc0, 0x0c, 0x12, 0x0e, 0x0a, 0x09, 0x54, 0x61,
|
||||
0x73, 0x6b, 0x52, 0x65, 0x73, 0x65, 0x74, 0x10, 0xc1, 0x0c, 0x12, 0x0f, 0x0a, 0x0a, 0x54, 0x61,
|
||||
0x73, 0x6b, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x10, 0xc2, 0x0c, 0x12, 0x11, 0x0a, 0x0c, 0x54,
|
||||
0x61, 0x73, 0x6b, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x10, 0xc3, 0x0c, 0x12, 0x13,
|
||||
0x0a, 0x0e, 0x54, 0x61, 0x73, 0x6b, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x49, 0x6e, 0x69, 0x74,
|
||||
0x10, 0xc4, 0x0c, 0x12, 0x16, 0x0a, 0x11, 0x54, 0x61, 0x73, 0x6b, 0x41, 0x63, 0x74, 0x69, 0x76,
|
||||
0x65, 0x4e, 0x6f, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x10, 0xc5, 0x0c, 0x12, 0x17, 0x0a, 0x12, 0x54,
|
||||
0x61, 0x73, 0x6b, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x4e, 0x6f, 0x65, 0x6e, 0x6f, 0x75, 0x67,
|
||||
0x68, 0x10, 0xc6, 0x0c, 0x12, 0x13, 0x0a, 0x0e, 0x54, 0x61, 0x73, 0x6b, 0x4e, 0x6f, 0x46, 0x69,
|
||||
0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x10, 0xc7, 0x0c, 0x12, 0x11, 0x0a, 0x0c, 0x54, 0x61, 0x73,
|
||||
0x6b, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x10, 0xc8, 0x0c, 0x12, 0x11, 0x0a, 0x0c,
|
||||
0x54, 0x61, 0x73, 0x6b, 0x54, 0x61, 0x67, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x10, 0xc9, 0x0c, 0x12,
|
||||
0x10, 0x0a, 0x0b, 0x54, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x10, 0xca,
|
||||
0x0c, 0x12, 0x11, 0x0a, 0x0c, 0x54, 0x61, 0x73, 0x6b, 0x4e, 0x6f, 0x74, 0x46, 0x6f, 0x75, 0x6e,
|
||||
0x64, 0x10, 0xcb, 0x0c, 0x12, 0x17, 0x0a, 0x12, 0x53, 0x68, 0x6f, 0x70, 0x47, 0x6f, 0x6f, 0x64,
|
||||
0x73, 0x49, 0x73, 0x53, 0x6f, 0x6c, 0x64, 0x4f, 0x75, 0x74, 0x10, 0xa4, 0x0d, 0x12, 0x1c, 0x0a,
|
||||
0x17, 0x53, 0x68, 0x6f, 0x70, 0x4e, 0x6f, 0x53, 0x75, 0x72, 0x70, 0x6c, 0x75, 0x73, 0x52, 0x65,
|
||||
0x66, 0x72, 0x65, 0x73, 0x68, 0x4e, 0x75, 0x6d, 0x10, 0xa5, 0x0d, 0x12, 0x0c, 0x0a, 0x07, 0x4d,
|
||||
0x61, 0x69, 0x6c, 0x45, 0x72, 0x72, 0x10, 0x88, 0x0e, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70,
|
||||
0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
@ -29,6 +29,7 @@ type DBFriend struct {
|
||||
FriendIds []string `protobuf:"bytes,2,rep,name=friendIds,proto3" json:"friendIds" bson:"friendIds"` //好友ID
|
||||
ApplyIds []string `protobuf:"bytes,3,rep,name=applyIds,proto3" json:"applyIds" bson:"applyIds"` //申请用户ID
|
||||
BlackIds []string `protobuf:"bytes,4,rep,name=blackIds,proto3" json:"blackIds" bson:"blackIds"` //黑名单ID
|
||||
ZanIds []string `protobuf:"bytes,5,rep,name=zanIds,proto3" json:"zanIds" bson:"zanIds"` //点赞好友ID
|
||||
}
|
||||
|
||||
func (x *DBFriend) Reset() {
|
||||
@ -91,19 +92,28 @@ func (x *DBFriend) GetBlackIds() []string {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *DBFriend) GetZanIds() []string {
|
||||
if x != nil {
|
||||
return x.ZanIds
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_friend_friend_db_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_friend_friend_db_proto_rawDesc = []byte{
|
||||
0x0a, 0x16, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2f, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x5f,
|
||||
0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x72, 0x0a, 0x08, 0x44, 0x42, 0x46, 0x72,
|
||||
0x69, 0x65, 0x6e, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64,
|
||||
0x49, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x66, 0x72, 0x69, 0x65, 0x6e,
|
||||
0x64, 0x49, 0x64, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x70, 0x70, 0x6c, 0x79, 0x49, 0x64, 0x73,
|
||||
0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x61, 0x70, 0x70, 0x6c, 0x79, 0x49, 0x64, 0x73,
|
||||
0x12, 0x1a, 0x0a, 0x08, 0x62, 0x6c, 0x61, 0x63, 0x6b, 0x49, 0x64, 0x73, 0x18, 0x04, 0x20, 0x03,
|
||||
0x28, 0x09, 0x52, 0x08, 0x62, 0x6c, 0x61, 0x63, 0x6b, 0x49, 0x64, 0x73, 0x42, 0x06, 0x5a, 0x04,
|
||||
0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8a, 0x01, 0x0a, 0x08, 0x44, 0x42, 0x46,
|
||||
0x72, 0x69, 0x65, 0x6e, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x66, 0x72, 0x69, 0x65, 0x6e,
|
||||
0x64, 0x49, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x66, 0x72, 0x69, 0x65,
|
||||
0x6e, 0x64, 0x49, 0x64, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x70, 0x70, 0x6c, 0x79, 0x49, 0x64,
|
||||
0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x61, 0x70, 0x70, 0x6c, 0x79, 0x49, 0x64,
|
||||
0x73, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x6c, 0x61, 0x63, 0x6b, 0x49, 0x64, 0x73, 0x18, 0x04, 0x20,
|
||||
0x03, 0x28, 0x09, 0x52, 0x08, 0x62, 0x6c, 0x61, 0x63, 0x6b, 0x49, 0x64, 0x73, 0x12, 0x16, 0x0a,
|
||||
0x06, 0x7a, 0x61, 0x6e, 0x49, 0x64, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x7a,
|
||||
0x61, 0x6e, 0x49, 0x64, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
@ -1379,6 +1379,92 @@ func (x *FriendTotalResp) GetTotal() int32 {
|
||||
return 0
|
||||
}
|
||||
|
||||
// 点赞列表
|
||||
type FriendZanlistReq struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
}
|
||||
|
||||
func (x *FriendZanlistReq) Reset() {
|
||||
*x = FriendZanlistReq{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_friend_friend_msg_proto_msgTypes[27]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *FriendZanlistReq) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*FriendZanlistReq) ProtoMessage() {}
|
||||
|
||||
func (x *FriendZanlistReq) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_friend_friend_msg_proto_msgTypes[27]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use FriendZanlistReq.ProtoReflect.Descriptor instead.
|
||||
func (*FriendZanlistReq) Descriptor() ([]byte, []int) {
|
||||
return file_friend_friend_msg_proto_rawDescGZIP(), []int{27}
|
||||
}
|
||||
|
||||
type FriendZanlistResp struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
List []*FriendBase `protobuf:"bytes,1,rep,name=list,proto3" json:"list"`
|
||||
}
|
||||
|
||||
func (x *FriendZanlistResp) Reset() {
|
||||
*x = FriendZanlistResp{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_friend_friend_msg_proto_msgTypes[28]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *FriendZanlistResp) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*FriendZanlistResp) ProtoMessage() {}
|
||||
|
||||
func (x *FriendZanlistResp) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_friend_friend_msg_proto_msgTypes[28]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use FriendZanlistResp.ProtoReflect.Descriptor instead.
|
||||
func (*FriendZanlistResp) Descriptor() ([]byte, []int) {
|
||||
return file_friend_friend_msg_proto_rawDescGZIP(), []int{28}
|
||||
}
|
||||
|
||||
func (x *FriendZanlistResp) GetList() []*FriendBase {
|
||||
if x != nil {
|
||||
return x.List
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// 点赞
|
||||
type FriendZanReq struct {
|
||||
state protoimpl.MessageState
|
||||
@ -1391,7 +1477,7 @@ type FriendZanReq struct {
|
||||
func (x *FriendZanReq) Reset() {
|
||||
*x = FriendZanReq{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_friend_friend_msg_proto_msgTypes[27]
|
||||
mi := &file_friend_friend_msg_proto_msgTypes[29]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -1404,7 +1490,7 @@ func (x *FriendZanReq) String() string {
|
||||
func (*FriendZanReq) ProtoMessage() {}
|
||||
|
||||
func (x *FriendZanReq) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_friend_friend_msg_proto_msgTypes[27]
|
||||
mi := &file_friend_friend_msg_proto_msgTypes[29]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -1417,7 +1503,7 @@ func (x *FriendZanReq) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use FriendZanReq.ProtoReflect.Descriptor instead.
|
||||
func (*FriendZanReq) Descriptor() ([]byte, []int) {
|
||||
return file_friend_friend_msg_proto_rawDescGZIP(), []int{27}
|
||||
return file_friend_friend_msg_proto_rawDescGZIP(), []int{29}
|
||||
}
|
||||
|
||||
func (x *FriendZanReq) GetFriendId() string {
|
||||
@ -1438,7 +1524,7 @@ type FriendZanResp struct {
|
||||
func (x *FriendZanResp) Reset() {
|
||||
*x = FriendZanResp{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_friend_friend_msg_proto_msgTypes[28]
|
||||
mi := &file_friend_friend_msg_proto_msgTypes[30]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -1451,7 +1537,7 @@ func (x *FriendZanResp) String() string {
|
||||
func (*FriendZanResp) ProtoMessage() {}
|
||||
|
||||
func (x *FriendZanResp) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_friend_friend_msg_proto_msgTypes[28]
|
||||
mi := &file_friend_friend_msg_proto_msgTypes[30]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -1464,7 +1550,7 @@ func (x *FriendZanResp) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use FriendZanResp.ProtoReflect.Descriptor instead.
|
||||
func (*FriendZanResp) Descriptor() ([]byte, []int) {
|
||||
return file_friend_friend_msg_proto_rawDescGZIP(), []int{28}
|
||||
return file_friend_friend_msg_proto_rawDescGZIP(), []int{30}
|
||||
}
|
||||
|
||||
func (x *FriendZanResp) GetFlag() bool {
|
||||
@ -1474,6 +1560,101 @@ func (x *FriendZanResp) GetFlag() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
//接收点赞
|
||||
type FriendZanreceiveReq struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
FriendId string `protobuf:"bytes,1,opt,name=friendId,proto3" json:"friendId"`
|
||||
}
|
||||
|
||||
func (x *FriendZanreceiveReq) Reset() {
|
||||
*x = FriendZanreceiveReq{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_friend_friend_msg_proto_msgTypes[31]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *FriendZanreceiveReq) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*FriendZanreceiveReq) ProtoMessage() {}
|
||||
|
||||
func (x *FriendZanreceiveReq) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_friend_friend_msg_proto_msgTypes[31]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use FriendZanreceiveReq.ProtoReflect.Descriptor instead.
|
||||
func (*FriendZanreceiveReq) Descriptor() ([]byte, []int) {
|
||||
return file_friend_friend_msg_proto_rawDescGZIP(), []int{31}
|
||||
}
|
||||
|
||||
func (x *FriendZanreceiveReq) GetFriendId() string {
|
||||
if x != nil {
|
||||
return x.FriendId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type FriendZanreceiveResp struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Flag bool `protobuf:"varint,1,opt,name=flag,proto3" json:"flag"`
|
||||
}
|
||||
|
||||
func (x *FriendZanreceiveResp) Reset() {
|
||||
*x = FriendZanreceiveResp{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_friend_friend_msg_proto_msgTypes[32]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *FriendZanreceiveResp) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*FriendZanreceiveResp) ProtoMessage() {}
|
||||
|
||||
func (x *FriendZanreceiveResp) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_friend_friend_msg_proto_msgTypes[32]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use FriendZanreceiveResp.ProtoReflect.Descriptor instead.
|
||||
func (*FriendZanreceiveResp) Descriptor() ([]byte, []int) {
|
||||
return file_friend_friend_msg_proto_rawDescGZIP(), []int{32}
|
||||
}
|
||||
|
||||
func (x *FriendZanreceiveResp) GetFlag() bool {
|
||||
if x != nil {
|
||||
return x.Flag
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
var File_friend_friend_msg_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_friend_friend_msg_proto_rawDesc = []byte{
|
||||
@ -1574,13 +1755,24 @@ var file_friend_friend_msg_proto_rawDesc = []byte{
|
||||
0x74, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x72, 0x69, 0x65, 0x6e,
|
||||
0x64, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x72, 0x69, 0x65, 0x6e,
|
||||
0x64, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01,
|
||||
0x28, 0x05, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x22, 0x2a, 0x0a, 0x0c, 0x46, 0x72, 0x69,
|
||||
0x65, 0x6e, 0x64, 0x5a, 0x61, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x72, 0x69,
|
||||
0x65, 0x6e, 0x64, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x72, 0x69,
|
||||
0x65, 0x6e, 0x64, 0x49, 0x64, 0x22, 0x23, 0x0a, 0x0d, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x5a,
|
||||
0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x6c, 0x61, 0x67, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x66, 0x6c, 0x61, 0x67, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b,
|
||||
0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x28, 0x05, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x22, 0x12, 0x0a, 0x10, 0x46, 0x72, 0x69,
|
||||
0x65, 0x6e, 0x64, 0x5a, 0x61, 0x6e, 0x6c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x22, 0x34, 0x0a,
|
||||
0x11, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x5a, 0x61, 0x6e, 0x6c, 0x69, 0x73, 0x74, 0x52, 0x65,
|
||||
0x73, 0x70, 0x12, 0x1f, 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b,
|
||||
0x32, 0x0b, 0x2e, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x42, 0x61, 0x73, 0x65, 0x52, 0x04, 0x6c,
|
||||
0x69, 0x73, 0x74, 0x22, 0x2a, 0x0a, 0x0c, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x5a, 0x61, 0x6e,
|
||||
0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, 0x64, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, 0x64, 0x22,
|
||||
0x23, 0x0a, 0x0d, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x5a, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70,
|
||||
0x12, 0x12, 0x0a, 0x04, 0x66, 0x6c, 0x61, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04,
|
||||
0x66, 0x6c, 0x61, 0x67, 0x22, 0x31, 0x0a, 0x13, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x5a, 0x61,
|
||||
0x6e, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x66,
|
||||
0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66,
|
||||
0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, 0x64, 0x22, 0x2a, 0x0a, 0x14, 0x46, 0x72, 0x69, 0x65, 0x6e,
|
||||
0x64, 0x5a, 0x61, 0x6e, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12,
|
||||
0x12, 0x0a, 0x04, 0x66, 0x6c, 0x61, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x66,
|
||||
0x6c, 0x61, 0x67, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
@ -1595,48 +1787,53 @@ func file_friend_friend_msg_proto_rawDescGZIP() []byte {
|
||||
return file_friend_friend_msg_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_friend_friend_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 29)
|
||||
var file_friend_friend_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 33)
|
||||
var file_friend_friend_msg_proto_goTypes = []interface{}{
|
||||
(*FriendBase)(nil), // 0: FriendBase
|
||||
(*FriendListReq)(nil), // 1: FriendListReq
|
||||
(*FriendListResp)(nil), // 2: FriendListResp
|
||||
(*FriendApplyReq)(nil), // 3: FriendApplyReq
|
||||
(*FriendApplyResp)(nil), // 4: FriendApplyResp
|
||||
(*FriendDelReq)(nil), // 5: FriendDelReq
|
||||
(*FriendDelResp)(nil), // 6: FriendDelResp
|
||||
(*FriendAgreeReq)(nil), // 7: FriendAgreeReq
|
||||
(*FriendAgreeResp)(nil), // 8: FriendAgreeResp
|
||||
(*FriendRefuseReq)(nil), // 9: FriendRefuseReq
|
||||
(*FriendRefuseResp)(nil), // 10: FriendRefuseResp
|
||||
(*FriendApplyListReq)(nil), // 11: FriendApplyListReq
|
||||
(*FriendApplyListResp)(nil), // 12: FriendApplyListResp
|
||||
(*FriendSearchReq)(nil), // 13: FriendSearchReq
|
||||
(*FriendSearchResp)(nil), // 14: FriendSearchResp
|
||||
(*FriendBlackListReq)(nil), // 15: FriendBlackListReq
|
||||
(*FriendBlackListResp)(nil), // 16: FriendBlackListResp
|
||||
(*FriendBlackAddReq)(nil), // 17: FriendBlackAddReq
|
||||
(*FriendBlackAddResp)(nil), // 18: FriendBlackAddResp
|
||||
(*FriendDelBlackReq)(nil), // 19: FriendDelBlackReq
|
||||
(*FriendDelBlackResp)(nil), // 20: FriendDelBlackResp
|
||||
(*FriendReceiveReq)(nil), // 21: FriendReceiveReq
|
||||
(*FriendReceiveResp)(nil), // 22: FriendReceiveResp
|
||||
(*FriendGiveReq)(nil), // 23: FriendGiveReq
|
||||
(*FriendGiveResp)(nil), // 24: FriendGiveResp
|
||||
(*FriendTotalReq)(nil), // 25: FriendTotalReq
|
||||
(*FriendTotalResp)(nil), // 26: FriendTotalResp
|
||||
(*FriendZanReq)(nil), // 27: FriendZanReq
|
||||
(*FriendZanResp)(nil), // 28: FriendZanResp
|
||||
(*FriendBase)(nil), // 0: FriendBase
|
||||
(*FriendListReq)(nil), // 1: FriendListReq
|
||||
(*FriendListResp)(nil), // 2: FriendListResp
|
||||
(*FriendApplyReq)(nil), // 3: FriendApplyReq
|
||||
(*FriendApplyResp)(nil), // 4: FriendApplyResp
|
||||
(*FriendDelReq)(nil), // 5: FriendDelReq
|
||||
(*FriendDelResp)(nil), // 6: FriendDelResp
|
||||
(*FriendAgreeReq)(nil), // 7: FriendAgreeReq
|
||||
(*FriendAgreeResp)(nil), // 8: FriendAgreeResp
|
||||
(*FriendRefuseReq)(nil), // 9: FriendRefuseReq
|
||||
(*FriendRefuseResp)(nil), // 10: FriendRefuseResp
|
||||
(*FriendApplyListReq)(nil), // 11: FriendApplyListReq
|
||||
(*FriendApplyListResp)(nil), // 12: FriendApplyListResp
|
||||
(*FriendSearchReq)(nil), // 13: FriendSearchReq
|
||||
(*FriendSearchResp)(nil), // 14: FriendSearchResp
|
||||
(*FriendBlackListReq)(nil), // 15: FriendBlackListReq
|
||||
(*FriendBlackListResp)(nil), // 16: FriendBlackListResp
|
||||
(*FriendBlackAddReq)(nil), // 17: FriendBlackAddReq
|
||||
(*FriendBlackAddResp)(nil), // 18: FriendBlackAddResp
|
||||
(*FriendDelBlackReq)(nil), // 19: FriendDelBlackReq
|
||||
(*FriendDelBlackResp)(nil), // 20: FriendDelBlackResp
|
||||
(*FriendReceiveReq)(nil), // 21: FriendReceiveReq
|
||||
(*FriendReceiveResp)(nil), // 22: FriendReceiveResp
|
||||
(*FriendGiveReq)(nil), // 23: FriendGiveReq
|
||||
(*FriendGiveResp)(nil), // 24: FriendGiveResp
|
||||
(*FriendTotalReq)(nil), // 25: FriendTotalReq
|
||||
(*FriendTotalResp)(nil), // 26: FriendTotalResp
|
||||
(*FriendZanlistReq)(nil), // 27: FriendZanlistReq
|
||||
(*FriendZanlistResp)(nil), // 28: FriendZanlistResp
|
||||
(*FriendZanReq)(nil), // 29: FriendZanReq
|
||||
(*FriendZanResp)(nil), // 30: FriendZanResp
|
||||
(*FriendZanreceiveReq)(nil), // 31: FriendZanreceiveReq
|
||||
(*FriendZanreceiveResp)(nil), // 32: FriendZanreceiveResp
|
||||
}
|
||||
var file_friend_friend_msg_proto_depIdxs = []int32{
|
||||
0, // 0: FriendListResp.list:type_name -> FriendBase
|
||||
0, // 1: FriendApplyListResp.list:type_name -> FriendBase
|
||||
0, // 2: FriendSearchResp.friend:type_name -> FriendBase
|
||||
0, // 3: FriendBlackListResp.friends:type_name -> FriendBase
|
||||
4, // [4:4] is the sub-list for method output_type
|
||||
4, // [4:4] is the sub-list for method input_type
|
||||
4, // [4:4] is the sub-list for extension type_name
|
||||
4, // [4:4] is the sub-list for extension extendee
|
||||
0, // [0:4] is the sub-list for field type_name
|
||||
0, // 4: FriendZanlistResp.list:type_name -> FriendBase
|
||||
5, // [5:5] is the sub-list for method output_type
|
||||
5, // [5:5] is the sub-list for method input_type
|
||||
5, // [5:5] is the sub-list for extension type_name
|
||||
5, // [5:5] is the sub-list for extension extendee
|
||||
0, // [0:5] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_friend_friend_msg_proto_init() }
|
||||
@ -1970,7 +2167,7 @@ func file_friend_friend_msg_proto_init() {
|
||||
}
|
||||
}
|
||||
file_friend_friend_msg_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*FriendZanReq); i {
|
||||
switch v := v.(*FriendZanlistReq); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
@ -1982,6 +2179,30 @@ func file_friend_friend_msg_proto_init() {
|
||||
}
|
||||
}
|
||||
file_friend_friend_msg_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*FriendZanlistResp); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_friend_friend_msg_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*FriendZanReq); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_friend_friend_msg_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*FriendZanResp); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -1993,6 +2214,30 @@ func file_friend_friend_msg_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_friend_friend_msg_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*FriendZanreceiveReq); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_friend_friend_msg_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*FriendZanreceiveResp); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
@ -2000,7 +2245,7 @@ func file_friend_friend_msg_proto_init() {
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_friend_friend_msg_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 29,
|
||||
NumMessages: 33,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
|
176
pb/pagoda_db.pb.go
Normal file
176
pb/pagoda_db.pb.go
Normal file
@ -0,0 +1,176 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.28.0
|
||||
// protoc v3.20.0
|
||||
// source: pagoda/pagoda_db.proto
|
||||
|
||||
package pb
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
type DBPagoda struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id" bson:"_id"` //ID
|
||||
Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid" bson:"uid"` //用户ID
|
||||
PagodaId int32 `protobuf:"varint,3,opt,name=pagodaId,proto3" json:"pagodaId" bson:"chapterId"` //塔层
|
||||
Reward map[int32]bool `protobuf:"bytes,4,rep,name=reward,proto3" json:"reward" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // 是否领奖
|
||||
}
|
||||
|
||||
func (x *DBPagoda) Reset() {
|
||||
*x = DBPagoda{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_pagoda_pagoda_db_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *DBPagoda) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*DBPagoda) ProtoMessage() {}
|
||||
|
||||
func (x *DBPagoda) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_pagoda_pagoda_db_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use DBPagoda.ProtoReflect.Descriptor instead.
|
||||
func (*DBPagoda) Descriptor() ([]byte, []int) {
|
||||
return file_pagoda_pagoda_db_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *DBPagoda) GetId() string {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *DBPagoda) GetUid() string {
|
||||
if x != nil {
|
||||
return x.Uid
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *DBPagoda) GetPagodaId() int32 {
|
||||
if x != nil {
|
||||
return x.PagodaId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *DBPagoda) GetReward() map[int32]bool {
|
||||
if x != nil {
|
||||
return x.Reward
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_pagoda_pagoda_db_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_pagoda_pagoda_db_proto_rawDesc = []byte{
|
||||
0x0a, 0x16, 0x70, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x2f, 0x70, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x5f,
|
||||
0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb2, 0x01, 0x0a, 0x08, 0x44, 0x42, 0x50,
|
||||
0x61, 0x67, 0x6f, 0x64, 0x61, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x67, 0x6f, 0x64,
|
||||
0x61, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x6f, 0x64,
|
||||
0x61, 0x49, 0x64, 0x12, 0x2d, 0x0a, 0x06, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x18, 0x04, 0x20,
|
||||
0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x44, 0x42, 0x50, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x2e, 0x52,
|
||||
0x65, 0x77, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x72, 0x65, 0x77, 0x61,
|
||||
0x72, 0x64, 0x1a, 0x39, 0x0a, 0x0b, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72,
|
||||
0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03,
|
||||
0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01,
|
||||
0x28, 0x08, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x06, 0x5a,
|
||||
0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_pagoda_pagoda_db_proto_rawDescOnce sync.Once
|
||||
file_pagoda_pagoda_db_proto_rawDescData = file_pagoda_pagoda_db_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_pagoda_pagoda_db_proto_rawDescGZIP() []byte {
|
||||
file_pagoda_pagoda_db_proto_rawDescOnce.Do(func() {
|
||||
file_pagoda_pagoda_db_proto_rawDescData = protoimpl.X.CompressGZIP(file_pagoda_pagoda_db_proto_rawDescData)
|
||||
})
|
||||
return file_pagoda_pagoda_db_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_pagoda_pagoda_db_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
||||
var file_pagoda_pagoda_db_proto_goTypes = []interface{}{
|
||||
(*DBPagoda)(nil), // 0: DBPagoda
|
||||
nil, // 1: DBPagoda.RewardEntry
|
||||
}
|
||||
var file_pagoda_pagoda_db_proto_depIdxs = []int32{
|
||||
1, // 0: DBPagoda.reward:type_name -> DBPagoda.RewardEntry
|
||||
1, // [1:1] is the sub-list for method output_type
|
||||
1, // [1:1] is the sub-list for method input_type
|
||||
1, // [1:1] is the sub-list for extension type_name
|
||||
1, // [1:1] is the sub-list for extension extendee
|
||||
0, // [0:1] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_pagoda_pagoda_db_proto_init() }
|
||||
func file_pagoda_pagoda_db_proto_init() {
|
||||
if File_pagoda_pagoda_db_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_pagoda_pagoda_db_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DBPagoda); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_pagoda_pagoda_db_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 2,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_pagoda_pagoda_db_proto_goTypes,
|
||||
DependencyIndexes: file_pagoda_pagoda_db_proto_depIdxs,
|
||||
MessageInfos: file_pagoda_pagoda_db_proto_msgTypes,
|
||||
}.Build()
|
||||
File_pagoda_pagoda_db_proto = out.File
|
||||
file_pagoda_pagoda_db_proto_rawDesc = nil
|
||||
file_pagoda_pagoda_db_proto_goTypes = nil
|
||||
file_pagoda_pagoda_db_proto_depIdxs = nil
|
||||
}
|
457
pb/pagoda_msg.pb.go
Normal file
457
pb/pagoda_msg.pb.go
Normal file
@ -0,0 +1,457 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.28.0
|
||||
// protoc v3.20.0
|
||||
// source: pagoda/pagoda_msg.proto
|
||||
|
||||
package pb
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
// 查询塔进度
|
||||
type PagodaGetListReq struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
}
|
||||
|
||||
func (x *PagodaGetListReq) Reset() {
|
||||
*x = PagodaGetListReq{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_pagoda_pagoda_msg_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *PagodaGetListReq) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*PagodaGetListReq) ProtoMessage() {}
|
||||
|
||||
func (x *PagodaGetListReq) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_pagoda_pagoda_msg_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use PagodaGetListReq.ProtoReflect.Descriptor instead.
|
||||
func (*PagodaGetListReq) Descriptor() ([]byte, []int) {
|
||||
return file_pagoda_pagoda_msg_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
// 返回进度信息
|
||||
type PagodaGetListResp struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Data *DBPagoda `protobuf:"bytes,1,opt,name=data,proto3" json:"data"`
|
||||
}
|
||||
|
||||
func (x *PagodaGetListResp) Reset() {
|
||||
*x = PagodaGetListResp{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_pagoda_pagoda_msg_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *PagodaGetListResp) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*PagodaGetListResp) ProtoMessage() {}
|
||||
|
||||
func (x *PagodaGetListResp) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_pagoda_pagoda_msg_proto_msgTypes[1]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use PagodaGetListResp.ProtoReflect.Descriptor instead.
|
||||
func (*PagodaGetListResp) Descriptor() ([]byte, []int) {
|
||||
return file_pagoda_pagoda_msg_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *PagodaGetListResp) GetData() *DBPagoda {
|
||||
if x != nil {
|
||||
return x.Data
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// 领取关卡宝箱
|
||||
type PagodaGetRewardReq struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id"` // 对应 task_reward 表中的id
|
||||
}
|
||||
|
||||
func (x *PagodaGetRewardReq) Reset() {
|
||||
*x = PagodaGetRewardReq{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_pagoda_pagoda_msg_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *PagodaGetRewardReq) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*PagodaGetRewardReq) ProtoMessage() {}
|
||||
|
||||
func (x *PagodaGetRewardReq) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_pagoda_pagoda_msg_proto_msgTypes[2]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use PagodaGetRewardReq.ProtoReflect.Descriptor instead.
|
||||
func (*PagodaGetRewardReq) Descriptor() ([]byte, []int) {
|
||||
return file_pagoda_pagoda_msg_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *PagodaGetRewardReq) GetId() int32 {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type PagodaGetRewardResp struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Data *DBPagoda `protobuf:"bytes,1,opt,name=data,proto3" json:"data"`
|
||||
}
|
||||
|
||||
func (x *PagodaGetRewardResp) Reset() {
|
||||
*x = PagodaGetRewardResp{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_pagoda_pagoda_msg_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *PagodaGetRewardResp) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*PagodaGetRewardResp) ProtoMessage() {}
|
||||
|
||||
func (x *PagodaGetRewardResp) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_pagoda_pagoda_msg_proto_msgTypes[3]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use PagodaGetRewardResp.ProtoReflect.Descriptor instead.
|
||||
func (*PagodaGetRewardResp) Descriptor() ([]byte, []int) {
|
||||
return file_pagoda_pagoda_msg_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *PagodaGetRewardResp) GetData() *DBPagoda {
|
||||
if x != nil {
|
||||
return x.Data
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// 挑战
|
||||
type PagodaChallengeReq struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
LevelID int32 `protobuf:"varint,1,opt,name=levelID,proto3" json:"levelID"` // 挑战的关卡ID
|
||||
}
|
||||
|
||||
func (x *PagodaChallengeReq) Reset() {
|
||||
*x = PagodaChallengeReq{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_pagoda_pagoda_msg_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *PagodaChallengeReq) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*PagodaChallengeReq) ProtoMessage() {}
|
||||
|
||||
func (x *PagodaChallengeReq) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_pagoda_pagoda_msg_proto_msgTypes[4]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use PagodaChallengeReq.ProtoReflect.Descriptor instead.
|
||||
func (*PagodaChallengeReq) Descriptor() ([]byte, []int) {
|
||||
return file_pagoda_pagoda_msg_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (x *PagodaChallengeReq) GetLevelID() int32 {
|
||||
if x != nil {
|
||||
return x.LevelID
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type PagodaChallengeResp struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Data *DBPagoda `protobuf:"bytes,1,opt,name=data,proto3" json:"data"`
|
||||
}
|
||||
|
||||
func (x *PagodaChallengeResp) Reset() {
|
||||
*x = PagodaChallengeResp{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_pagoda_pagoda_msg_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *PagodaChallengeResp) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*PagodaChallengeResp) ProtoMessage() {}
|
||||
|
||||
func (x *PagodaChallengeResp) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_pagoda_pagoda_msg_proto_msgTypes[5]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use PagodaChallengeResp.ProtoReflect.Descriptor instead.
|
||||
func (*PagodaChallengeResp) Descriptor() ([]byte, []int) {
|
||||
return file_pagoda_pagoda_msg_proto_rawDescGZIP(), []int{5}
|
||||
}
|
||||
|
||||
func (x *PagodaChallengeResp) GetData() *DBPagoda {
|
||||
if x != nil {
|
||||
return x.Data
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_pagoda_pagoda_msg_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_pagoda_pagoda_msg_proto_rawDesc = []byte{
|
||||
0x0a, 0x17, 0x70, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x2f, 0x70, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x5f,
|
||||
0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x16, 0x70, 0x61, 0x67, 0x6f, 0x64,
|
||||
0x61, 0x2f, 0x70, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x22, 0x12, 0x0a, 0x10, 0x50, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x47, 0x65, 0x74, 0x4c, 0x69,
|
||||
0x73, 0x74, 0x52, 0x65, 0x71, 0x22, 0x32, 0x0a, 0x11, 0x50, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x47,
|
||||
0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x04, 0x64, 0x61,
|
||||
0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x44, 0x42, 0x50, 0x61, 0x67,
|
||||
0x6f, 0x64, 0x61, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x24, 0x0a, 0x12, 0x50, 0x61, 0x67,
|
||||
0x6f, 0x64, 0x61, 0x47, 0x65, 0x74, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x12,
|
||||
0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x22,
|
||||
0x34, 0x0a, 0x13, 0x50, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x47, 0x65, 0x74, 0x52, 0x65, 0x77, 0x61,
|
||||
0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x44, 0x42, 0x50, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x52,
|
||||
0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x2e, 0x0a, 0x12, 0x50, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x43,
|
||||
0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x6c,
|
||||
0x65, 0x76, 0x65, 0x6c, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x6c, 0x65,
|
||||
0x76, 0x65, 0x6c, 0x49, 0x44, 0x22, 0x34, 0x0a, 0x13, 0x50, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x43,
|
||||
0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x04,
|
||||
0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x44, 0x42, 0x50,
|
||||
0x61, 0x67, 0x6f, 0x64, 0x61, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x42, 0x06, 0x5a, 0x04, 0x2e,
|
||||
0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_pagoda_pagoda_msg_proto_rawDescOnce sync.Once
|
||||
file_pagoda_pagoda_msg_proto_rawDescData = file_pagoda_pagoda_msg_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_pagoda_pagoda_msg_proto_rawDescGZIP() []byte {
|
||||
file_pagoda_pagoda_msg_proto_rawDescOnce.Do(func() {
|
||||
file_pagoda_pagoda_msg_proto_rawDescData = protoimpl.X.CompressGZIP(file_pagoda_pagoda_msg_proto_rawDescData)
|
||||
})
|
||||
return file_pagoda_pagoda_msg_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_pagoda_pagoda_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
|
||||
var file_pagoda_pagoda_msg_proto_goTypes = []interface{}{
|
||||
(*PagodaGetListReq)(nil), // 0: PagodaGetListReq
|
||||
(*PagodaGetListResp)(nil), // 1: PagodaGetListResp
|
||||
(*PagodaGetRewardReq)(nil), // 2: PagodaGetRewardReq
|
||||
(*PagodaGetRewardResp)(nil), // 3: PagodaGetRewardResp
|
||||
(*PagodaChallengeReq)(nil), // 4: PagodaChallengeReq
|
||||
(*PagodaChallengeResp)(nil), // 5: PagodaChallengeResp
|
||||
(*DBPagoda)(nil), // 6: DBPagoda
|
||||
}
|
||||
var file_pagoda_pagoda_msg_proto_depIdxs = []int32{
|
||||
6, // 0: PagodaGetListResp.data:type_name -> DBPagoda
|
||||
6, // 1: PagodaGetRewardResp.data:type_name -> DBPagoda
|
||||
6, // 2: PagodaChallengeResp.data:type_name -> DBPagoda
|
||||
3, // [3:3] is the sub-list for method output_type
|
||||
3, // [3:3] is the sub-list for method input_type
|
||||
3, // [3:3] is the sub-list for extension type_name
|
||||
3, // [3:3] is the sub-list for extension extendee
|
||||
0, // [0:3] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_pagoda_pagoda_msg_proto_init() }
|
||||
func file_pagoda_pagoda_msg_proto_init() {
|
||||
if File_pagoda_pagoda_msg_proto != nil {
|
||||
return
|
||||
}
|
||||
file_pagoda_pagoda_db_proto_init()
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_pagoda_pagoda_msg_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*PagodaGetListReq); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_pagoda_pagoda_msg_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*PagodaGetListResp); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_pagoda_pagoda_msg_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*PagodaGetRewardReq); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_pagoda_pagoda_msg_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*PagodaGetRewardResp); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_pagoda_pagoda_msg_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*PagodaChallengeReq); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_pagoda_pagoda_msg_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*PagodaChallengeResp); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_pagoda_pagoda_msg_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 6,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_pagoda_pagoda_msg_proto_goTypes,
|
||||
DependencyIndexes: file_pagoda_pagoda_msg_proto_depIdxs,
|
||||
MessageInfos: file_pagoda_pagoda_msg_proto_msgTypes,
|
||||
}.Build()
|
||||
File_pagoda_pagoda_msg_proto = out.File
|
||||
file_pagoda_pagoda_msg_proto_rawDesc = nil
|
||||
file_pagoda_pagoda_msg_proto_goTypes = nil
|
||||
file_pagoda_pagoda_msg_proto_depIdxs = nil
|
||||
}
|
Loading…
Reference in New Issue
Block a user