canaddreqlogic.go 937 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  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_code = status
  26. resp.Error_msg = error_msg
  27. resp.Data = map[string]interface{}{
  28. "status": status,
  29. }
  30. return
  31. }