1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- package logic
- import (
- "context"
- "bp.jydev.jianyu360.cn/BaseService/biService/entity"
- "bp.jydev.jianyu360.cn/BaseService/biService/service"
- "bp.jydev.jianyu360.cn/BaseService/biService/rpc/internal/svc"
- "bp.jydev.jianyu360.cn/BaseService/biService/rpc/pb"
- "github.com/zeromicro/go-zero/core/logx"
- )
- type CallLogic struct {
- ctx context.Context
- svcCtx *svc.ServiceContext
- logx.Logger
- }
- func NewCallLogic(ctx context.Context, svcCtx *svc.ServiceContext) *CallLogic {
- return &CallLogic{
- ctx: ctx,
- svcCtx: svcCtx,
- Logger: logx.WithContext(ctx),
- }
- }
- func (l *CallLogic) Call(in *pb.CallReq) (*pb.Resp, error) {
- resp := &pb.Resp{}
- hlyj := service.HlyjStruct{
- Account: entity.Hlyj.Account,
- TokenUrl: entity.Hlyj.TokenUrl,
- Appid: entity.Hlyj.Appid,
- Secret: entity.Hlyj.Secret,
- CallUrl: entity.Hlyj.CallUrl,
- Integratedid: entity.Hlyj.Integratedid,
- CallFlag: entity.Hlyj.CallFlag,
- }
- status := hlyj.Call(in.Phone, in.PositionId)
- if status {
- resp.Status = 1
- } else {
- resp.Status = -1
- }
- return resp, nil
- }
|