调试上传

This commit is contained in:
meixiongfeng 2023-09-07 18:31:44 +08:00
parent bf9a56b291
commit 1df2df9367
7 changed files with 65 additions and 67 deletions

View File

@ -105,7 +105,6 @@ func (this *ModuleSys) AutoActivate(session comm.IUserSession, cids []string) bo
szOpen = append(szOpen, cid)
}
}
}
if len(szOpen) > 0 {
this.modelSys.ChangeOpenCondData(session.GetUserId(), map[string]interface{}{

View File

@ -7,7 +7,7 @@ import (
)
// 参数校验
func (this *apiComp) LvRewardCheck(session comm.IUserSession, req *pb.VenturLvRewardReq) (errdata *pb.ErrorData) {
func (this *apiComp) LvRewardCheck(session comm.IUserSession, req *pb.VentureLvRewardReq) (errdata *pb.ErrorData) {
if req.Cid == 0 {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_ReqParameterError,
@ -17,7 +17,7 @@ func (this *apiComp) LvRewardCheck(session comm.IUserSession, req *pb.VenturLvRe
return
}
func (this *apiComp) LvReward(session comm.IUserSession, req *pb.VenturLvRewardReq) (errdata *pb.ErrorData) {
func (this *apiComp) LvReward(session comm.IUserSession, req *pb.VentureLvRewardReq) (errdata *pb.ErrorData) {
var (
err error
conf *cfg.GameVenturegiftsLvawardData
@ -49,25 +49,22 @@ func (this *apiComp) LvReward(session comm.IUserSession, req *pb.VenturLvRewardR
// 等级校验
if user = this.module.ModuleUser.GetUser(session.GetUserId()); user == nil {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_DBError,
Title: pb.ErrorCode_DBError.ToString(),
Message: err.Error(),
Code: pb.ErrorCode_DBError,
Title: pb.ErrorCode_DBError.ToString(),
}
return
}
if conf.Lvcondition > user.Lv { // 等级不够
errdata = &pb.ErrorData{
Code: pb.ErrorCode_ActivityCantReward,
Title: pb.ErrorCode_ActivityCantReward.ToString(),
Message: err.Error(),
Code: pb.ErrorCode_ActivityCantReward,
Title: pb.ErrorCode_ActivityCantReward.ToString(),
}
return
}
if _, ok := ventureLv.Reward[req.Cid]; ok {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_ActivityRepatReward,
Title: pb.ErrorCode_ActivityRepatReward.ToString(),
Message: err.Error(),
Code: pb.ErrorCode_ActivityRepatReward,
Title: pb.ErrorCode_ActivityRepatReward.ToString(),
}
return
}
@ -78,7 +75,7 @@ func (this *apiComp) LvReward(session comm.IUserSession, req *pb.VenturLvRewardR
this.module.ModelSign.Change(session.GetUserId(), map[string]interface{}{
"reward": ventureLv.Reward,
})
session.SendMsg(string(this.module.GetType()), "lvreward", &pb.VenturLvRewardResp{
session.SendMsg(string(this.module.GetType()), "lvreward", &pb.VentureLvRewardResp{
Data: ventureLv,
Atno: atno,
})

View File

@ -7,7 +7,7 @@ import (
)
// 参数校验
func (this *apiComp) ReceiveCheck(session comm.IUserSession, req *pb.VentureSignRewardReq) (errdata *pb.ErrorData) {
func (this *apiComp) SignRewardCheck(session comm.IUserSession, req *pb.VentureSignRewardReq) (errdata *pb.ErrorData) {
if req.Day == 0 {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_ReqParameterError,
@ -17,14 +17,14 @@ func (this *apiComp) ReceiveCheck(session comm.IUserSession, req *pb.VentureSign
return
}
func (this *apiComp) Receive(session comm.IUserSession, req *pb.VentureSignRewardReq) (errdata *pb.ErrorData) {
func (this *apiComp) SignReward(session comm.IUserSession, req *pb.VentureSignRewardReq) (errdata *pb.ErrorData) {
var (
err error
conf *cfg.GameVenturegiftsLoginData
sign *pb.DBVentureSign
atno []*pb.UserAtno
)
if errdata = this.ReceiveCheck(session, req); errdata != nil {
if errdata = this.SignRewardCheck(session, req); errdata != nil {
return
}
@ -47,17 +47,15 @@ func (this *apiComp) Receive(session comm.IUserSession, req *pb.VentureSignRewar
if len(sign.Sign) >= int(sign.Val) {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_ActivityCantReward,
Title: pb.ErrorCode_ActivityCantReward.ToString(),
Message: err.Error(),
Code: pb.ErrorCode_ActivityCantReward,
Title: pb.ErrorCode_ActivityCantReward.ToString(),
}
return
}
if _, ok := sign.Sign[req.Day]; ok {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_ActivityRepatReward,
Title: pb.ErrorCode_ActivityRepatReward.ToString(),
Message: err.Error(),
Code: pb.ErrorCode_ActivityRepatReward,
Title: pb.ErrorCode_ActivityRepatReward.ToString(),
}
return
}

View File

@ -4,6 +4,7 @@ import (
"go_dreamfactory/comm"
"go_dreamfactory/lego/core"
"go_dreamfactory/modules"
"go_dreamfactory/sys/configure"
cfg "go_dreamfactory/sys/configure/structs"
)
@ -20,9 +21,18 @@ type configureComp struct {
func (this *configureComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
err = this.MCompConfigure.Init(service, module, comp, options)
this.module = module.(*Venture)
err = this.LoadMultiConfigure(map[string]interface{}{
game_venturegiflogin: cfg.NewGameVenturegiftsLogin,
game_venturegiftslvaward: cfg.NewGameVenturegiftsLvaward,
})
this.getGameVenturegiftsLogin(1)
return
}
//读取配置数据
func (this *configureComp) GetConfigure(name string) (v interface{}, err error) {
return configure.GetConfigure(name)
}
func (this *configureComp) getGameVenturegiftsLogin(id int32) (conf *cfg.GameVenturegiftsLoginData, err error) {
var (
v interface{}

View File

@ -30,8 +30,8 @@ const (
HdType_XSFundPhysical HdType = 4 //现时活动 体力基金
HdType_XSFundRecruit HdType = 5 //现时活动 招募基金
HdType_XSFundExp HdType = 6 //现时活动 经验基金
//HdType_HdLevel HdType = 7 //开服等级活动
//HdType_HdTypeSign HdType = 8 //七日签到
HdType_HdLevel HdType = 7 //开服等级活动
HdType_HdTypeSign HdType = 8 //七日签到
HdType_HdTypeDraw HdType = 9 //圣桃招募
HdType_AddUpRecharge HdType = 10 //累计充值
HdType_ShopCenterPayPakcge HdType = 11 //活动中心限时礼包

View File

@ -443,8 +443,6 @@ const (
ErrorCode_ActivityNotIntime ErrorCode = 5004 // 不在活动时间范围
ErrorCode_ActivityInvalid ErrorCode = 5005 // 不存在的活动
ErrorCode_ActivityCantReward ErrorCode = 5006 // 还不能领奖
//捕羊大赛的
ErrorCode_CapturesheepRankCloseed ErrorCode = 5101 //排位比赛不在开启时间内
)
// Enum value maps for ErrorCode.
@ -827,7 +825,6 @@ var (
5004: "ActivityNotIntime",
5005: "ActivityInvalid",
5006: "ActivityCantReward",
5101: "CapturesheepRankCloseed",
}
ErrorCode_value = map[string]int32{
"Success": 0,
@ -1207,7 +1204,6 @@ var (
"ActivityNotIntime": 5004,
"ActivityInvalid": 5005,
"ActivityCantReward": 5006,
"CapturesheepRankCloseed": 5101,
}
)
@ -1242,7 +1238,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, 0x91, 0x46, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12,
0x6f, 0x2a, 0xf3, 0x45, 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, 0x14, 0x0a, 0x10,
0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x45, 0x78, 0x63, 0x65, 0x70, 0x74, 0x69, 0x6f, 0x6e,
0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x4e, 0x6f, 0x46, 0x69, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76,
@ -1801,10 +1797,8 @@ var file_errorcode_proto_rawDesc = []byte{
0x6e, 0x74, 0x69, 0x6d, 0x65, 0x10, 0x8c, 0x27, 0x12, 0x14, 0x0a, 0x0f, 0x41, 0x63, 0x74, 0x69,
0x76, 0x69, 0x74, 0x79, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x10, 0x8d, 0x27, 0x12, 0x17,
0x0a, 0x12, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x43, 0x61, 0x6e, 0x74, 0x52, 0x65,
0x77, 0x61, 0x72, 0x64, 0x10, 0x8e, 0x27, 0x12, 0x1c, 0x0a, 0x17, 0x43, 0x61, 0x70, 0x74, 0x75,
0x72, 0x65, 0x73, 0x68, 0x65, 0x65, 0x70, 0x52, 0x61, 0x6e, 0x6b, 0x43, 0x6c, 0x6f, 0x73, 0x65,
0x65, 0x64, 0x10, 0xed, 0x27, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x33,
0x77, 0x61, 0x72, 0x64, 0x10, 0x8e, 0x27, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62,
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (

View File

@ -294,7 +294,7 @@ func (x *VentureLvGetListResp) GetData() *DBVentureLv {
return nil
}
type VenturLvRewardReq struct {
type VentureLvRewardReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
@ -302,8 +302,8 @@ type VenturLvRewardReq struct {
Cid int32 `protobuf:"varint,1,opt,name=cid,proto3" json:"cid"` // 配置表id
}
func (x *VenturLvRewardReq) Reset() {
*x = VenturLvRewardReq{}
func (x *VentureLvRewardReq) Reset() {
*x = VentureLvRewardReq{}
if protoimpl.UnsafeEnabled {
mi := &file_venture_venture_msg_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -311,13 +311,13 @@ func (x *VenturLvRewardReq) Reset() {
}
}
func (x *VenturLvRewardReq) String() string {
func (x *VentureLvRewardReq) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*VenturLvRewardReq) ProtoMessage() {}
func (*VentureLvRewardReq) ProtoMessage() {}
func (x *VenturLvRewardReq) ProtoReflect() protoreflect.Message {
func (x *VentureLvRewardReq) ProtoReflect() protoreflect.Message {
mi := &file_venture_venture_msg_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -329,19 +329,19 @@ func (x *VenturLvRewardReq) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
// Deprecated: Use VenturLvRewardReq.ProtoReflect.Descriptor instead.
func (*VenturLvRewardReq) Descriptor() ([]byte, []int) {
// Deprecated: Use VentureLvRewardReq.ProtoReflect.Descriptor instead.
func (*VentureLvRewardReq) Descriptor() ([]byte, []int) {
return file_venture_venture_msg_proto_rawDescGZIP(), []int{6}
}
func (x *VenturLvRewardReq) GetCid() int32 {
func (x *VentureLvRewardReq) GetCid() int32 {
if x != nil {
return x.Cid
}
return 0
}
type VenturLvRewardResp struct {
type VentureLvRewardResp struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
@ -350,8 +350,8 @@ type VenturLvRewardResp struct {
Atno []*UserAtno `protobuf:"bytes,2,rep,name=atno,proto3" json:"atno"`
}
func (x *VenturLvRewardResp) Reset() {
*x = VenturLvRewardResp{}
func (x *VentureLvRewardResp) Reset() {
*x = VentureLvRewardResp{}
if protoimpl.UnsafeEnabled {
mi := &file_venture_venture_msg_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -359,13 +359,13 @@ func (x *VenturLvRewardResp) Reset() {
}
}
func (x *VenturLvRewardResp) String() string {
func (x *VentureLvRewardResp) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*VenturLvRewardResp) ProtoMessage() {}
func (*VentureLvRewardResp) ProtoMessage() {}
func (x *VenturLvRewardResp) ProtoReflect() protoreflect.Message {
func (x *VentureLvRewardResp) ProtoReflect() protoreflect.Message {
mi := &file_venture_venture_msg_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -377,19 +377,19 @@ func (x *VenturLvRewardResp) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
// Deprecated: Use VenturLvRewardResp.ProtoReflect.Descriptor instead.
func (*VenturLvRewardResp) Descriptor() ([]byte, []int) {
// Deprecated: Use VentureLvRewardResp.ProtoReflect.Descriptor instead.
func (*VentureLvRewardResp) Descriptor() ([]byte, []int) {
return file_venture_venture_msg_proto_rawDescGZIP(), []int{7}
}
func (x *VenturLvRewardResp) GetData() *DBVentureLv {
func (x *VentureLvRewardResp) GetData() *DBVentureLv {
if x != nil {
return x.Data
}
return nil
}
func (x *VenturLvRewardResp) GetAtno() []*UserAtno {
func (x *VentureLvRewardResp) GetAtno() []*UserAtno {
if x != nil {
return x.Atno
}
@ -422,15 +422,15 @@ var file_venture_venture_msg_proto_rawDesc = []byte{
0x4c, 0x76, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x20, 0x0a,
0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x44, 0x42,
0x56, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, 0x4c, 0x76, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22,
0x25, 0x0a, 0x11, 0x56, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x4c, 0x76, 0x52, 0x65, 0x77, 0x61, 0x72,
0x64, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
0x05, 0x52, 0x03, 0x63, 0x69, 0x64, 0x22, 0x55, 0x0a, 0x12, 0x56, 0x65, 0x6e, 0x74, 0x75, 0x72,
0x4c, 0x76, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x20, 0x0a, 0x04,
0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x44, 0x42, 0x56,
0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, 0x4c, 0x76, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1d,
0x0a, 0x04, 0x61, 0x74, 0x6e, 0x6f, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x55,
0x73, 0x65, 0x72, 0x41, 0x74, 0x6e, 0x6f, 0x52, 0x04, 0x61, 0x74, 0x6e, 0x6f, 0x42, 0x06, 0x5a,
0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x26, 0x0a, 0x12, 0x56, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, 0x4c, 0x76, 0x52, 0x65, 0x77, 0x61,
0x72, 0x64, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
0x28, 0x05, 0x52, 0x03, 0x63, 0x69, 0x64, 0x22, 0x56, 0x0a, 0x13, 0x56, 0x65, 0x6e, 0x74, 0x75,
0x72, 0x65, 0x4c, 0x76, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x20,
0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x44,
0x42, 0x56, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, 0x4c, 0x76, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61,
0x12, 0x1d, 0x0a, 0x04, 0x61, 0x74, 0x6e, 0x6f, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x09,
0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x74, 0x6e, 0x6f, 0x52, 0x04, 0x61, 0x74, 0x6e, 0x6f, 0x42,
0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@ -453,8 +453,8 @@ var file_venture_venture_msg_proto_goTypes = []interface{}{
(*VentureSignRewardResp)(nil), // 3: VentureSignRewardResp
(*VentureLvGetListReq)(nil), // 4: VentureLvGetListReq
(*VentureLvGetListResp)(nil), // 5: VentureLvGetListResp
(*VenturLvRewardReq)(nil), // 6: VenturLvRewardReq
(*VenturLvRewardResp)(nil), // 7: VenturLvRewardResp
(*VentureLvRewardReq)(nil), // 6: VentureLvRewardReq
(*VentureLvRewardResp)(nil), // 7: VentureLvRewardResp
(*DBVentureSign)(nil), // 8: DBVentureSign
(*UserAtno)(nil), // 9: UserAtno
(*DBVentureLv)(nil), // 10: DBVentureLv
@ -464,8 +464,8 @@ var file_venture_venture_msg_proto_depIdxs = []int32{
8, // 1: VentureSignRewardResp.sign:type_name -> DBVentureSign
9, // 2: VentureSignRewardResp.atno:type_name -> UserAtno
10, // 3: VentureLvGetListResp.data:type_name -> DBVentureLv
10, // 4: VenturLvRewardResp.data:type_name -> DBVentureLv
9, // 5: VenturLvRewardResp.atno:type_name -> UserAtno
10, // 4: VentureLvRewardResp.data:type_name -> DBVentureLv
9, // 5: VentureLvRewardResp.atno:type_name -> UserAtno
6, // [6:6] is the sub-list for method output_type
6, // [6:6] is the sub-list for method input_type
6, // [6:6] is the sub-list for extension type_name
@ -554,7 +554,7 @@ func file_venture_venture_msg_proto_init() {
}
}
file_venture_venture_msg_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*VenturLvRewardReq); i {
switch v := v.(*VentureLvRewardReq); i {
case 0:
return &v.state
case 1:
@ -566,7 +566,7 @@ func file_venture_venture_msg_proto_init() {
}
}
file_venture_venture_msg_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*VenturLvRewardResp); i {
switch v := v.(*VentureLvRewardResp); i {
case 0:
return &v.state
case 1: