|
|
@@ -23,7 +23,6 @@ class WxMessageClass extends BaseClass
|
|
|
'OPENTM417875155' => '新订单通知',
|
|
|
'OPENTM207430125' => '操作成功通知',
|
|
|
'OPENTM401915538' => '审核通知',
|
|
|
- 'TM00006' => '充值通知',
|
|
|
'OPENTM201205968' => '订单送达通知',
|
|
|
'OPENTM207777535' => '付款提醒',
|
|
|
'OPENTM207422813' => '收入提醒',
|
|
|
@@ -31,7 +30,6 @@ class WxMessageClass extends BaseClass
|
|
|
'OPENTM207327227' => '宝贝售出提醒',
|
|
|
'OPENTM207188526' => '付款成功',
|
|
|
'OPENTM411207151' => '提现成功通知',
|
|
|
- 'OPENTM406262304' => '还款通知',
|
|
|
'OPENTM416881153' => '发货通知',
|
|
|
],
|
|
|
//供货商
|
|
|
@@ -39,7 +37,6 @@ class WxMessageClass extends BaseClass
|
|
|
'OPENTM417875155' => '新订单通知',
|
|
|
'OPENTM207430125' => '操作成功通知',
|
|
|
'OPENTM401915538' => '审核通知',
|
|
|
- 'TM00006' => '充值通知',
|
|
|
'OPENTM201205968' => '订单送达通知',
|
|
|
'OPENTM207777535' => '付款提醒',
|
|
|
'OPENTM207422813' => '收入提醒',
|
|
|
@@ -47,7 +44,6 @@ class WxMessageClass extends BaseClass
|
|
|
'OPENTM207327227' => '宝贝售出提醒',
|
|
|
'OPENTM207188526' => '付款成功',
|
|
|
'OPENTM411207151' => '提现成功通知',
|
|
|
- 'OPENTM406262304' => '还款通知',
|
|
|
'OPENTM416881153' => '发货通知',
|
|
|
],
|
|
|
//商城
|
|
|
@@ -279,4 +275,48 @@ class WxMessageClass extends BaseClass
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ //零售清算欠款通知供货商 shish 20210531
|
|
|
+ public static function clearIncome($shop, $order, $custom)
|
|
|
+ {
|
|
|
+ $shopId = $shop->id;
|
|
|
+ $ptStyle = $shop->ptStyle;
|
|
|
+ $wxBase = WxOpenClass::getWxBase();
|
|
|
+ $wx = $wxBase[$ptStyle] ?? [];
|
|
|
+ $message = self::getAllByCondition(['ptStyle' => $ptStyle], null, '*', 'shortTemplateId');
|
|
|
+ $shortTempId = 'OPENTM207422813';//收入提醒
|
|
|
+ $tempId = isset($message[$shortTempId]['templateId']) ? $message[$shortTempId]['templateId'] : '';
|
|
|
+ if (empty($tempId)) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ $orderId = $order->id;
|
|
|
+ $actPrice = $order->actPrice;
|
|
|
+ $name = $custom->name ?? '';
|
|
|
+ $adminList = ShopAdminClass::getRemainAdmin($shopId);
|
|
|
+ foreach ($adminList as $admin) {
|
|
|
+ if (isset($admin['subscribe']) == false || $admin['subscribe'] == 0) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ $openId = isset($admin['openId']) ? $admin['openId'] : '';
|
|
|
+
|
|
|
+ $data = [
|
|
|
+ "touser" => $openId,
|
|
|
+ "template_id" => $tempId,
|
|
|
+ "url" => Yii::$app->params['ghsDomain'],
|
|
|
+ "data" => [
|
|
|
+ "first" => ["value" => "您有新的收入!", "color" => "#173177"],
|
|
|
+ "keyword1" => ["value" => $actPrice, "color" => "#173177"],
|
|
|
+ "keyword2" => ["value" => '客户结款', "color" => "#173177"],
|
|
|
+ "keyword3" => ["value" => date("Y-m-d H:i"), "color" => "#173177"],
|
|
|
+ "remark" => ["value" => "客户姓名:{$name} 点击查看详情", "color" => "#173177"]
|
|
|
+ ]
|
|
|
+ ];
|
|
|
+ $data['miniprogram']['appid'] = $wx['miniAppId'];
|
|
|
+ $data['miniprogram']['pagepath'] = 'pagesPurchase/purDetails?id=' . $orderId;
|
|
|
+
|
|
|
+ wxUtil::sendTaskInform($data, $wx, $ptStyle);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
}
|