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

Merge branch 'dev' into dev-sxb

sunxbiao 1 год назад
Родитель
Сommit
a16dac89c1

+ 12 - 10
app/common/repositories/store/product/ProductRepository.php

@@ -1905,16 +1905,18 @@ class ProductRepository extends BaseRepository
1905 1905
             } else {
1906 1906
                 // 平台商品 走商户后台
1907 1907
                 // 推荐创客收益设置
1908
-                $shop_bonus_setting                 = merchantConfig($mer_id, 'shop_bonus_setting') ?: [
1909
-                    'shop_bonus_rate' => 30,
1910
-                    'yanglao_rate'    => 5,
1911
-                ];
1912
-                $shop_bonus_setting['yanglao_rate'] = $shop_bonus_setting['yanglao_rate'] ?? 5;
1913
-//                if ($mer_id == 496) {
1914
-//                    $yanglao = $total_price * 5 / 100;
1915
-//                } else {
1916
-                $yanglao = $total_price * $shop_bonus_setting['yanglao_rate'] / 100;
1917
-//                }
1908
+//                 $shop_bonus_setting                 = merchantConfig($mer_id, 'shop_bonus_setting') ?: [
1909
+//                     'shop_bonus_rate' => 30,
1910
+//                     'yanglao_rate'    => 5,
1911
+//                 ];
1912
+//                 $shop_bonus_setting['yanglao_rate'] = $shop_bonus_setting['yanglao_rate'] ?? 5;
1913
+// //                if ($mer_id == 496) {
1914
+// //                    $yanglao = $total_price * 5 / 100;
1915
+// //                } else {
1916
+//                 $yanglao = $total_price * $shop_bonus_setting['yanglao_rate'] / 100;
1917
+// //                }
1918
+                $yanglao = bcmul($product['concession_pri'], 0.3, 2);
1919
+
1918 1920
             }
1919 1921
             $yanglao= decimal2($yanglao);
1920 1922
         } else {

+ 16 - 1
app/controller/api/store/merchant/Merchant.php

@@ -172,7 +172,22 @@ class Merchant extends BaseController
172 172
         $where['is_del'] = 0;
173 173
         $where['status'] = 1;
174 174
         $category_id && $where['category_id'] = $category_id;
175
-        $mer_list = Db::name('merchant')->where($where)->page($page)->limit(100)->select();
175
+
176
+        $hasProductMerIdList = Db::name('store_product')
177
+            ->where('status', '=', 1)
178
+            ->where('is_show', '=', 1)
179
+            ->where('is_del', '=', 0)
180
+            ->group('mer_id')
181
+            ->field('mer_id')
182
+            ->select();
183
+        if ($hasProductMerIdList) {
184
+            $hasProductMerIdList = array_column($hasProductMerIdList->toArray(), 'mer_id');
185
+        }
186
+        $query = Db::name('merchant')->where($where);
187
+        if (!empty($hasProductMerIdList) && is_array($hasProductMerIdList)) {
188
+            $query->whereIn('mer_id', $hasProductMerIdList);
189
+        }
190
+        $mer_list = $query->page($page)->limit($limit)->select();
176 191
         $where['is_gift_bag'] = 0;
177 192
         $where['is_used'] = 1;
178 193
         $where['product_type'] = 0;

+ 29 - 40
app/controller/api/store/merchant/Taskorderguquan.php

@@ -18,55 +18,44 @@ class Taskorderguquan
18 18
     {
19 19
 
20 20
         /**
21
-         * 9900元补贴下面人员
22
-         * 13231658486周行体1500
23
-         * 13333069689魏惠新2000
24
-         * 13959100621周金花600
25
-         * 13701061395李素红500
26
-         * 17501006833邢艳丽500
27
-         * 15631982690魏震洪400
28
-         * 18603401312黄金花400
21
+         * 请根据内容:
22
+         * 6250元补贴下面人员
23
+         * 13231658486周行体1000
24
+         * 13333069689魏惠新1500
25
+         * 13959100621周金花300
26
+         * 13701061395李素红300
27
+         * 17501006833邢艳丽300
28
+         * 15631982690魏震洪300
29
+         * 18603401312黄金花200
29 30
          * 13521438652徐立苹200
30
-         * 15832971815孟晓玮500
31
-         * 18600200909陈冠霖500
32
-         * 18001316701闫旭400
33
-         * 15810064711 王   玲 500
34
-         * 13932925303会强400
35
-         * 15321221558李伟400
36
-         * 15232797965侯玉兰50
37
-         * 13601071082隋彩云300
31
+         * 15832971815孟晓玮300
32
+         * 18600200909陈冠霖300
33
+         * 15810064711 王   玲 300
34
+         * 13932925303会强300
35
+         * 13601071082隋彩云200
38 36
          * 13161909228刘银霞50
39 37
          * 18760167163刘春梅50
40 38
          * 18911752386魏利琴50
41 39
          * 13215917919李小秋50
42 40
          * 15332507711张传莲50
43 41
          * 18715313601大饼500
44
-         *
45
-         * 计9900元
46
-         *
47
-         * 2000转给周军VR市场使用
48
-         *
49
-         * 4.3258.35万做合伙人分红
50
-         *
51
-         * 共计55158.35万
52
-         */
42
+         * 23750元做合伙人分红
43
+         * 共计3万
44
+ */
53 45
         $data = [
54
-            '13231658486' => 1500,
55
-            '13333069689' => 2000,
56
-            '13959100621' => 600,
57
-            '13701061395' => 500,
58
-            '17501006833' => 500,
59
-            '15631982690' => 400,
60
-            '18603401312' => 400,
46
+            '13231658486' => 1000,
47
+            '13333069689' => 1500,
48
+            '13959100621' => 300,
49
+            '13701061395' => 300,
50
+            '17501006833' => 300,
51
+            '15631982690' => 300,
52
+            '18603401312' => 200,
61 53
             '13521438652' => 200,
62
-            '15832971815' => 500,
63
-            '18600200909' => 500,
64
-            '18001316701' => 400,
65
-            '15810064711' => 500,
66
-            '13932925303' => 400,
67
-            '15321221558' => 400,
68
-            '15232797965' => 50,
69
-            '13601071082' => 300,
54
+            '15832971815' => 300,
55
+            '18600200909' => 300,
56
+            '15810064711' => 300,
57
+            '13932925303' => 300,
58
+            '13601071082' => 200,
70 59
             '13161909228' => 50,
71 60
             '18760167163' => 50,
72 61
             '18911752386' => 50,