change layout
CI / changes (push) Successful in 5s
CI / docker-bff (push) Failing after 7s
CI / docker-product (push) Failing after 5s
CI / docker-admin (push) Failing after 4s
CI / docker-user (push) Failing after 6s

This commit is contained in:
2026-08-20 15:41:44 +08:00
parent 57e04be304
commit be8f89f449
176 changed files with 7009 additions and 4498 deletions
+13
View File
@@ -0,0 +1,13 @@
package config
type Config struct {
Nacos NacosConf
}
type NacosConf struct {
Hosts []string
NamespaceId string `json:",optional"`
Group string `json:",optional"`
RegisterIP string `json:",optional"`
ConfigID string `json:",optional"`
}
@@ -0,0 +1,31 @@
package logic
import (
"context"
"lone-services/rpc/order/pb"
"lone-services/services/order/internal/svc"
"github.com/zeromicro/go-zero/core/logx"
)
type ItemsLogic struct {
ctx context.Context
svcCtx *svc.ServiceContext
logx.Logger
}
func NewItemsLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ItemsLogic {
return &ItemsLogic{
ctx: ctx,
svcCtx: svcCtx,
Logger: logx.WithContext(ctx),
}
}
func (l *ItemsLogic) Items(in *order.ItemsRequest) (*order.Response, error) {
// todo: add your logic here and delete this line
//TODO new id now
return &order.Response{}, nil
}
@@ -0,0 +1,29 @@
// Code generated by goctl. DO NOT EDIT.
// goctl 1.10.2
// Source: order.proto
package server
import (
"context"
"lone-services/rpc/order/pb"
"lone-services/services/order/internal/logic"
"lone-services/services/order/internal/svc"
)
type OrderServer struct {
svcCtx *svc.ServiceContext
order.UnimplementedOrderServer
}
func NewOrderServer(svcCtx *svc.ServiceContext) *OrderServer {
return &OrderServer{
svcCtx: svcCtx,
}
}
func (s *OrderServer) Items(ctx context.Context, in *order.ItemsRequest) (*order.Response, error) {
l := logic.NewItemsLogic(ctx, s.svcCtx)
return l.Items(in)
}
@@ -0,0 +1,22 @@
package svc
import (
"lone-services/pkg/utils"
"lone-services/services/order/internal/config"
"gorm.io/gorm"
)
type ServiceContext struct {
Config config.Config
DB *gorm.DB
Prefix string
}
func NewServiceContext(c config.Config, db *gorm.DB) *ServiceContext {
return &ServiceContext{
Config: c,
DB: db,
Prefix: utils.GetConfigString("mysql.prefix"),
}
}