Pārlūkot izejas kodu

Merge branch 'dev' of https://git.bjtdba.com/shop/php into dev

sunxbiao 1 gadu atpakaļ
vecāks
revīzija
42f84006b0

+ 13 - 0
app/common/middleware/InstallMiddleware.php

@@ -21,6 +21,19 @@ class InstallMiddleware extends BaseMiddleware
21 21
 
22 22
     public function before(Request $request)
23 23
     {
24
+        // 系统维护开关(示例条件,实际应根据配置)
25
+        $isMaintenance = false; // 改为从配置读取
26
+
27
+        if ($isMaintenance) {
28
+            // 创建符合前端格式的响应
29
+            $response = json([
30
+                'status' => 400,
31
+                'message' => '系统正在升级中'
32
+            ], 503); // 使用503状态码表示服务不可用
33
+
34
+            // 抛出异常中断请求
35
+            throw new HttpResponseException($response);
36
+        }
24 37
         if(!file_exists(__DIR__.'/../../../install/install.lock')){
25 38
             throw new HttpResponseException( Response::create('/install.html', 'redirect')->code(302));
26 39
         }

+ 6 - 6
app/common/repositories/store/product/ProductRepository.php

@@ -1044,7 +1044,7 @@ class ProductRepository extends BaseRepository
1044 1044
                 $s = 8000;
1045 1045
             }
1046 1046
 
1047
-            $res['yanglao'] = bcmul($s, 0.035, 2);  
1047
+            $res['yanglao'] = bcmul($s, 0.035, 2);
1048 1048
         }
1049 1049
 
1050 1050
 
@@ -1337,7 +1337,7 @@ class ProductRepository extends BaseRepository
1337 1337
 //        echo Db::getlastsql();die;
1338 1338
         $list = $query->page($page, $limit)->setOption('field', [])->with(['issetCoupon'])->field('volunteer,product_id,cate_id,mer_id,image,store_name,sort,sales,price,create_time,keyword')->select();
1339 1339
         $arr=[];
1340
-        foreach ($list["list"] as $v) {
1340
+        foreach ($list as $v) {
1341 1341
             $k = $this->pvParm($v['product_id']);
1342 1342
 //            $v['yanglao'] = $yanglao;
1343 1343
 //            $v["yanglao"]
@@ -1351,7 +1351,7 @@ class ProductRepository extends BaseRepository
1351 1351
 //            array_push($v,$k);
1352 1352
             $arr[]=$v;
1353 1353
         }
1354
-        $list["list"]=$arr;
1354
+        $list=$arr;
1355 1355
         return compact('count', 'list');
1356 1356
     }
1357 1357
 
@@ -1969,7 +1969,7 @@ class ProductRepository extends BaseRepository
1969 1969
                 ->where('product_id', $product_id)
1970 1970
                 ->select()->toArray();
1971 1971
             $attrInfo = array_column($attrInfo, null, 'gong_sku_id');
1972
-            $updateData = [];   
1972
+            $updateData = [];
1973 1973
             // 组装数据
1974 1974
             foreach ($skuArr as $key => $value) {
1975 1975
                 if (isset($attrInfo[$value['sku_id']])) {
@@ -1980,7 +1980,7 @@ class ProductRepository extends BaseRepository
1980 1980
                         // $diff_profit = bcmul($diff, 0.7, 2);
1981 1981
                         $diff_profit = $diff;
1982 1982
                         $plate_mer_profit = bcadd($attrInfo[$value['sku_id']]['gong_mer_profit'], $diff_profit, 2);
1983
-                    } else {    
1983
+                    } else {
1984 1984
                         // 下调价格计算创客利润
1985 1985
                         $diff = bcsub($attrInfo[$value['sku_id']]['gong_market_price'], $value['edit_price'], 2);
1986 1986
                         $plate_mer_profit = bcsub($attrInfo[$value['sku_id']]['gong_mer_profit'], $diff, 2);
@@ -2068,7 +2068,7 @@ class ProductRepository extends BaseRepository
2068 2068
     // 供应链商品上下架
2069 2069
     public function changeStatus($ids, $is_show)
2070 2070
     {
2071
-    
2071
+
2072 2072
         if ($is_show == 1) {
2073 2073
             $data = ['is_show' => $is_show, 'is_status' => 0];
2074 2074
         } else {

+ 1 - 1
app/controller/api/store/merchant/TaskPartnerProfits.php

@@ -128,7 +128,7 @@ class TaskPartnerProfits
128 128
             ->toArray();
129 129
         $removeUserIdList = array_column($removeUserList, 'uid');
130 130
 
131
-        $zeroLineUidList = [37];
131
+        $zeroLineUidList = [];
132 132
         foreach ($zeroLineUidList as $uid) {
133 133
 
134 134
             //查询当前团队的用户列表

+ 1 - 1
app/controller/api/store/merchant/Taskorderguquan.php

@@ -813,7 +813,7 @@ class Taskorderguquan
813 813
             ->toArray();
814 814
         $removeUserIdList = array_column($removeUserList, 'uid');
815 815
 
816
-        $zeroLineUidList = [37];
816
+        $zeroLineUidList = [];
817 817
         foreach ($zeroLineUidList as $uid) {
818 818
             //查询当前团队的用户列表
819 819
             $sql = "select getUserLevelId($uid) as uids";

+ 1 - 1
app/controller/api/store/merchant/Taskorderlianc.php

@@ -294,7 +294,7 @@ class Taskorderlianc
294 294
             ->toArray();
295 295
         $removeUserIdList = array_column($removeUserList, 'uid');
296 296
 
297
-        $zeroLineUidList = [37];
297
+        $zeroLineUidList = [];
298 298
         foreach ($zeroLineUidList as $uid) {
299 299
             //查询当前团队的用户列表
300 300
             $sql = "select getUserLevelId($uid) as uids";