examinelogic.go 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. package logic
  2. import (
  3. "context"
  4. "bp.jydev.jianyu360.cn/BaseService/userCenter/api/internal/svc"
  5. "bp.jydev.jianyu360.cn/BaseService/userCenter/api/internal/types"
  6. "bp.jydev.jianyu360.cn/BaseService/userCenter/entity"
  7. "bp.jydev.jianyu360.cn/BaseService/userCenter/rpc/pb"
  8. "github.com/zeromicro/go-zero/core/logx"
  9. )
  10. type ExamineLogic struct {
  11. logx.Logger
  12. ctx context.Context
  13. svcCtx *svc.ServiceContext
  14. }
  15. func NewExamineLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ExamineLogic {
  16. return &ExamineLogic{
  17. Logger: logx.WithContext(ctx),
  18. ctx: ctx,
  19. svcCtx: svcCtx,
  20. }
  21. }
  22. func (l *ExamineLogic) Examine(req *types.ExamineReq) (resp *types.Resp, err error) {
  23. // todo: add your logic here and delete this line
  24. res, err := entity.UserCenterRpc.EntExamine(l.ctx, &pb.ExamineReq{
  25. EntId: req.EntId,
  26. AuthType: req.AuthType,
  27. Reason: req.Reason,
  28. AuditUser: req.AuditUser,
  29. ExamineId: req.ExamineId,
  30. })
  31. return &types.Resp{
  32. Error_code: res.ErrorCode,
  33. Error_msg: res.ErrorMsg,
  34. Data: res.Data,
  35. }, err
  36. }