上传会长弹劾
This commit is contained in:
parent
a2fad05df7
commit
4383d49694
@ -29,6 +29,15 @@ func (this *apiComp) Accuse(session comm.IUserSession, req *pb.SociatyAccuseReq)
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if sociaty.AccuseTime > 0 { //正在弹劾中
|
||||||
|
errdata = &pb.ErrorData{
|
||||||
|
Code: pb.ErrorCode_ReqParameterError,
|
||||||
|
Title: pb.ErrorCode_ReqParameterError.ToString(),
|
||||||
|
Message: "AccuseTime > 0, Accuseing",
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
// 校验权限
|
// 校验权限
|
||||||
if !this.module.modelSociaty.isRight(uid, sociaty,
|
if !this.module.modelSociaty.isRight(uid, sociaty,
|
||||||
pb.SociatyJob_VICEPRESIDENT,
|
pb.SociatyJob_VICEPRESIDENT,
|
||||||
@ -69,6 +78,7 @@ func (this *apiComp) Accuse(session comm.IUserSession, req *pb.SociatyAccuseReq)
|
|||||||
|
|
||||||
rsp := &pb.SociatyAccuseResp{
|
rsp := &pb.SociatyAccuseResp{
|
||||||
SociatyId: sociaty.Id,
|
SociatyId: sociaty.Id,
|
||||||
|
AccuseTime: sociaty.AccuseTime,
|
||||||
}
|
}
|
||||||
|
|
||||||
session.SendMsg(string(this.module.GetType()), SociatySubTypeAccuse, rsp)
|
session.SendMsg(string(this.module.GetType()), SociatySubTypeAccuse, rsp)
|
||||||
|
@ -643,9 +643,10 @@ func (this *ModelSociaty) accuse(sociaty *pb.DBSociaty) error {
|
|||||||
if left < int64(globalCnf.GuildInitiateImpeachmentTime*3600) || user.Offlinetime == 0 {
|
if left < int64(globalCnf.GuildInitiateImpeachmentTime*3600) || user.Offlinetime == 0 {
|
||||||
return comm.NewCustomError(pb.ErrorCode_SociatyNoAccuse)
|
return comm.NewCustomError(pb.ErrorCode_SociatyNoAccuse)
|
||||||
} else {
|
} else {
|
||||||
|
sociaty.AccuseTime = utils.AddHour(int(globalCnf.GuildImpeachmentCountDown)).Unix()
|
||||||
//更新会长的弹劾倒计时时间
|
//更新会长的弹劾倒计时时间
|
||||||
update := map[string]interface{}{
|
update := map[string]interface{}{
|
||||||
"accuseTime": utils.AddHour(int(globalCnf.GuildImpeachmentCountDown)).Unix(),
|
"accuseTime": sociaty.AccuseTime,
|
||||||
}
|
}
|
||||||
return this.updateSociaty(sociaty.Id, update)
|
return this.updateSociaty(sociaty.Id, update)
|
||||||
}
|
}
|
||||||
|
@ -401,7 +401,7 @@ func (*CapturesheepUseItemResp) Descriptor() ([]byte, []int) {
|
|||||||
return file_capturesheep_capturesheep_msg_proto_rawDescGZIP(), []int{7}
|
return file_capturesheep_capturesheep_msg_proto_rawDescGZIP(), []int{7}
|
||||||
}
|
}
|
||||||
|
|
||||||
//捕养大赛使用道具
|
//捕养大赛结算
|
||||||
type CapturesheepOverReq struct {
|
type CapturesheepOverReq struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
@ -457,7 +457,7 @@ func (x *CapturesheepOverReq) GetRating() int32 {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
//捕养大赛使用道具
|
//捕养大赛结算
|
||||||
type CapturesheepOverResp struct {
|
type CapturesheepOverResp struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
@ -585,7 +585,7 @@ func (x *CapturesheepWeekRewardReq) GetId() int32 {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
//捕养大赛使用道具
|
//周长奖励请求
|
||||||
type CapturesheepWeekRewardResp struct {
|
type CapturesheepWeekRewardResp struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
@ -680,7 +680,7 @@ func (*CapturesheepAllWeekRewardReq) Descriptor() ([]byte, []int) {
|
|||||||
return file_capturesheep_capturesheep_msg_proto_rawDescGZIP(), []int{12}
|
return file_capturesheep_capturesheep_msg_proto_rawDescGZIP(), []int{12}
|
||||||
}
|
}
|
||||||
|
|
||||||
//捕养大赛使用道具
|
//周长奖励请求
|
||||||
type CapturesheepAllWeekRewardResp struct {
|
type CapturesheepAllWeekRewardResp struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
|
@ -1991,6 +1991,7 @@ type SociatyAccuseResp struct {
|
|||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
SociatyId string `protobuf:"bytes,1,opt,name=sociatyId,proto3" json:"sociatyId"`
|
SociatyId string `protobuf:"bytes,1,opt,name=sociatyId,proto3" json:"sociatyId"`
|
||||||
|
AccuseTime int64 `protobuf:"varint,2,opt,name=accuseTime,proto3" json:"accuseTime"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *SociatyAccuseResp) Reset() {
|
func (x *SociatyAccuseResp) Reset() {
|
||||||
@ -2032,6 +2033,13 @@ func (x *SociatyAccuseResp) GetSociatyId() string {
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (x *SociatyAccuseResp) GetAccuseTime() int64 {
|
||||||
|
if x != nil {
|
||||||
|
return x.AccuseTime
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
// 签到
|
// 签到
|
||||||
type SociatySignReq struct {
|
type SociatySignReq struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
@ -3943,10 +3951,12 @@ var file_sociaty_sociaty_msg_proto_rawDesc = []byte{
|
|||||||
0x1d, 0x0a, 0x03, 0x6a, 0x6f, 0x62, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0b, 0x2e, 0x53,
|
0x1d, 0x0a, 0x03, 0x6a, 0x6f, 0x62, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0b, 0x2e, 0x53,
|
||||||
0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x4a, 0x6f, 0x62, 0x52, 0x03, 0x6a, 0x6f, 0x62, 0x22, 0x12,
|
0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x4a, 0x6f, 0x62, 0x52, 0x03, 0x6a, 0x6f, 0x62, 0x22, 0x12,
|
||||||
0x0a, 0x10, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x41, 0x63, 0x63, 0x75, 0x73, 0x65, 0x52,
|
0x0a, 0x10, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x41, 0x63, 0x63, 0x75, 0x73, 0x65, 0x52,
|
||||||
0x65, 0x71, 0x22, 0x31, 0x0a, 0x11, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x41, 0x63, 0x63,
|
0x65, 0x71, 0x22, 0x51, 0x0a, 0x11, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x41, 0x63, 0x63,
|
||||||
0x75, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x6f, 0x63, 0x69, 0x61,
|
0x75, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x6f, 0x63, 0x69, 0x61,
|
||||||
0x74, 0x79, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x6f, 0x63, 0x69,
|
0x74, 0x79, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x6f, 0x63, 0x69,
|
||||||
0x61, 0x74, 0x79, 0x49, 0x64, 0x22, 0x10, 0x0a, 0x0e, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79,
|
0x61, 0x74, 0x79, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x75, 0x73, 0x65, 0x54,
|
||||||
|
0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x61, 0x63, 0x63, 0x75, 0x73,
|
||||||
|
0x65, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x10, 0x0a, 0x0e, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79,
|
||||||
0x53, 0x69, 0x67, 0x6e, 0x52, 0x65, 0x71, 0x22, 0x41, 0x0a, 0x0f, 0x53, 0x6f, 0x63, 0x69, 0x61,
|
0x53, 0x69, 0x67, 0x6e, 0x52, 0x65, 0x71, 0x22, 0x41, 0x0a, 0x0f, 0x53, 0x6f, 0x63, 0x69, 0x61,
|
||||||
0x74, 0x79, 0x53, 0x69, 0x67, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69,
|
0x74, 0x79, 0x53, 0x69, 0x67, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69,
|
||||||
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09,
|
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09,
|
||||||
|
Loading…
Reference in New Issue
Block a user