Просмотр исходного кода

Merge branch 'sh-send' into dev

shish 1 год назад
Родитель
Сommit
5ae2360ed3
2 измененных файлов с 16 добавлено и 21 удалено
  1. 10 1
      app-pt/controllers/WxController.php
  2. 6 20
      common/components/shippingUtil.php

+ 10 - 1
app-pt/controllers/WxController.php

@@ -176,7 +176,7 @@ class WxController extends PublicController
                     //关注
                     case 'subscribe':
 
-                        //noticeUtil::push('销花宝 关注者openId ' . $this->fromUsername, '15280215347');
+                        noticeUtil::push('销花宝 关注者openId ' . $this->fromUsername, '15280215347');
 
                         $text = $this->replyTextContent("{$this->fromUsername}");
                         $pc = new \WXBizMsgCrypt($openToken, $encodingAesKey, $openAppId);
@@ -193,6 +193,15 @@ class WxController extends PublicController
                             \bizGhs\admin\services\AdminService::unFocus($adminId);
                         }
                         break;
+                    case 'trade_manage_remind_access_api':
+                        noticeUtil::push('trade_manage_remind_access_api', '15280215347');
+                        break;
+                    case 'trade_manage_remind_shipping':
+                        noticeUtil::push('trade_manage_remind_shipping', '15280215347');
+                        break;
+                    case 'trade_manage_order_settlement':
+                        noticeUtil::push('trade_manage_order_settlement', '15280215347');
+                        break;
                     default:
                 }
 

+ 6 - 20
common/components/shippingUtil.php

@@ -8,7 +8,6 @@ use linslin\yii2\curl;
 
 /**
  * 微信小程序发货信息管理服务-核心接口工具类
- * 仅封装图片中列出的接口,风格参考 expressUtil.php
  */
 class shippingUtil
 {
@@ -19,12 +18,11 @@ class shippingUtil
 
     /**
      * 发货信息录入接口
-     * https://api.weixin.qq.com/wxa/sec/order/shipping?access_token=ACCESS_TOKEN
      */
     public static function shipping($merchant, $data, $ptStyle = 0)
     {
         $accessToken = self::getAccessToken($merchant, $ptStyle);
-        $url = "https://api.weixin.qq.com/wxa/sec/order/shipping?access_token={$accessToken}";
+        $url = "https://api.weixin.qq.com/wxa/sec/order/upload_shipping_info?access_token={$accessToken}";
         $curl = new curl\Curl();
         $result = $curl->setOption(CURLOPT_POSTFIELDS, Json::encode($data))->post($url);
         return Json::decode($result);
@@ -32,12 +30,11 @@ class shippingUtil
 
     /**
      * 发货信息合单录入接口
-     * https://api.weixin.qq.com/wxa/sec/order/shippingcombine?access_token=ACCESS_TOKEN
      */
     public static function shippingCombine($merchant, $data, $ptStyle = 0)
     {
         $accessToken = self::getAccessToken($merchant, $ptStyle);
-        $url = "https://api.weixin.qq.com/wxa/sec/order/shippingcombine?access_token={$accessToken}";
+        $url = "https://api.weixin.qq.com/wxa/sec/order/upload_combined_shipping_info?access_token={$accessToken}";
         $curl = new curl\Curl();
         $result = $curl->setOption(CURLOPT_POSTFIELDS, Json::encode($data))->post($url);
         return Json::decode($result);
@@ -45,12 +42,11 @@ class shippingUtil
 
     /**
      * 查询订单发货状态
-     * https://api.weixin.qq.com/wxa/sec/order/getshippinginfo?access_token=ACCESS_TOKEN
      */
     public static function getShippingInfo($merchant, $data, $ptStyle = 0)
     {
         $accessToken = self::getAccessToken($merchant, $ptStyle);
-        $url = "https://api.weixin.qq.com/wxa/sec/order/getshippinginfo?access_token={$accessToken}";
+        $url = "https://api.weixin.qq.com/wxa/sec/order/get_order?access_token={$accessToken}";
         $curl = new curl\Curl();
         $result = $curl->setOption(CURLOPT_POSTFIELDS, Json::encode($data))->post($url);
         return Json::decode($result);
@@ -58,12 +54,11 @@ class shippingUtil
 
     /**
      * 查询订单列表
-     * https://api.weixin.qq.com/wxa/sec/order/getorderlist?access_token=ACCESS_TOKEN
      */
     public static function getOrderList($merchant, $data, $ptStyle = 0)
     {
         $accessToken = self::getAccessToken($merchant, $ptStyle);
-        $url = "https://api.weixin.qq.com/wxa/sec/order/getorderlist?access_token={$accessToken}";
+        $url = "https://api.weixin.qq.com/wxa/sec/order/get_order_list?access_token={$accessToken}";
         $curl = new curl\Curl();
         $result = $curl->setOption(CURLOPT_POSTFIELDS, Json::encode($data))->post($url);
         return Json::decode($result);
@@ -71,12 +66,11 @@ class shippingUtil
 
     /**
      * 确认收货提醒接口
-     * https://api.weixin.qq.com/wxa/sec/order/confirmreceivemsg?access_token=ACCESS_TOKEN
      */
     public static function confirmReceiveMsg($merchant, $data, $ptStyle = 0)
     {
         $accessToken = self::getAccessToken($merchant, $ptStyle);
-        $url = "https://api.weixin.qq.com/wxa/sec/order/confirmreceivemsg?access_token={$accessToken}";
+        $url = "https://api.weixin.qq.com/wxa/sec/order/notify_confirm_receive?access_token={$accessToken}";
         $curl = new curl\Curl();
         $result = $curl->setOption(CURLOPT_POSTFIELDS, Json::encode($data))->post($url);
         return Json::decode($result);
@@ -84,12 +78,11 @@ class shippingUtil
 
     /**
      * 消息跳转路径设置接口
-     * https://api.weixin.qq.com/wxa/sec/order/setmsgjump?access_token=ACCESS_TOKEN
      */
     public static function setMsgJump($merchant, $data, $ptStyle = 0)
     {
         $accessToken = self::getAccessToken($merchant, $ptStyle);
-        $url = "https://api.weixin.qq.com/wxa/sec/order/setmsgjump?access_token={$accessToken}";
+        $url = "https://api.weixin.qq.com/wxa/sec/order/set_msg_jump_path?access_token={$accessToken}";
         $curl = new curl\Curl();
         $result = $curl->setOption(CURLOPT_POSTFIELDS, Json::encode($data))->post($url);
         return Json::decode($result);
@@ -119,15 +112,8 @@ class shippingUtil
         return Json::decode($result);
     }
 
-    /**
-     * 相关消息推送(无需主动调用,文档留档)
-     * 仅做占位说明
-     */
-    // public static function messagePush() {}
-
     /**
      * 特殊发货报备
-     * https://api.weixin.qq.com/wxa/sec/order/opspecialorder?access_token=ACCESS_TOKEN
      */
     public static function opSpecialOrder($merchant, $data, $ptStyle = 0)
     {