v1.1
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user