fix admin login log
CI / changes (push) Successful in 4s
CI / docker-bff (push) Successful in 3m21s
CI / docker-product (push) Successful in 3m39s
CI / docker-admin (push) Successful in 3m34s
CI / docker-user (push) Successful in 3m29s
CI / docker-ad (push) Successful in 3m29s

This commit is contained in:
2026-08-21 16:07:03 +08:00
parent ccba568457
commit c33fbdb422
30 changed files with 2131 additions and 74 deletions
@@ -0,0 +1,30 @@
package logic
import (
"context"
"lone-services/rpc/order/pb"
"lone-services/services/order/internal/svc"
"github.com/zeromicro/go-zero/core/logx"
)
type AddressItemLogic struct {
ctx context.Context
svcCtx *svc.ServiceContext
logx.Logger
}
func NewAddressItemLogic(ctx context.Context, svcCtx *svc.ServiceContext) *AddressItemLogic {
return &AddressItemLogic{
ctx: ctx,
svcCtx: svcCtx,
Logger: logx.WithContext(ctx),
}
}
func (l *AddressItemLogic) AddressItem(in *order.AddressItemsRequest) (*order.Response, error) {
// todo: add your logic here and delete this line
return &order.Response{}, nil
}
@@ -0,0 +1,30 @@
package logic
import (
"context"
"lone-services/rpc/order/pb"
"lone-services/services/order/internal/svc"
"github.com/zeromicro/go-zero/core/logx"
)
type OrderAuditingItemsLogic struct {
ctx context.Context
svcCtx *svc.ServiceContext
logx.Logger
}
func NewOrderAuditingItemsLogic(ctx context.Context, svcCtx *svc.ServiceContext) *OrderAuditingItemsLogic {
return &OrderAuditingItemsLogic{
ctx: ctx,
svcCtx: svcCtx,
Logger: logx.WithContext(ctx),
}
}
func (l *OrderAuditingItemsLogic) OrderAuditingItems(in *order.OrderAuditingItemsRequest) (*order.Response, error) {
// todo: add your logic here and delete this line
return &order.Response{}, nil
}
@@ -0,0 +1,30 @@
package logic
import (
"context"
"lone-services/rpc/order/pb"
"lone-services/services/order/internal/svc"
"github.com/zeromicro/go-zero/core/logx"
)
type OrderAuditingLogic struct {
ctx context.Context
svcCtx *svc.ServiceContext
logx.Logger
}
func NewOrderAuditingLogic(ctx context.Context, svcCtx *svc.ServiceContext) *OrderAuditingLogic {
return &OrderAuditingLogic{
ctx: ctx,
svcCtx: svcCtx,
Logger: logx.WithContext(ctx),
}
}
func (l *OrderAuditingLogic) OrderAuditing(in *order.OrderAuditingRequest) (*order.Response, error) {
// todo: add your logic here and delete this line
return &order.Response{}, nil
}
@@ -0,0 +1,30 @@
package logic
import (
"context"
"lone-services/rpc/order/pb"
"lone-services/services/order/internal/svc"
"github.com/zeromicro/go-zero/core/logx"
)
type OrderCreateLogic struct {
ctx context.Context
svcCtx *svc.ServiceContext
logx.Logger
}
func NewOrderCreateLogic(ctx context.Context, svcCtx *svc.ServiceContext) *OrderCreateLogic {
return &OrderCreateLogic{
ctx: ctx,
svcCtx: svcCtx,
Logger: logx.WithContext(ctx),
}
}
func (l *OrderCreateLogic) OrderCreate(in *order.AdminCreateOrderRequest) (*order.Response, error) {
// todo: add your logic here and delete this line
return &order.Response{}, nil
}
@@ -0,0 +1,30 @@
package logic
import (
"context"
"lone-services/rpc/order/pb"
"lone-services/services/order/internal/svc"
"github.com/zeromicro/go-zero/core/logx"
)
type WebAddressCreateLogic struct {
ctx context.Context
svcCtx *svc.ServiceContext
logx.Logger
}
func NewWebAddressCreateLogic(ctx context.Context, svcCtx *svc.ServiceContext) *WebAddressCreateLogic {
return &WebAddressCreateLogic{
ctx: ctx,
svcCtx: svcCtx,
Logger: logx.WithContext(ctx),
}
}
func (l *WebAddressCreateLogic) WebAddressCreate(in *order.EditAddressRequest) (*order.Response, error) {
// todo: add your logic here and delete this line
return &order.Response{}, nil
}
@@ -0,0 +1,30 @@
package logic
import (
"context"
"lone-services/rpc/order/pb"
"lone-services/services/order/internal/svc"
"github.com/zeromicro/go-zero/core/logx"
)
type WebAddressDefLogic struct {
ctx context.Context
svcCtx *svc.ServiceContext
logx.Logger
}
func NewWebAddressDefLogic(ctx context.Context, svcCtx *svc.ServiceContext) *WebAddressDefLogic {
return &WebAddressDefLogic{
ctx: ctx,
svcCtx: svcCtx,
Logger: logx.WithContext(ctx),
}
}
func (l *WebAddressDefLogic) WebAddressDef(in *order.IdRequest) (*order.Response, error) {
// todo: add your logic here and delete this line
return &order.Response{}, nil
}
@@ -0,0 +1,30 @@
package logic
import (
"context"
"lone-services/rpc/order/pb"
"lone-services/services/order/internal/svc"
"github.com/zeromicro/go-zero/core/logx"
)
type WebAddressEditLogic struct {
ctx context.Context
svcCtx *svc.ServiceContext
logx.Logger
}
func NewWebAddressEditLogic(ctx context.Context, svcCtx *svc.ServiceContext) *WebAddressEditLogic {
return &WebAddressEditLogic{
ctx: ctx,
svcCtx: svcCtx,
Logger: logx.WithContext(ctx),
}
}
func (l *WebAddressEditLogic) WebAddressEdit(in *order.EditAddressRequest) (*order.Response, error) {
// todo: add your logic here and delete this line
return &order.Response{}, nil
}
@@ -0,0 +1,30 @@
package logic
import (
"context"
"lone-services/rpc/order/pb"
"lone-services/services/order/internal/svc"
"github.com/zeromicro/go-zero/core/logx"
)
type WebAddressItemsLogic struct {
ctx context.Context
svcCtx *svc.ServiceContext
logx.Logger
}
func NewWebAddressItemsLogic(ctx context.Context, svcCtx *svc.ServiceContext) *WebAddressItemsLogic {
return &WebAddressItemsLogic{
ctx: ctx,
svcCtx: svcCtx,
Logger: logx.WithContext(ctx),
}
}
func (l *WebAddressItemsLogic) WebAddressItems(in *order.EmptyRequest) (*order.Response, error) {
// todo: add your logic here and delete this line
return &order.Response{}, nil
}
@@ -0,0 +1,30 @@
package logic
import (
"context"
"lone-services/rpc/order/pb"
"lone-services/services/order/internal/svc"
"github.com/zeromicro/go-zero/core/logx"
)
type WebAddressStatusLogic struct {
ctx context.Context
svcCtx *svc.ServiceContext
logx.Logger
}
func NewWebAddressStatusLogic(ctx context.Context, svcCtx *svc.ServiceContext) *WebAddressStatusLogic {
return &WebAddressStatusLogic{
ctx: ctx,
svcCtx: svcCtx,
Logger: logx.WithContext(ctx),
}
}
func (l *WebAddressStatusLogic) WebAddressStatus(in *order.StatusAddressRequest) (*order.Response, error) {
// todo: add your logic here and delete this line
return &order.Response{}, nil
}
@@ -0,0 +1,30 @@
package logic
import (
"context"
"lone-services/rpc/order/pb"
"lone-services/services/order/internal/svc"
"github.com/zeromicro/go-zero/core/logx"
)
type WebCartEditLogic struct {
ctx context.Context
svcCtx *svc.ServiceContext
logx.Logger
}
func NewWebCartEditLogic(ctx context.Context, svcCtx *svc.ServiceContext) *WebCartEditLogic {
return &WebCartEditLogic{
ctx: ctx,
svcCtx: svcCtx,
Logger: logx.WithContext(ctx),
}
}
func (l *WebCartEditLogic) WebCartEdit(in *order.EditCartRequest) (*order.Response, error) {
// todo: add your logic here and delete this line
return &order.Response{}, nil
}
@@ -0,0 +1,30 @@
package logic
import (
"context"
"lone-services/rpc/order/pb"
"lone-services/services/order/internal/svc"
"github.com/zeromicro/go-zero/core/logx"
)
type WebCartLogic struct {
ctx context.Context
svcCtx *svc.ServiceContext
logx.Logger
}
func NewWebCartLogic(ctx context.Context, svcCtx *svc.ServiceContext) *WebCartLogic {
return &WebCartLogic{
ctx: ctx,
svcCtx: svcCtx,
Logger: logx.WithContext(ctx),
}
}
func (l *WebCartLogic) WebCart(in *order.EmptyRequest) (*order.Response, error) {
// todo: add your logic here and delete this line
return &order.Response{}, nil
}
@@ -0,0 +1,30 @@
package logic
import (
"context"
"lone-services/rpc/order/pb"
"lone-services/services/order/internal/svc"
"github.com/zeromicro/go-zero/core/logx"
)
type WebCreateLogic struct {
ctx context.Context
svcCtx *svc.ServiceContext
logx.Logger
}
func NewWebCreateLogic(ctx context.Context, svcCtx *svc.ServiceContext) *WebCreateLogic {
return &WebCreateLogic{
ctx: ctx,
svcCtx: svcCtx,
Logger: logx.WithContext(ctx),
}
}
func (l *WebCreateLogic) WebCreate(in *order.CreateOrderRequest) (*order.Response, error) {
// todo: add your logic here and delete this line
return &order.Response{}, nil
}
+61 -1
View File
@@ -23,7 +23,67 @@ func NewOrderServer(svcCtx *svc.ServiceContext) *OrderServer {
}
}
func (s *OrderServer) Items(ctx context.Context, in *order.ItemsRequest) (*order.Response, error) {
func (s *OrderServer) Items(ctx context.Context, in *order.OrderItemsRequest) (*order.Response, error) {
l := logic.NewItemsLogic(ctx, s.svcCtx)
return l.Items(in)
}
func (s *OrderServer) WebCreate(ctx context.Context, in *order.CreateOrderRequest) (*order.Response, error) {
l := logic.NewWebCreateLogic(ctx, s.svcCtx)
return l.WebCreate(in)
}
func (s *OrderServer) WebAddressCreate(ctx context.Context, in *order.EditAddressRequest) (*order.Response, error) {
l := logic.NewWebAddressCreateLogic(ctx, s.svcCtx)
return l.WebAddressCreate(in)
}
func (s *OrderServer) WebAddressEdit(ctx context.Context, in *order.EditAddressRequest) (*order.Response, error) {
l := logic.NewWebAddressEditLogic(ctx, s.svcCtx)
return l.WebAddressEdit(in)
}
func (s *OrderServer) WebAddressStatus(ctx context.Context, in *order.StatusAddressRequest) (*order.Response, error) {
l := logic.NewWebAddressStatusLogic(ctx, s.svcCtx)
return l.WebAddressStatus(in)
}
func (s *OrderServer) WebAddressDef(ctx context.Context, in *order.IdRequest) (*order.Response, error) {
l := logic.NewWebAddressDefLogic(ctx, s.svcCtx)
return l.WebAddressDef(in)
}
func (s *OrderServer) WebAddressItems(ctx context.Context, in *order.EmptyRequest) (*order.Response, error) {
l := logic.NewWebAddressItemsLogic(ctx, s.svcCtx)
return l.WebAddressItems(in)
}
func (s *OrderServer) WebCart(ctx context.Context, in *order.EmptyRequest) (*order.Response, error) {
l := logic.NewWebCartLogic(ctx, s.svcCtx)
return l.WebCart(in)
}
func (s *OrderServer) WebCartEdit(ctx context.Context, in *order.EditCartRequest) (*order.Response, error) {
l := logic.NewWebCartEditLogic(ctx, s.svcCtx)
return l.WebCartEdit(in)
}
func (s *OrderServer) AddressItem(ctx context.Context, in *order.AddressItemsRequest) (*order.Response, error) {
l := logic.NewAddressItemLogic(ctx, s.svcCtx)
return l.AddressItem(in)
}
func (s *OrderServer) OrderAuditingItems(ctx context.Context, in *order.OrderAuditingItemsRequest) (*order.Response, error) {
l := logic.NewOrderAuditingItemsLogic(ctx, s.svcCtx)
return l.OrderAuditingItems(in)
}
func (s *OrderServer) OrderAuditing(ctx context.Context, in *order.OrderAuditingRequest) (*order.Response, error) {
l := logic.NewOrderAuditingLogic(ctx, s.svcCtx)
return l.OrderAuditing(in)
}
func (s *OrderServer) OrderCreate(ctx context.Context, in *order.AdminCreateOrderRequest) (*order.Response, error) {
l := logic.NewOrderCreateLogic(ctx, s.svcCtx)
return l.OrderCreate(in)
}
+86 -4
View File
@@ -14,11 +14,33 @@ import (
)
type (
ItemsRequest = order.ItemsRequest
Response = order.Response
AddressItemsRequest = order.AddressItemsRequest
AdminCreateOrderRequest = order.AdminCreateOrderRequest
CreateOrderRequest = order.CreateOrderRequest
EditAddressRequest = order.EditAddressRequest
EditCartRequest = order.EditCartRequest
EmptyRequest = order.EmptyRequest
IdRequest = order.IdRequest
OrderAuditingItemsRequest = order.OrderAuditingItemsRequest
OrderAuditingRequest = order.OrderAuditingRequest
OrderItemsRequest = order.OrderItemsRequest
Response = order.Response
StatusAddressRequest = order.StatusAddressRequest
Order interface {
Items(ctx context.Context, in *ItemsRequest, opts ...grpc.CallOption) (*Response, error)
Items(ctx context.Context, in *OrderItemsRequest, opts ...grpc.CallOption) (*Response, error)
WebCreate(ctx context.Context, in *CreateOrderRequest, opts ...grpc.CallOption) (*Response, error)
WebAddressCreate(ctx context.Context, in *EditAddressRequest, opts ...grpc.CallOption) (*Response, error)
WebAddressEdit(ctx context.Context, in *EditAddressRequest, opts ...grpc.CallOption) (*Response, error)
WebAddressStatus(ctx context.Context, in *StatusAddressRequest, opts ...grpc.CallOption) (*Response, error)
WebAddressDef(ctx context.Context, in *IdRequest, opts ...grpc.CallOption) (*Response, error)
WebAddressItems(ctx context.Context, in *EmptyRequest, opts ...grpc.CallOption) (*Response, error)
WebCart(ctx context.Context, in *EmptyRequest, opts ...grpc.CallOption) (*Response, error)
WebCartEdit(ctx context.Context, in *EditCartRequest, opts ...grpc.CallOption) (*Response, error)
AddressItem(ctx context.Context, in *AddressItemsRequest, opts ...grpc.CallOption) (*Response, error)
OrderAuditingItems(ctx context.Context, in *OrderAuditingItemsRequest, opts ...grpc.CallOption) (*Response, error)
OrderAuditing(ctx context.Context, in *OrderAuditingRequest, opts ...grpc.CallOption) (*Response, error)
OrderCreate(ctx context.Context, in *AdminCreateOrderRequest, opts ...grpc.CallOption) (*Response, error)
}
defaultOrder struct {
@@ -32,7 +54,67 @@ func NewOrder(cli zrpc.Client) Order {
}
}
func (m *defaultOrder) Items(ctx context.Context, in *ItemsRequest, opts ...grpc.CallOption) (*Response, error) {
func (m *defaultOrder) Items(ctx context.Context, in *OrderItemsRequest, opts ...grpc.CallOption) (*Response, error) {
client := order.NewOrderClient(m.cli.Conn())
return client.Items(ctx, in, opts...)
}
func (m *defaultOrder) WebCreate(ctx context.Context, in *CreateOrderRequest, opts ...grpc.CallOption) (*Response, error) {
client := order.NewOrderClient(m.cli.Conn())
return client.WebCreate(ctx, in, opts...)
}
func (m *defaultOrder) WebAddressCreate(ctx context.Context, in *EditAddressRequest, opts ...grpc.CallOption) (*Response, error) {
client := order.NewOrderClient(m.cli.Conn())
return client.WebAddressCreate(ctx, in, opts...)
}
func (m *defaultOrder) WebAddressEdit(ctx context.Context, in *EditAddressRequest, opts ...grpc.CallOption) (*Response, error) {
client := order.NewOrderClient(m.cli.Conn())
return client.WebAddressEdit(ctx, in, opts...)
}
func (m *defaultOrder) WebAddressStatus(ctx context.Context, in *StatusAddressRequest, opts ...grpc.CallOption) (*Response, error) {
client := order.NewOrderClient(m.cli.Conn())
return client.WebAddressStatus(ctx, in, opts...)
}
func (m *defaultOrder) WebAddressDef(ctx context.Context, in *IdRequest, opts ...grpc.CallOption) (*Response, error) {
client := order.NewOrderClient(m.cli.Conn())
return client.WebAddressDef(ctx, in, opts...)
}
func (m *defaultOrder) WebAddressItems(ctx context.Context, in *EmptyRequest, opts ...grpc.CallOption) (*Response, error) {
client := order.NewOrderClient(m.cli.Conn())
return client.WebAddressItems(ctx, in, opts...)
}
func (m *defaultOrder) WebCart(ctx context.Context, in *EmptyRequest, opts ...grpc.CallOption) (*Response, error) {
client := order.NewOrderClient(m.cli.Conn())
return client.WebCart(ctx, in, opts...)
}
func (m *defaultOrder) WebCartEdit(ctx context.Context, in *EditCartRequest, opts ...grpc.CallOption) (*Response, error) {
client := order.NewOrderClient(m.cli.Conn())
return client.WebCartEdit(ctx, in, opts...)
}
func (m *defaultOrder) AddressItem(ctx context.Context, in *AddressItemsRequest, opts ...grpc.CallOption) (*Response, error) {
client := order.NewOrderClient(m.cli.Conn())
return client.AddressItem(ctx, in, opts...)
}
func (m *defaultOrder) OrderAuditingItems(ctx context.Context, in *OrderAuditingItemsRequest, opts ...grpc.CallOption) (*Response, error) {
client := order.NewOrderClient(m.cli.Conn())
return client.OrderAuditingItems(ctx, in, opts...)
}
func (m *defaultOrder) OrderAuditing(ctx context.Context, in *OrderAuditingRequest, opts ...grpc.CallOption) (*Response, error) {
client := order.NewOrderClient(m.cli.Conn())
return client.OrderAuditing(ctx, in, opts...)
}
func (m *defaultOrder) OrderCreate(ctx context.Context, in *AdminCreateOrderRequest, opts ...grpc.CallOption) (*Response, error) {
client := order.NewOrderClient(m.cli.Conn())
return client.OrderCreate(ctx, in, opts...)
}