浏览代码

init: 项目基础结构

HeWang 10 月之前
父节点
当前提交
47f5b69421

+ 7 - 0
biz/dal/init.go

@@ -0,0 +1,7 @@
+package dal
+
+import "pji_desktop_http/biz/dal/mysql"
+
+func Init() {
+	mysql.Init()
+}

+ 24 - 0
biz/dal/mysql/init.go

@@ -0,0 +1,24 @@
+package mysql
+
+import (
+	"gorm.io/driver/mysql"
+	"gorm.io/gorm"
+	"time"
+)
+
+var dsn = "root:1qaz2wsx!@tcp(36.110.106.156:3306)/pji_desktop?charset=utf8&parseTime=True&loc=Local"
+
+var db *gorm.DB
+
+func Init() {
+	var err error
+	db, err = gorm.Open(mysql.Open(dsn), &gorm.Config{})
+	if err != nil {
+		panic(err)
+	}
+	// 连接池配置
+	sqlDB, err := db.DB()
+	sqlDB.SetMaxIdleConns(10)           // 设置空闲连接池中连接的最大数量
+	sqlDB.SetMaxOpenConns(100)          // 设置打开数据库连接的最大数量
+	sqlDB.SetConnMaxLifetime(time.Hour) // 设置连接可复用的最大时间
+}

+ 14 - 0
biz/dal/mysql/user.go

@@ -0,0 +1,14 @@
+package mysql
+
+import (
+	"fmt"
+	"pji_desktop_http/biz/model"
+)
+
+func QureyUser() {
+	var user model.User
+	fmt.Println("db", db)
+	//db.Raw("SELECT * FROM users WHERE id = ?", 1).Scan(&user)
+	db.Where("id = ?", 1).First(&user)
+	fmt.Println(user.Name)
+}

+ 0 - 59
biz/handler/hello1_service/hello1_service.go

@@ -1,59 +0,0 @@
-// Code generated by hertz generator.
-
-package hello1_service
-
-import (
-	"context"
-
-	"github.com/cloudwego/hertz/pkg/app"
-	"github.com/cloudwego/hertz/pkg/protocol/consts"
-	hello1_service "pji_desktop_http/biz/model/hello1_service"
-)
-
-// GetCicvOssConfig .
-// @router /oss/config [GET]
-func GetCicvOssConfig(ctx context.Context, c *app.RequestContext) {
-	var err error
-	var req hello1_service.Token
-	err = c.BindAndValidate(&req)
-	if err != nil {
-		c.String(consts.StatusBadRequest, err.Error())
-		return
-	}
-
-	resp := new(hello1_service.OssConfigInfo)
-
-	c.JSON(consts.StatusOK, resp)
-}
-
-// GetPjiOssConfig .
-// @router /oss/pji [GET]
-func GetPjiOssConfig(ctx context.Context, c *app.RequestContext) {
-	var err error
-	var req hello1_service.Token
-	err = c.BindAndValidate(&req)
-	if err != nil {
-		c.String(consts.StatusBadRequest, err.Error())
-		return
-	}
-
-	resp := new(hello1_service.OssConfigInfo)
-
-	c.JSON(consts.StatusOK, resp)
-}
-
-// Test .
-// @router /oss/pji [GET]
-func Test(ctx context.Context, c *app.RequestContext) {
-	var err error
-	var req hello1_service.Token
-	err = c.BindAndValidate(&req)
-	if err != nil {
-		c.String(consts.StatusBadRequest, err.Error())
-		return
-	}
-
-	resp := new(hello1_service.OssConfigInfo)
-
-	c.JSON(consts.StatusOK, resp)
-}

+ 6 - 6
biz/handler/hello2_service/hello1_service.go → biz/handler/hello1_service/hello_service.go

@@ -1,27 +1,27 @@
 // Code generated by hertz generator.
 
-package hello2_service
+package hello1_service
 
 import (
 	"context"
 
 	"github.com/cloudwego/hertz/pkg/app"
 	"github.com/cloudwego/hertz/pkg/protocol/consts"
-	hello2_service "pji_desktop_http/biz/model/hello2_service"
+	hello1_service "pji_desktop_http/biz/model/hello1_service"
 )
 
 // GetCicvOssConfig .
 // @router /oss/config [GET]
 func GetCicvOssConfig(ctx context.Context, c *app.RequestContext) {
 	var err error
-	var req hello2_service.Token
+	var req hello1_service.Token
 	err = c.BindAndValidate(&req)
 	if err != nil {
 		c.String(consts.StatusBadRequest, err.Error())
 		return
 	}
 
-	resp := new(hello2_service.OssConfigInfo)
+	resp := new(hello1_service.OssConfigInfo)
 
 	c.JSON(consts.StatusOK, resp)
 }
@@ -30,14 +30,14 @@ func GetCicvOssConfig(ctx context.Context, c *app.RequestContext) {
 // @router /oss/pji [GET]
 func GetPjiOssConfig(ctx context.Context, c *app.RequestContext) {
 	var err error
-	var req hello2_service.Token
+	var req hello1_service.Token
 	err = c.BindAndValidate(&req)
 	if err != nil {
 		c.String(consts.StatusBadRequest, err.Error())
 		return
 	}
 
-	resp := new(hello2_service.OssConfigInfo)
+	resp := new(hello1_service.OssConfigInfo)
 
 	c.JSON(consts.StatusOK, resp)
 }

+ 15 - 0
biz/handler/user_service/user_service.go

@@ -0,0 +1,15 @@
+package user_service
+
+import (
+	"context"
+	"github.com/cloudwego/hertz/pkg/app"
+	"pji_desktop_http/biz/dal/mysql"
+)
+
+// @router /test/queryuser [GET]
+func TestQueryUser(ctx context.Context, c *app.RequestContext) {
+	mysql.QureyUser()
+	//c.JSON(consts.StatusOK, utils.H{
+	//	"message": "pong",
+	//})
+}

+ 0 - 261
biz/model/hello1_service/hello1_service.pb.go

@@ -1,261 +0,0 @@
-// Code generated by protoc-gen-go. DO NOT EDIT.
-// versions:
-// 	protoc-gen-go v1.28.0
-// 	protoc        v5.27.2
-// source: hello1_service.proto
-
-package hello1_service
-
-import (
-	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
-	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
-	_ "pji_desktop_http/biz/model/api"
-	reflect "reflect"
-	sync "sync"
-)
-
-const (
-	// Verify that this generated code is sufficiently up-to-date.
-	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
-	// Verify that runtime/protoimpl is sufficiently up-to-date.
-	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
-)
-
-type OssConfigInfo struct {
-	state         protoimpl.MessageState
-	sizeCache     protoimpl.SizeCache
-	unknownFields protoimpl.UnknownFields
-
-	Endpoint        string `protobuf:"bytes,1,opt,name=endpoint,proto3" json:"endpoint,omitempty" form:"endpoint" query:"endpoint"`
-	AccessKeyId     string `protobuf:"bytes,2,opt,name=accessKeyId,proto3" json:"accessKeyId,omitempty" form:"accessKeyId" query:"accessKeyId"`
-	AccessKeySecret string `protobuf:"bytes,3,opt,name=accessKeySecret,proto3" json:"accessKeySecret,omitempty" form:"accessKeySecret" query:"accessKeySecret"`
-	BucketName      string `protobuf:"bytes,4,opt,name=bucketName,proto3" json:"bucketName,omitempty" form:"bucketName" query:"bucketName"`
-}
-
-func (x *OssConfigInfo) Reset() {
-	*x = OssConfigInfo{}
-	if protoimpl.UnsafeEnabled {
-		mi := &file_hello1_service_proto_msgTypes[0]
-		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
-		ms.StoreMessageInfo(mi)
-	}
-}
-
-func (x *OssConfigInfo) String() string {
-	return protoimpl.X.MessageStringOf(x)
-}
-
-func (*OssConfigInfo) ProtoMessage() {}
-
-func (x *OssConfigInfo) ProtoReflect() protoreflect.Message {
-	mi := &file_hello1_service_proto_msgTypes[0]
-	if protoimpl.UnsafeEnabled && x != nil {
-		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
-		if ms.LoadMessageInfo() == nil {
-			ms.StoreMessageInfo(mi)
-		}
-		return ms
-	}
-	return mi.MessageOf(x)
-}
-
-// Deprecated: Use OssConfigInfo.ProtoReflect.Descriptor instead.
-func (*OssConfigInfo) Descriptor() ([]byte, []int) {
-	return file_hello1_service_proto_rawDescGZIP(), []int{0}
-}
-
-func (x *OssConfigInfo) GetEndpoint() string {
-	if x != nil {
-		return x.Endpoint
-	}
-	return ""
-}
-
-func (x *OssConfigInfo) GetAccessKeyId() string {
-	if x != nil {
-		return x.AccessKeyId
-	}
-	return ""
-}
-
-func (x *OssConfigInfo) GetAccessKeySecret() string {
-	if x != nil {
-		return x.AccessKeySecret
-	}
-	return ""
-}
-
-func (x *OssConfigInfo) GetBucketName() string {
-	if x != nil {
-		return x.BucketName
-	}
-	return ""
-}
-
-type Token struct {
-	state         protoimpl.MessageState
-	sizeCache     protoimpl.SizeCache
-	unknownFields protoimpl.UnknownFields
-
-	Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty" form:"token" query:"token"`
-}
-
-func (x *Token) Reset() {
-	*x = Token{}
-	if protoimpl.UnsafeEnabled {
-		mi := &file_hello1_service_proto_msgTypes[1]
-		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
-		ms.StoreMessageInfo(mi)
-	}
-}
-
-func (x *Token) String() string {
-	return protoimpl.X.MessageStringOf(x)
-}
-
-func (*Token) ProtoMessage() {}
-
-func (x *Token) ProtoReflect() protoreflect.Message {
-	mi := &file_hello1_service_proto_msgTypes[1]
-	if protoimpl.UnsafeEnabled && x != nil {
-		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
-		if ms.LoadMessageInfo() == nil {
-			ms.StoreMessageInfo(mi)
-		}
-		return ms
-	}
-	return mi.MessageOf(x)
-}
-
-// Deprecated: Use Token.ProtoReflect.Descriptor instead.
-func (*Token) Descriptor() ([]byte, []int) {
-	return file_hello1_service_proto_rawDescGZIP(), []int{1}
-}
-
-func (x *Token) GetToken() string {
-	if x != nil {
-		return x.Token
-	}
-	return ""
-}
-
-var File_hello1_service_proto protoreflect.FileDescriptor
-
-var file_hello1_service_proto_rawDesc = []byte{
-	0x0a, 0x14, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x31, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
-	0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x6f, 0x73, 0x73, 0x5f, 0x73, 0x65, 0x72, 0x76,
-	0x69, 0x63, 0x65, 0x1a, 0x09, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x97,
-	0x01, 0x0a, 0x0d, 0x4f, 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x49, 0x6e, 0x66, 0x6f,
-	0x12, 0x1a, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01,
-	0x28, 0x09, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x20, 0x0a, 0x0b,
-	0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28,
-	0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x49, 0x64, 0x12, 0x28,
-	0x0a, 0x0f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x53, 0x65, 0x63, 0x72, 0x65,
-	0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4b,
-	0x65, 0x79, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x62, 0x75, 0x63, 0x6b,
-	0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x62, 0x75,
-	0x63, 0x6b, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x1d, 0x0a, 0x05, 0x54, 0x6f, 0x6b, 0x65,
-	0x6e, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
-	0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x32, 0xfb, 0x01, 0x0a, 0x0d, 0x48, 0x65, 0x6c, 0x6c,
-	0x6f, 0x31, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x53, 0x0a, 0x10, 0x47, 0x65, 0x74,
-	0x43, 0x69, 0x63, 0x76, 0x4f, 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x12, 0x2e,
-	0x6f, 0x73, 0x73, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x54, 0x6f, 0x6b, 0x65,
-	0x6e, 0x1a, 0x1a, 0x2e, 0x6f, 0x73, 0x73, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e,
-	0x4f, 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x0f, 0xca,
-	0xc1, 0x18, 0x0b, 0x2f, 0x6f, 0x73, 0x73, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x4f,
-	0x0a, 0x0f, 0x47, 0x65, 0x74, 0x50, 0x6a, 0x69, 0x4f, 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69,
-	0x67, 0x12, 0x12, 0x2e, 0x6f, 0x73, 0x73, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e,
-	0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x1a, 0x1a, 0x2e, 0x6f, 0x73, 0x73, 0x5f, 0x73, 0x65, 0x72, 0x76,
-	0x69, 0x63, 0x65, 0x2e, 0x4f, 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x49, 0x6e, 0x66,
-	0x6f, 0x22, 0x0c, 0xca, 0xc1, 0x18, 0x08, 0x2f, 0x6f, 0x73, 0x73, 0x2f, 0x70, 0x6a, 0x69, 0x12,
-	0x44, 0x0a, 0x04, 0x54, 0x65, 0x73, 0x74, 0x12, 0x12, 0x2e, 0x6f, 0x73, 0x73, 0x5f, 0x73, 0x65,
-	0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x1a, 0x1a, 0x2e, 0x6f, 0x73,
-	0x73, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x4f, 0x73, 0x73, 0x43, 0x6f, 0x6e,
-	0x66, 0x69, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x0c, 0xca, 0xc1, 0x18, 0x08, 0x2f, 0x6f, 0x73,
-	0x73, 0x2f, 0x70, 0x6a, 0x69, 0x42, 0x2b, 0x5a, 0x29, 0x70, 0x6a, 0x69, 0x5f, 0x64, 0x65, 0x73,
-	0x6b, 0x74, 0x6f, 0x70, 0x5f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x62, 0x69, 0x7a, 0x2f, 0x6d, 0x6f,
-	0x64, 0x65, 0x6c, 0x2f, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x31, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69,
-	0x63, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
-}
-
-var (
-	file_hello1_service_proto_rawDescOnce sync.Once
-	file_hello1_service_proto_rawDescData = file_hello1_service_proto_rawDesc
-)
-
-func file_hello1_service_proto_rawDescGZIP() []byte {
-	file_hello1_service_proto_rawDescOnce.Do(func() {
-		file_hello1_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_hello1_service_proto_rawDescData)
-	})
-	return file_hello1_service_proto_rawDescData
-}
-
-var file_hello1_service_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
-var file_hello1_service_proto_goTypes = []interface{}{
-	(*OssConfigInfo)(nil), // 0: oss_service.OssConfigInfo
-	(*Token)(nil),         // 1: oss_service.Token
-}
-var file_hello1_service_proto_depIdxs = []int32{
-	1, // 0: oss_service.Hello1Service.GetCicvOssConfig:input_type -> oss_service.Token
-	1, // 1: oss_service.Hello1Service.GetPjiOssConfig:input_type -> oss_service.Token
-	1, // 2: oss_service.Hello1Service.Test:input_type -> oss_service.Token
-	0, // 3: oss_service.Hello1Service.GetCicvOssConfig:output_type -> oss_service.OssConfigInfo
-	0, // 4: oss_service.Hello1Service.GetPjiOssConfig:output_type -> oss_service.OssConfigInfo
-	0, // 5: oss_service.Hello1Service.Test:output_type -> oss_service.OssConfigInfo
-	3, // [3:6] is the sub-list for method output_type
-	0, // [0:3] is the sub-list for method input_type
-	0, // [0:0] is the sub-list for extension type_name
-	0, // [0:0] is the sub-list for extension extendee
-	0, // [0:0] is the sub-list for field type_name
-}
-
-func init() { file_hello1_service_proto_init() }
-func file_hello1_service_proto_init() {
-	if File_hello1_service_proto != nil {
-		return
-	}
-	if !protoimpl.UnsafeEnabled {
-		file_hello1_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
-			switch v := v.(*OssConfigInfo); i {
-			case 0:
-				return &v.state
-			case 1:
-				return &v.sizeCache
-			case 2:
-				return &v.unknownFields
-			default:
-				return nil
-			}
-		}
-		file_hello1_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
-			switch v := v.(*Token); i {
-			case 0:
-				return &v.state
-			case 1:
-				return &v.sizeCache
-			case 2:
-				return &v.unknownFields
-			default:
-				return nil
-			}
-		}
-	}
-	type x struct{}
-	out := protoimpl.TypeBuilder{
-		File: protoimpl.DescBuilder{
-			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
-			RawDescriptor: file_hello1_service_proto_rawDesc,
-			NumEnums:      0,
-			NumMessages:   2,
-			NumExtensions: 0,
-			NumServices:   1,
-		},
-		GoTypes:           file_hello1_service_proto_goTypes,
-		DependencyIndexes: file_hello1_service_proto_depIdxs,
-		MessageInfos:      file_hello1_service_proto_msgTypes,
-	}.Build()
-	File_hello1_service_proto = out.File
-	file_hello1_service_proto_rawDesc = nil
-	file_hello1_service_proto_goTypes = nil
-	file_hello1_service_proto_depIdxs = nil
-}

+ 255 - 0
biz/model/hello1_service/hello_service.pb.go

@@ -0,0 +1,255 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// 	protoc-gen-go v1.28.0
+// 	protoc        v5.27.2
+// source: hello_service.proto
+
+package hello1_service
+
+import (
+	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+	_ "pji_desktop_http/biz/model/api"
+	reflect "reflect"
+	sync "sync"
+)
+
+const (
+	// Verify that this generated code is sufficiently up-to-date.
+	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+	// Verify that runtime/protoimpl is sufficiently up-to-date.
+	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type OssConfigInfo struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	Endpoint        string `protobuf:"bytes,1,opt,name=endpoint,proto3" json:"endpoint,omitempty" form:"endpoint" query:"endpoint"`
+	AccessKeyId     string `protobuf:"bytes,2,opt,name=accessKeyId,proto3" json:"accessKeyId,omitempty" form:"accessKeyId" query:"accessKeyId"`
+	AccessKeySecret string `protobuf:"bytes,3,opt,name=accessKeySecret,proto3" json:"accessKeySecret,omitempty" form:"accessKeySecret" query:"accessKeySecret"`
+	BucketName      string `protobuf:"bytes,4,opt,name=bucketName,proto3" json:"bucketName,omitempty" form:"bucketName" query:"bucketName"`
+}
+
+func (x *OssConfigInfo) Reset() {
+	*x = OssConfigInfo{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_hello_service_proto_msgTypes[0]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *OssConfigInfo) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*OssConfigInfo) ProtoMessage() {}
+
+func (x *OssConfigInfo) ProtoReflect() protoreflect.Message {
+	mi := &file_hello_service_proto_msgTypes[0]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use OssConfigInfo.ProtoReflect.Descriptor instead.
+func (*OssConfigInfo) Descriptor() ([]byte, []int) {
+	return file_hello_service_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *OssConfigInfo) GetEndpoint() string {
+	if x != nil {
+		return x.Endpoint
+	}
+	return ""
+}
+
+func (x *OssConfigInfo) GetAccessKeyId() string {
+	if x != nil {
+		return x.AccessKeyId
+	}
+	return ""
+}
+
+func (x *OssConfigInfo) GetAccessKeySecret() string {
+	if x != nil {
+		return x.AccessKeySecret
+	}
+	return ""
+}
+
+func (x *OssConfigInfo) GetBucketName() string {
+	if x != nil {
+		return x.BucketName
+	}
+	return ""
+}
+
+type Token struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty" form:"token" query:"token"`
+}
+
+func (x *Token) Reset() {
+	*x = Token{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_hello_service_proto_msgTypes[1]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *Token) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Token) ProtoMessage() {}
+
+func (x *Token) ProtoReflect() protoreflect.Message {
+	mi := &file_hello_service_proto_msgTypes[1]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use Token.ProtoReflect.Descriptor instead.
+func (*Token) Descriptor() ([]byte, []int) {
+	return file_hello_service_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *Token) GetToken() string {
+	if x != nil {
+		return x.Token
+	}
+	return ""
+}
+
+var File_hello_service_proto protoreflect.FileDescriptor
+
+var file_hello_service_proto_rawDesc = []byte{
+	0x0a, 0x13, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e,
+	0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x6f, 0x73, 0x73, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69,
+	0x63, 0x65, 0x1a, 0x09, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x97, 0x01,
+	0x0a, 0x0d, 0x4f, 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x12,
+	0x1a, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28,
+	0x09, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x61,
+	0x63, 0x63, 0x65, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
+	0x52, 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x49, 0x64, 0x12, 0x28, 0x0a,
+	0x0f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74,
+	0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4b, 0x65,
+	0x79, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x62, 0x75, 0x63, 0x6b, 0x65,
+	0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x62, 0x75, 0x63,
+	0x6b, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x1d, 0x0a, 0x05, 0x54, 0x6f, 0x6b, 0x65, 0x6e,
+	0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
+	0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x32, 0xb4, 0x01, 0x0a, 0x0c, 0x48, 0x65, 0x6c, 0x6c, 0x6f,
+	0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x53, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x43, 0x69,
+	0x63, 0x76, 0x4f, 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x12, 0x2e, 0x6f, 0x73,
+	0x73, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x1a,
+	0x1a, 0x2e, 0x6f, 0x73, 0x73, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x4f, 0x73,
+	0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x0f, 0xca, 0xc1, 0x18,
+	0x0b, 0x2f, 0x6f, 0x73, 0x73, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x4f, 0x0a, 0x0f,
+	0x47, 0x65, 0x74, 0x50, 0x6a, 0x69, 0x4f, 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12,
+	0x12, 0x2e, 0x6f, 0x73, 0x73, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x54, 0x6f,
+	0x6b, 0x65, 0x6e, 0x1a, 0x1a, 0x2e, 0x6f, 0x73, 0x73, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63,
+	0x65, 0x2e, 0x4f, 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x22,
+	0x0c, 0xca, 0xc1, 0x18, 0x08, 0x2f, 0x6f, 0x73, 0x73, 0x2f, 0x70, 0x6a, 0x69, 0x42, 0x2b, 0x5a,
+	0x29, 0x70, 0x6a, 0x69, 0x5f, 0x64, 0x65, 0x73, 0x6b, 0x74, 0x6f, 0x70, 0x5f, 0x68, 0x74, 0x74,
+	0x70, 0x2f, 0x62, 0x69, 0x7a, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2f, 0x68, 0x65, 0x6c, 0x6c,
+	0x6f, 0x31, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
+	0x6f, 0x33,
+}
+
+var (
+	file_hello_service_proto_rawDescOnce sync.Once
+	file_hello_service_proto_rawDescData = file_hello_service_proto_rawDesc
+)
+
+func file_hello_service_proto_rawDescGZIP() []byte {
+	file_hello_service_proto_rawDescOnce.Do(func() {
+		file_hello_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_hello_service_proto_rawDescData)
+	})
+	return file_hello_service_proto_rawDescData
+}
+
+var file_hello_service_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
+var file_hello_service_proto_goTypes = []interface{}{
+	(*OssConfigInfo)(nil), // 0: oss_service.OssConfigInfo
+	(*Token)(nil),         // 1: oss_service.Token
+}
+var file_hello_service_proto_depIdxs = []int32{
+	1, // 0: oss_service.HelloService.GetCicvOssConfig:input_type -> oss_service.Token
+	1, // 1: oss_service.HelloService.GetPjiOssConfig:input_type -> oss_service.Token
+	0, // 2: oss_service.HelloService.GetCicvOssConfig:output_type -> oss_service.OssConfigInfo
+	0, // 3: oss_service.HelloService.GetPjiOssConfig:output_type -> oss_service.OssConfigInfo
+	2, // [2:4] is the sub-list for method output_type
+	0, // [0:2] is the sub-list for method input_type
+	0, // [0:0] is the sub-list for extension type_name
+	0, // [0:0] is the sub-list for extension extendee
+	0, // [0:0] is the sub-list for field type_name
+}
+
+func init() { file_hello_service_proto_init() }
+func file_hello_service_proto_init() {
+	if File_hello_service_proto != nil {
+		return
+	}
+	if !protoimpl.UnsafeEnabled {
+		file_hello_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*OssConfigInfo); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_hello_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Token); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+	}
+	type x struct{}
+	out := protoimpl.TypeBuilder{
+		File: protoimpl.DescBuilder{
+			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+			RawDescriptor: file_hello_service_proto_rawDesc,
+			NumEnums:      0,
+			NumMessages:   2,
+			NumExtensions: 0,
+			NumServices:   1,
+		},
+		GoTypes:           file_hello_service_proto_goTypes,
+		DependencyIndexes: file_hello_service_proto_depIdxs,
+		MessageInfos:      file_hello_service_proto_msgTypes,
+	}.Build()
+	File_hello_service_proto = out.File
+	file_hello_service_proto_rawDesc = nil
+	file_hello_service_proto_goTypes = nil
+	file_hello_service_proto_depIdxs = nil
+}

+ 0 - 255
biz/model/hello2_service/hello2_service.pb.go

@@ -1,255 +0,0 @@
-// Code generated by protoc-gen-go. DO NOT EDIT.
-// versions:
-// 	protoc-gen-go v1.28.0
-// 	protoc        v5.27.2
-// source: hello2_service.proto
-
-package hello2_service
-
-import (
-	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
-	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
-	_ "pji_desktop_http/biz/model/api"
-	reflect "reflect"
-	sync "sync"
-)
-
-const (
-	// Verify that this generated code is sufficiently up-to-date.
-	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
-	// Verify that runtime/protoimpl is sufficiently up-to-date.
-	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
-)
-
-type OssConfigInfo struct {
-	state         protoimpl.MessageState
-	sizeCache     protoimpl.SizeCache
-	unknownFields protoimpl.UnknownFields
-
-	Endpoint        string `protobuf:"bytes,1,opt,name=endpoint,proto3" json:"endpoint,omitempty" form:"endpoint" query:"endpoint"`
-	AccessKeyId     string `protobuf:"bytes,2,opt,name=accessKeyId,proto3" json:"accessKeyId,omitempty" form:"accessKeyId" query:"accessKeyId"`
-	AccessKeySecret string `protobuf:"bytes,3,opt,name=accessKeySecret,proto3" json:"accessKeySecret,omitempty" form:"accessKeySecret" query:"accessKeySecret"`
-	BucketName      string `protobuf:"bytes,4,opt,name=bucketName,proto3" json:"bucketName,omitempty" form:"bucketName" query:"bucketName"`
-}
-
-func (x *OssConfigInfo) Reset() {
-	*x = OssConfigInfo{}
-	if protoimpl.UnsafeEnabled {
-		mi := &file_hello2_service_proto_msgTypes[0]
-		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
-		ms.StoreMessageInfo(mi)
-	}
-}
-
-func (x *OssConfigInfo) String() string {
-	return protoimpl.X.MessageStringOf(x)
-}
-
-func (*OssConfigInfo) ProtoMessage() {}
-
-func (x *OssConfigInfo) ProtoReflect() protoreflect.Message {
-	mi := &file_hello2_service_proto_msgTypes[0]
-	if protoimpl.UnsafeEnabled && x != nil {
-		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
-		if ms.LoadMessageInfo() == nil {
-			ms.StoreMessageInfo(mi)
-		}
-		return ms
-	}
-	return mi.MessageOf(x)
-}
-
-// Deprecated: Use OssConfigInfo.ProtoReflect.Descriptor instead.
-func (*OssConfigInfo) Descriptor() ([]byte, []int) {
-	return file_hello2_service_proto_rawDescGZIP(), []int{0}
-}
-
-func (x *OssConfigInfo) GetEndpoint() string {
-	if x != nil {
-		return x.Endpoint
-	}
-	return ""
-}
-
-func (x *OssConfigInfo) GetAccessKeyId() string {
-	if x != nil {
-		return x.AccessKeyId
-	}
-	return ""
-}
-
-func (x *OssConfigInfo) GetAccessKeySecret() string {
-	if x != nil {
-		return x.AccessKeySecret
-	}
-	return ""
-}
-
-func (x *OssConfigInfo) GetBucketName() string {
-	if x != nil {
-		return x.BucketName
-	}
-	return ""
-}
-
-type Token struct {
-	state         protoimpl.MessageState
-	sizeCache     protoimpl.SizeCache
-	unknownFields protoimpl.UnknownFields
-
-	Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty" form:"token" query:"token"`
-}
-
-func (x *Token) Reset() {
-	*x = Token{}
-	if protoimpl.UnsafeEnabled {
-		mi := &file_hello2_service_proto_msgTypes[1]
-		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
-		ms.StoreMessageInfo(mi)
-	}
-}
-
-func (x *Token) String() string {
-	return protoimpl.X.MessageStringOf(x)
-}
-
-func (*Token) ProtoMessage() {}
-
-func (x *Token) ProtoReflect() protoreflect.Message {
-	mi := &file_hello2_service_proto_msgTypes[1]
-	if protoimpl.UnsafeEnabled && x != nil {
-		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
-		if ms.LoadMessageInfo() == nil {
-			ms.StoreMessageInfo(mi)
-		}
-		return ms
-	}
-	return mi.MessageOf(x)
-}
-
-// Deprecated: Use Token.ProtoReflect.Descriptor instead.
-func (*Token) Descriptor() ([]byte, []int) {
-	return file_hello2_service_proto_rawDescGZIP(), []int{1}
-}
-
-func (x *Token) GetToken() string {
-	if x != nil {
-		return x.Token
-	}
-	return ""
-}
-
-var File_hello2_service_proto protoreflect.FileDescriptor
-
-var file_hello2_service_proto_rawDesc = []byte{
-	0x0a, 0x14, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x32, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
-	0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x6f, 0x73, 0x73, 0x5f, 0x73, 0x65, 0x72, 0x76,
-	0x69, 0x63, 0x65, 0x1a, 0x09, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x97,
-	0x01, 0x0a, 0x0d, 0x4f, 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x49, 0x6e, 0x66, 0x6f,
-	0x12, 0x1a, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01,
-	0x28, 0x09, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x20, 0x0a, 0x0b,
-	0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28,
-	0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x49, 0x64, 0x12, 0x28,
-	0x0a, 0x0f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x53, 0x65, 0x63, 0x72, 0x65,
-	0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4b,
-	0x65, 0x79, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x62, 0x75, 0x63, 0x6b,
-	0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x62, 0x75,
-	0x63, 0x6b, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x1d, 0x0a, 0x05, 0x54, 0x6f, 0x6b, 0x65,
-	0x6e, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
-	0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x32, 0xb5, 0x01, 0x0a, 0x0d, 0x48, 0x65, 0x6c, 0x6c,
-	0x6f, 0x31, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x53, 0x0a, 0x10, 0x47, 0x65, 0x74,
-	0x43, 0x69, 0x63, 0x76, 0x4f, 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x12, 0x2e,
-	0x6f, 0x73, 0x73, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x54, 0x6f, 0x6b, 0x65,
-	0x6e, 0x1a, 0x1a, 0x2e, 0x6f, 0x73, 0x73, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e,
-	0x4f, 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x0f, 0xca,
-	0xc1, 0x18, 0x0b, 0x2f, 0x6f, 0x73, 0x73, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x4f,
-	0x0a, 0x0f, 0x47, 0x65, 0x74, 0x50, 0x6a, 0x69, 0x4f, 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69,
-	0x67, 0x12, 0x12, 0x2e, 0x6f, 0x73, 0x73, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e,
-	0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x1a, 0x1a, 0x2e, 0x6f, 0x73, 0x73, 0x5f, 0x73, 0x65, 0x72, 0x76,
-	0x69, 0x63, 0x65, 0x2e, 0x4f, 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x49, 0x6e, 0x66,
-	0x6f, 0x22, 0x0c, 0xca, 0xc1, 0x18, 0x08, 0x2f, 0x6f, 0x73, 0x73, 0x2f, 0x70, 0x6a, 0x69, 0x42,
-	0x2b, 0x5a, 0x29, 0x70, 0x6a, 0x69, 0x5f, 0x64, 0x65, 0x73, 0x6b, 0x74, 0x6f, 0x70, 0x5f, 0x68,
-	0x74, 0x74, 0x70, 0x2f, 0x62, 0x69, 0x7a, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2f, 0x68, 0x65,
-	0x6c, 0x6c, 0x6f, 0x32, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x62, 0x06, 0x70, 0x72,
-	0x6f, 0x74, 0x6f, 0x33,
-}
-
-var (
-	file_hello2_service_proto_rawDescOnce sync.Once
-	file_hello2_service_proto_rawDescData = file_hello2_service_proto_rawDesc
-)
-
-func file_hello2_service_proto_rawDescGZIP() []byte {
-	file_hello2_service_proto_rawDescOnce.Do(func() {
-		file_hello2_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_hello2_service_proto_rawDescData)
-	})
-	return file_hello2_service_proto_rawDescData
-}
-
-var file_hello2_service_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
-var file_hello2_service_proto_goTypes = []interface{}{
-	(*OssConfigInfo)(nil), // 0: oss_service.OssConfigInfo
-	(*Token)(nil),         // 1: oss_service.Token
-}
-var file_hello2_service_proto_depIdxs = []int32{
-	1, // 0: oss_service.Hello1Service.GetCicvOssConfig:input_type -> oss_service.Token
-	1, // 1: oss_service.Hello1Service.GetPjiOssConfig:input_type -> oss_service.Token
-	0, // 2: oss_service.Hello1Service.GetCicvOssConfig:output_type -> oss_service.OssConfigInfo
-	0, // 3: oss_service.Hello1Service.GetPjiOssConfig:output_type -> oss_service.OssConfigInfo
-	2, // [2:4] is the sub-list for method output_type
-	0, // [0:2] is the sub-list for method input_type
-	0, // [0:0] is the sub-list for extension type_name
-	0, // [0:0] is the sub-list for extension extendee
-	0, // [0:0] is the sub-list for field type_name
-}
-
-func init() { file_hello2_service_proto_init() }
-func file_hello2_service_proto_init() {
-	if File_hello2_service_proto != nil {
-		return
-	}
-	if !protoimpl.UnsafeEnabled {
-		file_hello2_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
-			switch v := v.(*OssConfigInfo); i {
-			case 0:
-				return &v.state
-			case 1:
-				return &v.sizeCache
-			case 2:
-				return &v.unknownFields
-			default:
-				return nil
-			}
-		}
-		file_hello2_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
-			switch v := v.(*Token); i {
-			case 0:
-				return &v.state
-			case 1:
-				return &v.sizeCache
-			case 2:
-				return &v.unknownFields
-			default:
-				return nil
-			}
-		}
-	}
-	type x struct{}
-	out := protoimpl.TypeBuilder{
-		File: protoimpl.DescBuilder{
-			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
-			RawDescriptor: file_hello2_service_proto_rawDesc,
-			NumEnums:      0,
-			NumMessages:   2,
-			NumExtensions: 0,
-			NumServices:   1,
-		},
-		GoTypes:           file_hello2_service_proto_goTypes,
-		DependencyIndexes: file_hello2_service_proto_depIdxs,
-		MessageInfos:      file_hello2_service_proto_msgTypes,
-	}.Build()
-	File_hello2_service_proto = out.File
-	file_hello2_service_proto_rawDesc = nil
-	file_hello2_service_proto_goTypes = nil
-	file_hello2_service_proto_depIdxs = nil
-}

+ 12 - 0
biz/model/user.go

@@ -0,0 +1,12 @@
+package model
+
+import "gorm.io/gorm"
+
+type User struct {
+	gorm.Model
+	Name string `gorm:"column:name"`
+}
+
+func (u User) TableName() string {
+	return "users"
+}

+ 0 - 1
biz/router/hello1_service/hello1_service.go → biz/router/hello1_service/hello_service.go

@@ -21,6 +21,5 @@ func Register(r *server.Hertz) {
 		_oss := root.Group("/oss", _ossMw()...)
 		_oss.GET("/config", append(_getcicvossconfigMw(), hello1_service.GetCicvOssConfig)...)
 		_oss.GET("/pji", append(_getpjiossconfigMw(), hello1_service.GetPjiOssConfig)...)
-		_oss.GET("/pji", append(_testMw(), hello1_service.Test)...)
 	}
 }

+ 0 - 25
biz/router/hello2_service/hello2_service.go

@@ -1,25 +0,0 @@
-// Code generated by hertz generator. DO NOT EDIT.
-
-package hello2_service
-
-import (
-	"github.com/cloudwego/hertz/pkg/app/server"
-	hello2_service "pji_desktop_http/biz/handler/hello2_service"
-)
-
-/*
- This file will register all the routes of the services in the master idl.
- And it will update automatically when you use the "update" command for the idl.
- So don't modify the contents of the file, or your code will be deleted when it is updated.
-*/
-
-// Register register routes based on the IDL 'api.${HTTP Method}' annotation.
-func Register(r *server.Hertz) {
-
-	root := r.Group("/", rootMw()...)
-	{
-		_oss := root.Group("/oss", _ossMw()...)
-		_oss.GET("/config", append(_getcicvossconfigMw(), hello2_service.GetCicvOssConfig)...)
-		_oss.GET("/pji", append(_getpjiossconfigMw(), hello2_service.GetPjiOssConfig)...)
-	}
-}

+ 0 - 27
biz/router/hello2_service/middleware.go

@@ -1,27 +0,0 @@
-// Code generated by hertz generator.
-
-package hello2_service
-
-import (
-	"github.com/cloudwego/hertz/pkg/app"
-)
-
-func rootMw() []app.HandlerFunc {
-	// your code...
-	return nil
-}
-
-func _ossMw() []app.HandlerFunc {
-	// your code...
-	return nil
-}
-
-func _getcicvossconfigMw() []app.HandlerFunc {
-	// your code...
-	return nil
-}
-
-func _getpjiossconfigMw() []app.HandlerFunc {
-	// your code...
-	return nil
-}

+ 0 - 3
biz/router/register.go

@@ -5,13 +5,10 @@ package router
 import (
 	"github.com/cloudwego/hertz/pkg/app/server"
 	hello1_service "pji_desktop_http/biz/router/hello1_service"
-	hello2_service "pji_desktop_http/biz/router/hello2_service"
 )
 
 // GeneratedRegister registers routers generated by IDL.
 func GeneratedRegister(r *server.Hertz) {
 	//INSERT_POINT: DO NOT DELETE THIS LINE!
-	hello2_service.Register(r)
-
 	hello1_service.Register(r)
 }

+ 9 - 5
go.mod

@@ -1,10 +1,12 @@
 module pji_desktop_http
 
-go 1.22
+go 1.22.5
 
 require (
-	github.com/cloudwego/hertz v0.9.1
+	github.com/cloudwego/hertz v0.9.2
 	google.golang.org/protobuf v1.34.2
+	gorm.io/driver/mysql v1.5.7
+	gorm.io/gorm v1.25.11
 )
 
 require (
@@ -14,9 +16,12 @@ require (
 	github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 // indirect
 	github.com/cloudwego/netpoll v0.6.0 // indirect
 	github.com/fsnotify/fsnotify v1.5.4 // indirect
+	github.com/go-sql-driver/mysql v1.7.0 // indirect
 	github.com/golang/protobuf v1.5.0 // indirect
 	github.com/henrylee2cn/ameda v1.4.10 // indirect
 	github.com/henrylee2cn/goutil v0.0.0-20210127050712-89660552f6f8 // indirect
+	github.com/jinzhu/inflection v1.0.0 // indirect
+	github.com/jinzhu/now v1.1.5 // indirect
 	github.com/klauspost/cpuid/v2 v2.0.9 // indirect
 	github.com/nyaruka/phonenumbers v1.0.55 // indirect
 	github.com/tidwall/gjson v1.14.4 // indirect
@@ -24,7 +29,6 @@ require (
 	github.com/tidwall/pretty v1.2.0 // indirect
 	github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
 	golang.org/x/arch v0.0.0-20210923205945-b76863e36670 // indirect
-	golang.org/x/sys v0.0.0-20220412211240-33da011f77ad // indirect
+	golang.org/x/sys v0.5.0 // indirect
+	golang.org/x/text v0.14.0 // indirect
 )
-
-replace github.com/apache/thrift => github.com/apache/thrift v0.13.0

+ 17 - 3
go.sum

@@ -10,8 +10,8 @@ github.com/bytedance/sonic v1.8.1/go.mod h1:i736AoUSYt75HyZLoJW9ERYxcy6eaN6h4BZX
 github.com/chenzhuoyu/base64x v0.0.0-20211019084208-fb5309c8db06/go.mod h1:DH46F32mSOjUmXrMHnKwZdA8wcEefY7UVqBKYGjpdQY=
 github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 h1:qSGYFH7+jGhDF8vLC+iwCD4WpbV1EBDSzWkJODFLams=
 github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311/go.mod h1:b583jCggY9gE99b6G5LEC39OIiVsWj+R97kbl5odCEk=
-github.com/cloudwego/hertz v0.9.1 h1:+jK9A6MDNTUVy6q/zSOlhbnp1fFMiOaPIsq0jlOfjZE=
-github.com/cloudwego/hertz v0.9.1/go.mod h1:cs8dH6unM4oaJ5k9m6pqbgLBPqakGWMG0+cthsxitsg=
+github.com/cloudwego/hertz v0.9.2 h1:VbqddZ5RuvcgxzfxvXcmTiRisGYoo0+WnHGeDJKhjqI=
+github.com/cloudwego/hertz v0.9.2/go.mod h1:cs8dH6unM4oaJ5k9m6pqbgLBPqakGWMG0+cthsxitsg=
 github.com/cloudwego/netpoll v0.6.0 h1:JRMkrA1o8k/4quxzg6Q1XM+zIhwZsyoWlq6ef+ht31U=
 github.com/cloudwego/netpoll v0.6.0/go.mod h1:xVefXptcyheopwNDZjDPcfU6kIjZXZ4nY550k1yH9eQ=
 github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
@@ -19,6 +19,8 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c
 github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
 github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI=
 github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU=
+github.com/go-sql-driver/mysql v1.7.0 h1:ueSltNNllEqE3qcWBTD0iQd3IpL/6U+mJxLkazJ7YPc=
+github.com/go-sql-driver/mysql v1.7.0/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI=
 github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
 github.com/golang/protobuf v1.5.0 h1:LUVKkCeviFUMKqHa4tXIIij/lbhnMbP7Fn5wKdKkRh4=
 github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
@@ -31,6 +33,10 @@ github.com/henrylee2cn/ameda v1.4.10 h1:JdvI2Ekq7tapdPsuhrc4CaFiqw6QXFvZIULWJgQy
 github.com/henrylee2cn/ameda v1.4.10/go.mod h1:liZulR8DgHxdK+MEwvZIylGnmcjzQ6N6f2PlWe7nEO4=
 github.com/henrylee2cn/goutil v0.0.0-20210127050712-89660552f6f8 h1:yE9ULgp02BhYIrO6sdV/FPe0xQM6fNHkVQW2IAymfM0=
 github.com/henrylee2cn/goutil v0.0.0-20210127050712-89660552f6f8/go.mod h1:Nhe/DM3671a5udlv2AdV2ni/MZzgfv2qrPL5nIi3EGQ=
+github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E=
+github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc=
+github.com/jinzhu/now v1.1.5 h1:/o9tlHleP7gOFmsnYNz3RGnqzefHA47wQpKrrdTIwXQ=
+github.com/jinzhu/now v1.1.5/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8=
 github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo=
 github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
 github.com/klauspost/cpuid/v2 v2.0.9 h1:lgaqFMSdTdQYdZ04uHyN2d/eKdOMyi2YLSvlQIBFYa4=
@@ -70,9 +76,12 @@ golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn
 golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
 golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
 golang.org/x/sys v0.0.0-20220110181412-a018aaa089fe/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.0.0-20220412211240-33da011f77ad h1:ntjMns5wyP/fN65tdBD4g8J5w8n015+iIIs9rtjXkY0=
 golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU=
+golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
+golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
+golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
 golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
 golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
 golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
@@ -85,4 +94,9 @@ gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
 gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
 gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
 gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
+gorm.io/driver/mysql v1.5.7 h1:MndhOPYOfEp2rHKgkZIhJ16eVUIRf2HmzgoPmh7FCWo=
+gorm.io/driver/mysql v1.5.7/go.mod h1:sEtPWMiqiN1N1cMXoXmBbd8C6/l+TESwriotuRRpkDM=
+gorm.io/gorm v1.25.7/go.mod h1:hbnx/Oo0ChWMn1BIhpy1oYozzpM15i4YPuHDmfYtwg8=
+gorm.io/gorm v1.25.11 h1:/Wfyg1B/je1hnDx3sMkX+gAlxrlZpn6X0BXRlwXlvHg=
+gorm.io/gorm v1.25.11/go.mod h1:xh7N7RHfYlNc5EmcI/El95gXusucDrQnHXe0+CgWcLQ=
 rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4=

+ 0 - 24
idl/services/hello1_service.proto

@@ -1,24 +0,0 @@
-syntax="proto3";
-package oss_service;
-option go_package = "hello1_service";
-import "api.proto";
-message OssConfigInfo {
-  string endpoint = 1;
-  string accessKeyId = 2 [json_name = "accessKeyId"];
-  string accessKeySecret = 3;
-  string bucketName = 4;
-}
-message Token {
-  string token = 1;
-}
-service Hello1Service {
-  rpc GetCicvOssConfig (Token) returns (OssConfigInfo){
-    option (api.get) = "/oss/config";
-  };
-  rpc GetPjiOssConfig (Token) returns (OssConfigInfo){
-    option (api.get) = "/oss/pji";
-  };
-  rpc Test (Token) returns (OssConfigInfo){
-    option (api.get) = "/oss/pji";
-  };
-}

+ 2 - 2
idl/services/hello2_service.proto → idl/services/hello_service.proto

@@ -1,6 +1,6 @@
 syntax="proto3";
 package oss_service;
-option go_package = "hello2_service";
+option go_package = "hello1_service";
 import "api.proto";
 message OssConfigInfo {
   string endpoint = 1;
@@ -11,7 +11,7 @@ message OssConfigInfo {
 message Token {
   string token = 1;
 }
-service Hello1Service {
+service HelloService {
   rpc GetCicvOssConfig (Token) returns (OssConfigInfo){
     option (api.get) = "/oss/config";
   };

+ 2 - 1
main.go

@@ -4,11 +4,12 @@ package main
 
 import (
 	"github.com/cloudwego/hertz/pkg/app/server"
+	"pji_desktop_http/biz/dal"
 )
 
 func main() {
+	dal.Init()
 	h := server.Default()
-
 	register(h)
 	h.Spin()
 }

+ 2 - 0
router.go

@@ -5,6 +5,7 @@ package main
 import (
 	"github.com/cloudwego/hertz/pkg/app/server"
 	handler "pji_desktop_http/biz/handler"
+	"pji_desktop_http/biz/handler/user_service"
 )
 
 // customizeRegister registers customize routers.
@@ -12,4 +13,5 @@ func customizedRegister(r *server.Hertz) {
 	r.GET("/ping", handler.Ping)
 
 	// your code ...
+	r.GET("/test/queryuser", user_service.TestQueryUser)
 }