|
|
@@ -10,7 +10,7 @@ use common\components\dict;
|
|
|
|
|
|
class xhTMessageService
|
|
|
{
|
|
|
-
|
|
|
+
|
|
|
//取所有的模板消息
|
|
|
public static function getList($merchantId)
|
|
|
{
|
|
|
@@ -29,17 +29,17 @@ class xhTMessageService
|
|
|
$tm = xhTMessage::add($data);
|
|
|
return $tm;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
public static function batchAdd($data)
|
|
|
{
|
|
|
xhTMessage::batchAdd($data);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
public static function delByMerchantId($merchantId)
|
|
|
{
|
|
|
xhTMessage::deleteByCondition(['merchantId' => $merchantId]);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
public static function delTMessage($merchant)
|
|
|
{
|
|
|
$merchantId = $merchant['id'];
|
|
|
@@ -57,7 +57,7 @@ class xhTMessageService
|
|
|
self::delByMerchantId($merchantId);
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
//商家模板初始化 ssh 2020.2.9
|
|
|
public static function init($merchant)
|
|
|
{
|
|
|
@@ -99,7 +99,7 @@ class xhTMessageService
|
|
|
}
|
|
|
xhMerchantExtendService::updateByMerchantId($merchantId, ['wxTMessageInit' => 1]);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
//发送到手机上 ssh 2019.8.11
|
|
|
public static function sendUrlToMobile($url, $openId, $merchant)
|
|
|
{
|
|
|
@@ -117,7 +117,7 @@ class xhTMessageService
|
|
|
wxUtil::sendTaskInform($data, $merchant);
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
//发送链接到手机上
|
|
|
public static function sendUrl($url, $name = '访问链接', $merchant, $admin)
|
|
|
{
|
|
|
@@ -136,7 +136,7 @@ class xhTMessageService
|
|
|
wxUtil::sendTaskInform($data, $merchant);
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
//补充缺失的模板 ssh 2020.2.9
|
|
|
public static function supplement($merchant, $isOpen)
|
|
|
{
|
|
|
@@ -172,5 +172,12 @@ class xhTMessageService
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
-}
|
|
|
+
|
|
|
+ //初始化消息模板
|
|
|
+ public static function initTMessage()
|
|
|
+ {
|
|
|
+ $tMessageList = dict::getDict('tMessage');
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+}
|