This commit is contained in:
2025-12-09 18:55:28 +08:00
parent 8d00d67540
commit c23ab8338b
209 changed files with 5445 additions and 3963 deletions

View File

@@ -1,17 +1,18 @@
package admin_feature
import (
"context"
"encoding/hex"
"context"
"encoding/hex"
"ycc-server/app/main/api/internal/svc"
"ycc-server/app/main/api/internal/types"
"ycc-server/app/main/model"
"ycc-server/common/xerr"
"ycc-server/pkg/lzkit/crypto"
"ycc-server/app/main/api/internal/svc"
"ycc-server/app/main/api/internal/types"
"ycc-server/app/main/model"
"ycc-server/common/xerr"
"ycc-server/pkg/lzkit/crypto"
"github.com/pkg/errors"
"github.com/zeromicro/go-zero/core/logx"
"github.com/pkg/errors"
"github.com/zeromicro/go-zero/core/logx"
"github.com/google/uuid"
)
type AdminConfigFeatureExampleLogic struct {
@@ -62,11 +63,12 @@ func (l *AdminConfigFeatureExampleLogic) AdminConfigFeatureExample(req *types.Ad
}
// 4. 准备示例数据
exampleData := &model.Example{
ApiId: feature.ApiId,
FeatureId: req.FeatureId,
Content: encryptedData,
}
exampleData := &model.Example{
Id: uuid.NewString(),
ApiId: feature.ApiId,
FeatureId: req.FeatureId,
Content: encryptedData,
}
// 4. 根据是否存在决定新增或更新
if existingExample == nil {