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

【程序目录】优化程序安装

吴昊天 3 лет назад
Родитель
Сommit
5de871c78c

+ 1 - 0
crmeb/.version

@@ -1,4 +1,5 @@
 version=CRMEB-KY v4.5.0
 version_code=450
+platform=CRMEB
 app_id=ze7x9rxsv09l6pvsyo
 app_key=fuF7U9zaybLa5gageVQzxtxQMFnvU2OI

+ 10 - 3
crmeb/app/dao/user/UserGroupDao.php

@@ -35,14 +35,21 @@ class UserGroupDao extends BaseDao
     /**
      * 获取列表
      * @param array $where
-     * @param string $feild
+     * @param string $field
+     * @param int $page
+     * @param int $limit
      * @return array
+     * @throws \ReflectionException
      * @throws \think\db\exception\DataNotFoundException
      * @throws \think\db\exception\DbException
      * @throws \think\db\exception\ModelNotFoundException
      */
-    public function getList(array $where = [], string $feild = '*', int $page = 0, int $limit)
+    public function getList(array $where = [], string $field = '*', int $page = 0, int $limit = 0)
     {
-        return $this->search($where)->field($feild)->page($page, $limit)->select()->toArray();
+        return $this->search($where)
+            ->field($field)
+            ->when($page && $limit, function ($query) use ($page, $limit) {
+                $query->page($page, $limit);
+            })->select()->toArray();
     }
 }

+ 4 - 6
crmeb/app/services/activity/live/LiveGoodsServices.php

@@ -63,12 +63,10 @@ class LiveGoodsServices extends BaseServices
     }
 
     /**
-     * @param array $data
-     * @return bool|mixed
-     * @throws \EasyWeChat\Core\Exceptions\InvalidArgumentException
-     * @throws \think\db\exception\DataNotFoundException
-     * @throws \think\db\exception\DbException
-     * @throws \think\db\exception\ModelNotFoundException
+     * 添加直播商品
+     * @param array $goods_info
+     * @return bool
+     * @throws \Exception
      */
     public function add(array $goods_info)
     {

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

@@ -49,20 +49,20 @@ class UserGroupServices extends BaseServices
 
     /**
      * 获取分组列表
-     * @param string $feild
+     * @param string $field
      * @return array
      * @throws \think\db\exception\DataNotFoundException
      * @throws \think\db\exception\DbException
      * @throws \think\db\exception\ModelNotFoundException
      */
-    public function getGroupList($feild = 'id,group_name', bool $is_page = false)
+    public function getGroupList(string $field = 'id,group_name', bool $is_page = false): array
     {
         $page = $limit = 0;
         if ($is_page) {
             [$page, $limit] = $this->getPageValue();
             $count = $this->dao->count([]);
         }
-        $list = $this->dao->getList([], $feild, $page, $limit);
+        $list = $this->dao->getList([], $field, $page, $limit);
 
         return $is_page ? compact('list', 'count') : $list;
     }
@@ -70,6 +70,7 @@ class UserGroupServices extends BaseServices
     /**
      * 获取一些用户的分组名称
      * @param array $ids
+     * @return array
      */
     public function getUsersGroupName(array $ids)
     {
@@ -133,6 +134,7 @@ class UserGroupServices extends BaseServices
     /**
      * 删除
      * @param int $id
+     * @return string
      */
     public function delGroup(int $id)
     {

+ 6 - 2
crmeb/app/services/user/UserServices.php

@@ -875,7 +875,9 @@ class UserServices extends BaseServices
      */
     public function setGroup($uids)
     {
-        $userGroup = app()->make(UserGroupServices::class)->getGroupList();
+        /** @var UserGroupServices $groupServices */
+        $groupServices = app()->make(UserGroupServices::class);
+        $userGroup = $groupServices->getGroupList();
         if (count($uids) == 1) {
             $user = $this->getUserInfo($uids[0], ['group_id']);
             $setOptionUserGroup = function () use ($userGroup) {
@@ -925,7 +927,9 @@ class UserServices extends BaseServices
      */
     public function setLabel($uids)
     {
-        $userLabel = app()->make(UserLabelServices::class)->getLabelList();
+        /** @var UserLabelServices $labelServices */
+        $labelServices = app()->make(UserLabelServices::class);
+        $userLabel = $labelServices->getLabelList();
         if (count($uids) == 1) {
             $lids = app()->make(UserLabelRelationServices::class)->getUserLabels($uids[0]);
             $setOptionUserLabel = function () use ($userLabel) {

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

@@ -33820,7 +33820,7 @@ INSERT INTO `eb_system_notification` (`id`, `mark`, `name`, `title`, `is_system`
 (24, 'kefu_send_extract_application', '提现申请给客服发消息', '提现申请给客服发消息', 1, 0, 0, 0, 0, 1, '你有个新的提现申请待处理', '您有一笔提现申请待处理,提现金额{money}!', 0, '0', '', 0, 0, '您有个提现申请请注意查收\\n>提现金额{money}', '{nickname}用户昵称,{money}提现金额', 'https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=ae3s-safwea-aa', 2, 0),
 (25, 'send_admin_confirm_take_over', '收货给客服发消息', '收货给客服发消息', 1, 0, 0, 0, 2, 1, '你有个新的用户收货待处理', '您有一笔订单已经确认收货,订单号{order_id}!', 0, '520422', '{$admin_name}管理员,您有一笔订单已经确认收货,订单号{$order_id}!', 0, 0, '您有个订单确认收货\\n>订单号{order_id}', '{storeTitle}商品名称,{order_id}订单号', '', 2, 0),
 (26, 'order_pay_false', '提醒付款通知', '提醒付款通知用户提醒发送', 1, 0, 1, 0, 2, 0, '提醒付款通知', '您有未付款订单,订单号为:{order_id},商品数量有限,请及时付款。', 0, '528116', '您有未付款订单,订单号为:{$order_id},商品数量有限,请及时付款。', 40, 0, '0', '', '', 1, 0),
-(27, 'verify_code', '短信验证码', '短信验证码', 0, 0, 0, 0, 2, 0, '短信验证码', '您的验证码是:{code},有效期为5分钟。如非本人操作,可不予理会。', 0, '538393', '您的验证码是:{$code},有效期为{$time}分钟。如非本人操作,可不予理会。', 0, 0, '0', '', '', 1, 0);
+(27, 'verify_code', '短信验证码', '短信验证码', 0, 0, 0, 0, 2, 0, '短信验证码', '您的验证码是:{code},有效期为{time}分钟。如非本人操作,可不予理会。', 0, '538393', '您的验证码是:{$code},有效期为{$time}分钟。如非本人操作,可不予理会。', 0, 0, '0', '', '', 1, 0);
 
 -- --------------------------------------------------------
 

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

@@ -377,6 +377,7 @@ switch ($step) {
                 $tables = mysqli_fetch_all($result);//参数MYSQL_ASSOC、MYSQLI_NUM、MYSQLI_BOTH规定产生数组类型
                 $bl_table = array('eb_system_admin'
                 , 'eb_system_role'
+                , 'eb_cache'
                 , 'eb_agent_level'
                 , 'eb_page_link'
                 , 'eb_page_categroy'
@@ -387,6 +388,9 @@ switch ($step) {
                 , 'eb_express'
                 , 'eb_system_group'
                 , 'eb_system_group_data'
+                , 'eb_lang_code'
+                , 'eb_lang_country'
+                , 'eb_lang_type'
                 , 'eb_template_message'
                 , 'eb_shipping_templates'
                 , "eb_shipping_templates_region"
@@ -397,6 +401,7 @@ switch ($step) {
                 , 'eb_agreement'
                 , 'eb_store_service_speechcraft'
                 , 'eb_system_user_level'
+                , 'eb_out_interface'
                 , 'eb_cache');
                 foreach ($bl_table as $k => $v) {
                     $bl_table[$k] = str_replace('eb_', $dbPrefix, $v);
@@ -477,6 +482,7 @@ switch ($step) {
         $host = $_SERVER['HTTP_HOST'];
         $curent_version = getversion();
         $version = trim($curent_version['version']);
+        $platform = trim($curent_version['platform']);
         installlog();
         include_once("./templates/step5.php");
         @touch('../install.lock');

+ 1 - 0
crmeb/public/install/templates/step5.php

@@ -43,6 +43,7 @@ $(function(){
 	    host:'<?php echo $host;?>',
         https:'<?php echo 'http://'.$host;?>',
         version:'<?php echo $version;?>',
+        version_code:'<?php echo $platform;?>',
         ip:<?php echo json_encode($ip);?>
     },
 	dataType: 'json',