|
|
@@ -38,6 +38,7 @@ class WxMessageClass extends BaseClass
|
|
|
'OPENTM411530050' => '充值成功提醒',
|
|
|
'OPENTM408238177' => '反馈进度通知',
|
|
|
'OPENTM203447669' => '新客户加入通知',
|
|
|
+ 'ZHH202308150025' => '退款申请处理通知',
|
|
|
],
|
|
|
//供货商
|
|
|
dict::getDict('ptStyle', 'ghs') => [
|
|
|
@@ -57,6 +58,7 @@ class WxMessageClass extends BaseClass
|
|
|
'OPENTM203447669' => '新客户加入通知',
|
|
|
'OPENTM411530050' => '充值成功提醒',
|
|
|
'OPENTM408238177' => '反馈进度通知',
|
|
|
+ 'ZHH202308150025' => '退款申请处理通知',
|
|
|
],
|
|
|
//商城
|
|
|
dict::getDict('ptStyle', 'mall') => [
|
|
|
@@ -116,6 +118,45 @@ class WxMessageClass extends BaseClass
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ //供货商有新的退款申请 ssh 20230815
|
|
|
+ public static function ghsHasNewRefundApplyInform($shop, $refund)
|
|
|
+ {
|
|
|
+ $ptStyle = $shop->ptStyle;
|
|
|
+ $wxBase = WxOpenClass::getWxBase();
|
|
|
+ $wx = $wxBase[$ptStyle] ?? [];
|
|
|
+ $message = self::getAllByCondition(['ptStyle' => $ptStyle], null, '*', 'shortTemplateId');
|
|
|
+ $shortTempId = 'ZHH202308150025';
|
|
|
+ $tempId = isset($message[$shortTempId]['templateId']) ? $message[$shortTempId]['templateId'] : '';
|
|
|
+ if (empty($tempId)) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ $adminList = ShopAdminClass::getRemainAdmin($shop);
|
|
|
+ if (empty($adminList)) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ foreach ($adminList as $admin) {
|
|
|
+ $openId = isset($admin['openId']) ? $admin['openId'] : '';
|
|
|
+ if ($ptStyle == dict::getDict('ptStyle', 'ghs')) {
|
|
|
+ $openId = isset($admin['ghsOpenId']) ? $admin['ghsOpenId'] : '';
|
|
|
+ }
|
|
|
+ $data = [
|
|
|
+ "touser" => $openId,
|
|
|
+ "template_id" => $tempId,
|
|
|
+ "url" => Yii::$app->params['ghsDomain'],
|
|
|
+ "data" => [
|
|
|
+ "amount1" => ["value" => '10元'],
|
|
|
+ "thing7" => ["value" => '张三'],
|
|
|
+ "time10" => ["value" => '2022-02-30 11:21:30'],
|
|
|
+ "thing2" => ["value" => '退货退款'],
|
|
|
+ "character_string3" => ["value" => '2023060900000001'],
|
|
|
+ ]
|
|
|
+ ];
|
|
|
+ $data['miniprogram']['appid'] = $wx['miniAppId'];
|
|
|
+ $data['miniprogram']['pagepath'] = 'pagesOrder/detail?id=1';
|
|
|
+ wxUtil::sendTaskInform($data, $wx, $ptStyle);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
//供货商新订单通知 ssh 20210529
|
|
|
public static function ghsHasNewOrderInform($shop, $order)
|
|
|
{
|