|
|
@@ -86,12 +86,13 @@ class WechatTemplateService implements ProviderInterface
|
|
|
@file_put_contents('quanju.txt', $tempid."-tempid\r\n", 8);
|
|
|
@file_put_contents('quanju.txt', WechatTemplateModel::getlastSql()."-tempid\r\n", 8);
|
|
|
if (!$tempid){
|
|
|
- $tempid = WechatTemplateModel::where('tempkey', $templateId)->where('status', 1)->value('tempid');
|
|
|
- @file_put_contents('quanju.txt', $tempid."-tempid2\r\n", 8);
|
|
|
+ $tempid = WechatTemplateModel::where('tempkey', $templateId)->find();
|
|
|
+ @file_put_contents('quanju.txt', json_encode($tempid)."-tempid2\r\n", 8);
|
|
|
@file_put_contents('quanju.txt', WechatTemplateModel::getlastSql()."-tempid2\r\n", 8);
|
|
|
if (!$tempid){
|
|
|
return false;
|
|
|
}
|
|
|
+ $tempid = $tempid['tempid'];
|
|
|
}
|
|
|
try {
|
|
|
$res=WechatService::sendTemplate($openid, $tempid, $data, $url, $defaultColor);
|