add strategy permit

This commit is contained in:
Liujian
2024-11-27 11:46:56 +08:00
parent b5671d14a4
commit 4e902e891e
9 changed files with 74 additions and 3 deletions
+5
View File
@@ -22,6 +22,11 @@ type imlStrategyService struct {
universally.IServiceEdit[Edit]
}
func (i *imlStrategyService) Restore(ctx context.Context, id string) error {
_, err := i.store.UpdateWhere(ctx, map[string]interface{}{"uuid": id}, map[string]interface{}{"is_delete": false})
return err
}
func (i *imlStrategyService) SearchAll(ctx context.Context, keyword string, driver string, scope int, target string) ([]*Strategy, error) {
w := make(map[string]interface{})
w["scope"] = scope
+2
View File
@@ -21,6 +21,8 @@ type IStrategyService interface {
SortDelete(ctx context.Context, id string) error
Delete(ctx context.Context, id ...string) error
Restore(ctx context.Context, id string) error
CommitStrategy(ctx context.Context, scope string, target string, strategyId string, data *Strategy) error
GetStrategyCommit(ctx context.Context, commitId string) (*commit.Commit[StrategyCommit], error)
LatestStrategyCommit(ctx context.Context, scope string, target string, strategyId string) (*commit.Commit[StrategyCommit], error)