12345678910111213141516171819202122232425262728293031323334353637383940 |
- package logic
- import (
- "context"
- "fmt"
- "bp.jydev.jianyu360.cn/BaseService/userCenter/rpc/internal/svc"
- "bp.jydev.jianyu360.cn/BaseService/userCenter/rpc/pb"
- "github.com/zeromicro/go-zero/core/logx"
- )
- type CheckIsEntAdminLogic struct {
- ctx context.Context
- svcCtx *svc.ServiceContext
- logx.Logger
- }
- func NewCheckIsEntAdminLogic(ctx context.Context, svcCtx *svc.ServiceContext) *CheckIsEntAdminLogic {
- return &CheckIsEntAdminLogic{
- ctx: ctx,
- svcCtx: svcCtx,
- Logger: logx.WithContext(ctx),
- }
- }
- // 查看员工是否是企业管理员
- func (l *CheckIsEntAdminLogic) CheckIsEntAdmin(in *pb.EntUserReq) (*pb.CheckIsEntAdminResp, error) {
- // todo: add your logic here and delete this line
- resp := &pb.CheckIsEntAdminResp{}
- data, msg := Entservice.CheckEntUserAdmin(in)
- if msg != "" {
- l.Error(fmt.Sprintf("%+v", in), msg)
- resp.ErrorMsg = msg
- resp.ErrorCode = -1
- } else {
- resp.Status = data
- }
- return resp, nil
- }
|