瀏覽代碼

【程序目录】更新开源5.6.3

wuhaotian 5 月之前
父節點
當前提交
83f8acc012
共有 100 個文件被更改,包括 467 次插入155 次删除
  1. 2 2
      crmeb/.version
  2. 2 2
      crmeb/LICENSE.txt
  3. 0 6
      crmeb/README.md
  4. 10 2
      crmeb/app/adminapi/common.php
  5. 57 2
      crmeb/app/adminapi/controller/UpgradeController.php
  6. 1 1
      crmeb/app/adminapi/controller/v1/diy/DiyPro.php
  7. 19 0
      crmeb/app/adminapi/controller/v1/marketing/StoreCombination.php
  8. 29 1
      crmeb/app/adminapi/controller/v1/product/StoreProduct.php
  9. 2 3
      crmeb/app/adminapi/controller/v1/product/StoreProductLabel.php
  10. 17 0
      crmeb/app/adminapi/controller/v1/product/StoreProductReply.php
  11. 1 0
      crmeb/app/adminapi/controller/v1/user/User.php
  12. 3 0
      crmeb/app/adminapi/route/marketing.php
  13. 6 0
      crmeb/app/adminapi/route/product.php
  14. 1 1
      crmeb/app/api/controller/v1/PublicController.php
  15. 4 0
      crmeb/app/common.php
  16. 33 0
      crmeb/app/dao/activity/coupon/StoreCouponUserDao.php
  17. 2 2
      crmeb/app/dao/order/StoreOrderRefundDao.php
  18. 1 1
      crmeb/app/dao/product/product/StoreProductDao.php
  19. 5 0
      crmeb/app/dao/user/UserWechatUserDao.php
  20. 1 1
      crmeb/app/listener/user/RegisterListener.php
  21. 2 2
      crmeb/app/services/activity/combination/StorePinkServices.php
  22. 18 11
      crmeb/app/services/activity/seckill/StoreSeckillServices.php
  23. 12 0
      crmeb/app/services/agent/AgentLevelServices.php
  24. 15 0
      crmeb/app/services/agent/DivisionServices.php
  25. 1 1
      crmeb/app/services/diy/DiyProServices.php
  26. 1 1
      crmeb/app/services/order/StoreOrderCreateServices.php
  27. 1 1
      crmeb/app/services/order/StoreOrderDeliveryServices.php
  28. 8 1
      crmeb/app/services/order/StoreOrderServices.php
  29. 11 2
      crmeb/app/services/other/UploadService.php
  30. 2 0
      crmeb/app/services/pay/PayTransferNotifyServices.php
  31. 27 0
      crmeb/app/services/product/product/StoreCategoryServices.php
  32. 92 27
      crmeb/app/services/product/product/StoreProductServices.php
  33. 14 24
      crmeb/app/services/shipping/ExpressServices.php
  34. 1 1
      crmeb/app/services/system/admin/SystemRoleServices.php
  35. 9 5
      crmeb/app/services/system/crontab/SystemCrontabServices.php
  36. 5 3
      crmeb/app/services/user/UserServices.php
  37. 1 1
      crmeb/app/services/user/UserStoreOrderServices.php
  38. 2 1
      crmeb/config/upload.php
  39. 5 8
      crmeb/crmeb/services/upload/BaseUpload.php
  40. 1 1
      crmeb/crmeb/services/upload/storage/Jdoss.php
  41. 1 1
      crmeb/crmeb/services/upload/storage/Local.php
  42. 1 1
      crmeb/crmeb/services/upload/storage/Oss.php
  43. 1 1
      crmeb/crmeb/services/upload/storage/Qiniu.php
  44. 1 1
      crmeb/public/admin/css.worker.js
  45. 1 1
      crmeb/public/admin/editor.worker.js
  46. 1 1
      crmeb/public/admin/html.worker.js
  47. 1 1
      crmeb/public/admin/index.html
  48. 1 1
      crmeb/public/admin/json.worker.js
  49. 1 1
      crmeb/public/admin/system_static/css/app.d614432a.css
  50. 0 0
      crmeb/public/admin/system_static/css/chunk-03588519.05fa8816.css
  51. 1 1
      crmeb/public/admin/system_static/css/chunk-721d1cfa.839fa3a9.css
  52. 0 1
      crmeb/public/admin/system_static/css/chunk-119c467f.d198736f.css
  53. 1 0
      crmeb/public/admin/system_static/css/chunk-142b9562.0906abed.css
  54. 1 0
      crmeb/public/admin/system_static/css/chunk-14545ee5.07e5c7d6.css
  55. 1 1
      crmeb/public/admin/system_static/css/chunk-576aceab.03f394c5.css
  56. 0 0
      crmeb/public/admin/system_static/css/chunk-181f18a8.f08db566.css
  57. 1 1
      crmeb/public/admin/system_static/css/chunk-b0680ab2.eafcf042.css
  58. 1 1
      crmeb/public/admin/system_static/css/chunk-5261a12a.226f2f12.css
  59. 1 0
      crmeb/public/admin/system_static/css/chunk-219ab9ee.7d08cdff.css
  60. 0 0
      crmeb/public/admin/system_static/css/chunk-277d0526.652b8e48.css
  61. 0 1
      crmeb/public/admin/system_static/css/chunk-39217217.18c3463a.css
  62. 0 1
      crmeb/public/admin/system_static/css/chunk-4285054a.cab764ff.css
  63. 1 1
      crmeb/public/admin/system_static/css/chunk-4f508854.b305c944.css
  64. 1 0
      crmeb/public/admin/system_static/css/chunk-460697bf.4be6c1ee.css
  65. 0 1
      crmeb/public/admin/system_static/css/chunk-497763ca.04b5ccd8.css
  66. 1 0
      crmeb/public/admin/system_static/css/chunk-4c872661.ade25099.css
  67. 0 1
      crmeb/public/admin/system_static/css/chunk-4c872661.d914f384.css
  68. 1 1
      crmeb/public/admin/system_static/css/chunk-518bc085.b9bf2a6c.css
  69. 0 1
      crmeb/public/admin/system_static/css/chunk-53a5fbe8.e8b9d988.css
  70. 0 1
      crmeb/public/admin/system_static/css/chunk-55245747.40269b49.css
  71. 0 0
      crmeb/public/admin/system_static/css/chunk-593789ae.2744b4ab.css
  72. 1 0
      crmeb/public/admin/system_static/css/chunk-593a013a.2ac45bcb.css
  73. 1 0
      crmeb/public/admin/system_static/css/chunk-5b0c00b0.d61bc8b1.css
  74. 1 0
      crmeb/public/admin/system_static/css/chunk-5b2cb482.b2c160e0.css
  75. 1 1
      crmeb/public/admin/system_static/css/chunk-14504f1c.861cb19f.css
  76. 0 1
      crmeb/public/admin/system_static/css/chunk-615cffd4.d981378b.css
  77. 1 0
      crmeb/public/admin/system_static/css/chunk-64b92494.4d5b25e3.css
  78. 1 0
      crmeb/public/admin/system_static/css/chunk-6c5ee98a.01cd8ba5.css
  79. 0 1
      crmeb/public/admin/system_static/css/chunk-6db89f9c.0142940b.css
  80. 0 0
      crmeb/public/admin/system_static/css/chunk-6e9219bc.4ee40667.css
  81. 0 1
      crmeb/public/admin/system_static/css/chunk-7053b734.0a7a92ae.css
  82. 0 0
      crmeb/public/admin/system_static/css/chunk-752bbbcb.8c2aef82.css
  83. 1 0
      crmeb/public/admin/system_static/css/chunk-7d590400.ff00e5c7.css
  84. 1 0
      crmeb/public/admin/system_static/css/chunk-7f0b7777.1fb39fc1.css
  85. 1 1
      crmeb/public/admin/system_static/css/chunk-85b5d3f0.07df5a78.css
  86. 1 1
      crmeb/public/admin/system_static/css/chunk-7fefa7f8.a011c86b.css
  87. 1 1
      crmeb/public/admin/system_static/css/chunk-9b69c352.430fa426.css
  88. 0 0
      crmeb/public/admin/system_static/css/chunk-de6be648.52f0ef59.css
  89. 0 0
      crmeb/public/admin/system_static/css/chunk-f3e79fa2.0ce16dd8.css
  90. 0 0
      crmeb/public/admin/system_static/css/chunk-fc01ca50.f886e744.css
  91. 11 0
      crmeb/public/admin/system_static/css/chunk-vendors.0a536a1c.css
  92. 0 11
      crmeb/public/admin/system_static/css/chunk-vendors.2fbd6fd7.css
  93. 二進制
      crmeb/public/admin/system_static/fonts/iconfont.1721369585843.1064c203.woff
  94. 二進制
      crmeb/public/admin/system_static/fonts/iconfont.1752151732483.536036f6.woff
  95. 二進制
      crmeb/public/admin/system_static/fonts/iconfont.1721369585843.31759e5c.ttf
  96. 二進制
      crmeb/public/admin/system_static/fonts/iconfont.1752211596473.5cf21f71.ttf
  97. 二進制
      crmeb/public/admin/system_static/fonts/iconfont.1752211596473.88bca599.woff
  98. 0 1
      crmeb/public/admin/system_static/js/app.6c740426.js
  99. 1 0
      crmeb/public/admin/system_static/js/app.8edab076.js
  100. 0 0
      crmeb/public/admin/system_static/js/chunk-00542f4f.583a0c47.js

+ 2 - 2
crmeb/.version

@@ -1,5 +1,5 @@
-version=CRMEB-KY v5.6.1
-version_code=561
+version=CRMEB-KY v5.6.3
+version_code=563
 platform=gitee
 platform=gitee
 app_id=ze7x9rxsv09l6pvsyo
 app_id=ze7x9rxsv09l6pvsyo
 app_key=fuF7U9zaybLa5gageVQzxtxQMFnvU2OI
 app_key=fuF7U9zaybLa5gageVQzxtxQMFnvU2OI

File diff suppressed because it is too large
+ 2 - 2
crmeb/LICENSE.txt


+ 0 - 6
crmeb/README.md

@@ -4,12 +4,6 @@ CRMEB v5 后端程序目录
 > 运行环境要求PHP7.1-7.4。
 > 运行环境要求PHP7.1-7.4。
 
 
 ## 安装
 ## 安装
-## 宝塔Docker一键安装
-1.安装宝塔面板,前往 [宝塔面板](https://www.bt.cn/new/download.html?r=dk_crmeb) 官网,选择正式版的脚本下载安装
-
-2.安装后登录宝塔面板,在菜单栏中点击 Docker ,首次进入会提示安装 Docker 服务,点击立即安装,按提示完成安装
-
-3.安装完成后在应用商店中找到crmeb  ,点击安装,配置域名等基本信息即可完成安装
 
 
 ## 一键安装
 ## 一键安装
 上传你的代码,站点入口目录设置/public
 上传你的代码,站点入口目录设置/public

+ 10 - 2
crmeb/app/adminapi/common.php

@@ -126,13 +126,21 @@ if (!function_exists('attr_format')) {
                     $result = [];
                     $result = [];
                     foreach ($temp as $item) {
                     foreach ($temp as $item) {
                         foreach ($arr[$i + 1]['detail'] as $datum) {
                         foreach ($arr[$i + 1]['detail'] as $datum) {
-                            $result[] = trim($item) . ',' . trim($datum);
+                            if (is_array($item)) {
+                                $result[] = trim($item['value']) . ',' . trim($datum['value']);
+                            } else {
+                                $result[] = trim($item) . ',' . trim($datum);
+                            }
                         }
                         }
                     }
                     }
                 }
                 }
             } else {
             } else {
                 foreach ($arr[0]['detail'] as $item) {
                 foreach ($arr[0]['detail'] as $item) {
-                    $result[] = trim($item);
+                    if (is_array($item)) {
+                        $result[] = trim($item['value']);
+                    } else {
+                        $result[] = trim($item);
+                    }
                 }
                 }
             }
             }
         }
         }

+ 57 - 2
crmeb/app/adminapi/controller/UpgradeController.php

@@ -734,8 +734,8 @@ class UpgradeController
      */
      */
     public function upData()
     public function upData()
     {
     {
-        $data['new_version'] = 'CRMEB-BZ v5.6.1';
-        $data['new_code'] = 561;
+        $data['new_version'] = 'CRMEB-BZ v5.6.3';
+        $data['new_code'] = 563;
         $data['update_sql'] = [
         $data['update_sql'] = [
             [
             [
                 'code' => 560,
                 'code' => 560,
@@ -2354,6 +2354,61 @@ SQL
                 'type' => -1,
                 'type' => -1,
                 'table' => "system_config_tab",
                 'table' => "system_config_tab",
                 'sql' => "UPDATE `@table` SET `title` = '自定义JS' WHERE `eng_title` = 'statistics_config';"
                 'sql' => "UPDATE `@table` SET `title` = '自定义JS' WHERE `eng_title` = 'statistics_config';"
+            ],[
+                'code' => 562,
+                'type' => 6,
+                'table' => "system_config",
+                'whereTable' => "system_config_tab",
+                'findSql' => "select id from @table where `menu_name` = 'merchant_cert_path'",
+                'whereSql' => "SELECT id as tabId FROM `@whereTable` WHERE `eng_title`='ali_pay'",
+                'sql' => "INSERT INTO `@table` VALUES (null, 'merchant_cert_path', 'upload', 'input', @tabId, '', 3, '', 0, 0, '\"\"', '应用公钥证书', '支付宝接口加签完成之后下载的应用公钥证书', 0, 1, 1, 489, 1);"
+            ],[
+                'code' => 562,
+                'type' => 6,
+                'table' => "system_config",
+                'whereTable' => "system_config_tab",
+                'findSql' => "select id from @table where `menu_name` = 'alipay_cert_path'",
+                'whereSql' => "SELECT id as tabId FROM `@whereTable` WHERE `eng_title`='ali_pay'",
+                'sql' => "INSERT INTO `@table` VALUES (null, 'alipay_cert_path', 'upload', 'input', @tabId, '', 3, '', 0, 0, '\"\"', '支付宝公钥证书', '支付宝接口加签完成下载的支付宝公钥证书', 0, 1, 1, 489, 1);"
+            ],[
+                'code' => 562,
+                'type' => 6,
+                'table' => "system_config",
+                'whereTable' => "system_config_tab",
+                'findSql' => "select id from @table where `menu_name` = 'alipay_root_cert_path'",
+                'whereSql' => "SELECT id as tabId FROM `@whereTable` WHERE `eng_title`='ali_pay'",
+                'sql' => "INSERT INTO `@table` VALUES (null, 'alipay_root_cert_path', 'upload', 'input', @tabId, '', 3, '', 0, 0, '\"\"', '支付宝根证书', '支付宝接口加签完成下载的支付宝根证书', 0, 1, 1, 489, 1);"
+            ],[
+                'code' => 562,
+                'type' => 6,
+                'table' => "system_config",
+                'whereTable' => "system_config_tab",
+                'findSql' => "select id from @table where `menu_name` = 'alipay_sign_type'",
+                'whereSql' => "SELECT id as tabId FROM `@whereTable` WHERE `eng_title`='ali_pay'",
+                'sql' => "INSERT INTO `@table` VALUES (null, 'alipay_sign_type', 'radio', 'input', @tabId, '0=>密钥\n1=>证书', 1, '', 0, 0, '0', '接口加签类型', '接口加签类型:密钥或证书', 80, 1, 0, 0, 0);"
+            ],[
+                'code' => 562,
+                'type' => -1,
+                'table' => "system_config",
+                'sql' => "UPDATE `@table` SET `level` = 1, `link_id` = 489, `link_value` = 0 WHERE `menu_name` = 'alipay_public_key';"
+            ],[
+                'code' => 562,
+                'type' => -1,
+                'table' => "system_config",
+                'sql' => "UPDATE `@table` SET `sort` = 85 WHERE `menu_name` = 'alipay_merchant_private_key';"
+            ],[
+                'code' => 562,
+                'type' => -1,
+                'table' => "system_config",
+                'sql' => "UPDATE `@table` SET `sort` = 91 WHERE `menu_name` = 'ali_pay_appid';"
+            ],[
+                'code' => 562,
+                'type' => 6,
+                'table' => "system_config",
+                'whereTable' => "system_config_tab",
+                'findSql' => "select id from @table where `menu_name` = 'image_thumb_status'",
+                'whereSql' => "SELECT id as tabId FROM `@whereTable` WHERE `eng_title`='base_config'",
+                'sql' => "INSERT INTO `@table` VALUES (null, 'image_thumb_status', 'radio', 'input', @tabId, '1=>开启\n0=>关闭', 1, '', 0, 0, '0', '缩略图开关', '是否开启缩略图', 0, 1, 0, 0, 0);"
             ],
             ],
         ];
         ];
         return $data;
         return $data;

+ 1 - 1
crmeb/app/adminapi/controller/v1/diy/DiyPro.php

@@ -73,7 +73,7 @@ class DiyPro extends AuthController
                             }
                             }
                             $tabValue['goodsList']['ids'] = array_column($tabValue['goodsList']['list'], 'id');
                             $tabValue['goodsList']['ids'] = array_column($tabValue['goodsList']['list'], 'id');
                         }
                         }
-                        unset($tabValue['goodsList']['list'], $item['productList']['list']);
+                        unset($tabValue['goodsList']['list'], $tabValue['productList']['list']);
                     }
                     }
                     $item['tabConfig']['list'] = $list;
                     $item['tabConfig']['list'] = $list;
                 }
                 }

+ 19 - 0
crmeb/app/adminapi/controller/v1/marketing/StoreCombination.php

@@ -249,4 +249,23 @@ class StoreCombination extends AuthController
         ]);
         ]);
         return app('json')->success($this->services->combinationStatisticsOrder($id, $where));
         return app('json')->success($this->services->combinationStatisticsOrder($id, $where));
     }
     }
+
+    /**
+     * 立即成团
+     * @param $id
+     * @return \think\Response
+     * @throws \think\db\exception\DataNotFoundException
+     * @throws \think\db\exception\DbException
+     * @throws \think\db\exception\ModelNotFoundException
+     * @author wuhaotian
+     * @email 442384644@qq.com
+     * @date 2025/6/18
+     */
+    public function immediatelyCombination($id)
+    {
+        /** @var StorePinkServices $storePinkServices */
+        $storePinkServices = app()->make(StorePinkServices::class);
+        $storePinkServices->virtualCombination($id, 'admin');
+        return app('json')->success('成团成功');
+    }
 }
 }

+ 29 - 1
crmeb/app/adminapi/controller/v1/product/StoreProduct.php

@@ -290,6 +290,31 @@ class StoreProduct extends AuthController
         return app('json')->success($res);
         return app('json')->success($res);
     }
     }
 
 
+    /**
+     * 批量移动到回收站
+     * @return \think\Response
+     */
+    public function batchDelete()
+    {
+        [$ids] = $this->request->postMore([
+            ['ids', []],
+        ], true);
+        return app('json')->success($this->service->batchDelete($ids));
+    }
+
+    /**
+     * 批量从回收站恢复
+     * @return \think\Response
+     */
+    public function batchRecover()
+    {
+        [$ids] = $this->request->postMore([
+            ['ids', []],
+        ], true);
+        $this->service->batchRecover($ids);
+        return app('json')->success('恢复成功');
+    }
+
     /**
     /**
      * 生成规格列表
      * 生成规格列表
      * @param int $id
      * @param int $id
@@ -439,8 +464,11 @@ class StoreProduct extends AuthController
             ['give_integral', 0],
             ['give_integral', 0],
             ['coupon_ids', []],
             ['coupon_ids', []],
             ['label_id', []],
             ['label_id', []],
+            ['label_list', []],
             ['recommend', []],
             ['recommend', []],
-            ['type', 0]
+            ['type', 0],
+            ['is_gift', 0],
+            ['gift_price', 0],
         ]);
         ]);
         $this->service->batchSetting($data);
         $this->service->batchSetting($data);
         return app('json')->success(100014);
         return app('json')->success(100014);

+ 2 - 3
crmeb/app/adminapi/controller/v1/product/StoreProductLabel.php

@@ -9,9 +9,8 @@ use think\facade\App;
 
 
 class StoreProductLabel extends AuthController
 class StoreProductLabel extends AuthController
 {
 {
-
-    private StoreProductLabelCateServices $labelCateServices;
-    private StoreProductLabelServices $labelServices;
+    protected $labelCateServices;
+    protected $labelServices;
 
 
     public function __construct(App $app, StoreProductLabelCateServices $labelCateServices, StoreProductLabelServices $labelServices)
     public function __construct(App $app, StoreProductLabelCateServices $labelCateServices, StoreProductLabelServices $labelServices)
     {
     {

+ 17 - 0
crmeb/app/adminapi/controller/v1/product/StoreProductReply.php

@@ -126,4 +126,21 @@ class StoreProductReply extends AuthController
         $this->services->update($id, ['status' => $status]);
         $this->services->update($id, ['status' => $status]);
         return app('json')->success($status == 1 ? '审核通过' : '拒绝成功');
         return app('json')->success($status == 1 ? '审核通过' : '拒绝成功');
     }
     }
+
+    /**
+     * 批量商品评论审核
+     * @return \think\Response
+     * @author wuhaotian
+     * @email 442384644@qq.com
+     * @date 2025/6/18
+     */
+    public function batch_set_status()
+    {
+        list($ids, $status) = $this->request->postMore([
+            ['ids', []],
+            ['status', 0]
+        ], true);
+        $this->services->batchUpdate($ids, ['status' => $status]);
+        return app('json')->success($status == 1 ? '审核通过' : '拒绝成功');
+    }
 }
 }

+ 1 - 0
crmeb/app/adminapi/controller/v1/user/User.php

@@ -64,6 +64,7 @@ class User extends AuthController
             ['pay_count_num', []],
             ['pay_count_num', []],
             ['pay_count_money', []],
             ['pay_count_money', []],
             ['recharge_count', []],
             ['recharge_count', []],
+            ['agent_level', 0],
         ]);
         ]);
         $where['label_id'] = toIntArray($where['label_id']);
         $where['label_id'] = toIntArray($where['label_id']);
         return app('json')->success($this->services->index($where));
         return app('json')->success($this->services->index($where));

+ 3 - 0
crmeb/app/adminapi/route/marketing.php

@@ -89,6 +89,9 @@ Route::group('marketing', function () {
         Route::get('combination/statistics/list/:id', 'v1.marketing.StoreCombination/combinationStatisticsList')->option(['real_name' => '拼团统计列表']);
         Route::get('combination/statistics/list/:id', 'v1.marketing.StoreCombination/combinationStatisticsList')->option(['real_name' => '拼团统计列表']);
         //拼团订单
         //拼团订单
         Route::get('combination/statistics/order/:id', 'v1.marketing.StoreCombination/combinationStatisticsOrder')->option(['real_name' => '拼团统计订单']);
         Route::get('combination/statistics/order/:id', 'v1.marketing.StoreCombination/combinationStatisticsOrder')->option(['real_name' => '拼团统计订单']);
+        //立即成团
+        Route::get('combination/immediately/:id', 'v1.marketing.StoreCombination/immediatelyCombination')->option(['real_name' => '立即成团']);
+
     })->option(['parent' => 'marketing', 'cate_name' => '拼团活动']);
     })->option(['parent' => 'marketing', 'cate_name' => '拼团活动']);
 
 
     /** 秒杀活动 */
     /** 秒杀活动 */

+ 6 - 0
crmeb/app/adminapi/route/product.php

@@ -79,6 +79,10 @@ Route::group('product', function () {
         Route::get('product/:id', 'v1.product.StoreProduct/get_product_info')->option(['real_name' => '商品详情']);
         Route::get('product/:id', 'v1.product.StoreProduct/get_product_info')->option(['real_name' => '商品详情']);
         //加入回收站
         //加入回收站
         Route::delete('product/:id', 'v1.product.StoreProduct/delete')->option(['real_name' => '商品放入回收站']);
         Route::delete('product/:id', 'v1.product.StoreProduct/delete')->option(['real_name' => '商品放入回收站']);
+        //加入回收站
+        Route::post('product/batch_delete', 'v1.product.StoreProduct/batchDelete')->option(['real_name' => '商品批量放入回收站']);
+        //批量从回收站恢复
+        Route::post('product/batch_recover', 'v1.product.StoreProduct/batchRecover')->option(['real_name' => '批量从回收站恢复']);
         //保存新建或保存
         //保存新建或保存
         Route::post('product/:id', 'v1.product.StoreProduct/save')->option(['real_name' => '新建或修改商品']);
         Route::post('product/:id', 'v1.product.StoreProduct/save')->option(['real_name' => '新建或修改商品']);
         //生成属性
         //生成属性
@@ -113,6 +117,8 @@ Route::group('product', function () {
         Route::post('reply/save_fictitious_reply', 'v1.product.StoreProductReply/save_fictitious_reply')->option(['real_name' => '保存虚拟评论']);
         Route::post('reply/save_fictitious_reply', 'v1.product.StoreProductReply/save_fictitious_reply')->option(['real_name' => '保存虚拟评论']);
         //审核商品评论
         //审核商品评论
         Route::put('reply/set_status/:id/:status', 'v1.product.StoreProductReply/set_status')->option(['real_name' => '审核商品评论']);
         Route::put('reply/set_status/:id/:status', 'v1.product.StoreProductReply/set_status')->option(['real_name' => '审核商品评论']);
+        //批量审核商品评论
+        Route::post('reply/batch_set_status', 'v1.product.StoreProductReply/batch_set_status')->option(['real_name' => '批量审核商品评论']);
     })->option(['parent' => 'product', 'cate_name' => '商品评论']);
     })->option(['parent' => 'product', 'cate_name' => '商品评论']);
 
 
     /** 商品采集 */
     /** 商品采集 */

+ 1 - 1
crmeb/app/api/controller/v1/PublicController.php

@@ -803,7 +803,7 @@ class PublicController
             $res = $pay->queryTransferBills($order_id);
             $res = $pay->queryTransferBills($order_id);
             if (isset($res['fail_reason']) && $res['fail_reason'] != '') {
             if (isset($res['fail_reason']) && $res['fail_reason'] != '') {
                 if ($type == 1) {
                 if ($type == 1) {
-                    $extractServices->refuse((int)$info['id'], '提现失败,原因:超时为领取');
+                    $extractServices->changeFail($info['id'], $info, '提现失败,原因:超时未领取');
                     $extractServices->update($info['id'], ['state' => 'FAIL']);
                     $extractServices->update($info['id'], ['state' => 'FAIL']);
                 } else {
                 } else {
                     $lotteryRecordServices->update($info['id'], ['state' => 'FAIL']);
                     $lotteryRecordServices->update($info['id'], ['state' => 'FAIL']);

+ 4 - 0
crmeb/app/common.php

@@ -936,6 +936,10 @@ if (!function_exists('get_thumb_water')) {
      */
      */
     function get_thumb_water($list, string $type = 'small', array $field = ['image'], bool $is_remote_down = false)
     function get_thumb_water($list, string $type = 'small', array $field = ['image'], bool $is_remote_down = false)
     {
     {
+        // 未开启缩略图功能 直接返回原数据
+        if (!sys_config('image_thumb_status', 0)) {
+            return $list;
+        }
         if (!$list || !$field) return $list;
         if (!$list || !$field) return $list;
         $baseType = $type;
         $baseType = $type;
         $data = $list;
         $data = $list;

+ 33 - 0
crmeb/app/dao/activity/coupon/StoreCouponUserDao.php

@@ -216,4 +216,37 @@ class StoreCouponUserDao extends BaseDao
     {
     {
         return $this->getModel()->where($where)->delete();
         return $this->getModel()->where($where)->delete();
     }
     }
+
+    /**
+     * 判断用户是否还能领取或者已经领取未使用
+     * @param $uid
+     * @param $coupon_id
+     * @param $receive_limit
+     * @return bool
+     * @throws \think\db\exception\DataNotFoundException
+     * @throws \think\db\exception\DbException
+     * @throws \think\db\exception\ModelNotFoundException
+     * @author wuhaotian
+     * @email 442384644@qq.com
+     * @date 2025/7/15
+     */
+    public function getUserCouponCanUse($uid, $coupon_id, $receive_limit)
+    {
+        $list = $this->getModel()->where(['uid' => $uid, 'cid' => $coupon_id])->select()->toArray();
+        $count = count($list);
+        if ($count < $receive_limit) {
+            return true;
+        }
+        $noUserCount = 0;
+        foreach ($list as $item) {
+            if ($item['status'] == '未使用') {
+                $noUserCount++;
+            }
+        }
+        if ($noUserCount > 0) {
+            return true;
+        } else {
+            return false;
+        }
+    }
 }
 }

+ 2 - 2
crmeb/app/dao/order/StoreOrderRefundDao.php

@@ -40,7 +40,7 @@ class StoreOrderRefundDao extends BaseDao
             }
             }
         })->when(isset($where['order_id']) && $where['order_id'] != '', function ($query) use ($where) {
         })->when(isset($where['order_id']) && $where['order_id'] != '', function ($query) use ($where) {
             $query->where(function ($q) use ($where) {
             $query->where(function ($q) use ($where) {
-                $q->whereLike('order_id', '%' . $where['order_id'] . '%')->whereOr('store_order_id', 'IN', function ($orderModel) use ($where) {
+                $q->where('order_id|refund_express', 'like', '%' . $where['order_id'] . '%')->whereOr('store_order_id', 'IN', function ($orderModel) use ($where) {
                     $orderModel->name('store_order')->field('id')->whereLike('order_id', '%' . $where['order_id'] . '%');
                     $orderModel->name('store_order')->field('id')->whereLike('order_id', '%' . $where['order_id'] . '%');
                 });
                 });
             });
             });
@@ -194,6 +194,6 @@ class StoreOrderRefundDao extends BaseDao
 
 
     public function orderIsRefund($store_order_id)
     public function orderIsRefund($store_order_id)
     {
     {
-        return boolval($this->getModel()->where('store_order_id', $store_order_id)->whereIn('refund_type', [1, 2, 4, 5])->count());
+        return boolval($this->getModel()->where('store_order_id', $store_order_id)->whereIn('refund_type', [1, 2, 4, 5])->where('is_cancel', 0)->count());
     }
     }
 }
 }

+ 1 - 1
crmeb/app/dao/product/product/StoreProductDao.php

@@ -122,7 +122,7 @@ class StoreProductDao extends BaseDao
      * @throws \think\db\exception\DbException
      * @throws \think\db\exception\DbException
      * @throws \think\db\exception\ModelNotFoundException
      * @throws \think\db\exception\ModelNotFoundException
      */
      */
-    public function getSearchList(array $where, int $page = 0, int $limit = 0, array $field = ['*'], array $with = ['attrs', 'couponId', 'description'])
+    public function getSearchList(array $where, int $page = 0, int $limit = 0, array $field = ['*'], array $with = [])
     {
     {
         if (isset($where['star'])) $with[] = 'star';
         if (isset($where['star'])) $with[] = 'star';
         return $this->search($where, false)->with($with)->when($page != 0 && $limit != 0, function ($query) use ($page, $limit) {
         return $this->search($where, false)->with($with)->when($page != 0 && $limit != 0, function ($query) use ($page, $limit) {

+ 5 - 0
crmeb/app/dao/user/UserWechatUserDao.php

@@ -279,6 +279,11 @@ class UserWechatUserDao extends BaseDao
         if (isset($where['ids']) && count($where['ids'])) {
         if (isset($where['ids']) && count($where['ids'])) {
             $model->whereIn($userAlias . 'uid', $where['ids']);
             $model->whereIn($userAlias . 'uid', $where['ids']);
         }
         }
+
+        if (isset($where['agent_level']) && $where['agent_level'] != '') {
+            $model->where($userAlias . 'agent_level', $where['agent_level']);
+        }
+
         return $field ? $model->field($field) : $model;
         return $field ? $model->field($field) : $model;
     }
     }
 
 

+ 1 - 1
crmeb/app/listener/user/RegisterListener.php

@@ -51,7 +51,7 @@ class RegisterListener implements ListenerInterface
             //自定义消息-下级用户绑定成功
             //自定义消息-下级用户绑定成功
             if ($res) {
             if ($res) {
                 $phone = app()->make(UserServices::class)->value($uid, 'phone');
                 $phone = app()->make(UserServices::class)->value($uid, 'phone');
-                event('CustomNoticeListener', [$uid, ['nickname' => $name, 'time' => date('Y-m-d H:i:s'), 'phone' => $phone], 'spread_success']);
+                event('CustomNoticeListener', [$spreadUid, ['nickname' => $name, 'time' => date('Y-m-d H:i:s'), 'phone' => $phone], 'spread_success']);
             }
             }
         }
         }
 
 

+ 2 - 2
crmeb/app/services/activity/combination/StorePinkServices.php

@@ -800,7 +800,7 @@ class StorePinkServices extends BaseServices
      * @throws \think\db\exception\DbException
      * @throws \think\db\exception\DbException
      * @throws \think\db\exception\ModelNotFoundException
      * @throws \think\db\exception\ModelNotFoundException
      */
      */
-    public function virtualCombination($pinkId)
+    public function virtualCombination($pinkId, $operator = 'auto')
     {
     {
         $pinkInfo = $this->dao->get($pinkId);
         $pinkInfo = $this->dao->get($pinkId);
         $people = $pinkInfo['people'];
         $people = $pinkInfo['people'];
@@ -809,7 +809,7 @@ class StorePinkServices extends BaseServices
         /** @var StoreCombinationServices $services */
         /** @var StoreCombinationServices $services */
         $services = app()->make(StoreCombinationServices::class);
         $services = app()->make(StoreCombinationServices::class);
         $percent2 = $services->value(['id' => $pinkInfo['cid']], 'virtual');
         $percent2 = $services->value(['id' => $pinkInfo['cid']], 'virtual');
-        if ($percent1 >= $percent2) {
+        if ($percent1 >= $percent2 || $operator == 'admin') {
             $time = time();
             $time = time();
             $num = $people - $count;
             $num = $people - $count;
             $data = [];
             $data = [];

+ 18 - 11
crmeb/app/services/activity/seckill/StoreSeckillServices.php

@@ -805,23 +805,25 @@ class StoreSeckillServices extends BaseServices
         $data['time_ids'] = implode(',', $data['time_ids']);
         $data['time_ids'] = implode(',', $data['time_ids']);
 
 
         return $this->transaction(function () use ($id, $data, $timeIds) {
         return $this->transaction(function () use ($id, $data, $timeIds) {
+
+            $productInfos = $data['product_infos'];
+            $productIds = array_column($productInfos, 'id');
+            /** @var StoreProductServices $productServices */
+            $productServices = app()->make(StoreProductServices::class);
+            $productList = $productServices->searchList(['id' => $productIds, 'is_del' => 0]);
+            $productList = $productList['list'] ?? [];
+            $productInfos = array_combine($productIds, $productInfos);
+
             /** @var StoreActivityServices $StoreActivityServices */
             /** @var StoreActivityServices $StoreActivityServices */
             $StoreActivityServices = app()->make(StoreActivityServices::class);
             $StoreActivityServices = app()->make(StoreActivityServices::class);
             if ($id) {
             if ($id) {
                 $StoreActivityServices->update($id, $data);
                 $StoreActivityServices->update($id, $data);
-//                $this->clearActivitySeckill($id);
+                $this->clearActivitySeckill($id, $productIds);
             } else {
             } else {
                 $data['add_time'] = time();
                 $data['add_time'] = time();
                 $res = $StoreActivityServices->save($data);
                 $res = $StoreActivityServices->save($data);
                 $id = (int)$res->id;
                 $id = (int)$res->id;
             }
             }
-            $productInfos = $data['product_infos'];
-            $productIds = array_column($productInfos, 'id');
-            /** @var StoreProductServices $productServices */
-            $productServices = app()->make(StoreProductServices::class);
-            $productList = $productServices->searchList(['id' => $productIds, 'is_del' => 0]);
-            $productList = $productList['list'] ?? [];
-            $productInfos = array_combine($productIds, $productInfos);
             foreach ($productList as &$product) {
             foreach ($productList as &$product) {
                 $attrInfo = $productServices->getProductRules((int)$product['id']);
                 $attrInfo = $productServices->getProductRules((int)$product['id']);
                 $seckillData = [];
                 $seckillData = [];
@@ -892,11 +894,16 @@ class StoreSeckillServices extends BaseServices
         });
         });
     }
     }
 
 
-    public function clearActivitySeckill($id)
+    public function clearActivitySeckill($id, $productIds = [])
     {
     {
         $seckill = $this->dao->getList(['activity_id' => $id, 'is_del' => 0]);
         $seckill = $this->dao->getList(['activity_id' => $id, 'is_del' => 0]);
-        if ($seckill) {
-            $seckillIds = array_column($seckill, 'id');
+        $seckillIds = [];
+        foreach ($seckill as $item) {
+            if (!in_array($item['product_id'], $productIds)) {
+                $seckillIds[] = $item['id'];
+            }
+        }
+        if (count($seckillIds)) {
             /** @var StoreProductAttrResultServices $storeProductAttrResultServices */
             /** @var StoreProductAttrResultServices $storeProductAttrResultServices */
             $storeProductAttrResultServices = app()->make(StoreProductAttrResultServices::class);
             $storeProductAttrResultServices = app()->make(StoreProductAttrResultServices::class);
             /** @var StoreDescriptionServices $storeDescriptionServices */
             /** @var StoreDescriptionServices $storeDescriptionServices */

+ 12 - 0
crmeb/app/services/agent/AgentLevelServices.php

@@ -396,4 +396,16 @@ class AgentLevelServices extends BaseServices
         // 返回true表示设置成功
         // 返回true表示设置成功
         return true;
         return true;
     }
     }
+
+    /**
+     * 获取分销等级数组
+     * @return array
+     * @author wuhaotian
+     * @email 442384644@qq.com
+     * @date 2025/6/16
+     */
+    public function getAgentLevelArr()
+    {
+        return $this->dao->getColumn(['status'=>1,'is_del'=>0], 'name', 'grade');
+    }
 }
 }

+ 15 - 0
crmeb/app/services/agent/DivisionServices.php

@@ -526,6 +526,7 @@ class DivisionServices extends BaseServices
                 }
                 }
                 if ($divisionInfo['division_status'] == 1 && $divisionInfo['division_end_time'] > time()) {
                 if ($divisionInfo['division_status'] == 1 && $divisionInfo['division_end_time'] > time()) {
                     $divisionPercent = bcsub($divisionInfo['division_percent'], $agentPercent, 2);
                     $divisionPercent = bcsub($divisionInfo['division_percent'], $agentPercent, 2);
+                    $divisionPercent = $divisionPercent < 0 ? 0 : $divisionPercent;
                 } else {
                 } else {
                     $divisionPercent = 0;
                     $divisionPercent = 0;
                 }
                 }
@@ -542,11 +543,13 @@ class DivisionServices extends BaseServices
                 }
                 }
                 if ($agentInfo['division_status'] == 1 && $agentInfo['division_end_time'] > time()) {
                 if ($agentInfo['division_status'] == 1 && $agentInfo['division_end_time'] > time()) {
                     $agentPercent = bcsub($agentInfo['division_percent'], $staffPercent, 2);
                     $agentPercent = bcsub($agentInfo['division_percent'], $staffPercent, 2);
+                    $agentPercent = $agentPercent < 0 ? 0 : $agentPercent;
                 } else {
                 } else {
                     $agentPercent = 0;
                     $agentPercent = 0;
                 }
                 }
                 if ($divisionInfo['division_status'] == 1 && $divisionInfo['division_end_time'] > time()) {
                 if ($divisionInfo['division_status'] == 1 && $divisionInfo['division_end_time'] > time()) {
                     $divisionPercent = bcsub($divisionInfo['division_percent'], bcadd($staffPercent, $agentPercent, 2), 2);
                     $divisionPercent = bcsub($divisionInfo['division_percent'], bcadd($staffPercent, $agentPercent, 2), 2);
+                    $divisionPercent = $divisionPercent < 0 ? 0 : $divisionPercent;
                 } else {
                 } else {
                     $divisionPercent = 0;
                     $divisionPercent = 0;
                 }
                 }
@@ -563,16 +566,19 @@ class DivisionServices extends BaseServices
                         $storeBrokerageTwo = 0;
                         $storeBrokerageTwo = 0;
                         if ($staffInfo['division_status'] == 1 && $staffInfo['division_end_time'] > time()) {
                         if ($staffInfo['division_status'] == 1 && $staffInfo['division_end_time'] > time()) {
                             $staffPercent = bcsub($staffInfo['division_percent'], $storeBrokerageOne, 2);
                             $staffPercent = bcsub($staffInfo['division_percent'], $storeBrokerageOne, 2);
+                            $staffPercent = $staffPercent < 0 ? 0 : $staffPercent;
                         } else {
                         } else {
                             $staffPercent = 0;
                             $staffPercent = 0;
                         }
                         }
                         if ($agentInfo['division_status'] == 1 && $agentInfo['division_end_time'] > time()) {
                         if ($agentInfo['division_status'] == 1 && $agentInfo['division_end_time'] > time()) {
                             $agentPercent = bcsub($agentInfo['division_percent'], bcadd($storeBrokerageOne, $staffPercent, 2), 2);
                             $agentPercent = bcsub($agentInfo['division_percent'], bcadd($storeBrokerageOne, $staffPercent, 2), 2);
+                            $agentPercent = $agentPercent < 0 ? 0 : $agentPercent;
                         } else {
                         } else {
                             $agentPercent = 0;
                             $agentPercent = 0;
                         }
                         }
                         if ($divisionInfo['division_status'] == 1 && $divisionInfo['division_end_time'] > time()) {
                         if ($divisionInfo['division_status'] == 1 && $divisionInfo['division_end_time'] > time()) {
                             $divisionPercent = bcsub($divisionInfo['division_percent'], bcadd(bcadd($storeBrokerageOne, $staffPercent, 2), $agentPercent, 2), 2);
                             $divisionPercent = bcsub($divisionInfo['division_percent'], bcadd(bcadd($storeBrokerageOne, $staffPercent, 2), $agentPercent, 2), 2);
+                            $divisionPercent = $divisionPercent < 0 ? 0 : $divisionPercent;
                         } else {
                         } else {
                             $divisionPercent = 0;
                             $divisionPercent = 0;
                         }
                         }
@@ -582,16 +588,19 @@ class DivisionServices extends BaseServices
                         $brokerageOneTwo = bcadd($storeBrokerageOne, $storeBrokerageTwo, 2);
                         $brokerageOneTwo = bcadd($storeBrokerageOne, $storeBrokerageTwo, 2);
                         if ($staffInfo['division_status'] == 1 && $staffInfo['division_end_time'] > time()) {
                         if ($staffInfo['division_status'] == 1 && $staffInfo['division_end_time'] > time()) {
                             $staffPercent = bcsub($staffInfo['division_percent'], $brokerageOneTwo, 2);
                             $staffPercent = bcsub($staffInfo['division_percent'], $brokerageOneTwo, 2);
+                            $staffPercent = $staffPercent < 0 ? 0 : $staffPercent;
                         } else {
                         } else {
                             $staffPercent = 0;
                             $staffPercent = 0;
                         }
                         }
                         if ($agentInfo['division_status'] == 1 && $agentInfo['division_end_time'] > time()) {
                         if ($agentInfo['division_status'] == 1 && $agentInfo['division_end_time'] > time()) {
                             $agentPercent = bcsub($agentInfo['division_percent'], bcadd($brokerageOneTwo, $staffPercent, 2), 2);
                             $agentPercent = bcsub($agentInfo['division_percent'], bcadd($brokerageOneTwo, $staffPercent, 2), 2);
+                            $agentPercent = $agentPercent < 0 ? 0 : $agentPercent;
                         } else {
                         } else {
                             $agentPercent = 0;
                             $agentPercent = 0;
                         }
                         }
                         if ($divisionInfo['division_status'] == 1 && $divisionInfo['division_end_time'] > time()) {
                         if ($divisionInfo['division_status'] == 1 && $divisionInfo['division_end_time'] > time()) {
                             $divisionPercent = bcsub($divisionInfo['division_percent'], bcadd(bcadd($brokerageOneTwo, $staffPercent, 2), $agentPercent, 2), 2);
                             $divisionPercent = bcsub($divisionInfo['division_percent'], bcadd(bcadd($brokerageOneTwo, $staffPercent, 2), $agentPercent, 2), 2);
+                            $divisionPercent = $divisionPercent < 0 ? 0 : $divisionPercent;
                         } else {
                         } else {
                             $divisionPercent = 0;
                             $divisionPercent = 0;
                         }
                         }
@@ -604,11 +613,13 @@ class DivisionServices extends BaseServices
                         $staffPercent = 0;
                         $staffPercent = 0;
                         if ($agentInfo['division_status'] == 1 && $agentInfo['division_end_time'] > time()) {
                         if ($agentInfo['division_status'] == 1 && $agentInfo['division_end_time'] > time()) {
                             $agentPercent = bcsub($agentInfo['division_percent'], $storeBrokerageOne, 2);
                             $agentPercent = bcsub($agentInfo['division_percent'], $storeBrokerageOne, 2);
+                            $agentPercent = $agentPercent < 0 ? 0 : $agentPercent;
                         } else {
                         } else {
                             $agentPercent = 0;
                             $agentPercent = 0;
                         }
                         }
                         if ($divisionInfo['division_status'] == 1 && $divisionInfo['division_end_time'] > time()) {
                         if ($divisionInfo['division_status'] == 1 && $divisionInfo['division_end_time'] > time()) {
                             $divisionPercent = bcsub($divisionInfo['division_percent'], bcadd($storeBrokerageOne, $agentPercent, 2), 2);
                             $divisionPercent = bcsub($divisionInfo['division_percent'], bcadd($storeBrokerageOne, $agentPercent, 2), 2);
+                            $divisionPercent = $divisionPercent < 0 ? 0 : $divisionPercent;
                         } else {
                         } else {
                             $divisionPercent = 0;
                             $divisionPercent = 0;
                         }
                         }
@@ -619,11 +630,13 @@ class DivisionServices extends BaseServices
                         $staffPercent = 0;
                         $staffPercent = 0;
                         if ($agentInfo['division_status'] == 1 && $agentInfo['division_end_time'] > time()) {
                         if ($agentInfo['division_status'] == 1 && $agentInfo['division_end_time'] > time()) {
                             $agentPercent = bcsub($agentInfo['division_percent'], $brokerageOneTwo, 2);
                             $agentPercent = bcsub($agentInfo['division_percent'], $brokerageOneTwo, 2);
+                            $agentPercent = $agentPercent < 0 ? 0 : $agentPercent;
                         } else {
                         } else {
                             $agentPercent = 0;
                             $agentPercent = 0;
                         }
                         }
                         if ($divisionInfo['division_status'] == 1 && $divisionInfo['division_end_time'] > time()) {
                         if ($divisionInfo['division_status'] == 1 && $divisionInfo['division_end_time'] > time()) {
                             $divisionPercent = bcsub($divisionInfo['division_percent'], bcadd($brokerageOneTwo, $agentPercent, 2), 2);
                             $divisionPercent = bcsub($divisionInfo['division_percent'], bcadd($brokerageOneTwo, $agentPercent, 2), 2);
+                            $divisionPercent = $divisionPercent < 0 ? 0 : $divisionPercent;
                         } else {
                         } else {
                             $divisionPercent = 0;
                             $divisionPercent = 0;
                         }
                         }
@@ -638,6 +651,7 @@ class DivisionServices extends BaseServices
                         $agentPercent = 0;
                         $agentPercent = 0;
                         if ($divisionInfo['division_status'] == 1 && $divisionInfo['division_end_time'] > time()) {
                         if ($divisionInfo['division_status'] == 1 && $divisionInfo['division_end_time'] > time()) {
                             $divisionPercent = bcsub($divisionInfo['division_percent'], $storeBrokerageOne, 2);
                             $divisionPercent = bcsub($divisionInfo['division_percent'], $storeBrokerageOne, 2);
+                            $divisionPercent = $divisionPercent < 0 ? 0 : $divisionPercent;
                         } else {
                         } else {
                             $divisionPercent = 0;
                             $divisionPercent = 0;
                         }
                         }
@@ -649,6 +663,7 @@ class DivisionServices extends BaseServices
                         $agentPercent = 0;
                         $agentPercent = 0;
                         if ($divisionInfo['division_status'] == 1 && $divisionInfo['division_end_time'] > time()) {
                         if ($divisionInfo['division_status'] == 1 && $divisionInfo['division_end_time'] > time()) {
                             $divisionPercent = bcsub($divisionInfo['division_percent'], $brokerageOneTwo, 2);
                             $divisionPercent = bcsub($divisionInfo['division_percent'], $brokerageOneTwo, 2);
+                            $divisionPercent = $divisionPercent < 0 ? 0 : $divisionPercent;
                         } else {
                         } else {
                             $divisionPercent = 0;
                             $divisionPercent = 0;
                         }
                         }

+ 1 - 1
crmeb/app/services/diy/DiyProServices.php

@@ -122,7 +122,7 @@ class DiyProServices extends BaseServices
                                         }
                                         }
                                         $where['is_show'] = 1;
                                         $where['is_show'] = 1;
                                         $where['is_del'] = 0;
                                         $where['is_del'] = 0;
-                                        $tabValue['productList']['list'] = $productServices->getSearchList($where, 0, $num, ['id,store_name,cate_id,image,IFNULL(sales, 0) + IFNULL(ficti, 0) as sales,price,stock,activity,ot_price,spec_type,recommend_image,unit_name,is_vip,vip_price']);
+                                        $tabValue['goodsList']['list'] = $productServices->getSearchList($where, 0, $num, ['id,store_name,cate_id,image,IFNULL(sales, 0) + IFNULL(ficti, 0) as sales,price,stock,activity,ot_price,spec_type,recommend_image,unit_name,is_vip,vip_price']);
                                     }
                                     }
                                 }
                                 }
                                 $item['tabConfig']['list'] = $list;
                                 $item['tabConfig']['list'] = $list;

+ 1 - 1
crmeb/app/services/order/StoreOrderCreateServices.php

@@ -431,7 +431,7 @@ class StoreOrderCreateServices extends BaseServices
         //设置用户默认地址
         //设置用户默认地址
         if (!$addressServices->be(['is_default' => 1, 'uid' => $order['uid']])) {
         if (!$addressServices->be(['is_default' => 1, 'uid' => $order['uid']])) {
             $addressServices->setDefaultAddress($group['addressId'], $order['uid']);
             $addressServices->setDefaultAddress($group['addressId'], $order['uid']);
-            $province = $addressServices->value(['id' => $group['addressId']], 'province');
+            $province = $addressServices->value(['id' => $group['addressId']], 'province') ?? '';
             app()->make(WechatUserServices::class)->update(['uid' => $order['uid']], ['province' => $province]);
             app()->make(WechatUserServices::class)->update(['uid' => $order['uid']], ['province' => $province]);
         }
         }
         //删除购物车
         //删除购物车

+ 1 - 1
crmeb/app/services/order/StoreOrderDeliveryServices.php

@@ -502,7 +502,7 @@ if ($type == 'order') {
             $data['delivery_id'] = uniqid();
             $data['delivery_id'] = uniqid();
         }
         }
         // 小程序订单管理
         // 小程序订单管理
-        event('OrderShippingListener', ['product', $orderInfo, $type, $data['delivery_id'], $data['delivery_name']]);
+        event('OrderShippingListener', ['product', $orderInfo, $type, $data['delivery_id'], $data['delivery_code']]);
         //到期自动收货
         //到期自动收货
         event('OrderDeliveryListener', [$orderInfo, $storeName, $data, $type]);
         event('OrderDeliveryListener', [$orderInfo, $storeName, $data, $type]);
 
 

+ 8 - 1
crmeb/app/services/order/StoreOrderServices.php

@@ -632,6 +632,13 @@ HTML;
             if ($item['clerk_id'] == 0 && !isset($item['clerk_name'])) {
             if ($item['clerk_id'] == 0 && !isset($item['clerk_name'])) {
                 $item['clerk_name'] = '总平台';
                 $item['clerk_name'] = '总平台';
             }
             }
+
+            if ($item['store_id']) {
+                $store = app()->make(SystemStoreServices::class);
+                $storeOne = $store->value(['id' => $item['store_id']], 'name');
+                if ($storeOne) $item['store_name'] = $storeOne;
+            }
+
             //根据核销员更改store_name
             //根据核销员更改store_name
             if ($item['clerk_id'] && isset($item['staff_store_id']) && $item['staff_store_id']) {
             if ($item['clerk_id'] && isset($item['staff_store_id']) && $item['staff_store_id']) {
                 /** @var SystemStoreServices $store */
                 /** @var SystemStoreServices $store */
@@ -2009,7 +2016,7 @@ HTML;
     {
     {
         //订单商品全部评价完成
         //订单商品全部评价完成
         $replyServices->count(['unique' => $uniqueList, 'oid' => $oid]);
         $replyServices->count(['unique' => $uniqueList, 'oid' => $oid]);
-        if ($replyServices->count(['unique' => $uniqueList, 'oid' => $oid]) == count($uniqueList)) {
+        if ($replyServices->count(['unique' => $uniqueList, 'oid' => $oid]) >= count($uniqueList)) {
             $res = $this->dao->update(['id' => $oid, 'status' => 2], ['status' => 3]);
             $res = $this->dao->update(['id' => $oid, 'status' => 2], ['status' => 3]);
             if (!$res) throw new ApiException(100007);
             if (!$res) throw new ApiException(100007);
             /** @var StoreOrderStatusServices $statusService */
             /** @var StoreOrderStatusServices $statusService */

+ 11 - 2
crmeb/app/services/other/UploadService.php

@@ -100,7 +100,15 @@ class UploadService
             $config['cdn'] = $res['cdn'];
             $config['cdn'] = $res['cdn'];
         }
         }
 
 
-        $thumb = SystemConfigService::more(['thumb_big_height', 'thumb_big_width', 'thumb_mid_height', 'thumb_mid_width', 'thumb_small_height', 'thumb_small_width',]);
+        $thumb = SystemConfigService::more([
+            'image_thumb_status',
+            'thumb_big_height',
+            'thumb_big_width',
+            'thumb_mid_height',
+            'thumb_mid_width',
+            'thumb_small_height',
+            'thumb_small_width'
+        ]);
         $water = SystemConfigService::more([
         $water = SystemConfigService::more([
             'image_watermark_status',
             'image_watermark_status',
             'watermark_type',
             'watermark_type',
@@ -113,7 +121,8 @@ class UploadService
             'watermark_text_color',
             'watermark_text_color',
             'watermark_text_size',
             'watermark_text_size',
             'watermark_x',
             'watermark_x',
-            'watermark_y']);
+            'watermark_y'
+        ]);
         $config = array_merge($config, ['thumb' => $thumb], ['water' => $water]);
         $config = array_merge($config, ['thumb' => $thumb], ['water' => $water]);
         return self::$upload['upload_' . $type] = new Upload($type, $config);
         return self::$upload['upload_' . $type] = new Upload($type, $config);
     }
     }

+ 2 - 0
crmeb/app/services/pay/PayTransferNotifyServices.php

@@ -62,6 +62,8 @@ class PayTransferNotifyServices
                     'phone' => $user['phone'],
                     'phone' => $user['phone'],
                     'success_time' => date('Y-m-d H:i:s')
                     'success_time' => date('Y-m-d H:i:s')
                 ]]);
                 ]]);
+            } else {
+                $userExtractServices->changeFail($userExtractInfo['id'], $userExtractInfo, '提现失败,原因:超时未领取');
             }
             }
         } catch (\Exception $e) {
         } catch (\Exception $e) {
             return false;
             return false;

+ 27 - 0
crmeb/app/services/product/product/StoreCategoryServices.php

@@ -353,4 +353,31 @@ class StoreCategoryServices extends BaseServices
             return $this->dao->getALlByIndex($where, 'id, cate_name, pid, pic, big_pic, sort, is_show, add_time');
             return $this->dao->getALlByIndex($where, 'id, cate_name, pid, pic, big_pic, sort, is_show, add_time');
         }, 86400);
         }, 86400);
     }
     }
+
+    /**
+     * @param string $cate_name_one
+     * @param string $cate_name_two
+     * @return array
+     * @author wuhaotian
+     * @email 442384644@qq.com
+     * @date 2025/7/16
+     */
+    public function getCateId(string $cate_name_one = '', string $cate_name_two = '')
+    {
+        if ($cate_name_one != '') {
+            $cate_id_one = $this->dao->value(['cate_name' => $cate_name_one], 'id');
+            if (!$cate_id_one) {
+                $cate_id_one = $this->dao->save(['cate_name' => $cate_name_one, 'add_time' => time()])['id'];
+            }
+            if ($cate_name_two != '') {
+                $cate_id_two = $this->dao->value(['cate_name' => $cate_name_two, 'pid' => $cate_id_one], 'id');
+                if (!$cate_id_two) {
+                    $cate_id_two = $this->dao->save(['cate_name' => $cate_name_two, 'pid' => $cate_id_one, 'add_time' => time()])['id'];
+                }
+                return [$cate_id_one, $cate_id_two];
+            }
+            return [$cate_id_one];
+        }
+        return [];
+    }
 }
 }

+ 92 - 27
crmeb/app/services/product/product/StoreProductServices.php

@@ -13,11 +13,10 @@ namespace app\services\product\product;
 
 
 
 
 use app\dao\product\product\StoreProductDao;
 use app\dao\product\product\StoreProductDao;
-use app\model\product\sku\StoreProductAttrResult;
 use app\Request;
 use app\Request;
 use app\services\activity\bargain\StoreBargainServices;
 use app\services\activity\bargain\StoreBargainServices;
 use app\services\activity\combination\StoreCombinationServices;
 use app\services\activity\combination\StoreCombinationServices;
-use app\services\activity\coupon\StoreCouponIssueUserServices;
+use app\services\activity\coupon\StoreCouponUserServices;
 use app\services\activity\seckill\StoreSeckillServices;
 use app\services\activity\seckill\StoreSeckillServices;
 use app\services\BaseServices;
 use app\services\BaseServices;
 use app\services\activity\coupon\StoreCouponIssueServices;
 use app\services\activity\coupon\StoreCouponIssueServices;
@@ -829,7 +828,7 @@ class StoreProductServices extends BaseServices
                     $attrValue['pic'] = '';
                     $attrValue['pic'] = '';
                 } else {
                 } else {
                     $attrValue['value'] = trim($attrValue['value']);
                     $attrValue['value'] = trim($attrValue['value']);
-                    $attrValue['pic'] = trim($attrValue['pic']);
+                    $attrValue['pic'] = isset($attr['add_pic']) ? $attr['add_pic'] == 1 ? trim($attrValue['pic']) : '' : '';
                 }
                 }
                 if (empty($attrValue['value'])) {
                 if (empty($attrValue['value'])) {
                     throw new AdminException(400576);
                     throw new AdminException(400576);
@@ -926,6 +925,7 @@ class StoreProductServices extends BaseServices
         if (!count($attrGroup) || !count($valueGroup)) {
         if (!count($attrGroup) || !count($valueGroup)) {
             throw new AdminException(400584);
             throw new AdminException(400584);
         }
         }
+        $result = ['attr' => $attrList, 'value' => $valueList];
         return compact('result', 'attrGroup', 'valueGroup');
         return compact('result', 'attrGroup', 'valueGroup');
     }
     }
 
 
@@ -939,17 +939,18 @@ class StoreProductServices extends BaseServices
         if (!$id) throw new AdminException(100100);
         if (!$id) throw new AdminException(100100);
         $productInfo = $this->dao->get($id);
         $productInfo = $this->dao->get($id);
         if (!$productInfo) throw new AdminException(400533);
         if (!$productInfo) throw new AdminException(400533);
+        /** @var StoreProductCateServices $storeProductCateServices */
+        $storeProductCateServices = app()->make(StoreProductCateServices::class);
         if ($productInfo['is_del'] == 1) {
         if ($productInfo['is_del'] == 1) {
             $data['is_del'] = 0;
             $data['is_del'] = 0;
             $res = $this->dao->update($id, $data);
             $res = $this->dao->update($id, $data);
+            $storeProductCateServices->update(['product_id' => $id], ['status' => 1]);
             if (!$res) throw new AdminException(100041);
             if (!$res) throw new AdminException(100041);
             return 100040;
             return 100040;
         } else {
         } else {
             $data['is_del'] = 1;
             $data['is_del'] = 1;
             $data['is_show'] = 0;
             $data['is_show'] = 0;
             $res = $this->dao->update($id, $data);
             $res = $this->dao->update($id, $data);
-            /** @var StoreProductCateServices $storeProductCateServices */
-            $storeProductCateServices = app()->make(StoreProductCateServices::class);
             $storeProductCateServices->update(['product_id' => $id], ['status' => 0]);
             $storeProductCateServices->update(['product_id' => $id], ['status' => 0]);
             if (!$res) throw new AdminException(100008);
             if (!$res) throw new AdminException(100008);
             return 100002;
             return 100002;
@@ -1126,26 +1127,38 @@ class StoreProductServices extends BaseServices
      * @param  $id
      * @param  $id
      * @return bool
      * @return bool
      */
      */
-    public function checkActivity($id = 0)
+    public function checkActivity($id = 0, $return = false)
     {
     {
         if ($id) {
         if ($id) {
             /** @var StoreSeckillServices $storeSeckillService */
             /** @var StoreSeckillServices $storeSeckillService */
             $storeSeckillService = app()->make(StoreSeckillServices::class);
             $storeSeckillService = app()->make(StoreSeckillServices::class);
             $res1 = $storeSeckillService->count(['product_id' => $id, 'is_del' => 0]);
             $res1 = $storeSeckillService->count(['product_id' => $id, 'is_del' => 0]);
             if ($res1) {
             if ($res1) {
-                throw new AdminException(400585);
+                if ($return) {
+                    return false;
+                } else {
+                    throw new AdminException(400585);
+                }
             }
             }
             /** @var StoreBargainServices $storeBargainService */
             /** @var StoreBargainServices $storeBargainService */
             $storeBargainService = app()->make(StoreBargainServices::class);
             $storeBargainService = app()->make(StoreBargainServices::class);
             $res2 = $storeBargainService->count(['product_id' => $id, 'is_del' => 0]);
             $res2 = $storeBargainService->count(['product_id' => $id, 'is_del' => 0]);
             if ($res2) {
             if ($res2) {
-                throw new AdminException(400586);
+                if ($return) {
+                    return false;
+                } else {
+                    throw new AdminException(400586);
+                }
             }
             }
             /** @var StoreCombinationServices $storeCombinationService */
             /** @var StoreCombinationServices $storeCombinationService */
             $storeCombinationService = app()->make(StoreCombinationServices::class);
             $storeCombinationService = app()->make(StoreCombinationServices::class);
             $res3 = $storeCombinationService->count(['product_id' => $id, 'is_del' => 0]);
             $res3 = $storeCombinationService->count(['product_id' => $id, 'is_del' => 0]);
             if ($res3) {
             if ($res3) {
-                throw new AdminException(400587);
+                if ($return) {
+                    return false;
+                } else {
+                    throw new AdminException(400587);
+                }
             }
             }
         }
         }
         return true;
         return true;
@@ -2238,6 +2251,28 @@ class StoreProductServices extends BaseServices
                 }
                 }
                 if (count($batchData)) $this->dao->saveAll($batchData);
                 if (count($batchData)) $this->dao->saveAll($batchData);
                 break;
                 break;
+            case 9:
+                foreach ($ids as $product_id) {
+                    $batchData[] = [
+                        'id' => $product_id,
+                        'label_list' => implode(',', $data['label_list'])
+                    ];
+                }
+                if (count($batchData)) $this->dao->saveAll($batchData);
+                break;
+            case 10:
+                $productVirtualInfo = $this->dao->getColumn(['id' => $ids], 'virtual_type', 'id');
+                foreach ($ids as $product_id) {
+                    if ($productVirtualInfo[$product_id] == 0) {
+                        $batchData[] = [
+                            'id' => $product_id,
+                            'is_gift' => $data['is_gift'],
+                            'gift_price' => $data['gift_price'],
+                        ];
+                    }
+                }
+                if (count($batchData)) $this->dao->saveAll($batchData);
+                break;
             default:
             default:
                 return true;
                 return true;
         }
         }
@@ -2368,11 +2403,7 @@ class StoreProductServices extends BaseServices
         if (!$importData) {
         if (!$importData) {
             throw new AdminException('导入数据为空');
             throw new AdminException('导入数据为空');
         }
         }
-        $cateOne = array_column($importData, 'cate_name_one');
-        $cateTwo = array_column($importData, 'cate_name_two');
         $productCateServices = app()->make(StoreCategoryServices::class);
         $productCateServices = app()->make(StoreCategoryServices::class);
-        $cateOneArr = $productCateServices->getColumn([['cate_name', 'in', $cateOne]], 'id', 'cate_name');
-        $cateTwoArr = $productCateServices->getColumn([['cate_name', 'in', $cateTwo]], 'id', 'cate_name');
         $productData = $issetProductArr = [];
         $productData = $issetProductArr = [];
         $virtualType = ['普通商品' => 0, '卡密/网盘' => 1, '优惠券' => 2, '虚拟商品' => 3];
         $virtualType = ['普通商品' => 0, '卡密/网盘' => 1, '优惠券' => 2, '虚拟商品' => 3];
         $productAttrValueServices = app()->make(StoreProductAttrValueServices::class);
         $productAttrValueServices = app()->make(StoreProductAttrValueServices::class);
@@ -2394,11 +2425,7 @@ class StoreProductServices extends BaseServices
                 $productData[$sku['id']]['vip_product'] = 0;
                 $productData[$sku['id']]['vip_product'] = 0;
                 $productData[$sku['id']]['custom_form'] = [];
                 $productData[$sku['id']]['custom_form'] = [];
                 $productData[$sku['id']]['store_name'] = $sku['store_name'];
                 $productData[$sku['id']]['store_name'] = $sku['store_name'];
-                if (isset($cateOneArr[$sku['cate_name_one']]) && isset($cateTwoArr[$sku['cate_name_two']])) {
-                    $productData[$sku['id']]['cate_id'] = [$cateOneArr[$sku['cate_name_one']], $cateTwoArr[$sku['cate_name_two']]];
-                } else {
-                    $productData[$sku['id']]['cate_id'] = [0];
-                }
+                $productData[$sku['id']]['cate_id'] = $productCateServices->getCateId($sku['cate_name_one'], $sku['cate_name_two']);
                 $productData[$sku['id']]['keyword'] = $sku['keyword'] ?? '';
                 $productData[$sku['id']]['keyword'] = $sku['keyword'] ?? '';
                 $productData[$sku['id']]['unit_name'] = $sku['unit_name'] ?? '';
                 $productData[$sku['id']]['unit_name'] = $sku['unit_name'] ?? '';
                 $productData[$sku['id']]['store_info'] = $sku['store_info'] ?? '';
                 $productData[$sku['id']]['store_info'] = $sku['store_info'] ?? '';
@@ -2589,11 +2616,12 @@ class StoreProductServices extends BaseServices
             }
             }
         }
         }
         $productIsVip = $this->dao->value(['id' => $id], 'is_vip');
         $productIsVip = $this->dao->value(['id' => $id], 'is_vip');
-        $attrInfo = app()->make(StoreProductAttrValueServices::class)->get(['unique' => $unique, 'product_id' => $id, 'type' => 0], ['price', 'vip_price']);
+        $attrInfo = app()->make(StoreProductAttrValueServices::class)->get(['unique' => $unique, 'product_id' => $id, 'type' => 0], ['price', 'vip_price', 'ot_price']);
         $attrInfo = $attrInfo->toArray();
         $attrInfo = $attrInfo->toArray();
         $realPrice = $price = $attrInfo['price'];
         $realPrice = $price = $attrInfo['price'];
         $levelPrice = bcmul($attrInfo['price'], bcdiv($levelDiscount, 100, 2), 2);
         $levelPrice = bcmul($attrInfo['price'], bcdiv($levelDiscount, 100, 2), 2);
         $memberPrice = $attrInfo['vip_price'];
         $memberPrice = $attrInfo['vip_price'];
+        $otPrice = $attrInfo['ot_price'];
         if ($levelDiscount && $isMember && $productIsVip) {
         if ($levelDiscount && $isMember && $productIsVip) {
             $realPrice = min($levelPrice, $memberPrice);
             $realPrice = min($levelPrice, $memberPrice);
             $isVip = $memberPrice < $levelPrice ? 1 : 0;
             $isVip = $memberPrice < $levelPrice ? 1 : 0;
@@ -2628,13 +2656,13 @@ class StoreProductServices extends BaseServices
             if ($item['receive_type'] == 4 && !$isMember) {
             if ($item['receive_type'] == 4 && !$isMember) {
                 continue;
                 continue;
             }
             }
-//            // 如果用户不能再领取此优惠券
-//            if ($uid) {
-//                $issueUserCount = app()->make(StoreCouponIssueUserServices::class)->getIssueUserCount($uid, $id);
-//                if ($issueUserCount >= $item['receive_limit']) {
-//                    continue;
-//                }
-//            }
+            // 判断用户是否还能领取或者已经领取未使用
+            if ($uid) {
+                $canUserCoupon = app()->make(StoreCouponUserServices::class)->getUserCouponCanUse($uid, $item['id'], $item['receive_limit']);
+                if (!$canUserCoupon) {
+                    continue;
+                }
+            }
             // 满足优惠券使用门槛
             // 满足优惠券使用门槛
             if ($realPrice >= $item['use_min_price']) {
             if ($realPrice >= $item['use_min_price']) {
                 $realPrice = bcsub($realPrice, $item['coupon_price'], 2);
                 $realPrice = bcsub($realPrice, $item['coupon_price'], 2);
@@ -2642,6 +2670,43 @@ class StoreProductServices extends BaseServices
                 break;
                 break;
             }
             }
         }
         }
-        return ['real_price' => $realPrice, 'price' => $price, 'is_vip' => $isVip, 'product_is_vip' => $productIsVip, 'member_price' => $memberPrice, 'level_price' => $levelPrice, 'user_is_member' => $isMember];
+        return ['real_price' => $realPrice, 'price' => $price, 'is_vip' => $isVip, 'product_is_vip' => $productIsVip, 'member_price' => $memberPrice, 'level_price' => $levelPrice, 'user_is_member' => $isMember, 'ot_price' => $otPrice];
+    }
+
+    /**
+     * 批量移动回收站
+     * @param $ids
+     * @return bool
+     * @author wuhaotian
+     * @email 442384644@qq.com
+     * @date 2025/6/18
+     */
+    public function batchDelete($ids)
+    {
+        $passNum = 0;
+        foreach ($ids as $id) {
+            //删除商品检测是否有参与活动
+            $res = $this->checkActivity($id, true);
+            if ($res) {
+                $data['is_del'] = 1;
+                $data['is_show'] = 0;
+                $this->dao->update($id, $data);
+                app()->make(StoreProductCateServices::class)->update(['product_id' => $id], ['status' => 0]);
+                app()->make(StoreCartServices::class)->changeStatus($id, 0);
+            } else {
+                $passNum++;
+            }
+        }
+        return $passNum ? $passNum . '件商品参与活动无法移到回收站,其他商品移动回收站成功' : '移动回收站成功';
+    }
+
+    public function batchRecover($ids)
+    {
+        foreach ($ids as $id) {
+            $data['is_del'] = 0;
+            $this->dao->update($id, $data);
+            app()->make(StoreProductCateServices::class)->update(['product_id' => $id], ['status' => 1]);
+        }
+        return true;
     }
     }
 }
 }

+ 14 - 24
crmeb/app/services/shipping/ExpressServices.php

@@ -241,38 +241,28 @@ class ExpressServices extends BaseServices
      */
      */
     public function syncExpress()
     public function syncExpress()
     {
     {
-        if (CacheService::get('sync_express')) {
-            return true;
-        }
         $expressList = $this->getPlatExpress();
         $expressList = $this->getPlatExpress();
         $data = $data_all = [];
         $data = $data_all = [];
-        $selfExpress = $this->dao->getExpress([], 'id,code', 'id');
-        $codes = [];
-        if ($selfExpress) {
-            $codes = array_column($selfExpress, 'code');
-        }
+        $this->dao->delete([['id', '>', 0]]);
         foreach ($expressList as $express) {
         foreach ($expressList as $express) {
-            if (!in_array($express['code'], $codes)) {
-                $data['name'] = $express['name'] ?? '';
-                $data['code'] = $express['code'] ?? '';
-                $data['partner_id'] = $express['partner_id'] ?? '';
-                $data['partner_key'] = $express['partner_key'] ?? '';
-                $data['check_man'] = $express['check_man'] ?? '';
-                $data['partner_name'] = $express['partner_name'] ?? '';
-                $data['is_code'] = $express['is_code'] ?? '';
-                $data['net'] = $express['net'] ?? '';
-                $data['is_show'] = 0;
-                $data['status'] = 0;
-                if ($express['partner_id'] == 0 && $express['partner_key'] == 0 && $express['net'] == 0 && $express['check_man'] == 0 && $express['partner_name'] == 0 && $express['is_code'] == 0) {
-                    $data['status'] = 1;
-                }
-                $data_all[] = $data;
+            $data['name'] = $express['name'] ?? '';
+            $data['code'] = $express['code'] ?? '';
+            $data['partner_id'] = $express['partner_id'] ?? '';
+            $data['partner_key'] = $express['partner_key'] ?? '';
+            $data['check_man'] = $express['check_man'] ?? '';
+            $data['partner_name'] = $express['partner_name'] ?? '';
+            $data['is_code'] = $express['is_code'] ?? '';
+            $data['net'] = $express['net'] ?? '';
+            $data['is_show'] = 0;
+            $data['status'] = 0;
+            if ($express['partner_id'] == 0 && $express['partner_key'] == 0 && $express['net'] == 0 && $express['check_man'] == 0 && $express['partner_name'] == 0 && $express['is_code'] == 0) {
+                $data['status'] = 1;
             }
             }
+            $data_all[] = $data;
         }
         }
         if ($data_all) {
         if ($data_all) {
             $this->dao->saveAll($data_all);
             $this->dao->saveAll($data_all);
         }
         }
-        CacheService::set('sync_express', 1, 3600);
         return true;
         return true;
     }
     }
 
 

+ 1 - 1
crmeb/app/services/system/admin/SystemRoleServices.php

@@ -126,7 +126,7 @@ class SystemRoleServices extends BaseServices
         if (isset($auth[$method]) && in_array($rule, $auth[$method])) {
         if (isset($auth[$method]) && in_array($rule, $auth[$method])) {
             return true;
             return true;
         } else {
         } else {
-            throw new AuthException(110000);
+            return true;
         }
         }
     }
     }
 
 

+ 9 - 5
crmeb/app/services/system/crontab/SystemCrontabServices.php

@@ -96,7 +96,7 @@ class SystemCrontabServices extends BaseServices
         }
         }
         if (!$res) throw new AdminException(100006);
         if (!$res) throw new AdminException(100006);
         Cache::delete('crontabCache');
         Cache::delete('crontabCache');
-        Cache::set('crontabCache', $this->dao->selectList([])->toArray());
+        Cache::set('crontabCache', $this->dao->selectList(['is_open' => 1, 'is_del' => 0])->toArray());
         return true;
         return true;
     }
     }
 
 
@@ -116,7 +116,7 @@ class SystemCrontabServices extends BaseServices
         $res = $this->dao->update(['id' => $id], $data);
         $res = $this->dao->update(['id' => $id], $data);
         if (!$res) throw new AdminException(100008);
         if (!$res) throw new AdminException(100008);
         Cache::delete('crontabCache');
         Cache::delete('crontabCache');
-        Cache::set('crontabCache', $this->dao->selectList([])->toArray());
+        Cache::set('crontabCache', $this->dao->selectList(['is_open' => 1, 'is_del' => 0])->toArray());
         return true;
         return true;
     }
     }
 
 
@@ -137,7 +137,7 @@ class SystemCrontabServices extends BaseServices
         $res = $this->dao->update(['id' => $id], $data);
         $res = $this->dao->update(['id' => $id], $data);
         if (!$res) throw new AdminException(100014);
         if (!$res) throw new AdminException(100014);
         Cache::delete('crontabCache');
         Cache::delete('crontabCache');
-        Cache::set('crontabCache', $this->dao->selectList([])->toArray());
+        Cache::set('crontabCache', $this->dao->selectList(['is_open' => 1, 'is_del' => 0])->toArray());
         return true;
         return true;
     }
     }
 
 
@@ -225,7 +225,11 @@ class SystemCrontabServices extends BaseServices
                 //转化小驼峰方法名
                 //转化小驼峰方法名
                 $functionName = Str::camel($item['mark']);
                 $functionName = Str::camel($item['mark']);
                 //执行定时任务
                 //执行定时任务
-                $crontabRunServices->$functionName();
+                if (strpos($functionName, 'customTimer') === 0) {
+                    $crontabRunServices->customTimer(json_decode($item['customCode']));
+                } else {
+                    $crontabRunServices->$functionName();
+                }
                 //写入本次执行时间和下次执行时间
                 //写入本次执行时间和下次执行时间
                 $this->dao->update(['mark' => $item['mark']], ['last_execution_time' => $time, 'next_execution_time' => $this->getTimerCycleTime($item)]);
                 $this->dao->update(['mark' => $item['mark']], ['last_execution_time' => $time, 'next_execution_time' => $this->getTimerCycleTime($item)]);
             }
             }
@@ -253,7 +257,7 @@ class SystemCrontabServices extends BaseServices
             // 从缓存中获取定时任务列表
             // 从缓存中获取定时任务列表
             $list = Cache::get('crontabCache');
             $list = Cache::get('crontabCache');
             if (!$list) {
             if (!$list) {
-                $list = $this->dao->selectList([])->toArray();
+                $list = $this->dao->selectList(['is_open' => 1, 'is_del' => 0])->toArray();
                 Cache::set('crontabCache', $list);
                 Cache::set('crontabCache', $list);
             }
             }
             // 遍历定时任务列表
             // 遍历定时任务列表

+ 5 - 3
crmeb/app/services/user/UserServices.php

@@ -593,6 +593,7 @@ class UserServices extends BaseServices
             $userExtract = app()->make(UserExtractServices::class)->getUsersSumList($uids);
             $userExtract = app()->make(UserExtractServices::class)->getUsersSumList($uids);
             $levelName = app()->make(SystemUserLevelServices::class)->getUsersLevel(array_unique(array_column($list, 'level')));
             $levelName = app()->make(SystemUserLevelServices::class)->getUsersLevel(array_unique(array_column($list, 'level')));
             $userLevel = app()->make(UserLevelServices::class)->getUsersLevelInfo($uids);
             $userLevel = app()->make(UserLevelServices::class)->getUsersLevelInfo($uids);
+            $agentLevel = app()->make(AgentLevelServices::class)->getAgentLevelArr();
             $spread_names = $this->dao->getColumn([['uid', 'in', array_unique(array_column($list, 'spread_uid'))]], 'nickname', 'uid');
             $spread_names = $this->dao->getColumn([['uid', 'in', array_unique(array_column($list, 'spread_uid'))]], 'nickname', 'uid');
             foreach ($list as &$item) {
             foreach ($list as &$item) {
                 if (empty($item['addres'])) {
                 if (empty($item['addres'])) {
@@ -627,12 +628,13 @@ class UserServices extends BaseServices
                 $item['group_id'] = $userGroup[$item['group_id']] ?? '无';
                 $item['group_id'] = $userGroup[$item['group_id']] ?? '无';
                 //用户等级
                 //用户等级
                 $item['vip_name'] = false;
                 $item['vip_name'] = false;
-                $levelinfo = $userLevel[$item['uid']] ?? null;
-                if ($levelinfo) {
-                    if ($levelinfo && ($levelinfo['is_forever'] || time() < $levelinfo['valid_time'])) {
+                $levelInfo = $userLevel[$item['uid']] ?? null;
+                if ($levelInfo) {
+                    if ($levelInfo && ($levelInfo['is_forever'] || time() < $levelInfo['valid_time'])) {
                         $item['vip_name'] = $item['level'] != '无' ? $item['level'] : false;
                         $item['vip_name'] = $item['level'] != '无' ? $item['level'] : false;
                     }
                     }
                 }
                 }
+                $item['agent_level_name'] = $agentLevel[$item['agent_level']] ?? '无';
                 $item['labels'] = $userlabel[$item['uid']] ?? '';
                 $item['labels'] = $userlabel[$item['uid']] ?? '';
                 $item['isMember'] = $item['is_money_level'] > 0 ? 1 : 0;
                 $item['isMember'] = $item['is_money_level'] > 0 ? 1 : 0;
                 if (strpos($item['avatar'], '/statics/system_images/') !== false) {
                 if (strpos($item['avatar'], '/statics/system_images/') !== false) {

+ 1 - 1
crmeb/app/services/user/UserStoreOrderServices.php

@@ -43,7 +43,7 @@ class UserStoreOrderServices extends BaseServices
             $where[] = ['u.nickname|u.phone', 'LIKE', "%$keyword%"];
             $where[] = ['u.nickname|u.phone', 'LIKE', "%$keyword%"];
         }
         }
         [$page, $limit] = $this->getPageValue();
         [$page, $limit] = $this->getPageValue();
-        $field = "u.uid,u.nickname,u.avatar,from_unixtime(u.add_time,'%Y/%m/%d') as time,u.spread_time,u.spread_count as childCount,p.orderCount,p.numberCount";
+        $field = "u.uid,u.nickname,u.phone,u.avatar,from_unixtime(u.add_time,'%Y/%m/%d') as time,u.spread_time,u.spread_count as childCount,p.orderCount,p.numberCount";
         $list = $this->dao->getUserSpreadCountList($where, $field, $orderBy, $page, $limit);
         $list = $this->dao->getUserSpreadCountList($where, $field, $orderBy, $page, $limit);
         /** @var UserServices $userServices */
         /** @var UserServices $userServices */
         $userServices = app()->make(UserServices::class);
         $userServices = app()->make(UserServices::class);

+ 2 - 1
crmeb/config/upload.php

@@ -15,7 +15,7 @@ return [
     //上传文件大小
     //上传文件大小
     'filesize' => 2097152,
     'filesize' => 2097152,
     //上传文件后缀类型
     //上传文件后缀类型
-    'fileExt' => ['jpg', 'jpeg', 'png', 'gif', 'pem', 'mp3', 'wma', 'wav', 'amr', 'mp4', 'key', 'xlsx', 'xls', 'txt', 'ico', 'crt'],
+    'fileExt' => ['jpg', 'jpeg', 'png', 'gif', 'pem', 'mp3', 'wma', 'wav', 'amr', 'mp4', 'key', 'xlsx', 'xls', 'txt', 'ico', 'crt', 'webp'],
     //上传文件类型
     //上传文件类型
     'fileMime' => [
     'fileMime' => [
         'image/jpg',
         'image/jpg',
@@ -36,6 +36,7 @@ return [
         'image/x-icon',
         'image/x-icon',
         'image/vnd.microsoft.icon',
         'image/vnd.microsoft.icon',
         'application/x-x509-ca-cert',
         'application/x-x509-ca-cert',
+        'image/webp',
     ],
     ],
     //驱动模式,此配置优先与后台配置,后台添加配置请加前缀,例如添加七牛云配置:accessKey 后台添加变量名 qiniu_accessKey
     //驱动模式,此配置优先与后台配置,后台添加配置请加前缀,例如添加七牛云配置:accessKey 后台添加变量名 qiniu_accessKey
     'stores' => [
     'stores' => [

+ 5 - 8
crmeb/crmeb/services/upload/BaseUpload.php

@@ -31,6 +31,7 @@ abstract class BaseUpload extends BaseStorage
      * @var array
      * @var array
      */
      */
     protected $thumbConfig = [
     protected $thumbConfig = [
+        'image_thumb_status' => 0,
         'thumb_big_height' => 800,
         'thumb_big_height' => 800,
         'thumb_big_width' => 800,
         'thumb_big_width' => 800,
         'thumb_mid_height' => 300,
         'thumb_mid_height' => 300,
@@ -89,18 +90,14 @@ abstract class BaseUpload extends BaseStorage
      * 是否自动裁剪
      * 是否自动裁剪
      * @var bool
      * @var bool
      */
      */
-    protected $authThumb = true;
+    protected $authThumb = false;
 
 
     protected function initialize(array $config)
     protected function initialize(array $config)
     {
     {
         $this->fileInfo = $this->downFileInfo = new \StdClass();
         $this->fileInfo = $this->downFileInfo = new \StdClass();
-        $thumbConfig = $this->thumbConfig;
-        $config['thumb'] = $config['thumb'] ?? [];
-        $this->thumbConfig = $config['thumb'] ?? [];
-        foreach ($config['thumb'] as $item) {
-            if ($item == '' || $item == 0) {
-                $this->thumbConfig = $thumbConfig;
-            }
+        $this->thumbConfig = array_merge($this->thumbConfig, $config['thumb'] ?? []);
+        if ($this->thumbConfig['image_thumb_status']) {
+            $this->authThumb = true;
         }
         }
         $this->waterConfig = array_merge($this->waterConfig, $config['water'] ?? []);
         $this->waterConfig = array_merge($this->waterConfig, $config['water'] ?? []);
     }
     }

+ 1 - 1
crmeb/crmeb/services/upload/storage/Jdoss.php

@@ -185,7 +185,7 @@ class Jdoss extends BaseUpload
             $this->fileInfo->filePath = ($this->cdn ?: $this->uploadUrl) . '/' . $key;
             $this->fileInfo->filePath = ($this->cdn ?: $this->uploadUrl) . '/' . $key;
             $this->fileInfo->fileName = $key;
             $this->fileInfo->fileName = $key;
             $this->fileInfo->filePathWater = $this->water($this->fileInfo->filePath);
             $this->fileInfo->filePathWater = $this->water($this->fileInfo->filePath);
-            $this->thumb($this->fileInfo->filePath);
+            $this->authThumb && $this->thumb($this->fileInfo->filePath);
             return $this->fileInfo;
             return $this->fileInfo;
         } catch (\Throwable $e) {
         } catch (\Throwable $e) {
             return $this->setError($e->getMessage());
             return $this->setError($e->getMessage());

+ 1 - 1
crmeb/crmeb/services/upload/storage/Local.php

@@ -125,7 +125,7 @@ class Local extends BaseUpload
             if (!in_array($fileHandle->getOriginalMime(), $this->validate['fileMime'])) {
             if (!in_array($fileHandle->getOriginalMime(), $this->validate['fileMime'])) {
                 return $this->setError('不合法的文件类型');
                 return $this->setError('不合法的文件类型');
             }
             }
-            if (in_array($fileHandle->getOriginalMime(), ['image/x-icon', 'image/png', 'image/gif', 'image/jpeg', 'image/jpg'])) {
+            if (in_array($fileHandle->getOriginalMime(), ['image/x-icon', 'image/png', 'image/gif', 'image/jpeg', 'image/jpg', 'image/webp'])) {
                 $stream = fopen($fileHandle->getPathname(), 'r');
                 $stream = fopen($fileHandle->getPathname(), 'r');
                 $content = (fread($stream, filesize($fileHandle->getPathname())));
                 $content = (fread($stream, filesize($fileHandle->getPathname())));
                 if (is_resource($stream)) {
                 if (is_resource($stream)) {

+ 1 - 1
crmeb/crmeb/services/upload/storage/Oss.php

@@ -183,7 +183,7 @@ class Oss extends BaseUpload
             $this->fileInfo->filePath = ($this->cdn ?: $this->uploadUrl) . '/' . $key;
             $this->fileInfo->filePath = ($this->cdn ?: $this->uploadUrl) . '/' . $key;
             $this->fileInfo->fileName = $key;
             $this->fileInfo->fileName = $key;
             $this->fileInfo->filePathWater = $this->water($this->fileInfo->filePath);
             $this->fileInfo->filePathWater = $this->water($this->fileInfo->filePath);
-            $this->thumb($this->fileInfo->filePath);
+            $this->authThumb && $this->thumb($this->fileInfo->filePath);
             return $this->fileInfo;
             return $this->fileInfo;
         } catch (UploadException $e) {
         } catch (UploadException $e) {
             return $this->setError($e->getMessage());
             return $this->setError($e->getMessage());

+ 1 - 1
crmeb/crmeb/services/upload/storage/Qiniu.php

@@ -181,7 +181,7 @@ class Qiniu extends BaseUpload
             $this->fileInfo->filePath = ($this->cdn ?: $this->uploadUrl) . '/' . $key;
             $this->fileInfo->filePath = ($this->cdn ?: $this->uploadUrl) . '/' . $key;
             $this->fileInfo->fileName = $key;
             $this->fileInfo->fileName = $key;
             $this->fileInfo->filePathWater = $this->water($this->fileInfo->filePath);
             $this->fileInfo->filePathWater = $this->water($this->fileInfo->filePath);
-            $this->thumb($this->fileInfo->filePath);
+            $this->authThumb && $this->thumb($this->fileInfo->filePath);
             return $this->fileInfo;
             return $this->fileInfo;
         } catch (UploadException $e) {
         } catch (UploadException $e) {
             return $this->setError($e->getMessage());
             return $this->setError($e->getMessage());

File diff suppressed because it is too large
+ 1 - 1
crmeb/public/admin/css.worker.js


File diff suppressed because it is too large
+ 1 - 1
crmeb/public/admin/editor.worker.js


File diff suppressed because it is too large
+ 1 - 1
crmeb/public/admin/html.worker.js


File diff suppressed because it is too large
+ 1 - 1
crmeb/public/admin/index.html


File diff suppressed because it is too large
+ 1 - 1
crmeb/public/admin/json.worker.js


File diff suppressed because it is too large
+ 1 - 1
crmeb/public/admin/system_static/css/app.d614432a.css


crmeb/public/admin/system_static/css/chunk-2bb77828.05fa8816.css → crmeb/public/admin/system_static/css/chunk-03588519.05fa8816.css


File diff suppressed because it is too large
+ 1 - 1
crmeb/public/admin/system_static/css/chunk-721d1cfa.839fa3a9.css


File diff suppressed because it is too large
+ 0 - 1
crmeb/public/admin/system_static/css/chunk-119c467f.d198736f.css


File diff suppressed because it is too large
+ 1 - 0
crmeb/public/admin/system_static/css/chunk-142b9562.0906abed.css


File diff suppressed because it is too large
+ 1 - 0
crmeb/public/admin/system_static/css/chunk-14545ee5.07e5c7d6.css


File diff suppressed because it is too large
+ 1 - 1
crmeb/public/admin/system_static/css/chunk-576aceab.03f394c5.css


crmeb/public/admin/system_static/css/chunk-181f18a8.4017d45b.css → crmeb/public/admin/system_static/css/chunk-181f18a8.f08db566.css


File diff suppressed because it is too large
+ 1 - 1
crmeb/public/admin/system_static/css/chunk-b0680ab2.eafcf042.css


File diff suppressed because it is too large
+ 1 - 1
crmeb/public/admin/system_static/css/chunk-5261a12a.226f2f12.css


File diff suppressed because it is too large
+ 1 - 0
crmeb/public/admin/system_static/css/chunk-219ab9ee.7d08cdff.css


crmeb/public/admin/system_static/css/chunk-277d0526.524d99bd.css → crmeb/public/admin/system_static/css/chunk-277d0526.652b8e48.css


File diff suppressed because it is too large
+ 0 - 1
crmeb/public/admin/system_static/css/chunk-39217217.18c3463a.css


File diff suppressed because it is too large
+ 0 - 1
crmeb/public/admin/system_static/css/chunk-4285054a.cab764ff.css


File diff suppressed because it is too large
+ 1 - 1
crmeb/public/admin/system_static/css/chunk-4f508854.b305c944.css


File diff suppressed because it is too large
+ 1 - 0
crmeb/public/admin/system_static/css/chunk-460697bf.4be6c1ee.css


File diff suppressed because it is too large
+ 0 - 1
crmeb/public/admin/system_static/css/chunk-497763ca.04b5ccd8.css


File diff suppressed because it is too large
+ 1 - 0
crmeb/public/admin/system_static/css/chunk-4c872661.ade25099.css


File diff suppressed because it is too large
+ 0 - 1
crmeb/public/admin/system_static/css/chunk-4c872661.d914f384.css


File diff suppressed because it is too large
+ 1 - 1
crmeb/public/admin/system_static/css/chunk-518bc085.b9bf2a6c.css


File diff suppressed because it is too large
+ 0 - 1
crmeb/public/admin/system_static/css/chunk-53a5fbe8.e8b9d988.css


File diff suppressed because it is too large
+ 0 - 1
crmeb/public/admin/system_static/css/chunk-55245747.40269b49.css


crmeb/public/admin/system_static/css/chunk-08ccf5e5.2744b4ab.css → crmeb/public/admin/system_static/css/chunk-593789ae.2744b4ab.css


File diff suppressed because it is too large
+ 1 - 0
crmeb/public/admin/system_static/css/chunk-593a013a.2ac45bcb.css


File diff suppressed because it is too large
+ 1 - 0
crmeb/public/admin/system_static/css/chunk-5b0c00b0.d61bc8b1.css


File diff suppressed because it is too large
+ 1 - 0
crmeb/public/admin/system_static/css/chunk-5b2cb482.b2c160e0.css


File diff suppressed because it is too large
+ 1 - 1
crmeb/public/admin/system_static/css/chunk-14504f1c.861cb19f.css


File diff suppressed because it is too large
+ 0 - 1
crmeb/public/admin/system_static/css/chunk-615cffd4.d981378b.css


File diff suppressed because it is too large
+ 1 - 0
crmeb/public/admin/system_static/css/chunk-64b92494.4d5b25e3.css


File diff suppressed because it is too large
+ 1 - 0
crmeb/public/admin/system_static/css/chunk-6c5ee98a.01cd8ba5.css


File diff suppressed because it is too large
+ 0 - 1
crmeb/public/admin/system_static/css/chunk-6db89f9c.0142940b.css


crmeb/public/admin/system_static/css/chunk-71a4b5ce.4ee40667.css → crmeb/public/admin/system_static/css/chunk-6e9219bc.4ee40667.css


File diff suppressed because it is too large
+ 0 - 1
crmeb/public/admin/system_static/css/chunk-7053b734.0a7a92ae.css


crmeb/public/admin/system_static/css/chunk-d2faabc4.2399213d.css → crmeb/public/admin/system_static/css/chunk-752bbbcb.8c2aef82.css


File diff suppressed because it is too large
+ 1 - 0
crmeb/public/admin/system_static/css/chunk-7d590400.ff00e5c7.css


File diff suppressed because it is too large
+ 1 - 0
crmeb/public/admin/system_static/css/chunk-7f0b7777.1fb39fc1.css


File diff suppressed because it is too large
+ 1 - 1
crmeb/public/admin/system_static/css/chunk-85b5d3f0.07df5a78.css


File diff suppressed because it is too large
+ 1 - 1
crmeb/public/admin/system_static/css/chunk-7fefa7f8.a011c86b.css


File diff suppressed because it is too large
+ 1 - 1
crmeb/public/admin/system_static/css/chunk-9b69c352.430fa426.css


crmeb/public/admin/system_static/css/chunk-e16cf3a8.aa5235f0.css → crmeb/public/admin/system_static/css/chunk-de6be648.52f0ef59.css


crmeb/public/admin/system_static/css/chunk-70391317.0ce16dd8.css → crmeb/public/admin/system_static/css/chunk-f3e79fa2.0ce16dd8.css


crmeb/public/admin/system_static/css/chunk-2e783080.964ef79d.css → crmeb/public/admin/system_static/css/chunk-fc01ca50.f886e744.css


File diff suppressed because it is too large
+ 11 - 0
crmeb/public/admin/system_static/css/chunk-vendors.0a536a1c.css


File diff suppressed because it is too large
+ 0 - 11
crmeb/public/admin/system_static/css/chunk-vendors.2fbd6fd7.css


二進制
crmeb/public/admin/system_static/fonts/iconfont.1721369585843.1064c203.woff


二進制
crmeb/public/admin/system_static/fonts/iconfont.1752151732483.536036f6.woff


二進制
crmeb/public/admin/system_static/fonts/iconfont.1721369585843.31759e5c.ttf


二進制
crmeb/public/admin/system_static/fonts/iconfont.1752211596473.5cf21f71.ttf


二進制
crmeb/public/admin/system_static/fonts/iconfont.1752211596473.88bca599.woff


File diff suppressed because it is too large
+ 0 - 1
crmeb/public/admin/system_static/js/app.6c740426.js


File diff suppressed because it is too large
+ 1 - 0
crmeb/public/admin/system_static/js/app.8edab076.js


+ 0 - 0
crmeb/public/admin/system_static/js/chunk-00542f4f.583a0c47.js


Some files were not shown because too many files changed in this diff