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
}