|
|
@ -272,7 +272,10 @@ class Server |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public function addTotemplate($draft_id): bool |
|
|
|
public function addTotemplate($draft_id): bool |
|
|
|
{ |
|
|
|
{ |
|
|
|
$templateList = $this->getTemplatelist(); |
|
|
|
$templateList = []; |
|
|
|
|
|
|
|
if (Cache::has('wx_server_templatelist')) { |
|
|
|
|
|
|
|
$templateList = Cache::get('wx_server_templatelist'); |
|
|
|
|
|
|
|
} |
|
|
|
if ($templateList) { |
|
|
|
if ($templateList) { |
|
|
|
$draft_ids = array_column($templateList, 'draft_id'); |
|
|
|
$draft_ids = array_column($templateList, 'draft_id'); |
|
|
|
if (in_array($draft_id, $draft_ids)) { |
|
|
|
if (in_array($draft_id, $draft_ids)) { |
|
|
|