saveTSGuideLogic.go 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. package logic
  2. import (
  3. "bp.jydev.jianyu360.cn/BaseService/jyMicroservices/jyBXSubscribe/api/internal/svc"
  4. "bp.jydev.jianyu360.cn/BaseService/jyMicroservices/jyBXSubscribe/api/internal/types"
  5. "bp.jydev.jianyu360.cn/BaseService/jyMicroservices/jyBXSubscribe/rpc/type/bxsubscribe"
  6. "context"
  7. "github.com/zeromicro/go-zero/core/logx"
  8. )
  9. type SaveTSGuideLogic struct {
  10. logx.Logger
  11. ctx context.Context
  12. svcCtx *svc.ServiceContext
  13. }
  14. func NewSaveTSGuideLogic(ctx context.Context, svcCtx *svc.ServiceContext) *SaveTSGuideLogic {
  15. return &SaveTSGuideLogic{
  16. Logger: logx.WithContext(ctx),
  17. ctx: ctx,
  18. svcCtx: svcCtx,
  19. }
  20. }
  21. func (l *SaveTSGuideLogic) SaveTSGuide(req *types.SaveTsGuideReq) (resp *types.CommonResp, err error) {
  22. // todo: add your logic here and delete this line
  23. _, err = l.svcCtx.Suscribe.SaveTSGuide(l.ctx, &bxsubscribe.SaveTSGuideReq{
  24. AppId: req.AppId,
  25. UserType: req.UserType,
  26. UserId: req.UserId,
  27. NewUserId: req.NewUserId,
  28. EntId: req.EntId,
  29. PositionId: req.PositionId,
  30. AccountId: req.AccountId,
  31. PositionType: req.PositionType,
  32. Area: req.Area,
  33. District: req.District,
  34. Keywords: req.Keywords,
  35. })
  36. if err != nil {
  37. return &types.CommonResp{
  38. Err_code: -1,
  39. Err_msg: err.Error(),
  40. Data: nil,
  41. }, nil
  42. }
  43. return &types.CommonResp{
  44. Err_code: 0,
  45. }, nil
  46. }