|
|
@@ -755,6 +755,51 @@ class WxMessageClass extends BaseClass
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ public static function hdScanPayInform($shop, $scan)
|
|
|
+ {
|
|
|
+ if (empty($shop)) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ $ptStyle = $shop->ptStyle;
|
|
|
+ $wxBase = WxOpenClass::getWxBase();
|
|
|
+ $wx = $wxBase[$ptStyle] ?? [];
|
|
|
+ $message = self::getAllByCondition(['ptStyle' => $ptStyle], null, '*', 'shortTemplateId');
|
|
|
+ $shortTempId = 'OPENTM207422813';//收入提醒
|
|
|
+ $tempId = $message[$shortTempId]['templateId'] ?? '';
|
|
|
+ if (empty($tempId)) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ $actPrice = $scan->actPrice;
|
|
|
+ $adminList = ShopAdminClass::getRemainAdmin($shop);
|
|
|
+ if (empty($adminList)) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ foreach ($adminList as $admin) {
|
|
|
+ $openId = $admin['openId'] ?? '';
|
|
|
+ if ($ptStyle == dict::getDict('ptStyle', 'ghs')) {
|
|
|
+ $openId = $admin['ghsOpenId'] ?? '';
|
|
|
+ }
|
|
|
+ if (empty($openId)) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ $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" => "点击查看详情", "color" => "#173177"]
|
|
|
+ ]
|
|
|
+ ];
|
|
|
+ $data['miniprogram']['appid'] = $wx['miniAppId'];
|
|
|
+ $data['miniprogram']['pagepath'] = 'admin/order/scanPay';
|
|
|
+ wxUtil::sendTaskInform($data, $wx, $ptStyle);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
//审核通过通知 ssh 20210530
|
|
|
public static function applyPass($shop)
|
|
|
{
|