上传藏宝图
This commit is contained in:
parent
8b79cd7aae
commit
ab07e59c30
50
modules/treasuremap/api_award.go
Normal file
50
modules/treasuremap/api_award.go
Normal file
@ -0,0 +1,50 @@
|
||||
package treasuremap
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/pb"
|
||||
)
|
||||
|
||||
// 参数校验
|
||||
func (this *apiComp) AwardCheck(session comm.IUserSession, req *pb.TreasuremapAwardReq) (errdata *pb.ErrorData) {
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// /获取系统公告
|
||||
func (this *apiComp) Award(session comm.IUserSession, req *pb.TreasuremapAwardReq) (errdata *pb.ErrorData) {
|
||||
var (
|
||||
info *pb.DBTreasuremap
|
||||
ok bool
|
||||
err error
|
||||
)
|
||||
if errdata = this.AwardCheck(session, req); errdata != nil {
|
||||
return
|
||||
}
|
||||
|
||||
if info, err = this.module.model.getModel(session.GetUserId()); err != nil {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_ConfigNoFound,
|
||||
Title: pb.ErrorCode_ConfigNoFound.ToString(),
|
||||
Message: err.Error(),
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
if _, ok = info.Treasuremap[req.Id]; ok {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_ReqParameterError,
|
||||
Title: pb.ErrorCode_ReqParameterError.ToString(),
|
||||
Message: fmt.Sprintf("Treasuremap Claimed!", req.Id),
|
||||
}
|
||||
}
|
||||
|
||||
info.Treasuremap[req.Id] = true
|
||||
|
||||
this.module.model.Change(session.GetUserId(), map[string]interface{}{
|
||||
"treasuremap": info.Treasuremap,
|
||||
})
|
||||
session.SendMsg(string(this.module.GetType()), "award", &pb.TreasuremapAwardResp{})
|
||||
return
|
||||
}
|
34
modules/treasuremap/api_info.go
Normal file
34
modules/treasuremap/api_info.go
Normal file
@ -0,0 +1,34 @@
|
||||
package treasuremap
|
||||
|
||||
import (
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/pb"
|
||||
)
|
||||
|
||||
// 参数校验
|
||||
func (this *apiComp) InfoCheck(session comm.IUserSession, req *pb.TreasuremapInfoReq) (errdata *pb.ErrorData) {
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// /获取系统公告
|
||||
func (this *apiComp) Info(session comm.IUserSession, req *pb.TreasuremapInfoReq) (errdata *pb.ErrorData) {
|
||||
var (
|
||||
info *pb.DBTreasuremap
|
||||
err error
|
||||
)
|
||||
if errdata = this.InfoCheck(session, req); errdata != nil {
|
||||
return
|
||||
}
|
||||
|
||||
if info, err = this.module.model.getModel(session.GetUserId()); err != nil {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_ConfigNoFound,
|
||||
Title: pb.ErrorCode_ConfigNoFound.ToString(),
|
||||
Message: err.Error(),
|
||||
}
|
||||
return
|
||||
}
|
||||
session.SendMsg(string(this.module.GetType()), "info", &pb.TreasuremapInfoResp{Info: info})
|
||||
return
|
||||
}
|
@ -27,17 +27,17 @@ func (this *modelComp) Init(service core.IService, module core.IModule, comp cor
|
||||
}
|
||||
|
||||
// 获取用户全部的埋点数据
|
||||
func (this *modelComp) getModel(uid string) (info *pb.DBDColor, err error) {
|
||||
info = &pb.DBDColor{}
|
||||
func (this *modelComp) getModel(uid string) (info *pb.DBTreasuremap, err error) {
|
||||
info = &pb.DBTreasuremap{}
|
||||
if err = this.Get(uid, info); err != nil && err != mgo.MongodbNil {
|
||||
this.module.Errorln(err)
|
||||
return
|
||||
}
|
||||
if err == mgo.MongodbNil {
|
||||
info = &pb.DBDColor{
|
||||
Id: primitive.NewObjectID().Hex(),
|
||||
Uid: uid,
|
||||
Integral: 0,
|
||||
info = &pb.DBTreasuremap{
|
||||
Id: primitive.NewObjectID().Hex(),
|
||||
Uid: uid,
|
||||
Treasuremap: make(map[int32]bool),
|
||||
}
|
||||
err = this.Add(uid, info)
|
||||
}
|
||||
|
@ -33,6 +33,7 @@ func (this *TreasureMap) Init(service core.IService, module core.IModule, option
|
||||
this.service = service.(comm.IService)
|
||||
return
|
||||
}
|
||||
|
||||
func (this *TreasureMap) OnInstallComp() {
|
||||
this.ModuleBase.OnInstallComp()
|
||||
this.api = this.RegisterComp(new(apiComp)).(*apiComp)
|
||||
|
170
pb/treasuremap_db.pb.go
Normal file
170
pb/treasuremap_db.pb.go
Normal file
@ -0,0 +1,170 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.28.0
|
||||
// protoc v3.20.0
|
||||
// source: treasuremap/treasuremap_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 DBTreasuremap struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id" bson:"_id"`
|
||||
Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid"`
|
||||
Treasuremap map[int32]bool `protobuf:"bytes,3,rep,name=treasuremap,proto3" json:"treasuremap" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"`
|
||||
}
|
||||
|
||||
func (x *DBTreasuremap) Reset() {
|
||||
*x = DBTreasuremap{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_treasuremap_treasuremap_db_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *DBTreasuremap) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*DBTreasuremap) ProtoMessage() {}
|
||||
|
||||
func (x *DBTreasuremap) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_treasuremap_treasuremap_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 DBTreasuremap.ProtoReflect.Descriptor instead.
|
||||
func (*DBTreasuremap) Descriptor() ([]byte, []int) {
|
||||
return file_treasuremap_treasuremap_db_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *DBTreasuremap) GetId() string {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *DBTreasuremap) GetUid() string {
|
||||
if x != nil {
|
||||
return x.Uid
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *DBTreasuremap) GetTreasuremap() map[int32]bool {
|
||||
if x != nil {
|
||||
return x.Treasuremap
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_treasuremap_treasuremap_db_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_treasuremap_treasuremap_db_proto_rawDesc = []byte{
|
||||
0x0a, 0x20, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x6d, 0x61, 0x70, 0x2f, 0x74, 0x72,
|
||||
0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x6d, 0x61, 0x70, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x22, 0xb4, 0x01, 0x0a, 0x0d, 0x44, 0x42, 0x54, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72,
|
||||
0x65, 0x6d, 0x61, 0x70, 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, 0x41, 0x0a, 0x0b, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75,
|
||||
0x72, 0x65, 0x6d, 0x61, 0x70, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x44, 0x42,
|
||||
0x54, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x6d, 0x61, 0x70, 0x2e, 0x54, 0x72, 0x65, 0x61,
|
||||
0x73, 0x75, 0x72, 0x65, 0x6d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0b, 0x74, 0x72,
|
||||
0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x6d, 0x61, 0x70, 0x1a, 0x3e, 0x0a, 0x10, 0x54, 0x72, 0x65,
|
||||
0x61, 0x73, 0x75, 0x72, 0x65, 0x6d, 0x61, 0x70, 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_treasuremap_treasuremap_db_proto_rawDescOnce sync.Once
|
||||
file_treasuremap_treasuremap_db_proto_rawDescData = file_treasuremap_treasuremap_db_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_treasuremap_treasuremap_db_proto_rawDescGZIP() []byte {
|
||||
file_treasuremap_treasuremap_db_proto_rawDescOnce.Do(func() {
|
||||
file_treasuremap_treasuremap_db_proto_rawDescData = protoimpl.X.CompressGZIP(file_treasuremap_treasuremap_db_proto_rawDescData)
|
||||
})
|
||||
return file_treasuremap_treasuremap_db_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_treasuremap_treasuremap_db_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
||||
var file_treasuremap_treasuremap_db_proto_goTypes = []interface{}{
|
||||
(*DBTreasuremap)(nil), // 0: DBTreasuremap
|
||||
nil, // 1: DBTreasuremap.TreasuremapEntry
|
||||
}
|
||||
var file_treasuremap_treasuremap_db_proto_depIdxs = []int32{
|
||||
1, // 0: DBTreasuremap.treasuremap:type_name -> DBTreasuremap.TreasuremapEntry
|
||||
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_treasuremap_treasuremap_db_proto_init() }
|
||||
func file_treasuremap_treasuremap_db_proto_init() {
|
||||
if File_treasuremap_treasuremap_db_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_treasuremap_treasuremap_db_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DBTreasuremap); 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_treasuremap_treasuremap_db_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 2,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_treasuremap_treasuremap_db_proto_goTypes,
|
||||
DependencyIndexes: file_treasuremap_treasuremap_db_proto_depIdxs,
|
||||
MessageInfos: file_treasuremap_treasuremap_db_proto_msgTypes,
|
||||
}.Build()
|
||||
File_treasuremap_treasuremap_db_proto = out.File
|
||||
file_treasuremap_treasuremap_db_proto_rawDesc = nil
|
||||
file_treasuremap_treasuremap_db_proto_goTypes = nil
|
||||
file_treasuremap_treasuremap_db_proto_depIdxs = nil
|
||||
}
|
326
pb/treasuremap_msg.pb.go
Normal file
326
pb/treasuremap_msg.pb.go
Normal file
@ -0,0 +1,326 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.28.0
|
||||
// protoc v3.20.0
|
||||
// source: treasuremap/treasuremap_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 TreasuremapInfoReq struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id"`
|
||||
}
|
||||
|
||||
func (x *TreasuremapInfoReq) Reset() {
|
||||
*x = TreasuremapInfoReq{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_treasuremap_treasuremap_msg_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *TreasuremapInfoReq) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*TreasuremapInfoReq) ProtoMessage() {}
|
||||
|
||||
func (x *TreasuremapInfoReq) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_treasuremap_treasuremap_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 TreasuremapInfoReq.ProtoReflect.Descriptor instead.
|
||||
func (*TreasuremapInfoReq) Descriptor() ([]byte, []int) {
|
||||
return file_treasuremap_treasuremap_msg_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *TreasuremapInfoReq) GetId() int32 {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type TreasuremapInfoResp struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Info *DBTreasuremap `protobuf:"bytes,1,opt,name=info,proto3" json:"info"` //获取资源
|
||||
}
|
||||
|
||||
func (x *TreasuremapInfoResp) Reset() {
|
||||
*x = TreasuremapInfoResp{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_treasuremap_treasuremap_msg_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *TreasuremapInfoResp) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*TreasuremapInfoResp) ProtoMessage() {}
|
||||
|
||||
func (x *TreasuremapInfoResp) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_treasuremap_treasuremap_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 TreasuremapInfoResp.ProtoReflect.Descriptor instead.
|
||||
func (*TreasuremapInfoResp) Descriptor() ([]byte, []int) {
|
||||
return file_treasuremap_treasuremap_msg_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *TreasuremapInfoResp) GetInfo() *DBTreasuremap {
|
||||
if x != nil {
|
||||
return x.Info
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type TreasuremapAwardReq struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id"`
|
||||
}
|
||||
|
||||
func (x *TreasuremapAwardReq) Reset() {
|
||||
*x = TreasuremapAwardReq{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_treasuremap_treasuremap_msg_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *TreasuremapAwardReq) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*TreasuremapAwardReq) ProtoMessage() {}
|
||||
|
||||
func (x *TreasuremapAwardReq) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_treasuremap_treasuremap_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 TreasuremapAwardReq.ProtoReflect.Descriptor instead.
|
||||
func (*TreasuremapAwardReq) Descriptor() ([]byte, []int) {
|
||||
return file_treasuremap_treasuremap_msg_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *TreasuremapAwardReq) GetId() int32 {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type TreasuremapAwardResp struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
}
|
||||
|
||||
func (x *TreasuremapAwardResp) Reset() {
|
||||
*x = TreasuremapAwardResp{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_treasuremap_treasuremap_msg_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *TreasuremapAwardResp) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*TreasuremapAwardResp) ProtoMessage() {}
|
||||
|
||||
func (x *TreasuremapAwardResp) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_treasuremap_treasuremap_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 TreasuremapAwardResp.ProtoReflect.Descriptor instead.
|
||||
func (*TreasuremapAwardResp) Descriptor() ([]byte, []int) {
|
||||
return file_treasuremap_treasuremap_msg_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
var File_treasuremap_treasuremap_msg_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_treasuremap_treasuremap_msg_proto_rawDesc = []byte{
|
||||
0x0a, 0x21, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x6d, 0x61, 0x70, 0x2f, 0x74, 0x72,
|
||||
0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x6d, 0x61, 0x70, 0x5f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x6d, 0x61, 0x70,
|
||||
0x2f, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x6d, 0x61, 0x70, 0x5f, 0x64, 0x62, 0x2e,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x24, 0x0a, 0x12, 0x54, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72,
|
||||
0x65, 0x6d, 0x61, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x12, 0x0e, 0x0a, 0x02, 0x69,
|
||||
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x22, 0x39, 0x0a, 0x13, 0x54,
|
||||
0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x6d, 0x61, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65,
|
||||
0x73, 0x70, 0x12, 0x22, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b,
|
||||
0x32, 0x0e, 0x2e, 0x44, 0x42, 0x54, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x6d, 0x61, 0x70,
|
||||
0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0x25, 0x0a, 0x13, 0x54, 0x72, 0x65, 0x61, 0x73, 0x75,
|
||||
0x72, 0x65, 0x6d, 0x61, 0x70, 0x41, 0x77, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x12, 0x0e, 0x0a,
|
||||
0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x22, 0x16, 0x0a,
|
||||
0x14, 0x54, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x6d, 0x61, 0x70, 0x41, 0x77, 0x61, 0x72,
|
||||
0x64, 0x52, 0x65, 0x73, 0x70, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_treasuremap_treasuremap_msg_proto_rawDescOnce sync.Once
|
||||
file_treasuremap_treasuremap_msg_proto_rawDescData = file_treasuremap_treasuremap_msg_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_treasuremap_treasuremap_msg_proto_rawDescGZIP() []byte {
|
||||
file_treasuremap_treasuremap_msg_proto_rawDescOnce.Do(func() {
|
||||
file_treasuremap_treasuremap_msg_proto_rawDescData = protoimpl.X.CompressGZIP(file_treasuremap_treasuremap_msg_proto_rawDescData)
|
||||
})
|
||||
return file_treasuremap_treasuremap_msg_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_treasuremap_treasuremap_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
|
||||
var file_treasuremap_treasuremap_msg_proto_goTypes = []interface{}{
|
||||
(*TreasuremapInfoReq)(nil), // 0: TreasuremapInfoReq
|
||||
(*TreasuremapInfoResp)(nil), // 1: TreasuremapInfoResp
|
||||
(*TreasuremapAwardReq)(nil), // 2: TreasuremapAwardReq
|
||||
(*TreasuremapAwardResp)(nil), // 3: TreasuremapAwardResp
|
||||
(*DBTreasuremap)(nil), // 4: DBTreasuremap
|
||||
}
|
||||
var file_treasuremap_treasuremap_msg_proto_depIdxs = []int32{
|
||||
4, // 0: TreasuremapInfoResp.info:type_name -> DBTreasuremap
|
||||
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_treasuremap_treasuremap_msg_proto_init() }
|
||||
func file_treasuremap_treasuremap_msg_proto_init() {
|
||||
if File_treasuremap_treasuremap_msg_proto != nil {
|
||||
return
|
||||
}
|
||||
file_treasuremap_treasuremap_db_proto_init()
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_treasuremap_treasuremap_msg_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*TreasuremapInfoReq); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_treasuremap_treasuremap_msg_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*TreasuremapInfoResp); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_treasuremap_treasuremap_msg_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*TreasuremapAwardReq); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_treasuremap_treasuremap_msg_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*TreasuremapAwardResp); 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_treasuremap_treasuremap_msg_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 4,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_treasuremap_treasuremap_msg_proto_goTypes,
|
||||
DependencyIndexes: file_treasuremap_treasuremap_msg_proto_depIdxs,
|
||||
MessageInfos: file_treasuremap_treasuremap_msg_proto_msgTypes,
|
||||
}.Build()
|
||||
File_treasuremap_treasuremap_msg_proto = out.File
|
||||
file_treasuremap_treasuremap_msg_proto_rawDesc = nil
|
||||
file_treasuremap_treasuremap_msg_proto_goTypes = nil
|
||||
file_treasuremap_treasuremap_msg_proto_depIdxs = nil
|
||||
}
|
@ -64,6 +64,7 @@ import (
|
||||
"go_dreamfactory/modules/storyline"
|
||||
"go_dreamfactory/modules/sys"
|
||||
"go_dreamfactory/modules/tools"
|
||||
"go_dreamfactory/modules/treasuremap"
|
||||
"go_dreamfactory/modules/turntable"
|
||||
"go_dreamfactory/modules/uigame"
|
||||
"go_dreamfactory/modules/user"
|
||||
@ -174,6 +175,7 @@ func main() {
|
||||
entertainment.NewModule(),
|
||||
dcolor.NewModule(),
|
||||
maincity.NewModule(),
|
||||
treasuremap.NewModule(),
|
||||
)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user