30 lines
647 B
Go
30 lines
647 B
Go
package dispatch
|
|
|
|
import (
|
|
"go_dreamfactory/comm"
|
|
"go_dreamfactory/pb"
|
|
|
|
"google.golang.org/protobuf/proto"
|
|
)
|
|
|
|
// 公告板信息
|
|
|
|
func (a *apiComp) NoticeCheck(session comm.IUserSession, req *pb.DispatchNoticeReq) (code pb.ErrorCode) {
|
|
return
|
|
}
|
|
|
|
func (a *apiComp) Notice(session comm.IUserSession, req *pb.DispatchNoticeReq) (code pb.ErrorCode, data proto.Message) {
|
|
d := a.module.modelDispatch.getDBDispatch(session.GetUserId())
|
|
|
|
if d == nil {
|
|
d = a.module.modelDispatch.initDispatch(session.GetUserId())
|
|
return
|
|
}
|
|
rsp := &pb.DispatchNoticeResp{
|
|
Dispatch: d,
|
|
}
|
|
|
|
session.SendMsg(string(a.module.GetType()), "notice", rsp)
|
|
return
|
|
}
|