infoexaminelogic.go 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. package logic
  2. import (
  3. "app.yhyue.com/moapp/jyInfo/rpc/manager/type/manager"
  4. "context"
  5. "app.yhyue.com/moapp/jybase/common"
  6. "app.yhyue.com/moapp/jyInfo/api/internal/svc"
  7. "app.yhyue.com/moapp/jyInfo/api/internal/types"
  8. "github.com/zeromicro/go-zero/core/logx"
  9. )
  10. type InfoExamineLogic struct {
  11. logx.Logger
  12. ctx context.Context
  13. svcCtx *svc.ServiceContext
  14. }
  15. func NewInfoExamineLogic(ctx context.Context, svcCtx *svc.ServiceContext) *InfoExamineLogic {
  16. return &InfoExamineLogic{
  17. Logger: logx.WithContext(ctx),
  18. ctx: ctx,
  19. svcCtx: svcCtx,
  20. }
  21. }
  22. func (l *InfoExamineLogic) InfoExamine(req *types.InfoExamineReq) (resp *types.CommonRes, err error) {
  23. infoExam, err0 := l.svcCtx.Manager.InfoExamine(l.ctx, &manager.InfoExamineReq{
  24. AppId: req.AppId,
  25. MsgId: req.MsgId,
  26. ReviewStatus: req.ReviewStatus,
  27. ReviewDetail: req.ReviewDetail,
  28. MsgType: req.MsgType,
  29. })
  30. if err0 != nil {
  31. return &types.CommonRes{
  32. Err_code: -1,
  33. Err_msg: "错误",
  34. Data: nil,
  35. }, nil
  36. }
  37. return &types.CommonRes{
  38. Err_code: common.IntAll(infoExam.ErrCode),
  39. Err_msg: infoExam.ErrMsg,
  40. Data: nil,
  41. }, nil
  42. }