| 513 | } |
| 514 | |
| 515 | func (i *imlSubscribeApprovalModule) GetApprovalDetail(ctx context.Context, pid string, id string) (*subscribe_dto.Approval, error) { |
| 516 | _, err := i.projectService.Get(ctx, pid) |
| 517 | if err != nil { |
| 518 | return nil, err |
| 519 | } |
| 520 | item, err := i.subscribeApplyService.Get(ctx, id) |
| 521 | if err != nil { |
| 522 | return nil, err |
| 523 | } |
| 524 | |
| 525 | return &subscribe_dto.Approval{ |
| 526 | Id: item.Id, |
| 527 | Service: auto.UUID(item.Service), |
| 528 | Team: auto.UUID(item.Team), |
| 529 | Application: auto.UUID(item.Application), |
| 530 | ApplyTeam: auto.UUID(item.ApplyTeam), |
| 531 | ApplyTime: auto.TimeLabel(item.ApplyAt), |
| 532 | Applier: auto.UUID(item.Applier), |
| 533 | Approver: auto.UUID(item.Approver), |
| 534 | ApprovalTime: auto.TimeLabel(item.ApproveAt), |
| 535 | Reason: item.Reason, |
| 536 | Opinion: item.Opinion, |
| 537 | Status: item.Status, |
| 538 | }, nil |
| 539 | } |