Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Письменов Дмитрий Иванович
/
yourroomads
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 5688ff64
authored
Jul 09, 2021
by
Vladislav
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#19499 Загрузка модификаторов ставок
1 parent
aa26b6b9
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
37 additions
and
28 deletions
app/Service/Requests/Direct/AddAdExtensions.php
app/Service/Requests/Direct/AddAdGroups.php
app/Service/Requests/Direct/AddAds.php
app/Service/Requests/Direct/AddBidModifiers.php
app/Service/Requests/Direct/AddAdExtensions.php
View file @
5688ff6
...
@@ -64,20 +64,22 @@ class AddAdExtensions extends DirectRequest
...
@@ -64,20 +64,22 @@ class AddAdExtensions extends DirectRequest
Log
::
debug
(
$add_result
);
Log
::
debug
(
$add_result
);
Log
::
debug
(
$this
->
getParams
()[
'AdExtensions'
][
$key
]);
Log
::
debug
(
$this
->
getParams
()[
'AdExtensions'
][
$key
]);
$goalAdExtension
->
update
([
GoalAdExtension
::
where
(
'id'
,
$goalAdExtension
->
getKey
())
'reserve_create_at'
=>
null
,
->
update
([
]);
'reserve_create_at'
=>
null
,
]);
continue
;
continue
;
}
}
$external_id
=
(
string
)
$add_result
[
'Id'
];
$external_id
=
(
string
)
$add_result
[
'Id'
];
$goalAdExtension
->
update
([
GoalAdExtension
::
where
(
'id'
,
$goalAdExtension
->
getKey
())
'external_id'
=>
$external_id
,
->
update
([
'external_upload_at'
=>
Carbon
::
now
(),
'external_id'
=>
$external_id
,
'reserve_create_at'
=>
null
,
'external_upload_at'
=>
Carbon
::
now
(),
]);
'reserve_create_at'
=>
null
,
]);
}
}
}
catch
(
\Exception
$e
)
{
}
catch
(
\Exception
$e
)
{
...
...
app/Service/Requests/Direct/AddAdGroups.php
View file @
5688ff6
...
@@ -63,20 +63,22 @@ class AddAdGroups extends DirectRequest
...
@@ -63,20 +63,22 @@ class AddAdGroups extends DirectRequest
Log
::
debug
(
$add_result
);
Log
::
debug
(
$add_result
);
Log
::
debug
(
$this
->
getParams
()[
'AdGroups'
][
$key
]);
Log
::
debug
(
$this
->
getParams
()[
'AdGroups'
][
$key
]);
$goalAdGroup
->
update
([
GoalAdGroup
::
where
(
'id'
,
$goalAdGroup
->
getKey
())
'reserve_create_at'
=>
null
,
->
update
([
]);
'reserve_create_at'
=>
null
,
]);
continue
;
continue
;
}
}
$external_id
=
(
string
)
$add_result
[
'Id'
];
$external_id
=
(
string
)
$add_result
[
'Id'
];
$goalAdGroup
->
update
([
GoalAdGroup
::
where
(
'id'
,
$goalAdGroup
->
getKey
())
'external_id'
=>
$external_id
,
->
update
([
'external_upload_at'
=>
Carbon
::
now
(),
'external_id'
=>
$external_id
,
'reserve_create_at'
=>
null
,
'external_upload_at'
=>
Carbon
::
now
(),
]);
'reserve_create_at'
=>
null
,
]);
$goalAdGroup
->
goalKeywords
()
->
update
([
$goalAdGroup
->
goalKeywords
()
->
update
([
'goal_ad_group_external_id'
=>
$external_id
,
'goal_ad_group_external_id'
=>
$external_id
,
...
...
app/Service/Requests/Direct/AddAds.php
View file @
5688ff6
...
@@ -65,7 +65,7 @@ class AddAds extends DirectRequest
...
@@ -65,7 +65,7 @@ class AddAds extends DirectRequest
Log
::
debug
(
$add_result
);
Log
::
debug
(
$add_result
);
Log
::
debug
(
$this
->
getParams
()[
'Ads'
][
$key
]);
Log
::
debug
(
$this
->
getParams
()[
'Ads'
][
$key
]);
GoalAdvertisement
::
whereId
(
$goalAd
->
id
)
GoalAdvertisement
::
whereId
(
$goalAd
->
getKey
()
)
->
update
([
->
update
([
'reserve_create_at'
=>
null
,
'reserve_create_at'
=>
null
,
]);
]);
...
@@ -75,7 +75,7 @@ class AddAds extends DirectRequest
...
@@ -75,7 +75,7 @@ class AddAds extends DirectRequest
$external_id
=
(
string
)
$add_result
[
'Id'
];
$external_id
=
(
string
)
$add_result
[
'Id'
];
GoalAdvertisement
::
whereId
(
$goalAd
->
id
)
GoalAdvertisement
::
whereId
(
$goalAd
->
getKey
()
)
->
update
([
->
update
([
'external_id'
=>
$external_id
,
'external_id'
=>
$external_id
,
'external_upload_at'
=>
Carbon
::
now
(),
'external_upload_at'
=>
Carbon
::
now
(),
...
...
app/Service/Requests/Direct/AddBidModifiers.php
View file @
5688ff6
...
@@ -59,12 +59,12 @@ class AddBidModifiers extends DirectRequest
...
@@ -59,12 +59,12 @@ class AddBidModifiers extends DirectRequest
/* @var $goalBidModifier \stdClass */
/* @var $goalBidModifier \stdClass */
$goalBidModifier
=
$this
->
goalBidModifiers
->
get
(
$key
);
$goalBidModifier
=
$this
->
goalBidModifiers
->
get
(
$key
);
if
(
!
isset
(
$add_result
[
'Id'
]))
{
if
(
!
isset
(
$add_result
[
'Id
s
'
]))
{
Log
::
debug
(
"AddBidModifiers, empty Id"
);
Log
::
debug
(
"AddBidModifiers, empty Id
s
"
);
Log
::
debug
(
$add_result
);
Log
::
debug
(
$add_result
);
Log
::
debug
(
$this
->
getParams
()[
'BidModifiers'
][
$key
]);
Log
::
debug
(
$this
->
getParams
()[
'BidModifiers'
][
$key
]);
GoalBidModifier
::
where
(
'id'
,
$goalBidModifier
->
id
)
GoalBidModifier
::
where
In
(
'id'
,
$goalBidModifier
->
ids
)
->
update
([
->
update
([
'reserve_create_at'
=>
null
,
'reserve_create_at'
=>
null
,
]);
]);
...
@@ -72,14 +72,19 @@ class AddBidModifiers extends DirectRequest
...
@@ -72,14 +72,19 @@ class AddBidModifiers extends DirectRequest
continue
;
continue
;
}
}
$
external_id
=
(
string
)
$add_result
[
'Id'
]
;
$
ids
=
json_decode
(
$goalBidModifier
->
ids
)
;
GoalBidModifier
::
whereIn
(
'id'
,
$goalBidModifier
->
ids
)
foreach
(
$add_result
[
'Ids'
]
as
$id_key
=>
$external_id
)
{
->
update
([
$external_id
=
(
string
)
$external_id
;
'external_id'
=>
$external_id
,
$id
=
$ids
[
$id_key
];
'external_upload_at'
=>
Carbon
::
now
(),
'reserve_create_at'
=>
null
,
GoalBidModifier
::
whereIn
(
'id'
,
$id
)
]);
->
update
([
'external_id'
=>
$external_id
,
'external_upload_at'
=>
Carbon
::
now
(),
'reserve_create_at'
=>
null
,
]);
}
}
}
}
catch
(
\Exception
$e
)
{
}
catch
(
\Exception
$e
)
{
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment