From 5de871c78ce951189a7556f69d785ee4a3cf144a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E6=98=8A=E5=A4=A9?= <442384644@qq.com> Date: Thu, 3 Nov 2022 15:25:18 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E7=A8=8B=E5=BA=8F=E7=9B=AE=E5=BD=95?= =?UTF-8?q?=E3=80=91=E4=BC=98=E5=8C=96=E7=A8=8B=E5=BA=8F=E5=AE=89=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crmeb/.version | 1 + crmeb/app/dao/user/UserGroupDao.php | 13 ++++++++++--- .../services/activity/live/LiveGoodsServices.php | 10 ++++------ crmeb/app/services/user/UserGroupServices.php | 8 +++++--- crmeb/app/services/user/UserServices.php | 8 ++++++-- crmeb/public/install/crmeb.sql | 2 +- crmeb/public/install/index.php | 6 ++++++ crmeb/public/install/templates/step5.php | 1 + 8 files changed, 34 insertions(+), 15 deletions(-) diff --git a/crmeb/.version b/crmeb/.version index bd53089ac..5292f5687 100644 --- a/crmeb/.version +++ b/crmeb/.version @@ -1,4 +1,5 @@ version=CRMEB-KY v4.5.0 version_code=450 +platform=CRMEB app_id=ze7x9rxsv09l6pvsyo app_key=fuF7U9zaybLa5gageVQzxtxQMFnvU2OI diff --git a/crmeb/app/dao/user/UserGroupDao.php b/crmeb/app/dao/user/UserGroupDao.php index 255a5d711..c71f695b7 100644 --- a/crmeb/app/dao/user/UserGroupDao.php +++ b/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(); } } diff --git a/crmeb/app/services/activity/live/LiveGoodsServices.php b/crmeb/app/services/activity/live/LiveGoodsServices.php index bbbceda3b..713d006ff 100644 --- a/crmeb/app/services/activity/live/LiveGoodsServices.php +++ b/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) { diff --git a/crmeb/app/services/user/UserGroupServices.php b/crmeb/app/services/user/UserGroupServices.php index 9dde34ef2..8a5a6b010 100644 --- a/crmeb/app/services/user/UserGroupServices.php +++ b/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) { diff --git a/crmeb/app/services/user/UserServices.php b/crmeb/app/services/user/UserServices.php index b49385893..d1f267c4a 100644 --- a/crmeb/app/services/user/UserServices.php +++ b/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) { diff --git a/crmeb/public/install/crmeb.sql b/crmeb/public/install/crmeb.sql index be938d116..9938ef5b4 100644 --- a/crmeb/public/install/crmeb.sql +++ b/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); -- -------------------------------------------------------- diff --git a/crmeb/public/install/index.php b/crmeb/public/install/index.php index 5edab2203..1f02fda53 100644 --- a/crmeb/public/install/index.php +++ b/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'); diff --git a/crmeb/public/install/templates/step5.php b/crmeb/public/install/templates/step5.php index 0b3971a7c..8da81a30e 100644 --- a/crmeb/public/install/templates/step5.php +++ b/crmeb/public/install/templates/step5.php @@ -43,6 +43,7 @@ $(function(){ host:'', https:'', version:'', + version_code:'', ip: }, dataType: 'json',