no message
This commit is contained in:
parent
e0dd17e86c
commit
a1efdb8866
@ -49,7 +49,7 @@ final class HookController
|
||||
public function cache_tg_new()
|
||||
{
|
||||
|
||||
$sCacheTgHook = Option::where("k", "cache_tg::hook")->first()?->v; // 做了一半
|
||||
$sCacheTgHook = Option::where("k", "cache_tg_new::hook")->first()?->v; // 做了一半
|
||||
|
||||
if (!$sCacheTgHook) {
|
||||
echo "$sCacheTgHook 未设置";
|
||||
|
||||
@ -8,7 +8,7 @@ class Option extends Model
|
||||
{
|
||||
protected $table = 'option';
|
||||
public $timestamps = false;
|
||||
protected $primaryKey = 'k';
|
||||
// protected $primaryKey = 'k';
|
||||
public $incrementing = false;
|
||||
protected $keyType = 'string';
|
||||
|
||||
|
||||
@ -14,6 +14,7 @@ use Illuminate\Support\Facades\File;
|
||||
use App\Models\TelegramKey as ModelTelegramKey;
|
||||
use Illuminate\Support\Str;
|
||||
use App\Services\Article\Cmd as ServiceArticleCmd;
|
||||
use App\Models\Option;
|
||||
|
||||
final class CacheTg
|
||||
{
|
||||
@ -186,8 +187,20 @@ final class CacheTg
|
||||
$oModelArticleSchema->group_code = $sGroupCode;
|
||||
$oModelArticleSchema->save();
|
||||
|
||||
$jDefaultThumbUse = Option::where("k", "cache_tg_new::default_thumb_use::{$sGroupCode}")->first()?->k;
|
||||
|
||||
if (!$aDefaultThumbUse) {
|
||||
$jDefaultThumbUse = Option::where("k", "cache_tg_new::default_thumb_use")->first()?->k;
|
||||
}
|
||||
|
||||
$aDefaultThumbUse = json_decode($jDefaultThumbUse, true);
|
||||
|
||||
if (!$aDefaultThumbUse) {
|
||||
$aDefaultThumbUse = ["c"];
|
||||
}
|
||||
|
||||
$oModelArticleSchema->_opt([
|
||||
"thumb_use" => ['c']
|
||||
"thumb_use" => $aDefaultThumbUse
|
||||
]);
|
||||
|
||||
ServiceArticleCmd::startWithO($oModelArticleSchema)->syncOpen()->save("new");
|
||||
|
||||
Loading…
Reference in New Issue
Block a user