no message
This commit is contained in:
parent
274c6d78c7
commit
a07d041db7
@ -134,20 +134,42 @@ public function receiveShadowrocketids(Request $oRequest)
|
|||||||
|
|
||||||
$oCategories = Categories::where("sSlug", "shadowrocketids")->first();
|
$oCategories = Categories::where("sSlug", "shadowrocketids")->first();
|
||||||
|
|
||||||
$oArticle = Articles::updateOrCreate(
|
$oArticle = Articles::where('sSlug', $sSlug)->first();
|
||||||
['sSlug' => $sSlug],
|
|
||||||
[
|
$aAttributes = [
|
||||||
'sThumb' => $sThumbPath,
|
'sThumb' => $sThumbPath,
|
||||||
'iCategoryId' => $oCategories->id,
|
'iCategoryId' => $oCategories->id,
|
||||||
'sTitle' => $sTitle,
|
'sTitle' => '「'.date("n月j日").'」'.$sTitle,
|
||||||
'sTitleSub' => $sTitleSub,
|
'sTitleSub' => $sTitleSub,
|
||||||
'sContent' => $sArticle,
|
'sContent' => $sArticle,
|
||||||
'i7like' => $i7like,
|
|
||||||
'iStatus' => 1,
|
'iStatus' => 1,
|
||||||
'iUserId' => 1,
|
'iUserId' => 1,
|
||||||
],
|
];
|
||||||
|
|
||||||
|
// 只有新创建时才写入初始点赞数
|
||||||
|
if (!$oArticle) {
|
||||||
|
$aAttributes['i7like'] = $i7like;
|
||||||
|
}
|
||||||
|
|
||||||
|
$oArticle = Articles::updateOrCreate(
|
||||||
|
['sSlug' => $sSlug],
|
||||||
|
$aAttributes
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// $oArticle = Articles::updateOrCreate(
|
||||||
|
// ['sSlug' => $sSlug],
|
||||||
|
// [
|
||||||
|
// 'sThumb' => $sThumbPath,
|
||||||
|
// 'iCategoryId' => $oCategories->id,
|
||||||
|
// 'sTitle' => $sTitle,
|
||||||
|
// 'sTitleSub' => $sTitleSub,
|
||||||
|
// 'sContent' => $sArticle,
|
||||||
|
// 'i7like' => $i7like,
|
||||||
|
// 'iStatus' => 1,
|
||||||
|
// 'iUserId' => 1,
|
||||||
|
// ],
|
||||||
|
// );
|
||||||
|
|
||||||
(new TagService())->syncArticleTagsByName($oArticle, $aArticleTags);
|
(new TagService())->syncArticleTagsByName($oArticle, $aArticleTags);
|
||||||
|
|
||||||
ArticleThumbNum::where("author_code", $sSubKey)->where("type", "shadowrocketids")->update(["num" => $sThumbNumTrue]);
|
ArticleThumbNum::where("author_code", $sSubKey)->where("type", "shadowrocketids")->update(["num" => $sThumbNumTrue]);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user