Преглед на файлове

【程序目录】优化清楚数据,优化记录

吴昊天 преди 3 години
родител
ревизия
6cd370036a

+ 198 - 39
crmeb/app/adminapi/controller/v1/system/SystemClearData.php

@@ -70,17 +70,14 @@ class SystemClearData extends AuthController
                 return $this->attachmentData();
                 break;
             case 'article':
-                return $this->articledata();
+                return $this->articleData();
                 break;
             case 'system':
-                return $this->systemdata();
+                return $this->systemData();
                 break;
             case 'user':
                 return $this->userRelevantData();
                 break;
-            case 'wechatuser':
-                return $this->wechatuserData();
-                break;
             default:
                 return app('json')->fail(100100);
         }
@@ -122,14 +119,62 @@ class SystemClearData extends AuthController
     public function userRelevantData()
     {
         $this->services->clearData([
-            'user_recharge', 'user_address', 'user_bill', 'user_enter', 'user_extract',
-            'user_notice', 'user_notice_see', 'wechat_message', 'store_visit',
-            'store_coupon_user', 'store_coupon_issue_user', 'store_bargain_user', 'store_bargain_user_help',
-            'store_product_reply', 'store_product_cate', 'user_sign',
-            'user_level', 'user_group', 'user_visit', 'user_label', 'user_label_relation', 'user_label_relation',
-            'store_product_relation', 'sms_record', 'system_file', 'system_store', 'system_store_staff',
-            'member_card', 'member_card_batch', 'member_ship', 'qrcode', 'user_brokerage_frozen', 'user_invoice'
-
+            'agent_level_task_record',
+            'member_card',
+            'member_card_batch',
+            'capital_flow',
+            'delivery_service',
+            'division_agent_apply',
+            'luck_lottery_record',
+            'other_order',
+            'other_order_status',
+            'qrcode',
+            'sms_record',
+            'store_bargain_user',
+            'store_bargain_user_help',
+            'store_cart',
+            'store_coupon_issue_user',
+            'store_coupon_user',
+            'store_integral_order',
+            'store_integral_order_status',
+            'store_order',
+            'store_order_cart_info',
+            'store_order_economize',
+            'store_order_invoice',
+            'store_order_refund',
+            'store_order_status',
+            'store_pink',
+            'store_product_relation',
+            'store_product_reply',
+            'store_service',
+            'store_service_feedback',
+            'store_service_log',
+            'store_service_record',
+            'store_visit',
+            'system_store_staff',
+            'user',
+            'user_address',
+            'user_bill',
+            'user_brokerage',
+            'user_brokerage_frozen',
+            'user_cancel',
+            'user_enter',
+            'user_extract',
+            'user_friends',
+            'user_group',
+            'user_invoice',
+            'user_label',
+            'user_label_relation',
+            'user_level',
+            'user_money',
+            'user_notice',
+            'user_notice_see',
+            'user_recharge',
+            'user_search',
+            'user_sign',
+            'user_spread',
+            'user_visit',
+            'wechat_user',
         ], true);
         $this->services->delDirAndFile('./public/uploads/store/comment');
         return app('json')->success(100046);
@@ -142,10 +187,110 @@ class SystemClearData extends AuthController
     public function storeData()
     {
         $this->services->clearData([
-            'store_coupon_issue', 'store_bargain', 'store_combination', 'store_product_attr',
-            'store_product_attr_result', 'store_product_cate', 'store_product_attr_value', 'store_product_description',
-            'store_product_rule', 'store_seckill', 'store_product', 'store_visit', 'store_product_log', 'category', 'delivery_service',
-            'live_anchor', 'live_goods', 'live_room', 'live_room_goods', 'store_product_coupon'
+            'eb_agent_level',
+            'eb_agent_level_task',
+            'eb_agent_level_task_record',
+            'eb_article',
+            'eb_article_category',
+            'eb_article_content',
+            'eb_auxiliary',
+            'eb_cache',
+            'eb_capital_flow',
+            'eb_category',
+            'eb_delivery_service',
+            'eb_division_agent_apply',
+            'eb_live_anchor',
+            'eb_live_goods',
+            'eb_live_room',
+            'eb_live_room_goods',
+            'eb_luck_lottery',
+            'eb_luck_lottery_record',
+            'eb_luck_prize',
+            'eb_member_card',
+            'eb_member_card_batch',
+            'eb_member_right',
+            'eb_member_ship',
+            'eb_message_system',
+            'eb_other_order',
+            'eb_other_order_status',
+            'eb_qrcode',
+            'eb_sms_record',
+            'eb_store_advance',
+            'eb_store_bargain',
+            'eb_store_bargain_user',
+            'eb_store_bargain_user_help',
+            'eb_store_cart',
+            'eb_store_category',
+            'eb_store_combination',
+            'eb_store_coupon_issue',
+            'eb_store_coupon_issue_user',
+            'eb_store_coupon_product',
+            'eb_store_coupon_user',
+            'eb_store_integral',
+            'eb_store_integral_order',
+            'eb_store_integral_order_status',
+            'eb_store_order',
+            'eb_store_order_cart_info',
+            'eb_store_order_economize',
+            'eb_store_order_invoice',
+            'eb_store_order_refund',
+            'eb_store_order_status',
+            'eb_store_pink',
+            'eb_store_product',
+            'eb_store_product_attr',
+            'eb_store_product_attr_result',
+            'eb_store_product_attr_value',
+            'eb_store_product_cate',
+            'eb_store_product_coupon',
+            'eb_store_product_description',
+            'eb_store_product_log',
+            'eb_store_product_relation',
+            'eb_store_product_reply',
+            'eb_store_product_rule',
+            'eb_store_product_virtual',
+            'eb_store_seckill',
+            'eb_store_service',
+            'eb_store_service_feedback',
+            'eb_store_service_log',
+            'eb_store_service_record',
+            'eb_store_visit',
+            'eb_system_file',
+            'eb_system_log',
+            'eb_system_notice',
+            'eb_system_notice_admin',
+            'eb_system_store',
+            'eb_system_store_staff',
+            'eb_user',
+            'eb_user_address',
+            'eb_user_bill',
+            'eb_user_brokerage',
+            'eb_user_brokerage_frozen',
+            'eb_user_cancel',
+            'eb_user_enter',
+            'eb_user_extract',
+            'eb_user_friends',
+            'eb_user_group',
+            'eb_user_invoice',
+            'eb_user_label',
+            'eb_user_label_relation',
+            'eb_user_level',
+            'eb_user_money',
+            'eb_user_notice',
+            'eb_user_notice_see',
+            'eb_user_recharge',
+            'eb_user_search',
+            'eb_user_sign',
+            'eb_user_spread',
+            'eb_user_visit',
+            'eb_wechat_key',
+            'eb_wechat_media',
+            'eb_wechat_message',
+            'eb_wechat_news_category',
+            'eb_wechat_qrcode',
+            'eb_wechat_qrcode_cate',
+            'eb_wechat_qrcode_record',
+            'eb_wechat_reply',
+            'eb_wechat_user',
         ], true);
         return app('json')->success(100046);
     }
@@ -166,8 +311,19 @@ class SystemClearData extends AuthController
      */
     public function orderData()
     {
-        $this->services->clearData(['store_order', 'store_order_cart_info', 'store_order_status', 'store_pink',
-            'store_cart', 'store_order_status', 'other_order', 'other_order_status', 'store_order_invoice'
+        $this->services->clearData([
+            'other_order',
+            'other_order_status',
+            'store_cart',
+            'store_integral_order',
+            'store_integral_order_status',
+            'store_order',
+            'store_order_cart_info',
+            'store_order_economize',
+            'store_order_invoice',
+            'store_order_refund',
+            'store_order_status',
+            'store_pink',
         ], true);
         return app('json')->success(100046);
     }
@@ -179,7 +335,11 @@ class SystemClearData extends AuthController
     public function kefuData()
     {
         $this->services->clearData([
-            'store_service', 'store_service_log', 'store_service_record', 'store_service_feedback', 'store_service_speechcraft'
+            'store_service',
+            'store_service_log',
+            'store_service_record',
+            'store_service_feedback',
+            'store_service_speechcraft'
         ], true);
         $this->services->delDirAndFile('./public/uploads/store/service');
         return app('json')->success(100046);
@@ -192,8 +352,15 @@ class SystemClearData extends AuthController
     public function wechatData()
     {
         $this->services->clearData([
-            'wechat_media', 'wechat_reply', 'cache', 'wechat_key',
-            'wechat_news_category'
+            'cache',
+            'wechat_key',
+            'wechat_media',
+            'wechat_message',
+            'wechat_news_category',
+            'wechat_qrcode',
+            'wechat_qrcode_cate',
+            'wechat_qrcode_record',
+            'wechat_reply'
         ], true);
         $this->services->delDirAndFile('./public/uploads/wechat');
         return app('json')->success(100046);
@@ -206,38 +373,30 @@ class SystemClearData extends AuthController
     public function attachmentData()
     {
         $this->services->clearData([
-            'system_attachment', 'system_attachment_category'
+            'system_attachment',
+            'system_attachment_category'
         ], true);
         $this->services->delDirAndFile('./public/uploads/');
         return app('json')->success(100046);
     }
 
-    /**
-     * 清除微信用户
-     * @return mixed
-     */
-    public function wechatuserData()
-    {
-        $this->services->clearData([
-            'user', 'wechat_user'
-        ], true);
-        return app('json')->success(100046);
-    }
-
     //清除内容分类
-    public function articledata()
+    public function articleData()
     {
         $this->services->clearData([
-            'article_category', 'article', 'article_content'
+            'article_category',
+            'article',
+            'article_content'
         ], true);
         return app('json')->success(100046);
     }
 
     //清除系统记录
-    public function systemdata()
+    public function systemData()
     {
         $this->services->clearData([
-            'system_notice_admin', 'system_log'
+            'system_notice_admin',
+            'system_log'
         ], true);
         return app('json')->success(100046);
     }

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

@@ -88,7 +88,7 @@ class UserMoneyServices extends BaseServices
         ],
         'register_system_add' => [
             'title' => '新用户注册赠送余额',
-            'type' => 'system_add',
+            'type' => 'register_system_add',
             'mark' => '新用户注册赠送{%num%}余额',
             'status' => 1,
             'pm' => 1

+ 0 - 18
crmeb/app/services/wechat/WechatServices.php

@@ -294,24 +294,6 @@ class WechatServices extends BaseServices
         $userInfoKey = md5($openid . '_' . time() . '_wechat');
         Cache::setTokenBucket($userInfoKey, $createData, 7200);
         return ['auth_login' => 1, 'key' => $userInfoKey];
-//        if (!$user) {//没有注册用户也没有强制手机号绑定 返回让微信授权登录
-//            $createData = [$openid, $wechatInfo, $spread, '', 'wechat'];
-//            $userInfoKey = md5($openid . '_' . time() . '_wechat');
-//            Cache::setTokenBucket($userInfoKey, $createData, 7200);
-//            return ['auth_login' => 1, 'key' => $userInfoKey];
-//        } else {
-//            //更新用户信息
-//            $wechatUserServices->wechatUpdata([$user['uid'], ['code' => $spread]]);
-//            $token = $this->createToken((int)$user['uid'], 'wechat');
-//            if ($token) {
-//                /** @var UserVisitServices $visitServices */
-//                $visitServices = app()->make(UserVisitServices::class);
-//                $visitServices->loginSaveVisit($user);
-//                $token['userInfo'] = $user;
-//                return $token;
-//            } else
-//                throw new ApiException(410019);
-//        }
     }
 
     /**

+ 0 - 1
crmeb/public/install/crmeb.sql

@@ -34289,7 +34289,6 @@ INSERT INTO `eb_system_menus` (`id`, `pid`, `icon`, `menu_name`, `module`, `cont
 (1002, 34, '', '积分统计', 'admin', '', '', '', '', '[]', 0, 1, 0, 1, '/admin/marketing/point_statistic', '27/34', 1, '', 0, 'marketing-point_statistic-index', 0),
 (1003, 35, '', '余额记录', 'admin', '', '', '', '', '[]', 0, 1, 0, 1, '/admin/finance/balance', '35', 1, '', 0, 'finance-balance-index', 0),
 (1004, 1003, '', '余额记录', 'admin', '', '', '', '', '[]', 0, 1, 0, 1, '/admin/finance/balance/balance', '35/1003', 1, '', 0, 'finance-user-balance', 0),
-(1005, 716, '', '余额统计', 'admin', '', '', '', '', '[]', 0, 1, 0, 1, '/admin/statistic/balance', '716', 1, '', 0, 'admin-statistic', 0),
 (1006, 69, '', '公众号配置', 'admin', '', '', '', '', '[]', 0, 1, 0, 1, '/admin/setting/wechat_config/3/2', '135/69', 1, '', 0, 'setting-system-config', 0),
 (1007, 993, '', '小程序配置', 'admin', '', '', '', '', '[]', 0, 1, 0, 1, '/admin/setting/routine_config/3/7', '135/993', 1, '', 0, 'setting-system-config', 0),
 (1008, 135, '', 'PC端', 'admin', '', '', '', '', '[]', 0, 1, 0, 1, '/admin/app/pc', '135', 1, '', 0, 'admin-pc', 0),

+ 52 - 0
crmeb/public/install/index.php

@@ -148,6 +148,58 @@ switch ($step) {
             '.version',
             '.constant',
         );
+        //必须开启函数
+//        $disabled = explode(',', ini_get('disable_functions'));
+//
+//
+//        if (function_exists('file_put_contents')) {
+//            $file_put_contents = '<span class="correct_span">&radic;</span> 启用';
+//        } else {
+//            $file_put_contents = '<span class="correct_span error_span">&radic;</span> 禁用';
+//            $err++;
+//        }
+//        if (function_exists('imagettftext')) {
+//            $imagettftext = '<span class="correct_span">&radic;</span> 启用';
+//        } else {
+//            $imagettftext = '<span class="correct_span error_span">&radic;</span> 禁用';
+//            $err++;
+//        }
+//        if (!in_array('proc_open', $disabled)) {
+//            $proc_open = '<span class="correct_span">&radic;</span> 启用';
+//        } else {
+//            $proc_open = '<span class="correct_span error_span">&radic;</span> 禁用';
+//            $err++;
+//        }
+//        if (!in_array('pcntl_signal', $disabled)) {
+//            $pcntl_signal = '<span class="correct_span">&radic;</span> 启用';
+//        } else {
+//            $pcntl_signal = '<span class="correct_span error_span">&radic;</span> 禁用';
+//            $err++;
+//        }
+//        if (!in_array('pcntl_signal_dispatch', $disabled)) {
+//            $pcntl_signal_dispatch = '<span class="correct_span">&radic;</span> 启用';
+//        } else {
+//            $pcntl_signal_dispatch = '<span class="correct_span error_span">&radic;</span> 禁用';
+//            $err++;
+//        }
+//        if (!in_array('pcntl_fork', $disabled)) {
+//            $pcntl_fork = '<span class="correct_span">&radic;</span> 启用';
+//        } else {
+//            $pcntl_fork = '<span class="correct_span error_span">&radic;</span> 禁用';
+//            $err++;
+//        }
+//        if (!in_array('pcntl_wait', $disabled)) {
+//            $pcntl_wait = '<span class="correct_span">&radic;</span> 启用';
+//        } else {
+//            $pcntl_wait = '<span class="correct_span error_span">&radic;</span> 禁用';
+//            $err++;
+//        }
+//        if (!in_array('pcntl_alarm', $disabled)) {
+//            $pcntl_alarm = '<span class="correct_span">&radic;</span> 启用';
+//        } else {
+//            $pcntl_alarm = '<span class="correct_span error_span">&radic;</span> 禁用';
+//            $err++;
+//        }
         include_once("./templates/step2.php");
         exit();
 

+ 32 - 0
crmeb/public/install/templates/step2.php

@@ -172,6 +172,38 @@
 
 
             </table>
+<!--            <table width="100%">-->
+<!--                <tr>-->
+<!--                  <td class="td1" width="25%">函数检测必须开启</td>-->
+<!--                  <td class="td1" width="25%">当前状态</td>-->
+<!--                  <td class="td1" width="25%">函数检测必须开启</td>-->
+<!--                  <td class="td1" width="25%">当前状态</td>-->
+<!--                </tr>-->
+<!--              <tr>-->
+<!--                    <td>file_put_contents</td>-->
+<!--                    <td>--><?php //echo $file_put_contents; ?><!--</td>-->
+<!--                <td>imagettftext</td>-->
+<!--                <td>--><?php //echo $imagettftext; ?><!--</td>-->
+<!--                </tr>-->
+<!--                <tr>-->
+<!--                    <td>proc_open</td>-->
+<!--                    <td>--><?php //echo $proc_open; ?><!--</td>-->
+<!--                    <td>pcntl_signal</td>-->
+<!--                    <td>--><?php //echo $pcntl_signal; ?><!--</td>-->
+<!--                </tr>-->
+<!--                <tr>-->
+<!--                    <td>pcntl_signal_dispatch</td>-->
+<!--                    <td>--><?php //echo $pcntl_signal_dispatch; ?><!--</td>-->
+<!--                    <td>pcntl_fork</td>-->
+<!--                    <td>--><?php //echo $pcntl_fork; ?><!--</td>-->
+<!--                </tr>-->
+<!--                <tr>-->
+<!--                    <td>pcntl_wait</td>-->
+<!--                    <td>--><?php //echo $pcntl_wait; ?><!--</td>-->
+<!--                    <td>pcntl_alarm</td>-->
+<!--                    <td>--><?php //echo $pcntl_alarm; ?><!--</td>-->
+<!--                </tr>-->
+<!--            </table>-->
         </div>
         <div class="bottom tac">
             <a href="<?php echo $_SERVER['PHP_SELF']; ?>?step=2" class="btn">重新检测</a>