canaddreqlogic.go 911 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. package logic
  2. import (
  3. "context"
  4. "bp.jydev.jianyu360.cn/CRM/application/api/internal/svc"
  5. "bp.jydev.jianyu360.cn/CRM/application/api/internal/types"
  6. "bp.jydev.jianyu360.cn/CRM/application/service"
  7. "github.com/zeromicro/go-zero/core/logx"
  8. )
  9. type CanAddReqLogic struct {
  10. logx.Logger
  11. ctx context.Context
  12. svcCtx *svc.ServiceContext
  13. }
  14. func NewCanAddReqLogic(ctx context.Context, svcCtx *svc.ServiceContext) *CanAddReqLogic {
  15. return &CanAddReqLogic{
  16. Logger: logx.WithContext(ctx),
  17. ctx: ctx,
  18. svcCtx: svcCtx,
  19. }
  20. }
  21. func (l *CanAddReqLogic) CanAddReq(req *types.CanAddReq) (resp *types.Reply, err error) {
  22. // todo: add your logic here and delete this line
  23. resp = &types.Reply{}
  24. status, error_msg := service.CanAdd(req.EntId, req.Key, req.EmployInfoId, req.EmployCustomId, req.PositionId)
  25. resp.Error_msg = error_msg
  26. resp.Data = map[string]interface{}{
  27. "status": status,
  28. }
  29. return
  30. }