Browse Source

Merge branch 'master' into ls

shish 1 year ago
parent
commit
d269d76e39
2 changed files with 13 additions and 1 deletions
  1. 2 1
      app-ghs/controllers/TestController.php
  2. 11 0
      app-hd/controllers/PurchaseController.php

+ 2 - 1
app-ghs/controllers/TestController.php

@@ -347,7 +347,8 @@ class TestController extends BaseController
             //['name' => '凯里壹号鲜花工厂', 'merchantNo' => '82271305992000N', 'wx' => [735074420, 735074312], 'zfb' => '2088660471452939'],
             //['name' => '平潭花天下', 'merchantNo' => '8223910599200DU', 'wx' => [742408710, 742408308], 'zfb' => '2088860472568840'],
             //['name' => '徐州贴心鲜花批发', 'merchantNo' => '82230305992005L', 'wx' => [770844003, 770842534], 'zfb' => '2088370485434992'],
-            ['name' => '海沧好多花换店', 'merchantNo' => '8223930599200CN', 'wx' => [772684174, 772684211], 'zfb' => '2088370864383343'],
+            //['name' => '海沧好多花换店', 'merchantNo' => '8223930599200CN', 'wx' => [772684174, 772684211], 'zfb' => '2088370864383343'],
+            ['name' => '九江伊朵鲜花批发', 'merchantNo' => '82242405992002A', 'wx' => [774681090, 774681246], 'zfb' => '2088470298005142'],
             //['name' => '日照月下鲜花批发', 'merchantNo' => '82247705992002D', 'wx' => [759404451, 759404055], 'zfb' => '2088170264295192'],
             //['name' => '陆丰幸运花坊', 'merchantNo' => '82259705992001N', 'wx' => [762636401,762635754 ], 'zfb' => '2088170810827880'],
             //['name' => '阜阳芳棠鲜花批发', 'merchantNo' => '82237205992002Q', 'wx' => [733203298, 733203681], 'zfb' => '2088660084283241'],

+ 11 - 0
app-hd/controllers/PurchaseController.php

@@ -832,6 +832,17 @@ class PurchaseController extends BaseController
     {
         $get = Yii::$app->request->get();
         $where = ['shopId' => $this->shopId];
+        $searchTime = $get['searchTime'] ?? '';
+        if (!empty($searchTime)) {
+            $startTime = $get['startTime'] ?? '';
+            $endTime = $get['endTime'] ?? '';
+            $period = dateUtil::formatTime($searchTime, $startTime, $endTime);
+            $where['payTime'] = ['between', [$period['startTime'], $period['endTime']]];
+        }
+        $ghsId = $get['ghsId'] ?? 0;
+        if (!empty($ghsId)) {
+            $where['ghsId'] = $ghsId;
+        }
         $status = $get['status'] ?? 0;
         if (!empty($status)) {
             $where['status'] = $status;