cluetransferlogic.go 927 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. package logic
  2. import (
  3. "bp.jydev.jianyu360.cn/BaseService/biService/service"
  4. "context"
  5. "bp.jydev.jianyu360.cn/BaseService/biService/rpc/internal/svc"
  6. "bp.jydev.jianyu360.cn/BaseService/biService/rpc/pb"
  7. "github.com/zeromicro/go-zero/core/logx"
  8. )
  9. type ClueTransferLogic struct {
  10. ctx context.Context
  11. svcCtx *svc.ServiceContext
  12. logx.Logger
  13. }
  14. func NewClueTransferLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ClueTransferLogic {
  15. return &ClueTransferLogic{
  16. ctx: ctx,
  17. svcCtx: svcCtx,
  18. Logger: logx.WithContext(ctx),
  19. }
  20. }
  21. func (l *ClueTransferLogic) ClueTransfer(in *pb.ClueTransferReq) (*pb.BiResp, error) {
  22. // todo: add your logic here and delete this line
  23. errMsg := ""
  24. status, err := service.ClueTransfer(in.ClueId, in.ChangeType, in.KcType, in.MainClueId, in.ClueName)
  25. if err != nil {
  26. errMsg = err.Error()
  27. }
  28. return &pb.BiResp{
  29. ErrorCode: int64(status),
  30. ErrorMsg: errMsg,
  31. }, err
  32. }