diff --git a/crmeb/app/adminapi/controller/v1/setting/SystemCrud.php b/crmeb/app/adminapi/controller/v1/setting/SystemCrud.php index 2a9acff1e..5118daeef 100644 --- a/crmeb/app/adminapi/controller/v1/setting/SystemCrud.php +++ b/crmeb/app/adminapi/controller/v1/setting/SystemCrud.php @@ -538,9 +538,9 @@ class SystemCrud extends AuthController if (!$tableName) { return app('json')->fail('缺少表名'); } -// if (in_array($tableName, SystemCrudServices::NOT_CRUD_TABANAME)) { -// return app('json')->fail('不允许查看当前表明细'); -// } + if (in_array($tableName, SystemCrudServices::NOT_CRUD_TABANAME)) { + return app('json')->fail('不允许查看当前表明细'); + } $tableInfo = $this->services->getColumnNamesList($tableName); $data = []; diff --git a/crmeb/app/dao/user/UserWechatUserDao.php b/crmeb/app/dao/user/UserWechatUserDao.php index 84fca1540..eb0f18b7e 100644 --- a/crmeb/app/dao/user/UserWechatUserDao.php +++ b/crmeb/app/dao/user/UserWechatUserDao.php @@ -204,10 +204,12 @@ class UserWechatUserDao extends BaseDao if (isset($where['label_id']) && $where['label_id']) { $model = $model->whereIn($userAlias . 'uid', function ($query) use ($where) { if (is_array($where['label_id'])) { - $query->name('user_label_relation')->whereIn('label_id', $where['label_id'])->field('uid')->select(); + $label_ids = array_map('intval', $where['label_id']); + $query->name('user_label_relation')->whereIn('label_id', $label_ids)->field('uid')->select(); } else { if (strpos($where['label_id'], ',') !== false) { - $query->name('user_label_relation')->whereIn('label_id', explode(',', $where['label_id']))->field('uid')->select(); + $label_ids = array_map('intval', explode(',', $where['label_id'])); + $query->name('user_label_relation')->whereIn('label_id', $label_ids)->field('uid')->select(); } else { $query->name('user_label_relation')->where('label_id', (int)$where['label_id'])->field('uid')->select(); } diff --git a/crmeb/app/services/article/ArticleServices.php b/crmeb/app/services/article/ArticleServices.php index 93e3da83c..8e25f28c5 100644 --- a/crmeb/app/services/article/ArticleServices.php +++ b/crmeb/app/services/article/ArticleServices.php @@ -68,7 +68,7 @@ class ArticleServices extends BaseServices { /** @var ArticleContentServices $articleContentService */ $articleContentService = app()->make(ArticleContentServices::class); - $content['content'] = $data['content']; + $content['content'] = htmlspecialchars($data['content']); $id = $data['id']; unset($data['content'], $data['id']); $info = $this->transaction(function () use ($id, $data, $articleContentService, $content) { @@ -105,6 +105,7 @@ class ArticleServices extends BaseServices { $info = $this->dao->read($id); $info['cid'] = (int)$info['cid']; + $info['content'] = htmlspecialchars_decode($info['content']); return compact('info'); } @@ -166,6 +167,7 @@ class ArticleServices extends BaseServices $info = $info->toArray(); $info['visit'] = (int)$info['visit']; $info['add_time'] = date('Y-m-d', $info['add_time']); + $info['content'] = htmlspecialchars_decode($info['content']); } return $info; } diff --git a/crmeb/app/services/order/StoreOrderTakeServices.php b/crmeb/app/services/order/StoreOrderTakeServices.php index 8ea54ed26..25cf81d7a 100644 --- a/crmeb/app/services/order/StoreOrderTakeServices.php +++ b/crmeb/app/services/order/StoreOrderTakeServices.php @@ -431,9 +431,10 @@ class StoreOrderTakeServices extends BaseServices return $this->backOrderBrokerageTwo($orderInfo, $userInfo, $isSelfBrokerage); } $brokeragePrice = $orderInfo['one_brokerage'] ?? 0; - // 返佣金额小于等于0 直接返回不返佣金 + // 一级返佣金额小于等于0 直接跳转二级返佣逻辑 if ($brokeragePrice <= 0) { - return true; + $frozen_time = time() + intval(sys_config('extract_time')) * 86400; + return $this->backOrderBrokerageTwo($orderInfo, $userInfo, $isSelfBrokerage, $frozen_time); } // 获取上级推广员信息 $spreadPrice = $userServices->value(['uid' => $one_spread_uid], 'brokerage_price'); diff --git a/crmeb/app/services/system/admin/SystemRoleServices.php b/crmeb/app/services/system/admin/SystemRoleServices.php index 44cebe874..d7e957ac0 100644 --- a/crmeb/app/services/system/admin/SystemRoleServices.php +++ b/crmeb/app/services/system/admin/SystemRoleServices.php @@ -126,7 +126,7 @@ class SystemRoleServices extends BaseServices if (isset($auth[$method]) && in_array($rule, $auth[$method])) { return true; } else { - return true; + return false; } }