Parcourir la source

暂时打开通知

shish il y a 1 mois
Parent
commit
66b6fff607

+ 1 - 1
app-hd/controllers/CustomController.php

@@ -496,7 +496,7 @@ class CustomController extends BaseController
                 "keyword2" => ["value" => $date, "color" => "#173177"],
                 "remark" => ["value" => "点击查看会员权益", "color" => "#173177"],
             ]];
-        //wxUtil::sendTaskInform($data, $this->sj);
+        wxUtil::sendTaskInform($data, $this->sj);
         util::complete();
     }
 

+ 1 - 1
app-hd/controllers/NoticeController.php

@@ -479,7 +479,7 @@ class NoticeController extends PublicController
 //                            $noticeKey = "hdCgNoticeGhs";
 //                            Yii::$app->redis->executeCommand('LPUSH', [$noticeKey, $noticeText]);
 
-                            //GhsNotifyClass::newOrderNotify($saleId);
+                            GhsNotifyClass::newOrderNotify($saleId);
 
                             //向供货商APP发通知
 //                            $cgShop = ShopClass::getById($cg->shopId, true, 'shopName, merchantName');

+ 16 - 16
biz-hd/notice/classes/NoticeClass.php

@@ -57,10 +57,10 @@ class NoticeClass extends BaseClass
                             ];
                             $page = 'pagesPurchase/refundDetail?id=' . $refund->id;
                             Yii::info(json_encode($msg));
-//                            $respond = miniUtil::commonSendSubscribeMessage($merchant, $ptStyle, $msgId, $miniOpenId, $page, $msg);
-//                            if (isset($respond['errcode']) && $respond['errcode'] === 0) {
-//                                $result['hasNotice'] = 1;
-//                            }
+                            $respond = miniUtil::commonSendSubscribeMessage($merchant, $ptStyle, $msgId, $miniOpenId, $page, $msg);
+                            if (isset($respond['errcode']) && $respond['errcode'] === 0) {
+                                $result['hasNotice'] = 1;
+                            }
                         }
                     }
                 }
@@ -105,10 +105,10 @@ class NoticeClass extends BaseClass
                             ];
                             $page = 'admin/clear/info?id=' . $clear->id;
                             Yii::info(json_encode($msg));
-//                            $respond = miniUtil::commonSendSubscribeMessage($merchant, $ptStyle, $msgId, $miniOpenId, $page, $msg);
-//                            if (isset($respond['errcode']) && $respond['errcode'] === 0) {
-//                                $result['hasNotice'] = 1;
-//                            }
+                            $respond = miniUtil::commonSendSubscribeMessage($merchant, $ptStyle, $msgId, $miniOpenId, $page, $msg);
+                            if (isset($respond['errcode']) && $respond['errcode'] === 0) {
+                                $result['hasNotice'] = 1;
+                            }
                         }
                     }
                 }
@@ -168,10 +168,10 @@ class NoticeClass extends BaseClass
                                 "thing5" => ["value" => $remark]
                             ];
                             $page = 'pagesPurchase/purDetails?id=' . $cg->id;
-//                            $respond = miniUtil::commonSendSubscribeMessage($merchant, $ptStyle, $msgId, $miniOpenId, $page, $msg);
-//                            if (isset($respond['errcode']) && $respond['errcode'] === 0) {
-//                                $result['hasNotice'] = 1;
-//                            }
+                            $respond = miniUtil::commonSendSubscribeMessage($merchant, $ptStyle, $msgId, $miniOpenId, $page, $msg);
+                            if (isset($respond['errcode']) && $respond['errcode'] === 0) {
+                                $result['hasNotice'] = 1;
+                            }
                         }
                     }
                 }
@@ -235,10 +235,10 @@ class NoticeClass extends BaseClass
                                 "thing6" => ["value" => $remark]
                             ];
                             $page = 'pagesPurchase/purDetails?id=' . $cg->id;
-//                            $respond = miniUtil::commonSendSubscribeMessage($merchant, $ptStyle, $msgId, $miniOpenId, $page, $msg);
-//                            if (isset($respond['errcode']) && $respond['errcode'] === 0) {
-//                                $result['hasNotice'] = 1;
-//                            }
+                            $respond = miniUtil::commonSendSubscribeMessage($merchant, $ptStyle, $msgId, $miniOpenId, $page, $msg);
+                            if (isset($respond['errcode']) && $respond['errcode'] === 0) {
+                                $result['hasNotice'] = 1;
+                            }
                         }
                     }
                 }

+ 1 - 2
biz/common/classes/GhsNotifyClass.php

@@ -12,7 +12,6 @@ class GhsNotifyClass extends BaseClass
     //供货商新订单通知 ssh 20251202
     public static function newOrderNotify($orderId)
     {
-        return false;
         try {
             $producer = Yii::$app->rabbitmq->getProducer('notifyProducer');
             $msg = serialize(['type' => 'ghs_new_order_notify', 'orderId' => $orderId]);
@@ -38,4 +37,4 @@ class GhsNotifyClass extends BaseClass
         }
     }
 
-}
+}

+ 0 - 7
biz/wx/classes/WxMessageClass.php

@@ -230,7 +230,6 @@ class WxMessageClass extends BaseClass
     //供货商有新的退款申请 ssh 20230815
     public static function ghsHasNewRefundApplyInform($shop, $refund)
     {
-        return false;
         $id = $refund->id;
         $refundSn = $refund->orderSn ?? '';
         $refundType = $refund->refundType ?? 1;
@@ -393,7 +392,6 @@ class WxMessageClass extends BaseClass
     //客户结清账单提醒 ssh 20240512
     public static function customHasClearToGhsInform($shop, $clearInfo, $custom)
     {
-        return false;
         //账单编号 合同金额 客户名称
         $ptStyle = $shop->ptStyle;
         $id = $clearInfo->id ?? 0;
@@ -441,7 +439,6 @@ class WxMessageClass extends BaseClass
     //客户充值清账通知 ssh 20240511
     public static function customRechargeClearInform($shop, $recharge)
     {
-        return false;
         //充值金额 商品名称 姓名 操作人 充值时间
         $ptStyle = $shop->ptStyle;
         $amount = $recharge->amount ?? 0;
@@ -724,7 +721,6 @@ class WxMessageClass extends BaseClass
     //花店新订单通知 ssh 20210529
     public static function hdNewOrderInform($shop, $order)
     {
-        return false;
         $ptStyle = $shop->ptStyle;
         $wxBase = WxOpenClass::getWxBase();
         $wx = $wxBase[$ptStyle] ?? [];
@@ -1005,7 +1001,6 @@ class WxMessageClass extends BaseClass
     //收款码收入通知 ssh 20210531
     public static function gatheringIncomeInform($shop, $order)
     {
-        return false;
         if ($order->payStatus != 1) {
             return false;
         }
@@ -1388,7 +1383,6 @@ class WxMessageClass extends BaseClass
     //供货商新客户通知 ssh 20210909
     public static function newGhsCustomInform($shop, $custom, $introduce = [])
     {
-        return false;
         $ptStyle = $shop->ptStyle ?? 0;
         $wxBase = WxOpenClass::getWxBase();
         $wx = $wxBase[$ptStyle] ?? [];
@@ -1496,7 +1490,6 @@ class WxMessageClass extends BaseClass
     //花店新客户通知 ssh 20220919
     public static function newHdCustomInform($shop, $custom, $introduce = [])
     {
-        return false;
         $ptStyle = $shop->ptStyle ?? 0;
         $wxBase = WxOpenClass::getWxBase();
         $wx = $wxBase[$ptStyle] ?? [];