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

Merge branch 'master' into huangfamily

family 1 год назад
Родитель
Сommit
976b307291

+ 1 - 0
app/command/PensionTasks.php

@@ -443,6 +443,7 @@ class PensionTasks extends Command
443 443
      */
444 444
     public function doOnlineOrderGzc($timeLimit)
445 445
     {
446
+        return true;
446 447
          // 普通订单
447 448
         $cursor = Db::table('rrx_store_order')->where('paid', 1)->where('gzc', 0)->where('pay_type', 'in', '0,1,2,4')->cursor();
448 449
         $StoreOrderStatusRepository = app()->make(StoreOrderStatusRepository::class);

+ 1 - 1
app/common/dao/user/UserDao.php

@@ -338,7 +338,7 @@ class UserDao extends BaseDao
338 338
     {
339 339
         return User::getDB()->alias('A')
340 340
             ->join('StoreOrder B', 'A.uid = B.uid and B.paid = 1 and B.pay_time between \'' . date('Y/m/d', strtotime('first day of')) . ' 00:00:00\' and \'' . date('Y/m/d H:i:s') . '\'')
341
-            ->field('A.brokerage_price as commission, A.brokerage_price as brokerage_price, A.score as green_integral, A.score as score, A.create_time as create_time,A.uid,A.avatar,A.nickname,A.now_money,A.pay_price,A.pay_count, sum(B.pay_price) as total_pay_price, count(B.order_id) as total_pay_count')
341
+            ->field('A.brokerage_price as commission, A.brokerage_price as brokerage_price, A.score as green_integral, A.score as score, A.create_time as create_time,A.uid,A.avatar,A.nickname,A.phone,A.now_money,A.pay_price,A.pay_count, sum(B.pay_price) as total_pay_price, count(B.order_id) as total_pay_count')
342 342
             ->where('A.uid', $uid)
343 343
             ->find();
344 344
     }

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

@@ -1034,7 +1034,7 @@ class StoreOrderRepository extends BaseRepository
1034 1034
                             $gxz_amount_mine = $user_data['contribute'] + $gx_jf;
1035 1035
                             $jf_amount_mine = $user_data['score'] + $gx_jf;
1036 1036
 
1037
-                            Db::name('user')->where('uid', $user_data['uid'])->update(['annuity' => $ylj_amount_mine, 'contribute' => $gxz_amount_mine, 'score' => $jf_amount_mine]);
1037
+                            // Db::name('user')->where('uid', $user_data['uid'])->update(['annuity' => $ylj_amount_mine, 'contribute' => $gxz_amount_mine, 'score' => $jf_amount_mine]);
1038 1038
                             $paystage_status = 1;
1039 1039
                             //修改订单状态
1040 1040
                             $orderdatas = Db::name("store_order")->where("order_id", $_order->order_id)->update(['paid' => 1, 'pay_time' => date('Y-m-d H:i:s'), 'status' => 0, 'distribution_mode' => 1]);
@@ -9712,9 +9712,9 @@ class StoreOrderRepository extends BaseRepository
9712 9712
                         $yj_amount_90 = round($pv * 0.05, 2) * 0.9;
9713 9713
                         $fgj_amount_10 = round($pv * 0.05, 2) * 0.1;//推广者的佣金抽10%到个人复购金
9714 9714
 
9715
-                        $yj_amount = $merchant_user_data['brokerage_price'] + $yj_amount_90;
9716
-                        $fgj_amount = $merchant_user_data['fugou'] + $fgj_amount_10;
9717
-                        $this->fugou_user_log($merchant_data['uid'], $fgj_amount_10, $store_order_data['order_id'], 1);
9715
+                        // $yj_amount = $merchant_user_data['brokerage_price'] + $yj_amount_90;
9716
+                        // $fgj_amount = $merchant_user_data['fugou'] + $fgj_amount_10;
9717
+                        // $this->fugou_user_log($merchant_data['uid'], $fgj_amount_10, $store_order_data['order_id'], 1);
9718 9718
 
9719 9719
 
9720 9720
                         // Db::name('user')->where('uid',$merchant_data['uid'])->update(['brokerage_price'=>$yj_amount,'fugou'=>$fgj_amount]);
@@ -9776,7 +9776,7 @@ class StoreOrderRepository extends BaseRepository
9776 9776
             $this->bill_user_log($user_data['uid'], round($pv * 0.035, 2), $store_order_data['order_id'], 5, $group_order['group_order_sn'], '消费获得养老金' . round($pv * 0.035, 2), $store_order_data['mer_id']);
9777 9777
 
9778 9778
             $this->con_log($user_data['uid'], $gx_jf, $store_order_data['order_id'], 11, "购买会员专区商品赠送贡献值", 1);
9779
-            $this->score_log($user_data['uid'], $gx_jf, $store_order_data['order_id'], 11, "购买会员专区商品赠送积分1", 1);
9779
+            $this->score_log($user_data['uid'], $gx_jf, $store_order_data['order_id'], 11, "购买会员专区商品赠送积分", 1);
9780 9780
 
9781 9781
             //查询下单用户上级身份(2.0新表用户)
9782 9782
             $spread_data = Db::name('user')->where('uid', $user_data['spread_uid'])->find();

+ 7 - 1
app/common/repositories/store/product/ProductRepository.php

@@ -2043,7 +2043,13 @@ class ProductRepository extends BaseRepository
2043 2043
     // 供应链商品上下架
2044 2044
     public function changeStatus($ids, $is_show)
2045 2045
     {
2046
-        $data = ['is_show' => $is_show, 'is_status' => 1];
2046
+    
2047
+        if ($is_show == 1) {
2048
+            $data = ['is_show' => $is_show, 'is_status' => 0];
2049
+        } else {
2050
+            $data = ['is_show' => $is_show, 'is_status' => 1];
2051
+        }
2052
+
2047 2053
         $this->dao->updates($ids, $data);
2048 2054
 
2049 2055
         foreach ($ids as $id) {

+ 4 - 1
app/controller/admin/system/auth/Menu.php

@@ -209,7 +209,10 @@ class Menu extends BaseController
209 209
         if($this->merchant){
210 210
 
211 211
             foreach($menus as $key => $value){
212
-                if($value['menu_id'] == '1112' && $this->request->merId() == 148){
212
+                if($value['menu_id'] == '1112' && $this->request->merId() != 439){
213
+                    unset($menus[$key]);
214
+                }
215
+                if($value['menu_id'] == '1127' && $this->request->merId() != 439){
213 216
                     unset($menus[$key]);
214 217
                 }
215 218
                 if($value['menu_id'] == '1103'){

+ 26 - 0
app/controller/admin/system/merchant/GzcLogs.php

@@ -118,6 +118,19 @@ class GzcLogs extends BaseController
118 118
             'success' => 1,
119 119
             'update_time' => date('Y-m-d H:i:s')
120 120
         ]);
121
+
122
+        //发起成功更新记录值
123
+        $order_id = Db::name('store_order')->where('order_sn', $log['out_trade_no'])->value('order_id');
124
+        if($order_id){
125
+            $bill = Db::name('user_bill')->where('link_id', $order_id)->where('commission_type', 5)->where('is_gzc', 'in', [0, 1])->find();
126
+            if($bill){
127
+                Db::name('user_bill')
128
+                ->where('bill_id', $bill['bill_id'])
129
+                ->update([
130
+                    'is_gzc' => 2
131
+                ]);
132
+            }
133
+        }
121 134
         
122 135
         return app('json')->success('发起成功', $log);
123 136
     }
@@ -186,6 +199,19 @@ class GzcLogs extends BaseController
186 199
                 'success' => 1,
187 200
                 'update_time' => date('Y-m-d H:i:s')
188 201
             ]);
202
+
203
+            //发起成功更新记录值
204
+            $order_id = Db::name('store_order')->where('order_sn', $log['out_trade_no'])->value('order_id');
205
+            if($order_id){
206
+                $bill = Db::name('user_bill')->where('link_id', $order_id)->where('commission_type', 5)->where('is_gzc', 'in', [0, 1])->find();
207
+                if($bill){
208
+                    Db::name('user_bill')
209
+                    ->where('bill_id', $bill['bill_id'])
210
+                    ->update([
211
+                        'is_gzc' => 2
212
+                    ]);
213
+                }
214
+            }
189 215
         }
190 216
         return app('json')->success('发起成功');
191 217
     }

+ 264 - 4
app/controller/api/cron/CommissionCron.php

@@ -3,7 +3,9 @@
3 3
 
4 4
 namespace app\controller\api\cron;
5 5
 
6
-
6
+use app\common\model\store\order\StoreOrder;
7
+use app\common\repositories\user\UserBillRepository;
8
+use app\common\model\user\UserCertification;
7 9
 use AdaPaySdk\Drawcash;
8 10
 use AdaPaySdk\PaymentConfirm;
9 11
 use AdaPaySdk\SettleAccount;
@@ -27,6 +29,7 @@ use think\facade\Cache;
27 29
 use think\facade\Db;
28 30
 use think\facade\Log;
29 31
 use function GuzzleHttp\Psr7\str;
32
+use app\traits\HuiPay;
30 33
 
31 34
 class CommissionCron
32 35
 {
@@ -1303,10 +1306,267 @@ where o.paid=1 and o.is_settlement=1 and settlement_time between '$this->startMo
1303 1306
         $this->sendEMail(['389123492@qq.com', '420132441@qq.com'], '结算定时', "执行结束<br/>" . $mallStr . date('Y-m-d H:i:s'), '如果邮件客户端不支持HTML则显示此内容');
1304 1307
     }
1305 1308
 
1306
-
1309
+    use HuiPay;
1307 1310
 
1308 1311
     public function cesexx(){
1309
-        // $storeOrderRepository = app()->make(StoreOrderRepository::class);
1310
-        // $storeOrderRepository->douhuomall_delivery();
1312
+
1313
+        // $store_product = Db::name('store_product')->where('mer_id', 439)->select();
1314
+        // foreach ($store_product as $key=>$online) {
1315
+        //     $spu_id = $online['spu_id'];
1316
+        //     $product_id = $online['product_id'];
1317
+        //     $data = Db::name('douhuomall')->where('spu_id', $spu_id)->find();
1318
+        //     if(!$data) continue;
1319
+
1320
+        //     //商品主图
1321
+        //     $spuId_info=json_decode($data['spuId_info'],true);
1322
+        //     $slider_image=$spuId_info['detail_img_list']??'';
1323
+        //     $image=$spuId_info['cover_url']??'';
1324
+        //     try {
1325
+        //         $slider_image = implode(',',json_decode($slider_image,true));
1326
+        //     }catch (\Exception $exception){
1327
+        //         $slider_image = $image;
1328
+        //     }
1329
+    
1330
+        //     //更新产品图片数据
1331
+        //     $product_insert_data=[
1332
+        //         'image'=>$image,
1333
+        //         'slider_image'=>$slider_image,
1334
+        //     ];
1335
+        //     Db::name('store_product')->where('product_id',$product_id)->update($product_insert_data);
1336
+        //     echo '更新产品图片数据成功'.json_encode($product_insert_data);
1337
+        //     echo '产品id:'.$product_id;
1338
+        //     $detail = $spuId_info['detail'];
1339
+        //     if(!is_null(json_decode($detail))){
1340
+        //         $detail_list = json_decode($detail);
1341
+        //         $detail = '';
1342
+        //         foreach($detail_list as $value){
1343
+        //             $detail .= "<img src='".$value."' referrerpolicy='no-referrer' /></img>";
1344
+        //         }
1345
+        //     }
1346
+        //     Db::name('store_product_content')->where('product_id',$product_id)->update(['content'=>$detail]);
1347
+        // }
1348
+
1349
+
1350
+        // $cursor = Db::name('store_order')->where('mer_id', 439)->select();
1351
+        // foreach ($cursor as $key=>$online) {
1352
+        //     // if($key != 0) continue;
1353
+        //     $order_id = $online['order_id'];
1354
+        //     $orderProduct = Db::name('store_order')->alias('so')->where('so.order_id',$order_id)->leftJoin('store_order_product sop','so.order_id=sop.order_id')->field('sop.*')->select()->toArray();
1355
+        //     foreach ($orderProduct as $_k=>&$_vv){
1356
+        //         $_vv['cart_info'] = json_decode($_vv['cart_info'],true);
1357
+        //         if(isset($_vv['cart_info']['product']['product_id'])){
1358
+        //             $image = Db::name('store_product')->where('product_id', $_vv['cart_info']['product']['product_id'])->value('image');
1359
+        //             if($image){
1360
+        //                 $_vv['cart_info']['product']['image'] = $image;
1361
+        //             }
1362
+        //         }
1363
+        //         Db::name('store_order_product')->where('order_id', $order_id)->update(['cart_info'=> json_encode($_vv['cart_info'], true)]);
1364
+        //     }
1365
+        // }
1366
+
1367
+
1368
+
1369
+
1370
+
1371
+
1372
+
1373
+
1374
+
1375
+
1376
+
1377
+        // 普通订单
1378
+        // $cursor = Db::table('rrx_store_order')->where('paid', 1)->where('gzc', 0)->where('mer_id', 496)->where('pay_type', 'in', [0,1,2,4])->select();
1379
+        // $StoreOrderStatusRepository = app()->make(StoreOrderStatusRepository::class);
1380
+        // $OrderMerchantRepository    = app()->make(OrderMerchantRepository::class);
1381
+        // $OrderGzcRepository         = app()->make(OrderGzcRepository::class);
1382
+        // foreach ($cursor as $online) {
1383
+        //     if ($online['mer_id'] == 496) {
1384
+        //         if (!in_array($online['status'], [0, 1, 2, 3])) {
1385
+        //             continue;
1386
+        //         }
1387
+        //     }
1388
+
1389
+        //     $certification = UserCertification::getInstance()->where('uid', $online['uid'])->find();
1390
+        //     if (!$certification) {
1391
+        //         Log::info($online['uid'] . '没有实名认证');
1392
+        //         // echo '没有实名认证';
1393
+        //         continue;
1394
+        //     }
1395
+        //     //查询养老金金额
1396
+        //     $UserBillRepository = app()->make(UserBillRepository::class);
1397
+        //     $bill               = $UserBillRepository->getWhere(['uid' => $online['uid'], 'link_id' => $online['order_id'], 'commission_type' => 5]);
1398
+
1399
+        //     $pension = $bill->number ?? 0;
1400
+        //     if ($pension <= 0) {
1401
+        //         echo '金额为为0:'.$online['order_sn'];
1402
+        //         Log::info($online['order_sn'] . 'pension' . $pension);
1403
+        //         continue;
1404
+        //     }
1405
+
1406
+        //     Db::transaction(function () use ($certification, $online, $pension, $OrderGzcRepository, $OrderMerchantRepository) {
1407
+        //         //新增入账明细记录
1408
+        //         $orderId   = $OrderMerchantRepository->getNewOrderId('IN10');
1409
+        //         $create    = [
1410
+        //             'uid'          => $online['uid'],
1411
+        //             'platform_no'  => $orderId,
1412
+        //             'account_type' => $online['pay_type'] == 1 ? 3 : 2,
1413
+        //             'user_name'    => $certification['user_name'],
1414
+        //             'mobile'       => $certification['mobile'],
1415
+        //             'user_card'    => $certification['user_card'],
1416
+        //             'pension'      => $pension,
1417
+        //             'order_type'   => 2,
1418
+        //             'out_trade_no' => $online['order_sn']
1419
+        //         ];
1420
+        //         $test_user = Db::name('user')->where('uid', $online['uid'])->value('test_user');
1421
+        //         $check     = Db::name("gzc_logs")->where("out_trade_no", $online['order_sn'])->where("order_type", 2)->count();
1422
+        //         if ($test_user == 0 && $check <= 0) {
1423
+        //             $OrderGzcRepository->create($create);
1424
+        //         }
1425
+        //         $order                  = StoreOrder::getInstance()->find($online['order_id']);
1426
+        //         $order->gzc             = 1;
1427
+        //         $order->save();
1428
+        //     });
1429
+
1430
+        //     $bill->gzc = 1;
1431
+        //     $bill->is_gzc = 1;
1432
+        //     $bill->save();
1433
+        // }
1434
+
1435
+
1436
+        
1437
+        //18995126502
1438
+       //会员直推荐佣金补1800,复购金补200,贡献值补4900,积分补4900,养老金补350
1439
+
1440
+    //    $user = Db::name("user")->where('uid', 910)->find();
1441
+
1442
+
1443
+    //    $order_sn = 0;
1444
+    //    $order_id = 0;
1445
+    //    $order["mer_id"] = 0;
1446
+
1447
+    //    //sat存养老金
1448
+    //    $tuiguanyanglaojin = '350';
1449
+    //    $tuimark = "推荐消费获得养老金" . $tuiguanyanglaojin;
1450
+    //    $tuititle = "养老金";
1451
+    //    $commission_type = 5;
1452
+    //    if ($tuiguanyanglaojin >= 0.01) {
1453
+    //        $this->add_bill($tuititle, $tuiguanyanglaojin, $user["uid"], $tuimark, $commission_type, $order_sn, $order_id, $order["mer_id"], 0, 0, 0);
1454
+    //    } else {
1455
+    //        Db::name('log')->insert(['data' => '订单号:' . $order_sn . '付款额度较低,推荐养老金低于0.01无法入库 特此记录!']);
1456
+    //    }
1457
+
1458
+    //    $tuiguanyongjin = '1800';
1459
+    //    $tuiYongmark = "推荐消费获得佣金" . $tuiguanyongjin;
1460
+    //    $tuiYongzhoutitle = "推广佣金";
1461
+    //    $commission_yong_type = 3;
1462
+    //    if ($tuiguanyongjin >= 0.01) {
1463
+    //        $this->add_bill($tuiYongzhoutitle, $tuiguanyongjin, $user["uid"], $tuiYongmark, $commission_yong_type, $order_sn, $order_id, $order["mer_id"], 0, 0, 0);
1464
+    //    } else {
1465
+    //        Db::name('log')->insert(['data' => '订单号:' . $order_sn . '付款额度较低或 商家、平台设置的返佣比例较低,佣金低于0.01无法入库 特此记录!']);
1466
+    //    }
1467
+
1468
+
1469
+
1470
+
1471
+
1472
+
1473
+
1474
+        // $merchant_member_list = Db::name('order_merchant')
1475
+        //            ->where('status', 0)->where('paid', 0)->where('create_time', '>', '2025-01-01 00:00:00')
1476
+        //             ->column('id,mer_id,uid,out_trade_no,hf_pay_id,create_time');
1477
+        // $out_trade_no_list = [];
1478
+        // foreach ($merchant_member_list as $key => $value) {
1479
+        //     if (strpos($value['out_trade_no'], 'ALI') !== false) {
1480
+        //         //支付宝
1481
+        //         $api_key = 'api_live_b23537ed-64b8-45d6-832e-fb228aa9e0a9';
1482
+        //     } else {
1483
+        //         //微信
1484
+        //         $api_key = 'api_live_b0a687ec-5450-4ada-a0e4-65bac0f46871';
1485
+        //     }
1486
+
1487
+        //     $params = [
1488
+        //         'api_key'    => $api_key,
1489
+        //         'payment_id'    => $value['hf_pay_id'],
1490
+        //     ];
1491
+            
1492
+        //     $res = $this->Payment_query_traits($params);
1493
+
1494
+        //     if (isset($res['status']) && $res['status'] == 'succeeded') {
1495
+        //         $params['out_trade_no'] = $value['out_trade_no'];
1496
+        //         // echo json_encode($params);
1497
+        //         $out_trade_no_list[] =  $value['out_trade_no'];
1498
+        //     }
1499
+
1500
+        //     echo json_encode($res);
1501
+        //     $params['out_trade_no'] = $value['out_trade_no'];
1502
+        //     echo json_encode($params);
1503
+        // }
1504
+        // echo json_encode($out_trade_no_list);
1505
+        // $api_key = 'api_live_b0a687ec-5450-4ada-a0e4-65bac0f46871';
1506
+        // $params = [
1507
+        //     'api_key'    => $api_key,
1508
+        //     'payment_id'    => '002212025031014345810745060317006163968'
1509
+        // ];  
1510
+        
1511
+        // $res = $this->Payment_query_traits($params);
1512
+        // echo json_encode($res);
1513
+        // $params['out_trade_no'] = $value['out_trade_no'];
1514
+        // echo json_encode($params);
1515
+
1516
+
1517
+        // echo json_encode($merchant_member_list);
1518
+        // echo 'xxx';
1519
+    }
1520
+
1521
+
1522
+        /**
1523
+     * 佣金加入账单
1524
+     * @param $title
1525
+     * @param $number
1526
+     * @param $uid
1527
+     * @param $mark
1528
+     * @param $commission_type
1529
+     * @param $order_sn
1530
+     */
1531
+    public function add_bill($title, $number, $uid, $mark, $commission_type, $order_sn, $order_id = 0, $mer_id = 0, $source = 0, $status = 1, $type_shop = 0)
1532
+    {
1533
+        log::info("====进入add——bill");
1534
+        log::info("==uid==={$uid}");
1535
+        if ($uid == 0 || $number == 0) {
1536
+            return;
1537
+        }
1538
+
1539
+        $number = sprintf('%.2f', $number);
1540
+
1541
+        $data = [
1542
+            'link_id' => $order_id,
1543
+            "uid" => $uid,
1544
+            "pm" => 1,
1545
+            "title" => $title,
1546
+            "category" => "now_money",
1547
+            "type" => "commission",
1548
+            "number" => $number,
1549
+            "balance" => 0,
1550
+            "mark" => $mark,
1551
+            //            "create_time"=>date("Y-m-d H:i:s"),
1552
+            "status" => $status,
1553
+            "commission_type" => $commission_type,
1554
+            "order_sn" => $order_sn,
1555
+            "mer_id" => $mer_id,
1556
+            "source" => $source,
1557
+            "type_shop" => $type_shop
1558
+        ];
1559
+        log::info("开始添加user——bills");
1560
+        log::info($data);
1561
+        Db::name("user_bill")->insert($data);
1562
+
1563
+        if ($type_shop == 0) {
1564
+           if ($commission_type == 5) {
1565
+               Db::name("user")->where("uid", $uid)->inc('annuity', $number)->update();
1566
+               Db::name("user")->where("uid", $uid)->inc('annuity_num', 1)->update();
1567
+           } else {
1568
+               Db::name("user")->where("uid", $uid)->inc('brokerage_price', $number)->update();
1569
+           }
1570
+        }
1311 1571
     }
1312 1572
 }

+ 43 - 2
app/controller/api/douhuomall/Take.php

@@ -53,7 +53,7 @@ class Take
53 53
                 $goodsInfo['detail'] = "";
54 54
                 $detail_img = $this->seveImg($value['goods_id'], $goodsInfo['detail_img'], $targetDir);
55 55
                 foreach($detail_img as $img_url){
56
-                    $img_url = "<img src='".$img_url."' />";
56
+                    $img_url = "<img src='".$img_url."' referrerpolicy='no-referrer' />";
57 57
                     $goodsInfo['detail'] = $goodsInfo['detail'].$img_url;
58 58
                 }
59 59
 
@@ -88,6 +88,9 @@ class Take
88 88
                 ];
89 89
                 $this->add($seveData);
90 90
                 $goods_id_list[] = $goodsInfo['spu_id'];
91
+
92
+
93
+                $this->updata_product_img($goodsInfo['spu_id']);
91 94
             }
92 95
 
93 96
             $goodsIds = array_diff($spu_id_list, $goods_id_list);
@@ -101,8 +104,46 @@ class Take
101 104
         }
102 105
     }
103 106
 
107
+    public function updata_product_img($spu_id){
108
+        $product_id = Db::name('store_product')->where('spu_id',$spu_id)->value('product_id');
109
+        if(!$product_id) return true;
110
+
111
+        $data = Db::name('douhuomall')->where('spu_id',$spu_id)->find();
112
+
113
+        //商品主图
114
+        $spuId_info=json_decode($data['spuId_info'],true);
115
+        $slider_image=$spuId_info['detail_img_list']??'';
116
+        $image=$spuId_info['cover_url']??'';
117
+        try {
118
+            $slider_image = implode(',',json_decode($slider_image,true));
119
+        }catch (\Exception $exception){
120
+            $slider_image = $image;
121
+        }
122
+
123
+        //更新产品图片数据
124
+        $product_insert_data=[
125
+            'image'=>$image,
126
+            'slider_image'=>$slider_image,
127
+        ];
128
+        Db::name('store_product')->where('product_id',$product_id)->update($product_insert_data);
129
+        echo '更新产品图片数据成功'.json_encode($product_insert_data);
130
+        $detail = $spuId_info['detail'];
131
+        if(!is_null(json_decode($detail))){
132
+            $detail_list = json_decode($detail);
133
+            $detail = '';
134
+            foreach($detail_list as $value){
135
+                $detail .= "<img src='".$value."' referrerpolicy='no-referrer' /></img>";
136
+            }
137
+        }
138
+        Db::name('store_product_content')->where('product_id',$product_id)->update(['content'=>$detail]);
139
+        return true;
140
+    }
141
+
142
+
143
+
104 144
     public function seveImg($goods_id, $img_url, $targetDir)
105 145
     {
146
+        return $img_url;
106 147
         if(!$img_url) return $img_url;
107 148
         if (is_array($img_url)){
108 149
             $new_img_url = [];
@@ -232,7 +273,7 @@ class Take
232 273
             ]);
233 274
             // 删除商品管理对应的数据
234 275
             Db::name('store_product')->whereIn('spu_id', $goodsIds)->update([
235
-                'is_del' => 1,
276
+                // 'is_del' => 1,
236 277
                 'is_show' => 0
237 278
             ]);
238 279
             Db::commit();

+ 4 - 0
app/controller/api/store/order/StoreOrder.php

@@ -941,6 +941,10 @@ class StoreOrder extends BaseController
941 941
             $orderProduct=Db::name('store_order')->alias('so')->where('so.order_id',$order_id)->leftJoin('store_order_product sop','so.order_id=sop.order_id')->field('sop.*')->select()->toArray();
942 942
             foreach ($orderProduct as $_k=>&$_vv){
943 943
                 $_vv['cart_info']=json_decode($_vv['cart_info'],true);
944
+                $image = Db::name('store_product')->where('product_id', $_vv['cart_info']['product']['product_id'])->value('image');
945
+                if($image){
946
+                    $_vv['cart_info']['product']['image'] = $image;
947
+                }
944 948
             }
945 949
             $data['order_id']=$order_id;
946 950
             $data['orderProduct']=$orderProduct;

+ 1 - 1
app/controller/api/user/User.php

@@ -3306,7 +3306,7 @@ return app("json")->success($data);
3306 3306
             ->sum('number');
3307 3307
 
3308 3308
         //最终 总收益是 = 佣金余额 + 已提现 + 已转VR
3309
-        $data['sum_amount'] = $data['sum_amount'] + $data['transition_vr_amount'];
3309
+        // $data['sum_amount'] = $data['sum_amount'] + $data['transition_vr_amount'];
3310 3310
 
3311 3311
         $data['sum_amount'] = set_price_rtrim($data['sum_amount']);
3312 3312
         return app('json')->success($data);