新增新接口

This commit is contained in:
2025-03-20 02:03:28 +08:00
parent b1375f0343
commit 115a67f537
16 changed files with 1295 additions and 171 deletions

View File

@@ -3,9 +3,10 @@ package query
import (
"context"
"encoding/json"
"github.com/pkg/errors"
"qnc-server/common/xerr"
"github.com/pkg/errors"
"qnc-server/app/user/cmd/api/internal/svc"
"qnc-server/app/user/cmd/api/internal/types"
@@ -27,10 +28,11 @@ func NewQuerySingleTestLogic(ctx context.Context, svcCtx *svc.ServiceContext) *Q
}
func (l *QuerySingleTestLogic) QuerySingleTest(req *types.QuerySingleTestReq) (resp *types.QuerySingleTestResp, err error) {
//featrueModel, err := l.svcCtx.FeatureModel.FindOneByApiId(l.ctx, req.Api)
//if err != nil {
// return nil, errors.Wrapf(xerr.NewErrCode(xerr.SERVER_COMMON_ERROR), "单查测试, 获取接口失败 : %d", err)
//}
_, err = l.svcCtx.FeatureModel.FindOneByApiId(l.ctx, req.Api)
if err != nil {
return nil, errors.Wrapf(xerr.NewErrCode(xerr.SERVER_COMMON_ERROR), "单查测试, 获取接口失败 : %d", err)
}
marshalParams, err := json.Marshal(req.Params)
if err != nil {
return nil, errors.Wrapf(xerr.NewErrCode(xerr.SERVER_COMMON_ERROR), "单查测试, 序列化参数失败 : %d", err)