addentpersonlogic.go 1012 B

12345678910111213141516171819202122232425262728293031323334353637
  1. package logic
  2. import (
  3. "bp.jydev.jianyu360.cn/BaseService/biService/rpc/biservice"
  4. "context"
  5. "fmt"
  6. "bp.jydev.jianyu360.cn/BaseService/biService/api/internal/svc"
  7. "bp.jydev.jianyu360.cn/BaseService/biService/api/internal/types"
  8. "github.com/zeromicro/go-zero/core/logx"
  9. )
  10. type AddEntPersonLogic struct {
  11. logx.Logger
  12. ctx context.Context
  13. svcCtx *svc.ServiceContext
  14. }
  15. func NewAddEntPersonLogic(ctx context.Context, svcCtx *svc.ServiceContext) *AddEntPersonLogic {
  16. return &AddEntPersonLogic{
  17. Logger: logx.WithContext(ctx),
  18. ctx: ctx,
  19. svcCtx: svcCtx,
  20. }
  21. }
  22. func (l *AddEntPersonLogic) AddEntPerson(req *types.AddEntPersonReq) (resp *types.BiResp, err error) {
  23. // todo: add your logic here and delete this line
  24. fmt.Println(req)
  25. res, err := l.svcCtx.BiServiceRpc.AddEntPerson(l.ctx, &biservice.AddEntPersonReq{
  26. EntId: req.EntId,
  27. Phone: req.Phone,
  28. PersonName: req.PersonName,
  29. })
  30. return &types.BiResp{Error_code: res.ErrorCode, Error_msg: res.ErrorMsg, Data: res.Data}, err
  31. }