Browse Source

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

chengzhiyixia 1 year ago
parent
commit
c646fb312f

+ 2 - 2
app/common/repositories/store/order/StoreOrderRepository.php

@@ -2365,9 +2365,9 @@ class StoreOrderRepository extends BaseRepository
2365 2365
                 // 商贸区
2366 2366
                 /** @var \app\common\repositories\merchant\MerchantRepository $merchant */
2367 2367
                 $merchant = app()->make(MerchantRepository::class);
2368
-                $merchantInfo = $merchant->get($store_product_datas['mer_id']);
2368
+                $tmpMerchantInfo = $merchant->get($store_product_datas['mer_id']);
2369 2369
                 // 1企业2个体3个人
2370
-                if ($merchantInfo && in_array($merchantInfo['type'], [2, 3])) {
2370
+                if ($tmpMerchantInfo && in_array($tmpMerchantInfo['type'], [2, 3])) {
2371 2371
                     $jf = $orderpri - round($store_product_datas['concession_pri'] * 0.3, 2) . ' + ' . round($store_product_datas['concession_pri'] * 0.3, 2);
2372 2372
                     $jd = $orderpri - round($store_product_datas['concession_pri'] * 0.35, 2) . ' + ' . round($store_product_datas['concession_pri'] * 0.35, 2);
2373 2373
                     if ($store_product_datas['concession_pri'] != null || $store_product_datas['concession_pri'] != 0) {

+ 16 - 16
app/common/repositories/user/UserOfflineRechargeRepository.php

@@ -138,25 +138,25 @@ class UserOfflineRechargeRepository extends BaseRepository
138 138
                 //496商户线下支付不返回养老金   
139 139
                 $orders = OrderMerchant::getDB()->where('pay_user_id', $unionUser->unionid)->where('status', 1) ->whereNotIn('mer_id', [496]) ->where('binds',0)->select();
140 140
                 foreach ($orders as $order) {
141
-                    app()->make(UserBillRepository::class)->incBill($unionUser->uid, 'now_money', 'commission', [
142
-                        'link_id' => $order->id,
143
-                        'pm' => 1,
144
-                        'status' => 1,
145
-                        'title' => '养老金',
146
-                        'number' => $order->pension,
147
-                        'mark' => '线下消费获得养老金',
148
-                        'commission_type' => 5,
149
-                        'balance' => $user->annuity,
150
-                        'order_sn' => $order->out_trade_no,
151
-                        'mer_id' => $order->mer_id,
152
-                        'source' => 1
153
-                    ]);
154
-                    $user->annuity += $order->pension;
155
-                    $user->annuity_num += 1;
141
+                    // app()->make(UserBillRepository::class)->incBill($unionUser->uid, 'now_money', 'commission', [
142
+                    //     'link_id' => $order->id,
143
+                    //     'pm' => 1,
144
+                    //     'status' => 1,
145
+                    //     'title' => '养老金',
146
+                    //     'number' => $order->pension,
147
+                    //     'mark' => '线下消费获得养老金',
148
+                    //     'commission_type' => 5,
149
+                    //     'balance' => $user->annuity,
150
+                    //     'order_sn' => $order->out_trade_no,
151
+                    //     'mer_id' => $order->mer_id,
152
+                    //     'source' => 1
153
+                    // ]);
154
+                    // $user->annuity += $order->pension;
155
+                    // $user->annuity_num += 1;
156 156
                     if (!$user->mer_id || !$user->locktime) {
157 157
                         Db::name('user')->where('uid', $unionUser->uid)->update(['mer_id' => $order->mer_id, 'locktime' => date('Y-m-d H:i:s')]);
158 158
                     }
159
-                    $user->save();
159
+                    // $user->save();
160 160
 
161 161
                     //同步用户部分------------------------------------
162 162
                     //同步红包

+ 1 - 1
app/common/repositories/user/UserRepository.php

@@ -1185,7 +1185,7 @@ class UserRepository extends BaseRepository
1185 1185
     public function registr(string $phone, ?string $pwd, $user_type = 'h5',$url="",$nickname="",$external=1,$spread_uid=null)
1186 1186
     {
1187 1187
         $user_res = Db::name('user')->where('phone', $phone)->find();
1188
-        if ($user_res && !$user_res['account']) {
1188
+        if ($user_res || !$user_res['account']) {
1189 1189
             $data = [
1190 1190
                 'account' => $phone,
1191 1191
             ];