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

@@ -2,6 +2,7 @@ package YYSY
import (
"context"
"tianyuan-api/pkg/errs"
"tianyuan-api/apps/api/internal/svc"
"tianyuan-api/apps/api/internal/types"
@@ -23,7 +24,7 @@ func NewYYSY09CDLogic(ctx context.Context, svcCtx *svc.ServiceContext) *YYSY09CD
}
}
func (l *YYSY09CDLogic) YYSY09CD(req *types.Request) (resp *types.Response, err error) {
func (l *YYSY09CDLogic) YYSY09CD(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 YYSY
import (
"context"
"tianyuan-api/pkg/errs"
"tianyuan-api/apps/api/internal/svc"
"tianyuan-api/apps/api/internal/types"
@@ -23,7 +24,7 @@ func NewYYSY4B37Logic(ctx context.Context, svcCtx *svc.ServiceContext) *YYSY4B37
}
}
func (l *YYSY4B37Logic) YYSY4B37(req *types.Request) (resp *types.Response, err error) {
func (l *YYSY4B37Logic) YYSY4B37(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 YYSY
import (
"context"
"tianyuan-api/pkg/errs"
"tianyuan-api/apps/api/internal/svc"
"tianyuan-api/apps/api/internal/types"
@@ -23,7 +24,7 @@ func NewYYSY6F2ELogic(ctx context.Context, svcCtx *svc.ServiceContext) *YYSY6F2E
}
}
func (l *YYSY6F2ELogic) YYSY6F2E(req *types.Request) (resp *types.Response, err error) {
func (l *YYSY6F2ELogic) YYSY6F2E(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 YYSY
import (
"context"
"tianyuan-api/pkg/errs"
"tianyuan-api/apps/api/internal/svc"
"tianyuan-api/apps/api/internal/types"
@@ -23,7 +24,7 @@ func NewYYSYBE08Logic(ctx context.Context, svcCtx *svc.ServiceContext) *YYSYBE08
}
}
func (l *YYSYBE08Logic) YYSYBE08(req *types.Request) (resp *types.Response, err error) {
func (l *YYSYBE08Logic) YYSYBE08(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 YYSY
import (
"context"
"tianyuan-api/pkg/errs"
"tianyuan-api/apps/api/internal/svc"
"tianyuan-api/apps/api/internal/types"
@@ -23,7 +24,7 @@ func NewYYSYD50FLogic(ctx context.Context, svcCtx *svc.ServiceContext) *YYSYD50F
}
}
func (l *YYSYD50FLogic) YYSYD50F(req *types.Request) (resp *types.Response, err error) {
func (l *YYSYD50FLogic) YYSYD50F(req *types.Request) (resp *types.Response, err *errs.AppError) {
// todo: add your logic here and delete this line
return

View File

@@ -5,6 +5,7 @@ import (
"github.com/zeromicro/go-zero/core/logx"
"tianyuan-api/apps/api/internal/svc"
"tianyuan-api/apps/api/internal/types"
"tianyuan-api/pkg/errs"
)
type YYSYF7DBLogic struct {
@@ -21,67 +22,7 @@ func NewYYSYF7DBLogic(ctx context.Context, svcCtx *svc.ServiceContext) *YYSYF7DB
}
}
func (l *YYSYF7DBLogic) YYSYF7DB(req *types.Request) (*types.Response, error) {
////userId, ok := l.ctx.Value("userId").(int64)
////if !ok {
//// return &types.Response{}, errors.New("系统错误,请联系管理员")
////}
//secretKey, ok := l.ctx.Value("secretKey").(string)
//if !ok {
// return &types.Response{}, errors.New("系统错误,请联系管理员")
//}
//
//// 1、解密
//key, err := hex.DecodeString(secretKey)
//decryptData, err := crypto.AesDecrypt(req.Data, key)
//if err != nil || len(decryptData) == 0 {
// return nil, errors.New("参数解密失败")
//}
//
//// 2、校验
//var data validator.YYSYf7dbRequest
//
//if validatorErr := validator.ValidateAndParse(decryptData, &data); validatorErr != nil {
// return nil, validatorErr
//}
//
//// 3、西部加密
//westConfig := l.svcCtx.Config.WestConfig
////name, err := crypto.WestDexEncrypt(data., westConfig.Key)
////if err != nil {
//// logx.Errorf("西部加密错误:%v", err)
//// return nil, errors.New("业务异常")
////}
//phone, err := crypto.WestDexEncrypt(data.MobileNo, westConfig.Key)
//if err != nil {
// logx.Errorf("西部加密错误:%v", err)
// return nil, errors.New("业务异常")
//}
//startDate, err := crypto.WestDexEncrypt(data.StartDate, westConfig.Key)
//if err != nil {
// logx.Errorf("西部加密错误:%v", err)
// return nil, errors.New("业务异常")
//}
//// 4、发送请求到西部
//westdexRequest := map[string]interface{}{
// "phone": phone,
// "startDate": startDate,
//}
//westResp, err := l.svcCtx.WestDexService.CallAPI("G19BJ02", westdexRequest)
//if err != nil {
// return nil, err
//}
//
//// 5、响应解析
////var respData westmodel.G09GX01Response
////unmarshalErr := json.Unmarshal(westResp, &respData)
////if unmarshalErr != nil {
//// return nil, unmarshalErr
////}
////crypto.AesEncrypt()
//return &types.Response{
// Data: string(westResp),
//}, nil
func (l *YYSYF7DBLogic) YYSYF7DB(req *types.Request) (*types.Response, *errs.AppError) {
return &types.Response{}, nil
}