This commit is contained in:
2024-10-12 21:35:35 +08:00
parent dd8d23416c
commit 3d3ab79e20
36 changed files with 85 additions and 115 deletions

View File

@@ -30,7 +30,7 @@ func NewFLXG162ALogic(ctx context.Context, svcCtx *svc.ServiceContext) *FLXG162A
}
}
func (l *FLXG162ALogic) FLXG162A(req *types.Request) (resp *types.Response, err error) {
func (l *FLXG162ALogic) FLXG162A(req *types.Request) (resp *types.Response, err *errs.AppError) {
secretKey, ok := l.ctx.Value("secretKey").(string)
if !ok {
return &types.Response{}, errs.ErrSystem
@@ -57,9 +57,9 @@ func (l *FLXG162ALogic) FLXG162A(req *types.Request) (resp *types.Response, err
// 3、西部加密
westConfig := l.svcCtx.Config.WestConfig
encryptedFields, err := common.EncryptStructFields(data, westConfig.Key)
if err != nil {
logx.Errorf("西部加密错误:%v", err)
encryptedFields, encryptStructFieldsErr := common.EncryptStructFields(data, westConfig.Key)
if encryptStructFieldsErr != nil {
logx.Errorf("西部加密错误:%v", encryptStructFieldsErr)
return nil, errs.ErrSystem
}

View File

@@ -31,7 +31,7 @@ func NewFLXG3D56Logic(ctx context.Context, svcCtx *svc.ServiceContext) *FLXG3D56
}
// FLXG3D56 特殊名单
func (l *FLXG3D56Logic) FLXG3D56(req *types.Request) (resp *types.Response, err error) {
func (l *FLXG3D56Logic) FLXG3D56(req *types.Request) (resp *types.Response, err *errs.AppError) {
secretKey, ok := l.ctx.Value("secretKey").(string)
if !ok {
return &types.Response{}, errs.ErrSystem
@@ -58,9 +58,9 @@ func (l *FLXG3D56Logic) FLXG3D56(req *types.Request) (resp *types.Response, err
// 3、西部加密
westConfig := l.svcCtx.Config.WestConfig
encryptedFields, err := common.EncryptStructFields(data, westConfig.Key)
if err != nil {
logx.Errorf("西部加密错误:%v", err)
encryptedFields, encryptStructFieldsErr := common.EncryptStructFields(data, westConfig.Key)
if encryptStructFieldsErr != nil {
logx.Errorf("西部加密错误:%v", encryptStructFieldsErr)
return nil, errs.ErrSystem
}

View File

@@ -30,7 +30,7 @@ func NewFLXG54F5Logic(ctx context.Context, svcCtx *svc.ServiceContext) *FLXG54F5
}
}
func (l *FLXG54F5Logic) FLXG54F5(req *types.Request) (resp *types.Response, err error) {
func (l *FLXG54F5Logic) FLXG54F5(req *types.Request) (resp *types.Response, err *errs.AppError) {
secretKey, ok := l.ctx.Value("secretKey").(string)
if !ok {
return &types.Response{}, errs.ErrSystem
@@ -57,9 +57,9 @@ func (l *FLXG54F5Logic) FLXG54F5(req *types.Request) (resp *types.Response, err
// 3、西部加密
westConfig := l.svcCtx.Config.WestConfig
encryptedFields, err := common.EncryptStructFields(data, westConfig.Key)
if err != nil {
logx.Errorf("西部加密错误:%v", err)
encryptedFields, encryptStructFieldsErr := common.EncryptStructFields(data, westConfig.Key)
if encryptStructFieldsErr != nil {
logx.Errorf("西部加密错误:%v", encryptStructFieldsErr)
return nil, errs.ErrSystem
}

View File

@@ -29,7 +29,7 @@ func NewFLXG5876Logic(ctx context.Context, svcCtx *svc.ServiceContext) *FLXG5876
}
}
func (l *FLXG5876Logic) FLXG5876(req *types.Request) (resp *types.Response, err error) {
func (l *FLXG5876Logic) FLXG5876(req *types.Request) (resp *types.Response, err *errs.AppError) {
secretKey, ok := l.ctx.Value("secretKey").(string)
if !ok {
return &types.Response{}, errs.ErrSystem
@@ -56,9 +56,9 @@ func (l *FLXG5876Logic) FLXG5876(req *types.Request) (resp *types.Response, err
// 3、西部加密
westConfig := l.svcCtx.Config.WestConfig
encryptedFields, err := common.EncryptStructFields(data, westConfig.Key)
if err != nil {
logx.Errorf("西部加密错误:%v", err)
encryptedFields, encryptStructFieldsErr := common.EncryptStructFields(data, westConfig.Key)
if encryptStructFieldsErr != nil {
logx.Errorf("西部加密错误:%v", encryptStructFieldsErr)
return nil, errs.ErrSystem
}

View File

@@ -2,6 +2,7 @@ package FLXG
import (
"context"
"tianyuan-api/pkg/errs"
"tianyuan-api/apps/api/internal/svc"
"tianyuan-api/apps/api/internal/types"
@@ -23,7 +24,7 @@ func NewFLXG75FELogic(ctx context.Context, svcCtx *svc.ServiceContext) *FLXG75FE
}
}
func (l *FLXG75FELogic) FLXG75FE(req *types.Request) (resp *types.Response, err error) {
func (l *FLXG75FELogic) FLXG75FE(req *types.Request) (resp *types.Response, err *errs.AppError) {
// todo: add your logic here and delete this line
return

View File

@@ -2,6 +2,7 @@ package FLXG
import (
"context"
"tianyuan-api/pkg/errs"
"tianyuan-api/apps/api/internal/svc"
"tianyuan-api/apps/api/internal/types"
@@ -23,7 +24,7 @@ func NewFLXG9687Logic(ctx context.Context, svcCtx *svc.ServiceContext) *FLXG9687
}
}
func (l *FLXG9687Logic) FLXG9687(req *types.Request) (resp *types.Response, err error) {
func (l *FLXG9687Logic) FLXG9687(req *types.Request) (resp *types.Response, err *errs.AppError) {
// todo: add your logic here and delete this line
return

View File

@@ -29,7 +29,7 @@ func NewFLXG970FLogic(ctx context.Context, svcCtx *svc.ServiceContext) *FLXG970F
}
}
func (l *FLXG970FLogic) FLXG970F(req *types.Request) (resp *types.Response, err error) {
func (l *FLXG970FLogic) FLXG970F(req *types.Request) (resp *types.Response, err *errs.AppError) {
secretKey, ok := l.ctx.Value("secretKey").(string)
if !ok {
return &types.Response{}, errs.ErrSystem
@@ -56,9 +56,9 @@ func (l *FLXG970FLogic) FLXG970F(req *types.Request) (resp *types.Response, err
// 3、西部加密
westConfig := l.svcCtx.Config.WestConfig
encryptedFields, err := common.EncryptStructFields(data, westConfig.Key)
if err != nil {
logx.Errorf("西部加密错误:%v", err)
encryptedFields, encryptStructFieldsErr := common.EncryptStructFields(data, westConfig.Key)
if encryptStructFieldsErr != nil {
logx.Errorf("西部加密错误:%v", encryptStructFieldsErr)
return nil, errs.ErrSystem
}

View File

@@ -2,6 +2,7 @@ package FLXG
import (
"context"
"tianyuan-api/pkg/errs"
"tianyuan-api/apps/api/internal/svc"
"tianyuan-api/apps/api/internal/types"
@@ -23,7 +24,7 @@ func NewFLXGC9D1Logic(ctx context.Context, svcCtx *svc.ServiceContext) *FLXGC9D1
}
}
func (l *FLXGC9D1Logic) FLXGC9D1(req *types.Request) (resp *types.Response, err error) {
func (l *FLXGC9D1Logic) FLXGC9D1(req *types.Request) (resp *types.Response, err *errs.AppError) {
// todo: add your logic here and delete this line
return

View File

@@ -2,6 +2,7 @@ package FLXG
import (
"context"
"tianyuan-api/pkg/errs"
"tianyuan-api/apps/api/internal/svc"
"tianyuan-api/apps/api/internal/types"
@@ -23,7 +24,7 @@ func NewFLXGCA3DLogic(ctx context.Context, svcCtx *svc.ServiceContext) *FLXGCA3D
}
}
func (l *FLXGCA3DLogic) FLXGCA3D(req *types.Request) (resp *types.Response, err error) {
func (l *FLXGCA3DLogic) FLXGCA3D(req *types.Request) (resp *types.Response, err *errs.AppError) {
// todo: add your logic here and delete this line
return

View File

@@ -2,6 +2,7 @@ package FLXG
import (
"context"
"tianyuan-api/pkg/errs"
"tianyuan-api/apps/api/internal/svc"
"tianyuan-api/apps/api/internal/types"
@@ -23,7 +24,7 @@ func NewFLXGDEC7Logic(ctx context.Context, svcCtx *svc.ServiceContext) *FLXGDEC7
}
}
func (l *FLXGDEC7Logic) FLXGDEC7(req *types.Request) (resp *types.Response, err error) {
func (l *FLXGDEC7Logic) FLXGDEC7(req *types.Request) (resp *types.Response, err *errs.AppError) {
// todo: add your logic here and delete this line
return