app-cloudep-product-service/internal/server/kyc_service/kyc_service_server.go

61 lines
2.0 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// Code generated by goctl. DO NOT EDIT.
// goctl 1.8.1
// Source: product.proto
package server
import (
"context"
"code.30cm.net/digimon/app-cloudep-product-service/gen_result/pb/product"
"code.30cm.net/digimon/app-cloudep-product-service/internal/logic/kyc_service"
"code.30cm.net/digimon/app-cloudep-product-service/internal/svc"
)
type KycServiceServer struct {
svcCtx *svc.ServiceContext
product.UnimplementedKyc_ServiceServer
}
func NewKycServiceServer(svcCtx *svc.ServiceContext) *KycServiceServer {
return &KycServiceServer{
svcCtx: svcCtx,
}
}
// Create 建立 KYC 資料
func (s *KycServiceServer) Create(ctx context.Context, in *product.CreateKycReq) (*product.OKResp, error) {
l := kycservicelogic.NewCreateLogic(ctx, s.svcCtx)
return l.Create(in)
}
// FindLatestByUID 根據使用者 UID 查詢最新 KYC 紀錄
func (s *KycServiceServer) FindLatestByUid(ctx context.Context, in *product.FindLatestKycByUIDReq) (*product.Kyc, error) {
l := kycservicelogic.NewFindLatestByUidLogic(ctx, s.svcCtx)
return l.FindLatestByUid(in)
}
// FindByID 根據 KYC ID 查詢
func (s *KycServiceServer) FindById(ctx context.Context, in *product.FindKycByIDReq) (*product.Kyc, error) {
l := kycservicelogic.NewFindByIdLogic(ctx, s.svcCtx)
return l.FindById(in)
}
// List 分頁查詢 Kyc 清單(後台審核用)
func (s *KycServiceServer) List(ctx context.Context, in *product.ListKycReq) (*product.ListKycResp, error) {
l := kycservicelogic.NewListLogic(ctx, s.svcCtx)
return l.List(in)
}
// UpdateStatus 更新 Kyc 審核狀態與原因
func (s *KycServiceServer) UpdateStatus(ctx context.Context, in *product.UpdateKycStatusReq) (*product.OKResp, error) {
l := kycservicelogic.NewUpdateStatusLogic(ctx, s.svcCtx)
return l.UpdateStatus(in)
}
// Update 更新使用者的 Kyc尚未審核
func (s *KycServiceServer) Update(ctx context.Context, in *product.UpdateKycInfoReq) (*product.OKResp, error) {
l := kycservicelogic.NewUpdateLogic(ctx, s.svcCtx)
return l.Update(in)
}