2025-04-09 14:46:53 +00:00
|
|
|
package kycservicelogic
|
2025-04-08 09:20:34 +00:00
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
|
|
|
|
"code.30cm.net/digimon/app-cloudep-product-service/gen_result/pb/product"
|
|
|
|
"code.30cm.net/digimon/app-cloudep-product-service/internal/svc"
|
|
|
|
|
|
|
|
"github.com/zeromicro/go-zero/core/logx"
|
|
|
|
)
|
|
|
|
|
2025-04-09 14:46:53 +00:00
|
|
|
type UpdateStatusLogic struct {
|
2025-04-08 09:20:34 +00:00
|
|
|
ctx context.Context
|
|
|
|
svcCtx *svc.ServiceContext
|
|
|
|
logx.Logger
|
|
|
|
}
|
|
|
|
|
2025-04-09 14:46:53 +00:00
|
|
|
func NewUpdateStatusLogic(ctx context.Context, svcCtx *svc.ServiceContext) *UpdateStatusLogic {
|
|
|
|
return &UpdateStatusLogic{
|
2025-04-08 09:20:34 +00:00
|
|
|
ctx: ctx,
|
|
|
|
svcCtx: svcCtx,
|
|
|
|
Logger: logx.WithContext(ctx),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2025-04-09 14:46:53 +00:00
|
|
|
// UpdateStatus 更新 Kyc 審核狀態與原因
|
|
|
|
func (l *UpdateStatusLogic) UpdateStatus(in *product.UpdateKycStatusReq) (*product.OKResp, error) {
|
2025-04-08 09:20:34 +00:00
|
|
|
err := l.svcCtx.KYCUseCase.UpdateStatus(l.ctx, in.GetId(), in.GetStatus(), in.GetReason())
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
|
|
|
|
return &product.OKResp{}, nil
|
|
|
|
}
|