Files
tyapi-server/internal/application/certification/certification_application_service.go

49 lines
2.6 KiB
Go
Raw Normal View History

2025-07-13 16:36:20 +08:00
package certification
import (
"context"
"tyapi-server/internal/application/certification/dto/commands"
"tyapi-server/internal/application/certification/dto/queries"
"tyapi-server/internal/application/certification/dto/responses"
)
// CertificationApplicationService 认证应用服务接口
type CertificationApplicationService interface {
// 认证申请管理
CreateCertification(ctx context.Context, cmd *commands.CreateCertificationCommand) (*responses.CertificationResponse, error)
GetCertificationStatus(ctx context.Context, query *queries.GetCertificationStatusQuery) (*responses.CertificationResponse, error)
GetCertificationDetails(ctx context.Context, query *queries.GetCertificationDetailsQuery) (*responses.CertificationResponse, error)
GetCertificationProgress(ctx context.Context, userID string) (map[string]interface{}, error)
// 企业信息管理
CreateEnterpriseInfo(ctx context.Context, cmd *commands.CreateEnterpriseInfoCommand) (*responses.EnterpriseInfoResponse, error)
SubmitEnterpriseInfo(ctx context.Context, cmd *commands.SubmitEnterpriseInfoCommand) (*responses.EnterpriseInfoResponse, error)
// 营业执照上传
UploadLicense(ctx context.Context, cmd *commands.UploadLicenseCommand) (*responses.UploadLicenseResponse, error)
GetLicenseOCRResult(ctx context.Context, recordID string) (*responses.UploadLicenseResponse, error)
// UploadBusinessLicense 上传营业执照并同步OCR识别
UploadBusinessLicense(ctx context.Context, userID string, fileBytes []byte, fileName string) (*responses.UploadLicenseResponse, error)
// 人脸识别
InitiateFaceVerify(ctx context.Context, cmd *commands.InitiateFaceVerifyCommand) (*responses.FaceVerifyResponse, error)
CompleteFaceVerify(ctx context.Context, faceVerifyID string, isSuccess bool) error
RetryFaceVerify(ctx context.Context, userID string) (*responses.FaceVerifyResponse, error)
// 合同管理
ApplyContract(ctx context.Context, userID string) (*responses.CertificationResponse, error)
ApproveContract(ctx context.Context, certificationID, adminID, signingURL, approvalNotes string) error
RejectContract(ctx context.Context, certificationID, adminID, rejectReason string) error
CompleteContractSign(ctx context.Context, certificationID, contractURL string) error
RetryContractSign(ctx context.Context, userID string) (*responses.CertificationResponse, error)
// 认证完成
CompleteCertification(ctx context.Context, certificationID string) error
// 重试和重启
RetryStep(ctx context.Context, cmd *commands.RetryStepCommand) error
RestartCertification(ctx context.Context, certificationID string) error
}