36 lines
977 B
Go
36 lines
977 B
Go
package reddot
|
|
|
|
import (
|
|
"go_dreamfactory/comm"
|
|
"go_dreamfactory/pb"
|
|
|
|
"google.golang.org/protobuf/proto"
|
|
)
|
|
|
|
//参数校验
|
|
func (this *apiComp) GetAllCheck(session comm.IUserSession, req *pb.ReddotGetAllReq) (code pb.ErrorCode) {
|
|
|
|
return
|
|
}
|
|
|
|
///获取系统公告
|
|
func (this *apiComp) GetAll(session comm.IUserSession, req *pb.ReddotGetAllReq) (code pb.ErrorCode, data proto.Message) {
|
|
var (
|
|
reddot map[int32]bool = make(map[int32]bool)
|
|
)
|
|
if code = this.GetAllCheck(session, req); code != pb.ErrorCode_Success {
|
|
return
|
|
}
|
|
reddot[int32(comm.Reddot1)] = true
|
|
reddot[int32(comm.Reddot2)] = true
|
|
reddot[int32(comm.Reddot3)] = false
|
|
reddot[int32(comm.Reddot4)] = true
|
|
reddot[int32(comm.Reddot5)] = true
|
|
reddot[int32(comm.Reddot6)] = true
|
|
// for k, v := range this.module.martialhall.Reddot(session.GetUserId(), comm.Reddot1) {
|
|
// reddot[int32(k)] = v
|
|
// }
|
|
session.SendMsg(string(this.module.GetType()), "getall", &pb.ReddotGetAllResp{Reddot: reddot})
|
|
return
|
|
}
|