mirror of
https://github.com/APIParkLab/APIPark.git
synced 2026-06-14 20:41:15 +08:00
add strategy permit
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user