25 lines
677 B
Go
25 lines
677 B
Go
package privilege
|
|
|
|
import (
|
|
"go_dreamfactory/comm"
|
|
"go_dreamfactory/pb"
|
|
|
|
"google.golang.org/protobuf/proto"
|
|
)
|
|
|
|
//参数校验
|
|
func (this *apiComp) GetlistCheck(session comm.IUserSession, req *pb.PrivilegeGetListReq) (code pb.ErrorCode) {
|
|
|
|
return
|
|
}
|
|
|
|
///获取特权列表
|
|
func (this *apiComp) Getlist(session comm.IUserSession, req *pb.PrivilegeGetListReq) (code pb.ErrorCode, data proto.Message) {
|
|
list, err := this.module.modelPrivilege.getPrivilegeList(session.GetUserId())
|
|
if err != nil {
|
|
this.module.Errorf("can't get privilege list :%v", err)
|
|
}
|
|
session.SendMsg(string(this.module.GetType()), PrivilegeGetListResp, &pb.PrivilegeGetListResp{Data: list})
|
|
return
|
|
}
|