feat: import services and standardize Go 1.26.5
This commit is contained in:
27
apps/finance/wallet/internal/logic/payment/hello.go
Normal file
27
apps/finance/wallet/internal/logic/payment/hello.go
Normal file
@@ -0,0 +1,27 @@
|
||||
// Package payment 支付相关业务逻辑
|
||||
package payment
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
pb "git.apinb.com/bsm-finance/wallet/pb"
|
||||
"git.apinb.com/bsm-sdk/core/service"
|
||||
)
|
||||
|
||||
// Hello 支付服务健康检查接口
|
||||
// 用于验证支付服务是否正常运行
|
||||
func Hello(ctx context.Context, in *pb.Empty) (reply *pb.PaymentReply, err error) {
|
||||
// 解析授权元数据
|
||||
_, err = service.ParseMetaCtx(ctx, nil)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// 返回服务状态信息
|
||||
return &pb.PaymentReply{
|
||||
Result: map[string]string{
|
||||
"message": "Payment service is running",
|
||||
"status": "healthy",
|
||||
},
|
||||
}, nil
|
||||
}
|
||||
Reference in New Issue
Block a user