addacceptancelogic.go 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. package logic
  2. import (
  3. "bp.jydev.jianyu360.cn/BaseService/biService/rpc/biservice"
  4. "context"
  5. "bp.jydev.jianyu360.cn/BaseService/biService/api/internal/svc"
  6. "bp.jydev.jianyu360.cn/BaseService/biService/api/internal/types"
  7. "github.com/zeromicro/go-zero/core/logx"
  8. )
  9. type AddAcceptanceLogic struct {
  10. logx.Logger
  11. ctx context.Context
  12. svcCtx *svc.ServiceContext
  13. }
  14. func NewAddAcceptanceLogic(ctx context.Context, svcCtx *svc.ServiceContext) *AddAcceptanceLogic {
  15. return &AddAcceptanceLogic{
  16. Logger: logx.WithContext(ctx),
  17. ctx: ctx,
  18. svcCtx: svcCtx,
  19. }
  20. }
  21. func (l *AddAcceptanceLogic) AddAcceptance(req *types.AcceptanceReq) (resp *types.BiResp, err error) {
  22. // todo: add your logic here and delete this line
  23. res, err := l.svcCtx.BiServiceRpc.AddAcceptance(l.ctx, &biservice.AcceptanceReq{
  24. PositionId: req.PositionId,
  25. ProposeType: req.ProposeType,
  26. Channel: req.Channel,
  27. AcceptanceType: req.Acceptance_type,
  28. Status: req.Status,
  29. OverTime: req.Over_time,
  30. Remark: req.Remark,
  31. ParamData: req.ParamData,
  32. EntUserName: req.EntUserName,
  33. DeptId: req.DeptId,
  34. ProposeTime: req.Propose_time,
  35. })
  36. return &types.BiResp{Error_code: res.ErrorCode, Error_msg: res.ErrorMsg, Data: res.Data}, err
  37. }