This commit is contained in:
Pavel 2024-04-18 16:49:45 +03:00
parent acca2a858b
commit 50f5b8cdf0
2 changed files with 4 additions and 52 deletions

@ -709,7 +709,7 @@ SELECT (new_tags->>'AmoID')::INT,
new_tags->>'Name', new_tags->>'Name',
new_tags->>'Color', new_tags->>'Color',
CURRENT_TIMESTAMP CURRENT_TIMESTAMP
FROM json_array_elements($2::json[]) AS new_tags FROM json_array_elements($2::json) AS new_tags
JOIN user_data ON true JOIN user_data ON true
ON CONFLICT (amoID, accountID, entity) DO UPDATE ON CONFLICT (amoID, accountID, entity) DO UPDATE
SET name = EXCLUDED.name, SET name = EXCLUDED.name,
@ -724,7 +724,7 @@ SELECT (new_pipelines->>'AmoID')::INT,
new_pipelines->>'Name', new_pipelines->>'Name',
new_pipelines->>'IsArchive', new_pipelines->>'IsArchive',
CURRENT_TIMESTAMP CURRENT_TIMESTAMP
FROM json_array_elements($1::json[]) AS new_pipelines FROM json_array_elements($1::json) AS new_pipelines
ON CONFLICT (amoID, accountID) DO UPDATE ON CONFLICT (amoID, accountID) DO UPDATE
SET name = EXCLUDED.name, SET name = EXCLUDED.name,
isArchive = EXCLUDED.isArchive, isArchive = EXCLUDED.isArchive,
@ -739,7 +739,7 @@ SELECT (new_steps->>'AmoID')::INT,
new_steps->>'Name', new_steps->>'Name',
new_steps->>'Color', new_steps->>'Color',
CURRENT_TIMESTAMP CURRENT_TIMESTAMP
FROM json_array_elements($1::json[]) AS new_steps FROM json_array_elements($1::json) AS new_steps
ON CONFLICT (amoID, accountID, PipelineID) DO UPDATE ON CONFLICT (amoID, accountID, PipelineID) DO UPDATE
SET name = EXCLUDED.name, SET name = EXCLUDED.name,
color = EXCLUDED.color, color = EXCLUDED.color,
@ -760,7 +760,7 @@ SELECT (new_fields->>'AmoID')::INT,
CAST(new_fields->>'Entity' AS entitytype), CAST(new_fields->>'Entity' AS entitytype),
new_fields->>'Type', new_fields->>'Type',
CURRENT_TIMESTAMP CURRENT_TIMESTAMP
FROM json_array_elements($2::json[]) AS new_fields FROM json_array_elements($2::json) AS new_fields
JOIN user_data ON true JOIN user_data ON true
ON CONFLICT (amoID, accountID, entity) DO UPDATE ON CONFLICT (amoID, accountID, entity) DO UPDATE
SET name = EXCLUDED.name, SET name = EXCLUDED.name,

@ -316,18 +316,6 @@ func (r *AmoRepository) CheckPipelines(ctx context.Context, pipelines []model.Pi
return nil return nil
} }
func (r *AmoRepository) GetPipelineByID(ctx context.Context, accountID string, amoid int) (*model.Pipeline, error) {
return nil, nil
}
func (r *AmoRepository) UpdatePipeline(ctx context.Context, pipeline *model.Pipeline) error {
return nil
}
func (r *AmoRepository) InsertPipeline(ctx context.Context, pipeline *model.Pipeline) error {
return nil
}
// методы steps // методы steps
func (r *AmoRepository) GetStepsWithPagination(ctx context.Context, req *model.PaginationReq) (*model.UserListStepsResp, error) { func (r *AmoRepository) GetStepsWithPagination(ctx context.Context, req *model.PaginationReq) (*model.UserListStepsResp, error) {
@ -388,18 +376,6 @@ func (r *AmoRepository) CheckSteps(ctx context.Context, steps []model.Step) erro
return nil return nil
} }
func (r *AmoRepository) GetStepByID(ctx context.Context, accountID string, amoid int) (*model.Step, error) {
return nil, nil
}
func (r *AmoRepository) UpdateStep(ctx context.Context, step *model.Step) error {
return nil
}
func (r *AmoRepository) InsertStep(ctx context.Context, step *model.Step) error {
return nil
}
// методы tags // методы tags
func (r *AmoRepository) GetTagsWithPagination(ctx context.Context, req *model.PaginationReq) (*model.UserListTagsResp, error) { func (r *AmoRepository) GetTagsWithPagination(ctx context.Context, req *model.PaginationReq) (*model.UserListTagsResp, error) {
@ -471,18 +447,6 @@ func (r *AmoRepository) CheckTags(ctx context.Context, tags []model.Tag, tokenID
return nil return nil
} }
func (r *AmoRepository) GetTagByID(ctx context.Context, accountID string, amoid int, entity model.EntityType) (*model.Tag, error) {
return nil, nil
}
func (r *AmoRepository) UpdateTag(ctx context.Context, tag *model.Tag) error {
return nil
}
func (r *AmoRepository) InsertTag(ctx context.Context, tag *model.Tag) error {
return nil
}
// методы fields // методы fields
func (r *AmoRepository) GetFieldsWithPagination(ctx context.Context, req *model.PaginationReq) (*model.UserListFieldsResp, error) { func (r *AmoRepository) GetFieldsWithPagination(ctx context.Context, req *model.PaginationReq) (*model.UserListFieldsResp, error) {
@ -557,18 +521,6 @@ func (r *AmoRepository) CheckFields(ctx context.Context, fields []model.Field, t
return nil return nil
} }
func (r *AmoRepository) GetFieldByID(ctx context.Context, accountID string, amoid int, entity model.EntityType) (*model.Field, error) {
return nil, nil
}
func (r *AmoRepository) UpdateField(ctx context.Context, field *model.Field) error {
return nil
}
func (r *AmoRepository) InsertField(ctx context.Context, field *model.Field) error {
return nil
}
// методы rules // методы rules
func (r *AmoRepository) ChangeQuizSettings(ctx context.Context, request *model.RulesReq) error { func (r *AmoRepository) ChangeQuizSettings(ctx context.Context, request *model.RulesReq) error {