Преглед изворни кода

Merge branch 'dev' into dev-sxb

sunxbiao пре 1 година
родитељ
комит
df9f5a5ab5

Разлика између датотеке није приказан због своје велике величине
+ 206 - 99
app/command/GzcAddByBillCommand.php


+ 13 - 1
app/command/PensionTasks.php

@@ -67,7 +67,7 @@ class PensionTasks extends Command
67
 //            $this->doThridVipOrderGzc($nowTime, $timeLimit = 30);
67
 //            $this->doThridVipOrderGzc($nowTime, $timeLimit = 30);
68
 //            $this->doThridDyOrderGzc($nowTime, $timeLimit = 30);
68
 //            $this->doThridDyOrderGzc($nowTime, $timeLimit = 30);
69
 //            $this->doThridHfOrderGzc($nowTime, $timeLimit = 30);
69
 //            $this->doThridHfOrderGzc($nowTime, $timeLimit = 30);
70
-            $this->billGzcAdd($nowTime);
70
+//             $this->billGzcAdd($nowTime);
71
             //升级
71
             //升级
72
 //            $this -> doUpgrade();
72
 //            $this -> doUpgrade();
73
         } catch (\Throwable $e) {
73
         } catch (\Throwable $e) {
@@ -142,6 +142,18 @@ class PensionTasks extends Command
142
                     case "9":
142
                     case "9":
143
                         $online = Db::table('rrx_order_huafei')->where('uid', $bill['uid'])->where('order_sn', $bill['order_sn'])->find();
143
                         $online = Db::table('rrx_order_huafei')->where('uid', $bill['uid'])->where('order_sn', $bill['order_sn'])->find();
144
                         break;
144
                         break;
145
+                    case "10":
146
+                        $online = Db::table('rrx_order_merchant')
147
+                            ->where('uid', $bill['uid'])
148
+                            ->where('out_trade_no', $bill['order_sn'])
149
+                            ->where('paid', 1)
150
+                            ->where('status', 1)
151
+                            ->find();
152
+                        if (!empty($online)) {
153
+                            $online = $online->toArray();
154
+                            $online['order_sn'] = $online['out_trade_no'];
155
+                        }
156
+                        break;
145
                     default:
157
                     default:
146
                         $online = Db::table('rrx_store_order')->where('uid', $bill['uid'])->where('order_sn', $bill['order_sn'])->where('paid', 1)->find();
158
                         $online = Db::table('rrx_store_order')->where('uid', $bill['uid'])->where('order_sn', $bill['order_sn'])->where('paid', 1)->find();
147
                 }
159
                 }

+ 21 - 18
app/common/repositories/store/order/StoreOrderRepository.php

@@ -9669,23 +9669,6 @@ class StoreOrderRepository extends BaseRepository
9669
                         $sm_status = 1;
9669
                         $sm_status = 1;
9670
                         Db::name('store_order')->where("order_id", $order_id)->update(['gzc' => 1]);
9670
                         Db::name('store_order')->where("order_id", $order_id)->update(['gzc' => 1]);
9671
 
9671
 
9672
-                        //添加养老金到公证处日志
9673
-                        $ylj_data_log = [
9674
-                            'user_name' => $get_cer_datas['user_name'],
9675
-                            "mobile" => $get_cer_datas['mobile'],
9676
-                            "user_card" => $get_cer_datas['user_card'],//身份证
9677
-                            "pension" => $num,//养老金额度
9678
-                            "out_trade_no" => $order_from_mer['order_sn'],//订单号
9679
-                            "account_type" =>  $pay_type,//支付方式(3:微信,4:组合)
9680
-                            "order_type" => 0,//订单类型(2:)
9681
-                            "pay_time" => date('Y-m-d H:i:s'),
9682
-                            "create_time" => date('Y-m-d H:i:s'),
9683
-                            "update_time" => date('Y-m-d H:i:s'),
9684
-                            "uid" => $uid,
9685
-                        ];
9686
-
9687
-                        Db::name('gzc_logs')->insert($ylj_data_log);
9688
-
9689
                     }
9672
                     }
9690
                 }
9673
                 }
9691
 
9674
 
@@ -9729,6 +9712,7 @@ class StoreOrderRepository extends BaseRepository
9729
             'order_type' => 1,//1自营  2 第三方  订单类型
9712
             'order_type' => 1,//1自营  2 第三方  订单类型
9730
             'is_red_brokerage' => 0,//1红积分对冲佣金 0正常佣金
9713
             'is_red_brokerage' => 0,//1红积分对冲佣金 0正常佣金
9731
             'gzc' => $sm_status,//养老金是否已进入公证处log表0:未进入。1:已进入
9714
             'gzc' => $sm_status,//养老金是否已进入公证处log表0:未进入。1:已进入
9715
+            'is_gzc' => $sm_status,//0:未发起 1:已发起 2:已成功
9732
             'take_time' => $take_time,//结算时间
9716
             'take_time' => $take_time,//结算时间
9733
             'district_id' => '',//
9717
             'district_id' => '',//
9734
             'street_id' => '',//
9718
             'street_id' => '',//
@@ -9736,7 +9720,26 @@ class StoreOrderRepository extends BaseRepository
9736
 
9720
 
9737
         ];
9721
         ];
9738
 
9722
 
9739
-        Db::name('user_bill')->insert($bill);
9723
+        $bill_id = Db::name('user_bill')->insertGetId($bill);
9724
+        if ($sm_status == 1) {
9725
+            //添加养老金到公证处日志
9726
+            $ylj_data_log = [
9727
+                'user_name' => $get_cer_datas['user_name'],
9728
+                "mobile" => $get_cer_datas['mobile'],
9729
+                "user_card" => $get_cer_datas['user_card'],//身份证
9730
+                "pension" => $num,//养老金额度
9731
+                "out_trade_no" => $order_from_mer['order_sn'],//订单号
9732
+                "account_type" => $pay_type,//支付方式(3:微信,4:组合)
9733
+                "order_type" => 0,//订单类型(2:)
9734
+                "pay_time" => date('Y-m-d H:i:s'),
9735
+                "create_time" => date('Y-m-d H:i:s'),
9736
+                "update_time" => date('Y-m-d H:i:s'),
9737
+                "uid" => $uid,
9738
+                "platform_no" => 'IN10' . (int)(microtime(true) * 1000) . mt_rand(10000, 99999),
9739
+                "link_id" => $bill_id
9740
+            ];
9741
+            Db::name('gzc_logs')->insert($ylj_data_log);
9742
+        }
9740
     }
9743
     }
9741
 
9744
 
9742
     //添加复购金
9745
     //添加复购金

+ 1 - 1
app/common/repositories/store/order/StoreRefundOrderRepository.php

@@ -1095,7 +1095,7 @@ class StoreRefundOrderRepository extends BaseRepository
1095
             ->find();
1095
             ->find();
1096
         $array_fzone_paytype = json_decode($group_order_map['fzone_paytype'], true);
1096
         $array_fzone_paytype = json_decode($group_order_map['fzone_paytype'], true);
1097
         // 'a1' 不能退 会员专区
1097
         // 'a1' 不能退 会员专区
1098
-        if ($pay_type['pay_type'] == 5 || in_array($array_fzone_paytype['type'], ['b1', 'b3', 'b5'])) {
1098
+        if ($pay_type['pay_type'] == 5 || in_array($array_fzone_paytype['type'], ['b1', 'b3', 'b5', 'c1'])) {
1099
             Db::name('store_order')->where('order_id',$res['order_id'])->update(['status'=>'-1']);
1099
             Db::name('store_order')->where('order_id',$res['order_id'])->update(['status'=>'-1']);
1100
 
1100
 
1101
 //            $special_merchant = merchantConfig($pay_type['pay_mer_id'], 'special_merchant');
1101
 //            $special_merchant = merchantConfig($pay_type['pay_mer_id'], 'special_merchant');

+ 18 - 19
app/controller/admin/order/RefundOrder.php

@@ -283,26 +283,25 @@ class RefundOrder extends BaseController
283
                     ];
283
                     ];
284
                     Db::name('user_sign_vr')->insert($insertdata);
284
                     Db::name('user_sign_vr')->insert($insertdata);
285
 
285
 
286
+                } else if ($array_fzone_paytype['type'] == 'c1') {
287
+                    // {"checked":true,"note":"复购金","other":1.5,"price":8.5,"total":0.0,"type":"c1","vr":"48799.82"}
288
+                    $vrpri = Db::name("user")->where("uid", $group_order_map['uid'])->value('fugou');
289
+                    $vrpri += $array_fzone_paytype['price'];
290
+                    Db::name("user")->where("uid", $group_order_map['uid'])->update(['fugou' => $vrpri]);
291
+                    //支出账号存到log日志
292
+                    $log_data = [
293
+                        'uid' => $store_order_info['uid'],
294
+                        'number' => $array_fzone_paytype['price'],
295
+                        'mark' => "复购区商品申请退款退回复购金:" . $array_fzone_paytype['price'],
296
+                        'desc' => "复购金",
297
+                        'order_id' => $store_order_info['order_id'],
298
+                        'surplus' => $vrpri,
299
+                        'order_type' => 0,
300
+                        'type' => 1,
301
+                        'addtime' => time()
302
+                    ];
303
+                    Db::name("user_sign_fugou")->insert($log_data);
286
                 }
304
                 }
287
-                // else if ($array_fzone_paytype['type'] == 'c1') {
288
-                //     // {"checked":true,"note":"复购金","other":1.5,"price":8.5,"total":0.0,"type":"c1","vr":"48799.82"}
289
-                //     $vrpri = Db::name("user")->where("uid", $group_order_map['uid'])->value('fugou');
290
-                //     $vrpri += $array_fzone_paytype['other'];
291
-                //     Db::name("user")->where("uid", $group_order_map['uid'])->update(['fugou' => $vrpri]);
292
-                //     //支出账号存到log日志
293
-                //     $log_data = [
294
-                //         'uid' => $store_order_info['uid'],
295
-                //         'number' => $array_fzone_paytype['price'],
296
-                //         'mark' => "复购区商品申请退款退回复购金:" . $array_fzone_paytype['price'],
297
-                //         'desc' => "复购金",
298
-                //         'order_id' =>  $store_order_info['order_id'],
299
-                //         'surplus' => $vrpri,
300
-                //         'order_type' => 0,
301
-                //         'type' => 2,
302
-                //         'addtime' => time()
303
-                //     ];
304
-                //     $user_res_log = Db::name("user_sign_fugou")->insert($log_data);
305
-                // }
306
             }
305
             }
307
 
306
 
308
             // 取消 订单所发放的福利
307
             // 取消 订单所发放的福利

+ 23 - 21
app/controller/api/Notify.php

@@ -1728,25 +1728,7 @@ class Notify
1728
                         $sm_status = 1;
1728
                         $sm_status = 1;
1729
                         $ds = 1;
1729
                         $ds = 1;
1730
                         Db::name('store_order')->where("order_id", $order_id)->update(['gzc' => 1]);
1730
                         Db::name('store_order')->where("order_id", $order_id)->update(['gzc' => 1]);
1731
-
1732
-                        //添加养老金到公证处日志
1733
-                        $ylj_data_log = [
1734
-                            'user_name' => $get_cer_datas['user_name'],
1735
-                            "mobile" => $get_cer_datas['mobile'],
1736
-                            "user_card" => $get_cer_datas['user_card'],//身份证
1737
-                            "pension" => $num,//养老金额度
1738
-                            "out_trade_no" =>  $order_from_mer['order_sn'],//订单号
1739
-                            "account_type" =>  $pay_type,//支付方式(3:微信,4:组合)
1740
-                            "order_type" => 0,//订单类型(2:)
1741
-                            "pay_time" => date('Y-m-d H:i:s'),
1742
-                            "create_time" => date('Y-m-d H:i:s'),
1743
-                            "update_time" => date('Y-m-d H:i:s'),
1744
-                            "uid" => $uid,
1745
-                        ];
1746
-
1747
-                        Db::name('gzc_logs')->insert($ylj_data_log);
1748
-
1749
-                    } 
1731
+                    }
1750
                 }
1732
                 }
1751
             }
1733
             }
1752
             $ds = 1;
1734
             $ds = 1;
@@ -1787,6 +1769,7 @@ class Notify
1787
             'order_type'=>1,//1自营  2 第三方  订单类型
1769
             'order_type'=>1,//1自营  2 第三方  订单类型
1788
             'is_red_brokerage'=>0,//1红积分对冲佣金 0正常佣金
1770
             'is_red_brokerage'=>0,//1红积分对冲佣金 0正常佣金
1789
             'gzc'=> $sm_status,//养老金是否已进入公证处log表0:未进入。1:已进入
1771
             'gzc'=> $sm_status,//养老金是否已进入公证处log表0:未进入。1:已进入
1772
+            'is_gzc' => $sm_status,//0:未发起 1:已发起 2:已成功
1790
             'take_time'=>$take_time,//结算时间
1773
             'take_time'=>$take_time,//结算时间
1791
             'district_id'=>'',//
1774
             'district_id'=>'',//
1792
             'street_id'=>'',//
1775
             'street_id'=>'',//
@@ -1794,8 +1777,27 @@ class Notify
1794
 
1777
 
1795
         ];
1778
         ];
1796
 
1779
 
1797
-        Db::name('user_bill')->insert($bill);
1798
-        
1780
+        $bill_id = Db::name('user_bill')->insertGetId($bill);
1781
+
1782
+        if ($sm_status == 1) {
1783
+            //添加养老金到公证处日志
1784
+            $ylj_data_log = [
1785
+                'user_name' => $get_cer_datas['user_name'],
1786
+                "mobile" => $get_cer_datas['mobile'],
1787
+                "user_card" => $get_cer_datas['user_card'],//身份证
1788
+                "pension" => $num,//养老金额度
1789
+                "out_trade_no" => $order_from_mer['order_sn'],//订单号
1790
+                "account_type" => $pay_type,//支付方式(3:微信,4:组合)
1791
+                "order_type" => 0,//订单类型(2:)
1792
+                "pay_time" => date('Y-m-d H:i:s'),
1793
+                "create_time" => date('Y-m-d H:i:s'),
1794
+                "update_time" => date('Y-m-d H:i:s'),
1795
+                "uid" => $uid,
1796
+                "platform_no" => 'IN10' . (int)(microtime(true) * 1000) . mt_rand(10000, 99999),
1797
+                "link_id" => $bill_id
1798
+            ];
1799
+            Db::name('gzc_logs')->insert($ylj_data_log);
1800
+        }
1799
     }
1801
     }
1800
 
1802
 
1801
     //添加复购金
1803
     //添加复购金

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

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

+ 10 - 12
app/controller/api/store/merchant/Taskorderguquan.php

@@ -49,27 +49,25 @@ class Taskorderguquan
49
             '13959100621' => 300,
49
             '13959100621' => 300,
50
             '13701061395' => 300,
50
             '13701061395' => 300,
51
             '17501006833' => 300,
51
             '17501006833' => 300,
52
-            '13521438652' => 300,
52
+            '13521438652' => 200,
53
             '15832971815' => 300,
53
             '15832971815' => 300,
54
-            '18600200909' => 300,
55
-            '15810064711' => 300,
56
-            '18001316701' => 300,
57
-            '13932925303' => 300,
58
-            '13601071082' => 200,
54
+            '18600200909' => 200,
55
+            '15810064711' => 200,
56
+            '18001316701' => 200,
57
+            '13601071082' => 100,
59
             '13161909228' => 50,
58
             '13161909228' => 50,
60
-            '18603401312' => 50,
59
+            '18603401312' => 300,
61
             '18760167163' => 50,
60
             '18760167163' => 50,
62
             '18911752386' => 50,
61
             '18911752386' => 50,
63
             '13215917919' => 50,
62
             '13215917919' => 50,
64
             '15332507711' => 50,
63
             '15332507711' => 50,
65
             '15960349661' => 50,
64
             '15960349661' => 50,
66
-            '13381085923' => 50,
67
-            '13683609309' => 50,
68
-            '13601179856' => 50,
69
             '13901074090' => 200,
65
             '13901074090' => 200,
70
-            '18715313601' => 400
66
+            '18612051372' => 50,
67
+            '18715313601' => 350
71
         ];
68
         ];
72
 
69
 
70
+
73
         $result = Db::name("user")
71
         $result = Db::name("user")
74
             ->whereIn("account", array_keys($data))
72
             ->whereIn("account", array_keys($data))
75
             ->where('is_del', 0)
73
             ->where('is_del', 0)
@@ -816,7 +814,7 @@ class Taskorderguquan
816
             ->toArray();
814
             ->toArray();
817
         $removeUserIdList = array_column($removeUserList, 'uid');
815
         $removeUserIdList = array_column($removeUserList, 'uid');
818
 
816
 
819
-        $zeroLineUidList = [1420, 2328];
817
+        $zeroLineUidList = [1420, 2328, 1720];
820
         foreach ($zeroLineUidList as $uid) {
818
         foreach ($zeroLineUidList as $uid) {
821
             //查询当前团队的用户列表
819
             //查询当前团队的用户列表
822
             $sql = "select getUserLevelId($uid) as uids";
820
             $sql = "select getUserLevelId($uid) as uids";

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

@@ -361,7 +361,7 @@ class Taskorderlianc
361
             ->toArray();
361
             ->toArray();
362
         $removeUserIdList = array_column($removeUserList, 'uid');
362
         $removeUserIdList = array_column($removeUserList, 'uid');
363
 
363
 
364
-        $zeroLineUidList = [1420, 2328];
364
+        $zeroLineUidList = [1420, 2328, 1720];
365
         foreach ($zeroLineUidList as $uid) {
365
         foreach ($zeroLineUidList as $uid) {
366
             //查询当前团队的用户列表
366
             //查询当前团队的用户列表
367
             $sql = "select getUserLevelId($uid) as uids";
367
             $sql = "select getUserLevelId($uid) as uids";

+ 18 - 19
app/controller/merchant/store/order/RefundOrder.php

@@ -283,26 +283,25 @@ class RefundOrder extends BaseController
283
                     ];
283
                     ];
284
                     Db::name('user_sign_vr')->insert($insertdata);
284
                     Db::name('user_sign_vr')->insert($insertdata);
285
 
285
 
286
+                } else if ($array_fzone_paytype['type'] == 'c1') {
287
+                    // {"checked":true,"note":"复购金","other":1.5,"price":8.5,"total":0.0,"type":"c1","vr":"48799.82"}
288
+                    $vrpri = Db::name("user")->where("uid", $group_order_map['uid'])->value('fugou');
289
+                    $vrpri += $array_fzone_paytype['price'];
290
+                    Db::name("user")->where("uid", $group_order_map['uid'])->update(['fugou' => $vrpri]);
291
+                    //支出账号存到log日志
292
+                    $log_data = [
293
+                        'uid' => $store_order_info['uid'],
294
+                        'number' => $array_fzone_paytype['price'],
295
+                        'mark' => "复购区商品申请退款退回复购金:" . $array_fzone_paytype['price'],
296
+                        'desc' => "复购金",
297
+                        'order_id' => $store_order_info['order_id'],
298
+                        'surplus' => $vrpri,
299
+                        'order_type' => 0,
300
+                        'type' => 1,
301
+                        'addtime' => time()
302
+                    ];
303
+                    Db::name("user_sign_fugou")->insert($log_data);
286
                 }
304
                 }
287
-                // else if ($array_fzone_paytype['type'] == 'c1') {
288
-                //     // {"checked":true,"note":"复购金","other":1.5,"price":8.5,"total":0.0,"type":"c1","vr":"48799.82"}
289
-                //     $vrpri = Db::name("user")->where("uid", $group_order_map['uid'])->value('fugou');
290
-                //     $vrpri += $array_fzone_paytype['other'];
291
-                //     Db::name("user")->where("uid", $group_order_map['uid'])->update(['fugou' => $vrpri]);
292
-                //     //支出账号存到log日志
293
-                //     $log_data = [
294
-                //         'uid' => $store_order_info['uid'],
295
-                //         'number' => $array_fzone_paytype['price'],
296
-                //         'mark' => "复购区商品申请退款退回复购金:" . $array_fzone_paytype['price'],
297
-                //         'desc' => "复购金",
298
-                //         'order_id' =>  $store_order_info['order_id'],
299
-                //         'surplus' => $vrpri,
300
-                //         'order_type' => 0,
301
-                //         'type' => 2,
302
-                //         'addtime' => time()
303
-                //     ];
304
-                //     $user_res_log = Db::name("user_sign_fugou")->insert($log_data);
305
-                // }
306
             }
305
             }
307
 
306
 
308
             // 取消 订单所发放的福利
307
             // 取消 订单所发放的福利