| 396 | } |
| 397 | |
| 398 | func (i *imlSubscribeApprovalModule) ExportAll(ctx context.Context) ([]*subscribe_dto.ExportApproval, error) { |
| 399 | |
| 400 | list, err := i.subscribeApplyService.List(ctx) |
| 401 | if err != nil { |
| 402 | return nil, err |
| 403 | } |
| 404 | return utils.SliceToSlice(list, func(s *subscribe.Apply) *subscribe_dto.ExportApproval { |
| 405 | return &subscribe_dto.ExportApproval{ |
| 406 | Service: s.Service, |
| 407 | Application: s.Application, |
| 408 | Reason: s.Reason, |
| 409 | } |
| 410 | }), nil |
| 411 | } |
| 412 | |
| 413 | func (i *imlSubscribeApprovalModule) Pass(ctx context.Context, pid string, id string, approveInfo *subscribe_dto.Approve) error { |
| 414 | applyInfo, err := i.subscribeApplyService.Get(ctx, id) |