calllogic.go 1022 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. package logic
  2. import (
  3. "context"
  4. "bp.jydev.jianyu360.cn/BaseService/biService/entity"
  5. "bp.jydev.jianyu360.cn/BaseService/biService/service"
  6. "bp.jydev.jianyu360.cn/BaseService/biService/rpc/internal/svc"
  7. "bp.jydev.jianyu360.cn/BaseService/biService/rpc/pb"
  8. "github.com/zeromicro/go-zero/core/logx"
  9. )
  10. type CallLogic struct {
  11. ctx context.Context
  12. svcCtx *svc.ServiceContext
  13. logx.Logger
  14. }
  15. func NewCallLogic(ctx context.Context, svcCtx *svc.ServiceContext) *CallLogic {
  16. return &CallLogic{
  17. ctx: ctx,
  18. svcCtx: svcCtx,
  19. Logger: logx.WithContext(ctx),
  20. }
  21. }
  22. func (l *CallLogic) Call(in *pb.CallReq) (*pb.BiResp, error) {
  23. resp := &pb.BiResp{}
  24. hlyj := service.HlyjStruct{
  25. Account: entity.Hlyj.Account,
  26. TokenUrl: entity.Hlyj.TokenUrl,
  27. Appid: entity.Hlyj.Appid,
  28. Secret: entity.Hlyj.Secret,
  29. CallUrl: entity.Hlyj.CallUrl,
  30. Integratedid: entity.Hlyj.Integratedid,
  31. CallFlag: entity.Hlyj.CallFlag,
  32. }
  33. resp.Data = hlyj.Call(in.Phone, in.PositionId)
  34. return resp, nil
  35. }