From fbcc72182802db52b7f3e5b7d339eb95c151261e Mon Sep 17 00:00:00 2001 From: koogua Date: Tue, 6 Sep 2022 10:58:02 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E5=8E=BB=E9=99=A4group=E6=AE=8B=E7=95=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 16 +++++------ app/Console/Tasks/CleanDemoDataTask.php | 3 -- app/Http/Admin/Services/Index.php | 2 +- app/Http/Admin/Views/macros/group.volt | 11 ------- app/Http/Home/Views/macros/group.volt | 9 ------ app/Library/AppInfo.php | 4 +-- app/Library/Helper.php | 26 +---------------- app/Models/Notification.php | 9 ------ app/Services/Sync/GroupIndex.php | 38 ------------------------- 9 files changed, 12 insertions(+), 106 deletions(-) delete mode 100644 app/Http/Admin/Views/macros/group.volt delete mode 100644 app/Http/Home/Views/macros/group.volt delete mode 100644 app/Services/Sync/GroupIndex.php diff --git a/README.md b/README.md index 5fada448..f5664db8 100644 --- a/README.md +++ b/README.md @@ -6,10 +6,10 @@ 酷瓜云课堂,依托腾讯云基础服务架构,采用C扩展框架Phalcon开发,GPL-2.0开源协议,致力开源网课系统,开源网校系统,开源知识付费系统,开源在线教育系统。 -![star](https://koogua.com/gitee/badge?user=koogua&project=course-tencent-cloud&type=star) -![fork](https://koogua.com/gitee/badge?user=koogua&project=course-tencent-cloud&type=fork) -![license](https://koogua.com/gitee/badge?user=koogua&project=course-tencent-cloud&type=license) -![release](https://koogua.com/gitee/badge?user=koogua&project=course-tencent-cloud&type=release) +![star](https://www.koogua.com/gitee/badge?user=koogua&project=course-tencent-cloud&type=star) +![fork](https://www.koogua.com/gitee/badge?user=koogua&project=course-tencent-cloud&type=fork) +![license](https://www.koogua.com/gitee/badge?user=koogua&project=course-tencent-cloud&type=license) +![release](https://www.koogua.com/gitee/badge?user=koogua&project=course-tencent-cloud&type=release) ### 系统功能 @@ -69,12 +69,12 @@ Tips: 请用手机注册一个新账号,用户中心 -> 关注订阅,扫码 ### 项目文档 -- [运行环境搭建](https://koogua.com/page/wiki) -- [系统服务配置](https://koogua.com/page/wiki) -- [客户终端配置](https://koogua.com/page/wiki) +- [运行环境搭建](https://www.koogua.com/page/wiki) +- [系统服务配置](https://www.koogua.com/page/wiki) +- [客户终端配置](https://www.koogua.com/page/wiki) ### 意见反馈 - [码云平台](https://gitee.com/koogua/course-tencent-cloud/issues) -- [官方社区](https://koogua.com/community) +- [官方社区](https://www.koogua.com/community) - QQ交流群: 787363898 diff --git a/app/Console/Tasks/CleanDemoDataTask.php b/app/Console/Tasks/CleanDemoDataTask.php index b53f97a1..1fb99e63 100644 --- a/app/Console/Tasks/CleanDemoDataTask.php +++ b/app/Console/Tasks/CleanDemoDataTask.php @@ -104,9 +104,6 @@ class CleanDemoDataTask extends Task $courseIndexTask = new CourseIndexTask(); $courseIndexTask->cleanAction(); - $groupIndexTask = new GroupIndexTask(); - $groupIndexTask->cleanAction(); - $questionIndexTask = new QuestionIndexTask(); $questionIndexTask->cleanAction(); diff --git a/app/Http/Admin/Services/Index.php b/app/Http/Admin/Services/Index.php index 42f06887..b363b6bb 100644 --- a/app/Http/Admin/Services/Index.php +++ b/app/Http/Admin/Services/Index.php @@ -115,7 +115,7 @@ class Index extends Service public function getReleases() { - $url = 'https://koogua.com/api/releases'; + $url = 'https://www.koogua.com/api/releases'; $client = new Client(); diff --git a/app/Http/Admin/Views/macros/group.volt b/app/Http/Admin/Views/macros/group.volt deleted file mode 100644 index 98f9ea44..00000000 --- a/app/Http/Admin/Views/macros/group.volt +++ /dev/null @@ -1,11 +0,0 @@ -{%- macro type_info(value) %} - {% if value == 1 %} - 课程 - {% elseif value == 2 %} - 水吧 - {% elseif value == 3 %} - 职工 - {% else %} - 未知 - {% endif %} -{%- endmacro %} \ No newline at end of file diff --git a/app/Http/Home/Views/macros/group.volt b/app/Http/Home/Views/macros/group.volt deleted file mode 100644 index 4a63a95a..00000000 --- a/app/Http/Home/Views/macros/group.volt +++ /dev/null @@ -1,9 +0,0 @@ -{%- macro type_info(value) %} - {% if value == 1 %} - 课程 - {% elseif value == 2 %} - 水吧 - {% elseif value == 3 %} - 职工 - {% endif %} -{%- endmacro %} \ No newline at end of file diff --git a/app/Library/AppInfo.php b/app/Library/AppInfo.php index d2a54f3c..8c0bdaa1 100644 --- a/app/Library/AppInfo.php +++ b/app/Library/AppInfo.php @@ -14,9 +14,9 @@ class AppInfo protected $alias = 'CTC'; - protected $link = 'https://koogua.com'; + protected $link = 'https://www.koogua.com'; - protected $version = '1.5.8'; + protected $version = '1.5.9'; public function __get($name) { diff --git a/app/Library/Helper.php b/app/Library/Helper.php index f3fe0731..29142a3c 100644 --- a/app/Library/Helper.php +++ b/app/Library/Helper.php @@ -199,16 +199,6 @@ function kg_default_user_avatar_path() return '/img/default/user_avatar.png'; } -/** - * 获取默认群组头像路径 - * - * @return string - */ -function kg_default_group_avatar_path() -{ - return '/img/default/group_avatar.png'; -} - /** * 获取默认课程封面路径 * @@ -315,20 +305,6 @@ function kg_cos_user_avatar_url($path, $style = null) return kg_cos_img_url($path, $style); } -/** - * 获取群组头像URL - * - * @param string $path - * @param string $style - * @return string - */ -function kg_cos_group_avatar_url($path, $style = null) -{ - $path = $path ?: kg_default_group_avatar_path(); - - return kg_cos_img_url($path, $style); -} - /** * 获取课程封面URL * @@ -442,7 +418,7 @@ function kg_clean_html($content) * @param int $length * @return string */ -function kg_parse_summary($content, $length = 100) +function kg_parse_summary($content, $length = 150) { $content = trim(strip_tags($content)); diff --git a/app/Models/Notification.php b/app/Models/Notification.php index 31ac0cc5..675472a8 100644 --- a/app/Models/Notification.php +++ b/app/Models/Notification.php @@ -95,15 +95,6 @@ class Notification extends Model const TYPE_ANSWER_COMMENTED = 227; const TYPE_ANSWER_LIKED = 228; - /* -------------- 微聊相关 -------------- */ - - const TYPE_FRIEND_REQUEST = 0; // 好友请求 - const TYPE_FRIEND_ACCEPTED = 0; // 好友被接受 - const TYPE_FRIEND_REFUSED = 0; // 好友被拒绝 - const TYPE_GROUP_REQUEST = 0; // 入群请求 - const TYPE_GROUP_ACCEPTED = 0; // 入群被接受 - const TYPE_GROUP_REFUSED = 0; // 入群被拒绝 - /* -------------- 评论相关 -------------- */ const TYPE_COMMENT_CREATED = 500; diff --git a/app/Services/Sync/GroupIndex.php b/app/Services/Sync/GroupIndex.php deleted file mode 100644 index 077ff5ed..00000000 --- a/app/Services/Sync/GroupIndex.php +++ /dev/null @@ -1,38 +0,0 @@ -getRedis(); - - $key = $this->getSyncKey(); - - $redis->sAdd($key, $groupId); - - if ($redis->sCard($key) == 1) { - $redis->expire($key, $this->lifetime); - } - } - - public function getSyncKey() - { - return 'sync_group_index'; - } - -} From 93ec72faf65a8fafa25519a11aebc5e95787db37 Mon Sep 17 00:00:00 2001 From: koogua Date: Tue, 6 Sep 2022 11:03:19 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E5=86=85=E5=AE=B9?= =?UTF-8?q?=E5=9B=BE=E7=89=87=E4=B8=8A=E4=BC=A0=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/Controllers/UploadController.php | 43 ++++--------------- .../Home/Controllers/UploadController.php | 43 ++++--------------- 2 files changed, 16 insertions(+), 70 deletions(-) diff --git a/app/Http/Admin/Controllers/UploadController.php b/app/Http/Admin/Controllers/UploadController.php index 26c76045..73e34e5e 100644 --- a/app/Http/Admin/Controllers/UploadController.php +++ b/app/Http/Admin/Controllers/UploadController.php @@ -99,43 +99,16 @@ class UploadController extends Controller $file = $service->uploadContentImage(); if (!$file) { - return $this->jsonError(['msg' => '上传文件失败']); + return $this->jsonError([ + 'message' => '上传图片失败', + 'error' => 1, + ]); } - $data = [ - 'src' => $service->getImageUrl($file->path), - 'title' => $file->name, - ]; - - return $this->jsonSuccess(['data' => $data]); - } - - /** - * @Post("/remote/img", name="admin.upload.remote_img") - */ - public function uploadRemoteImageAction() - { - $originalUrl = $this->request->getPost('url', ['trim', 'string']); - - $service = new StorageService(); - - $file = $service->uploadRemoteImage($originalUrl); - - $newUrl = $originalUrl; - - if ($file) { - $newUrl = $service->getImageUrl($file->path); - } - - /** - * 编辑器要求返回的数据结构 - */ - $data = [ - 'url' => $newUrl, - 'originalURL' => $originalUrl, - ]; - - return $this->jsonSuccess(['data' => $data]); + return $this->jsonSuccess([ + 'url' => $service->getImageUrl($file->path), + 'error' => 0, + ]); } /** diff --git a/app/Http/Home/Controllers/UploadController.php b/app/Http/Home/Controllers/UploadController.php index c2b403db..2e1f0f4d 100644 --- a/app/Http/Home/Controllers/UploadController.php +++ b/app/Http/Home/Controllers/UploadController.php @@ -56,43 +56,16 @@ class UploadController extends Controller $file = $service->uploadContentImage(); if (!$file) { - return $this->jsonError(['msg' => '上传文件失败']); + return $this->jsonError([ + 'message' => '上传图片失败', + 'error' => 1, + ]); } - $data = [ - 'src' => $service->getImageUrl($file->path), - 'title' => $file->name, - ]; - - return $this->jsonSuccess(['data' => $data]); - } - - /** - * @Post("/remote/img", name="home.upload.remote_img") - */ - public function uploadRemoteImageAction() - { - $originalUrl = $this->request->getPost('url', ['trim', 'string']); - - $service = new StorageService(); - - $file = $service->uploadRemoteImage($originalUrl); - - $newUrl = $originalUrl; - - if ($file) { - $newUrl = $service->getImageUrl($file->path); - } - - /** - * 编辑器要求返回的数据结构 - */ - $data = [ - 'url' => $newUrl, - 'originalURL' => $originalUrl, - ]; - - return $this->jsonSuccess(['data' => $data]); + return $this->jsonSuccess([ + 'url' => $service->getImageUrl($file->path), + 'error' => 0, + ]); } } \ No newline at end of file From b79d6e558897e2b5a774156df747b56adb7fdb4a Mon Sep 17 00:00:00 2001 From: koogua Date: Tue, 6 Sep 2022 17:30:06 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E5=8E=BB=E9=99=A4user=E5=85=A8=E6=96=87?= =?UTF-8?q?=E7=B4=A2=E5=BC=95=E7=9B=B8=E5=85=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 - app/Console/Tasks/CleanDemoDataTask.php | 3 - app/Console/Tasks/SyncUserIndexTask.php | 65 -------- app/Console/Tasks/UserIndexTask.php | 154 ------------------ app/Http/Api/Controllers/SearchController.php | 10 +- .../Home/Controllers/SearchController.php | 10 +- app/Http/Home/Views/search/index.volt | 6 +- app/Http/Home/Views/search/user.volt | 29 ---- app/Models/User.php | 6 - app/Services/Logic/Search/Group.php | 90 ---------- app/Services/Logic/Search/User.php | 85 ---------- app/Services/Search/UserDocument.php | 55 ------- app/Services/Search/UserSearcher.php | 30 ---- app/Services/Sync/UserIndex.php | 38 ----- config/xs.user.default.ini | 32 ---- public/static/home/css/common.css | 32 +--- 16 files changed, 8 insertions(+), 638 deletions(-) delete mode 100644 app/Console/Tasks/SyncUserIndexTask.php delete mode 100644 app/Console/Tasks/UserIndexTask.php delete mode 100644 app/Http/Home/Views/search/user.volt delete mode 100644 app/Services/Logic/Search/Group.php delete mode 100644 app/Services/Logic/Search/User.php delete mode 100644 app/Services/Search/UserDocument.php delete mode 100644 app/Services/Search/UserSearcher.php delete mode 100644 app/Services/Sync/UserIndex.php delete mode 100644 config/xs.user.default.ini diff --git a/.gitignore b/.gitignore index 5870809d..4a25f9b4 100644 --- a/.gitignore +++ b/.gitignore @@ -5,7 +5,6 @@ /config/xs.course.ini /config/xs.article.ini /config/xs.question.ini -/config/xs.user.ini /config/alipay/*.crt /config/wxpay/*.pem /db/migrations/schema.php diff --git a/app/Console/Tasks/CleanDemoDataTask.php b/app/Console/Tasks/CleanDemoDataTask.php index 1fb99e63..b6de241d 100644 --- a/app/Console/Tasks/CleanDemoDataTask.php +++ b/app/Console/Tasks/CleanDemoDataTask.php @@ -106,9 +106,6 @@ class CleanDemoDataTask extends Task $questionIndexTask = new QuestionIndexTask(); $questionIndexTask->cleanAction(); - - $userIndexTask = new UserIndexTask(); - $userIndexTask->cleanAction(); } protected function isDemoEnv() diff --git a/app/Console/Tasks/SyncUserIndexTask.php b/app/Console/Tasks/SyncUserIndexTask.php deleted file mode 100644 index 554e7e70..00000000 --- a/app/Console/Tasks/SyncUserIndexTask.php +++ /dev/null @@ -1,65 +0,0 @@ -getRedis(); - - $key = $this->getSyncKey(); - - $userIds = $redis->sRandMember($key, 1000); - - if (!$userIds) return; - - $userRepo = new UserRepo(); - - $users = $userRepo->findByIds($userIds); - - if ($users->count() == 0) return; - - $document = new UserDocument(); - - $handler = new UserSearcher(); - - $index = $handler->getXS()->getIndex(); - - $index->openBuffer(); - - foreach ($users as $user) { - - $doc = $document->setDocument($user); - - if ($user->deleted == 0) { - $index->update($doc); - } else { - $index->del($user->id); - } - } - - $index->closeBuffer(); - - $redis->sRem($key, ...$userIds); - } - - protected function getSyncKey() - { - $sync = new UserIndexSync(); - - return $sync->getSyncKey(); - } - -} diff --git a/app/Console/Tasks/UserIndexTask.php b/app/Console/Tasks/UserIndexTask.php deleted file mode 100644 index 77b0db5d..00000000 --- a/app/Console/Tasks/UserIndexTask.php +++ /dev/null @@ -1,154 +0,0 @@ -searchUsers($query); - - var_export($result); - } - - /** - * 清空索引 - * - * @command: php console.php user_index clean - */ - public function cleanAction() - { - $this->cleanUserIndex(); - } - - /** - * 重建索引 - * - * @command: php console.php user_index rebuild - */ - public function rebuildAction() - { - $this->rebuildUserIndex(); - } - - /** - * 清空索引 - */ - protected function cleanUserIndex() - { - $handler = new UserSearcher(); - - $index = $handler->getXS()->getIndex(); - - echo '------ start clean user index ------' . PHP_EOL; - - $index->clean(); - - echo '------ end clean user index ------' . PHP_EOL; - } - - /** - * 重建索引 - */ - protected function rebuildUserIndex() - { - $limit = 1000; - - $totalCount = $this->countUsers(); - - if ($totalCount == 0) return; - - $page = ceil($totalCount / $limit); - - $handler = new UserSearcher(); - - $documenter = new UserDocument(); - - $index = $handler->getXS()->getIndex(); - - echo '------ start rebuild user index ------' . PHP_EOL; - - $index->beginRebuild(); - - for ($i = 0; $i < $page; $i++) { - - $offset = $i * $limit; - - $users = $this->findUsers($limit, $offset); - - if ($users->count() == 0) break; - - foreach ($users as $user) { - $document = $documenter->setDocument($user); - $index->add($document); - } - - echo "------ fetch users: {$limit},{$offset} ------" . PHP_EOL; - } - - $index->endRebuild(); - - echo '------ end rebuild user index ------' . PHP_EOL; - } - - /** - * 搜索课程 - * - * @param string $query - * @return array - * @throws \XSException - */ - protected function searchUsers($query) - { - $handler = new UserSearcher(); - - return $handler->search($query); - } - - /** - * @param int $limit - * @param int $offset - * @return ResultsetInterface|Resultset|UserModel[] - */ - protected function findUsers($limit, $offset) - { - return UserModel::query() - ->where('deleted = 0') - ->limit($limit, $offset) - ->execute(); - } - - protected function countUsers() - { - $userRepo = new UserRepo(); - - return $userRepo->countUsers(); - } - -} diff --git a/app/Http/Api/Controllers/SearchController.php b/app/Http/Api/Controllers/SearchController.php index 4b1cd272..9bd10ee2 100644 --- a/app/Http/Api/Controllers/SearchController.php +++ b/app/Http/Api/Controllers/SearchController.php @@ -9,9 +9,7 @@ namespace App\Http\Api\Controllers; use App\Services\Logic\Search\Article as ArticleSearch; use App\Services\Logic\Search\Course as CourseSearch; -use App\Services\Logic\Search\Group as GroupSearch; use App\Services\Logic\Search\Question as QuestionSearch; -use App\Services\Logic\Search\User as UserSearch; /** * @RoutePrefix("/api/search") @@ -46,7 +44,7 @@ class SearchController extends Controller /** * @param string $type - * @return ArticleSearch|QuestionSearch|CourseSearch|GroupSearch|UserSearch + * @return ArticleSearch|QuestionSearch|CourseSearch */ protected function getSearchService($type) { @@ -57,12 +55,6 @@ class SearchController extends Controller case 'question': $service = new QuestionSearch(); break; - case 'group': - $service = new GroupSearch(); - break; - case 'user': - $service = new UserSearch(); - break; default: $service = new CourseSearch(); break; diff --git a/app/Http/Home/Controllers/SearchController.php b/app/Http/Home/Controllers/SearchController.php index 7d8a2571..c8498354 100644 --- a/app/Http/Home/Controllers/SearchController.php +++ b/app/Http/Home/Controllers/SearchController.php @@ -9,9 +9,7 @@ namespace App\Http\Home\Controllers; use App\Services\Logic\Search\Article as ArticleSearchService; use App\Services\Logic\Search\Course as CourseSearchService; -use App\Services\Logic\Search\Group as GroupSearchService; use App\Services\Logic\Search\Question as QuestionSearchService; -use App\Services\Logic\Search\User as UserSearchService; /** * @RoutePrefix("/search") @@ -48,7 +46,7 @@ class SearchController extends Controller /** * @param string $type - * @return ArticleSearchService|QuestionSearchService|CourseSearchService|GroupSearchService|UserSearchService + * @return ArticleSearchService|QuestionSearchService|CourseSearchService */ protected function getSearchService($type) { @@ -59,12 +57,6 @@ class SearchController extends Controller case 'question': $service = new QuestionSearchService(); break; - case 'group': - $service = new GroupSearchService(); - break; - case 'user': - $service = new UserSearchService(); - break; default: $service = new CourseSearchService(); break; diff --git a/app/Http/Home/Views/search/index.volt b/app/Http/Home/Views/search/index.volt index e890f85f..9ca3d0e9 100644 --- a/app/Http/Home/Views/search/index.volt +++ b/app/Http/Home/Views/search/index.volt @@ -4,7 +4,7 @@ {{ partial('macros/course') }} - {% set types = {'course':'课程','article':'专栏','question':'问答','user':'用户'} %} + {% set types = {'course':'课程','article':'专栏','question':'问答'} %} {% set type = request.get('type','trim','course') %} {% set query = request.get('query','striptags','') %} @@ -39,10 +39,6 @@
{{ partial('search/question') }}
- {% elseif type == 'user' %} -
- {{ partial('search/user') }} -
{% endif %} diff --git a/app/Http/Home/Views/search/user.volt b/app/Http/Home/Views/search/user.volt deleted file mode 100644 index 0f7a07f1..00000000 --- a/app/Http/Home/Views/search/user.volt +++ /dev/null @@ -1,29 +0,0 @@ -{{ partial('macros/user') }} - -{% if pager.total_pages > 0 %} -
- {% for item in pager.items %} - {% set user_url = url({'for':'home.user.show','id':item.id}) %} - {% set item.about = item.about|default('这个家伙真懒,什么也没有留下!') %} -
-
- - {{ item.name }} - -
-
- -
{{ item.about }}
-
- 性别:{{ gender_info(item.gender) }} - 地区:{{ item.area }} -
-
-
- {% endfor %} -
-{% else %} - {{ partial('search/empty') }} -{% endif %} diff --git a/app/Models/User.php b/app/Models/User.php index 4cf2eb87..298c8958 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -9,7 +9,6 @@ namespace App\Models; use App\Caches\MaxUserId as MaxUserIdCache; use App\Caches\User as UserCache; -use App\Services\Sync\UserIndex as UserIndexSync; use Phalcon\Mvc\Model\Behavior\SoftDelete; use Phalcon\Text; @@ -216,11 +215,6 @@ class User extends Model public function beforeUpdate() { - if (time() - $this->update_time > 3 * 3600) { - $sync = new UserIndexSync(); - $sync->addItem($this->id); - } - $this->update_time = time(); } diff --git a/app/Services/Logic/Search/Group.php b/app/Services/Logic/Search/Group.php deleted file mode 100644 index 215e06b6..00000000 --- a/app/Services/Logic/Search/Group.php +++ /dev/null @@ -1,90 +0,0 @@ -getParams(); - $page = $pagerQuery->getPage(); - $limit = $pagerQuery->getLimit(); - - $searcher = new GroupSearcherService(); - - $paginator = new XunSearchPaginator([ - 'xs' => $searcher->getXS(), - 'highlight' => $searcher->getHighlightFields(), - 'query' => $params['query'], - 'page' => $page, - 'limit' => $limit, - ]); - - $pager = $paginator->getPaginate(); - - return $this->handleGroups($pager); - } - - public function getHotQuery($limit = 10, $type = 'total') - { - $searcher = new GroupSearcherService(); - - return $searcher->getHotQuery($limit, $type); - } - - public function getRelatedQuery($query, $limit = 10) - { - $searcher = new GroupSearcherService(); - - return $searcher->getRelatedQuery($query, $limit); - } - - protected function handleGroups($pager) - { - if ($pager->total_items == 0) { - return $pager; - } - - $items = []; - - $baseUrl = kg_cos_url(); - - foreach ($pager->items as $item) { - - $owner = json_decode($item['owner'], true); - - if (!empty($item['avatar']) && !Text::startsWith($item['avatar'], 'http')) { - $item['avatar'] = $baseUrl . $item['avatar']; - } - - $items[] = [ - 'id' => (int)$item['id'], - 'type' => (int)$item['type'], - 'name' => (string)$item['name'], - 'avatar' => (string)$item['avatar'], - 'about' => (string)$item['about'], - 'user_count' => (int)$item['user_count'], - 'msg_count' => (int)$item['msg_count'], - 'owner' => $owner, - ]; - } - - $pager->items = $items; - - return $pager; - } - -} diff --git a/app/Services/Logic/Search/User.php b/app/Services/Logic/Search/User.php deleted file mode 100644 index 6c171f75..00000000 --- a/app/Services/Logic/Search/User.php +++ /dev/null @@ -1,85 +0,0 @@ -getParams(); - $page = $pagerQuery->getPage(); - $limit = $pagerQuery->getLimit(); - - $searcher = new UserSearcherService(); - - $paginator = new XunSearchPaginator([ - 'xs' => $searcher->getXS(), - 'highlight' => $searcher->getHighlightFields(), - 'query' => $params['query'], - 'page' => $page, - 'limit' => $limit, - ]); - - $pager = $paginator->getPaginate(); - - return $this->handleUsers($pager); - } - - public function getHotQuery($limit = 10, $type = 'total') - { - $searcher = new UserSearcherService(); - - return $searcher->getHotQuery($limit, $type); - } - - public function getRelatedQuery($query, $limit = 10) - { - $searcher = new UserSearcherService(); - - return $searcher->getRelatedQuery($query, $limit); - } - - protected function handleUsers($pager) - { - if ($pager->total_items == 0) { - return $pager; - } - - $items = []; - - $baseUrl = kg_cos_url(); - - foreach ($pager->items as $item) { - - $item['avatar'] = $baseUrl . $item['avatar']; - - $items[] = [ - 'id' => (int)$item['id'], - 'name' => (string)$item['name'], - 'avatar' => (string)$item['avatar'], - 'title' => (string)$item['title'], - 'about' => (string)$item['about'], - 'vip' => (int)$item['vip'], - 'gender' => (int)$item['gender'], - 'area' => (string)$item['area'], - ]; - } - - $pager->items = $items; - - return $pager; - } - -} diff --git a/app/Services/Search/UserDocument.php b/app/Services/Search/UserDocument.php deleted file mode 100644 index 117063aa..00000000 --- a/app/Services/Search/UserDocument.php +++ /dev/null @@ -1,55 +0,0 @@ -formatDocument($user); - - $doc->setFields($data); - - return $doc; - } - - /** - * 格式化文档 - * - * @param UserModel $user - * @return array - */ - public function formatDocument(UserModel $user) - { - $user->avatar = UserModel::getAvatarPath($user->avatar); - - return [ - 'id' => $user->id, - 'name' => $user->name, - 'title' => $user->title, - 'avatar' => $user->avatar, - 'about' => $user->about, - 'gender' => $user->gender, - 'area' => $user->area, - 'vip' => $user->vip, - ]; - } - -} diff --git a/app/Services/Search/UserSearcher.php b/app/Services/Search/UserSearcher.php deleted file mode 100644 index 35d73355..00000000 --- a/app/Services/Search/UserSearcher.php +++ /dev/null @@ -1,30 +0,0 @@ -xs = $this->getXS(); - } - - public function getXS() - { - $filename = config_path('xs.user.ini'); - - return new \XS($filename); - } - - public function getHighlightFields() - { - return ['name', 'about']; - } - -} diff --git a/app/Services/Sync/UserIndex.php b/app/Services/Sync/UserIndex.php deleted file mode 100644 index 63a6fdaf..00000000 --- a/app/Services/Sync/UserIndex.php +++ /dev/null @@ -1,38 +0,0 @@ -getRedis(); - - $key = $this->getSyncKey(); - - $redis->sAdd($key, $userId); - - if ($redis->sCard($key) == 1) { - $redis->expire($key, $this->lifetime); - } - } - - public function getSyncKey() - { - return 'sync_user_index'; - } - -} diff --git a/config/xs.user.default.ini b/config/xs.user.default.ini deleted file mode 100644 index ed9d1b41..00000000 --- a/config/xs.user.default.ini +++ /dev/null @@ -1,32 +0,0 @@ -project.name = user -project.default_charset = UTF-8 - -server.index = xunsearch:8383 -server.search = xunsearch:8384 - -[id] -type = id - -[name] -type = title - -[avatar] -type = string - -[title] -type = string - -[about] -type = body - -[area] -type = string -index = self - -[gender] -type = string -index = self -tokenizer = full - -[vip] -type = string \ No newline at end of file diff --git a/public/static/home/css/common.css b/public/static/home/css/common.css index c37dc67e..c03b67b8 100644 --- a/public/static/home/css/common.css +++ b/public/static/home/css/common.css @@ -353,16 +353,14 @@ } .search-course-card, -.search-article-card, -.search-user-card { +.search-article-card { display: flex; padding-bottom: 15px; margin-bottom: 15px; border-bottom: 1px solid #f6f6f6; } -.search-course-card:last-child, -.search-user-card:last-child { +.search-course-card:last-child { padding-bottom: 0; margin-bottom: 0; border: none; @@ -374,8 +372,7 @@ margin-right: 15px; } -.search-course-card .cover img, -.search-user-card .avatar img { +.search-course-card .cover img { width: 100%; height: 100%; } @@ -384,14 +381,12 @@ width: 500px; } -.search-course-card .title, -.search-user-card .name { +.search-course-card .title { margin-bottom: 10px; white-space: nowrap; } -.search-course-card .summary, -.search-user-card .about { +.search-course-card .summary { margin-bottom: 10px; line-height: 1.5em; max-height: 4.5em; @@ -401,41 +396,24 @@ } .search-course-card .meta, -.search-user-card .meta, .search-article-card .meta, .search-question-card .meta { color: #999; } .search-course-card .meta span, -.search-user-card .meta span, .search-article-card .meta span, .search-question-card .meta span { margin-right: 10px; } .search-course-card em, -.search-user-card em, .search-article-card em, .search-question-card em { color: red; font-style: normal; } -.search-user-card .avatar { - width: 90px; - height: 90px; - margin-right: 15px; -} - -.search-user-card .avatar img { - border-radius: 100%; -} - -.search-user-card .info { - width: 600px; -} - .query-badge { padding: 2px 5px; margin-right: 5px; From 8d64969040c9852bcc94bd3371e3a3f4ae194ebc Mon Sep 17 00:00:00 2001 From: koogua Date: Thu, 8 Sep 2022 20:01:11 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E8=B0=83=E6=95=B4Notice=E7=9B=AE=E5=BD=95?= =?UTF-8?q?=E7=BB=93=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Console/Tasks/DeliverTask.php | 2 +- app/Console/Tasks/NoticeTask.php | 30 +++----- app/Console/Tasks/PointGiftDeliverTask.php | 2 +- app/Console/Tasks/RefundTask.php | 2 +- app/Console/Tasks/ServerMonitorTask.php | 2 +- app/Console/Tasks/TeacherLiveNoticeTask.php | 2 +- app/Http/Admin/Controllers/TestController.php | 4 +- app/Http/Admin/Services/Answer.php | 6 +- app/Http/Admin/Services/Article.php | 4 +- app/Http/Admin/Services/Consult.php | 2 +- app/Http/Admin/Services/PointGiftRedeem.php | 2 +- app/Http/Admin/Services/Question.php | 4 +- app/Http/Api/Services/Connect.php | 2 +- app/Http/Home/Services/Connect.php | 2 +- app/Listeners/Account.php | 2 +- app/Models/Task.php | 2 +- app/Services/LiveNotify.php | 2 +- app/Services/Logic/Answer/AnswerAccept.php | 2 +- app/Services/Logic/Answer/AnswerCreate.php | 2 +- app/Services/Logic/Answer/AnswerLike.php | 2 +- .../Logic/Article/ArticleFavorite.php | 2 +- app/Services/Logic/Article/ArticleLike.php | 2 +- .../Logic/Comment/AfterCreateTrait.php | 8 +-- app/Services/Logic/Comment/CommentLike.php | 2 +- app/Services/Logic/Consult/ConsultCreate.php | 2 +- app/Services/Logic/Consult/ConsultLike.php | 2 +- app/Services/Logic/Consult/ConsultReply.php | 2 +- .../Logic/Notice/DingTalk/CustomService.php | 68 ------------------- .../Notice/{ => External}/AccountLogin.php | 4 +- .../Notice/{ => External}/ConsultReply.php | 6 +- .../{ => External}/DingTalk/ConsultCreate.php | 2 +- .../DingTalk/PointGiftRedeem.php | 2 +- .../{ => External}/DingTalk/ServerMonitor.php | 2 +- .../{ => External}/DingTalk/TeacherLive.php | 2 +- .../Logic/Notice/{ => External}/LiveBegin.php | 6 +- .../Logic/Notice/{ => External}/Mail/Test.php | 2 +- .../Notice/{ => External}/Mail/Verify.php | 2 +- .../Notice/{ => External}/OrderFinish.php | 6 +- .../{ => External}/PointGoodsDeliver.php | 6 +- .../Notice/{ => External}/RefundFinish.php | 6 +- .../{ => External}/Sms/ConsultReply.php | 2 +- .../{ => External}/Sms/GoodsDeliver.php | 2 +- .../Notice/{ => External}/Sms/LiveBegin.php | 2 +- .../Notice/{ => External}/Sms/OrderFinish.php | 2 +- .../{ => External}/Sms/RefundFinish.php | 2 +- .../Logic/Notice/{ => External}/Sms/Test.php | 2 +- .../Notice/{ => External}/Sms/Verify.php | 2 +- .../{ => External}/WeChat/AccountLogin.php | 2 +- .../{ => External}/WeChat/ConsultReply.php | 2 +- .../{ => External}/WeChat/GoodsDeliver.php | 2 +- .../{ => External}/WeChat/LiveBegin.php | 2 +- .../{ => External}/WeChat/OrderFinish.php | 2 +- .../{ => External}/WeChat/RefundFinish.php | 2 +- .../{System => Internal}/AnswerAccepted.php | 2 +- .../{System => Internal}/AnswerApproved.php | 2 +- .../{System => Internal}/AnswerCommented.php | 2 +- .../{System => Internal}/AnswerLiked.php | 2 +- .../{System => Internal}/AnswerRejected.php | 2 +- .../{System => Internal}/ArticleApproved.php | 2 +- .../{System => Internal}/ArticleCommented.php | 2 +- .../{System => Internal}/ArticleDeleted.php | 2 +- .../{System => Internal}/ArticleFavorited.php | 2 +- .../{System => Internal}/ArticleLiked.php | 2 +- .../{System => Internal}/ArticleRejected.php | 2 +- .../{System => Internal}/ChapterCommented.php | 2 +- .../{System => Internal}/CommentLiked.php | 2 +- .../{System => Internal}/CommentReplied.php | 2 +- .../{System => Internal}/ConsultLiked.php | 2 +- .../{System => Internal}/QuestionAnswered.php | 2 +- .../{System => Internal}/QuestionApproved.php | 2 +- .../QuestionCommented.php | 2 +- .../QuestionFavorited.php | 2 +- .../{System => Internal}/QuestionLiked.php | 2 +- .../{System => Internal}/QuestionRejected.php | 2 +- .../{System => Internal}/ReviewLiked.php | 2 +- .../Logic/Question/QuestionFavorite.php | 2 +- app/Services/Logic/Question/QuestionLike.php | 2 +- app/Services/Logic/Review/ReviewLike.php | 2 +- app/Services/Logic/Verify/MailCode.php | 2 +- app/Services/Logic/Verify/SmsCode.php | 2 +- 80 files changed, 106 insertions(+), 186 deletions(-) delete mode 100644 app/Services/Logic/Notice/DingTalk/CustomService.php rename app/Services/Logic/Notice/{ => External}/AccountLogin.php (93%) rename app/Services/Logic/Notice/{ => External}/ConsultReply.php (94%) rename app/Services/Logic/Notice/{ => External}/DingTalk/ConsultCreate.php (97%) rename app/Services/Logic/Notice/{ => External}/DingTalk/PointGiftRedeem.php (96%) rename app/Services/Logic/Notice/{ => External}/DingTalk/ServerMonitor.php (94%) rename app/Services/Logic/Notice/{ => External}/DingTalk/TeacherLive.php (96%) rename app/Services/Logic/Notice/{ => External}/LiveBegin.php (94%) rename app/Services/Logic/Notice/{ => External}/Mail/Test.php (94%) rename app/Services/Logic/Notice/{ => External}/Mail/Verify.php (96%) rename app/Services/Logic/Notice/{ => External}/OrderFinish.php (93%) rename app/Services/Logic/Notice/{ => External}/PointGoodsDeliver.php (93%) rename app/Services/Logic/Notice/{ => External}/RefundFinish.php (93%) rename app/Services/Logic/Notice/{ => External}/Sms/ConsultReply.php (94%) rename app/Services/Logic/Notice/{ => External}/Sms/GoodsDeliver.php (95%) rename app/Services/Logic/Notice/{ => External}/Sms/LiveBegin.php (95%) rename app/Services/Logic/Notice/{ => External}/Sms/OrderFinish.php (94%) rename app/Services/Logic/Notice/{ => External}/Sms/RefundFinish.php (94%) rename app/Services/Logic/Notice/{ => External}/Sms/Test.php (89%) rename app/Services/Logic/Notice/{ => External}/Sms/Verify.php (93%) rename app/Services/Logic/Notice/{ => External}/WeChat/AccountLogin.php (96%) rename app/Services/Logic/Notice/{ => External}/WeChat/ConsultReply.php (95%) rename app/Services/Logic/Notice/{ => External}/WeChat/GoodsDeliver.php (95%) rename app/Services/Logic/Notice/{ => External}/WeChat/LiveBegin.php (95%) rename app/Services/Logic/Notice/{ => External}/WeChat/OrderFinish.php (95%) rename app/Services/Logic/Notice/{ => External}/WeChat/RefundFinish.php (95%) rename app/Services/Logic/Notice/{System => Internal}/AnswerAccepted.php (96%) rename app/Services/Logic/Notice/{System => Internal}/AnswerApproved.php (96%) rename app/Services/Logic/Notice/{System => Internal}/AnswerCommented.php (96%) rename app/Services/Logic/Notice/{System => Internal}/AnswerLiked.php (96%) rename app/Services/Logic/Notice/{System => Internal}/AnswerRejected.php (96%) rename app/Services/Logic/Notice/{System => Internal}/ArticleApproved.php (95%) rename app/Services/Logic/Notice/{System => Internal}/ArticleCommented.php (95%) rename app/Services/Logic/Notice/{System => Internal}/ArticleDeleted.php (95%) rename app/Services/Logic/Notice/{System => Internal}/ArticleFavorited.php (95%) rename app/Services/Logic/Notice/{System => Internal}/ArticleLiked.php (95%) rename app/Services/Logic/Notice/{System => Internal}/ArticleRejected.php (95%) rename app/Services/Logic/Notice/{System => Internal}/ChapterCommented.php (88%) rename app/Services/Logic/Notice/{System => Internal}/CommentLiked.php (95%) rename app/Services/Logic/Notice/{System => Internal}/CommentReplied.php (96%) rename app/Services/Logic/Notice/{System => Internal}/ConsultLiked.php (96%) rename app/Services/Logic/Notice/{System => Internal}/QuestionAnswered.php (96%) rename app/Services/Logic/Notice/{System => Internal}/QuestionApproved.php (95%) rename app/Services/Logic/Notice/{System => Internal}/QuestionCommented.php (95%) rename app/Services/Logic/Notice/{System => Internal}/QuestionFavorited.php (95%) rename app/Services/Logic/Notice/{System => Internal}/QuestionLiked.php (95%) rename app/Services/Logic/Notice/{System => Internal}/QuestionRejected.php (95%) rename app/Services/Logic/Notice/{System => Internal}/ReviewLiked.php (96%) diff --git a/app/Console/Tasks/DeliverTask.php b/app/Console/Tasks/DeliverTask.php index de42c7ea..41608ae9 100644 --- a/app/Console/Tasks/DeliverTask.php +++ b/app/Console/Tasks/DeliverTask.php @@ -19,7 +19,7 @@ use App\Repos\Vip as VipRepo; use App\Services\Logic\Deliver\CourseDeliver as CourseDeliverService; use App\Services\Logic\Deliver\PackageDeliver as PackageDeliverService; use App\Services\Logic\Deliver\VipDeliver as VipDeliverService; -use App\Services\Logic\Notice\OrderFinish as OrderFinishNotice; +use App\Services\Logic\Notice\External\OrderFinish as OrderFinishNotice; use App\Services\Logic\Point\History\OrderConsume as OrderConsumePointHistory; use Phalcon\Mvc\Model; use Phalcon\Mvc\Model\Resultset; diff --git a/app/Console/Tasks/NoticeTask.php b/app/Console/Tasks/NoticeTask.php index d8ec1d8b..dddf3a96 100644 --- a/app/Console/Tasks/NoticeTask.php +++ b/app/Console/Tasks/NoticeTask.php @@ -8,16 +8,15 @@ namespace App\Console\Tasks; use App\Models\Task as TaskModel; -use App\Services\Logic\Notice\AccountLogin as AccountLoginNotice; -use App\Services\Logic\Notice\ConsultReply as ConsultReplyNotice; -use App\Services\Logic\Notice\DingTalk\ConsultCreate as ConsultCreateNotice; -use App\Services\Logic\Notice\DingTalk\CustomService as CustomServiceNotice; -use App\Services\Logic\Notice\DingTalk\ServerMonitor as ServerMonitorNotice; -use App\Services\Logic\Notice\DingTalk\TeacherLive as TeacherLiveNotice; -use App\Services\Logic\Notice\LiveBegin as LiveBeginNotice; -use App\Services\Logic\Notice\OrderFinish as OrderFinishNotice; -use App\Services\Logic\Notice\PointGoodsDeliver as PointGoodsDeliverNotice; -use App\Services\Logic\Notice\RefundFinish as RefundFinishNotice; +use App\Services\Logic\Notice\External\AccountLogin as AccountLoginNotice; +use App\Services\Logic\Notice\External\ConsultReply as ConsultReplyNotice; +use App\Services\Logic\Notice\External\DingTalk\ConsultCreate as ConsultCreateNotice; +use App\Services\Logic\Notice\External\DingTalk\ServerMonitor as ServerMonitorNotice; +use App\Services\Logic\Notice\External\DingTalk\TeacherLive as TeacherLiveNotice; +use App\Services\Logic\Notice\External\LiveBegin as LiveBeginNotice; +use App\Services\Logic\Notice\External\OrderFinish as OrderFinishNotice; +use App\Services\Logic\Notice\External\PointGoodsDeliver as PointGoodsDeliverNotice; +use App\Services\Logic\Notice\External\RefundFinish as RefundFinishNotice; use Phalcon\Mvc\Model\Resultset; use Phalcon\Mvc\Model\ResultsetInterface; @@ -62,9 +61,6 @@ class NoticeTask extends Task case TaskModel::TYPE_STAFF_NOTICE_SERVER_MONITOR: $this->handleServerMonitorNotice($task); break; - case TaskModel::TYPE_STAFF_NOTICE_CUSTOM_SERVICE: - $this->handleCustomServiceNotice($task); - break; } $task->status = TaskModel::STATUS_FINISHED; @@ -157,13 +153,6 @@ class NoticeTask extends Task $notice->handleTask($task); } - protected function handleCustomServiceNotice(TaskModel $task) - { - $notice = new CustomServiceNotice(); - - $notice->handleTask($task); - } - /** * @param int $limit * @return ResultsetInterface|Resultset|TaskModel[] @@ -181,7 +170,6 @@ class NoticeTask extends Task TaskModel::TYPE_STAFF_NOTICE_CONSULT_CREATE, TaskModel::TYPE_STAFF_NOTICE_TEACHER_LIVE, TaskModel::TYPE_STAFF_NOTICE_SERVER_MONITOR, - TaskModel::TYPE_STAFF_NOTICE_CUSTOM_SERVICE, ]; $status = TaskModel::STATUS_PENDING; diff --git a/app/Console/Tasks/PointGiftDeliverTask.php b/app/Console/Tasks/PointGiftDeliverTask.php index b1553501..f5437a63 100644 --- a/app/Console/Tasks/PointGiftDeliverTask.php +++ b/app/Console/Tasks/PointGiftDeliverTask.php @@ -17,7 +17,7 @@ use App\Repos\User as UserRepo; use App\Repos\Vip as VipRepo; use App\Services\Logic\Deliver\CourseDeliver as CourseDeliverService; use App\Services\Logic\Deliver\VipDeliver as VipDeliverService; -use App\Services\Logic\Notice\DingTalk\PointGiftRedeem as PointGiftRedeemNotice; +use App\Services\Logic\Notice\External\DingTalk\PointGiftRedeem as PointGiftRedeemNotice; use App\Services\Logic\Point\History\PointGiftRefund as PointGiftRefundPointHistory; use Phalcon\Mvc\Model\Resultset; use Phalcon\Mvc\Model\ResultsetInterface; diff --git a/app/Console/Tasks/RefundTask.php b/app/Console/Tasks/RefundTask.php index 4ad651df..108cc60e 100644 --- a/app/Console/Tasks/RefundTask.php +++ b/app/Console/Tasks/RefundTask.php @@ -16,7 +16,7 @@ use App\Repos\Order as OrderRepo; use App\Repos\Refund as RefundRepo; use App\Repos\Trade as TradeRepo; use App\Repos\User as UserRepo; -use App\Services\Logic\Notice\RefundFinish as RefundFinishNotice; +use App\Services\Logic\Notice\External\RefundFinish as RefundFinishNotice; use App\Services\Pay\Alipay as AlipayService; use App\Services\Pay\Wxpay as WxpayService; use Phalcon\Mvc\Model\Resultset; diff --git a/app/Console/Tasks/ServerMonitorTask.php b/app/Console/Tasks/ServerMonitorTask.php index 44ff4f3e..897d5999 100644 --- a/app/Console/Tasks/ServerMonitorTask.php +++ b/app/Console/Tasks/ServerMonitorTask.php @@ -9,7 +9,7 @@ namespace App\Console\Tasks; use App\Library\Benchmark; use App\Models\User as UserModel; -use App\Services\Logic\Notice\DingTalk\ServerMonitor as ServerMonitorNotice; +use App\Services\Logic\Notice\External\DingTalk\ServerMonitor as ServerMonitorNotice; use App\Services\Search\UserSearcher; use GatewayClient\Gateway; diff --git a/app/Console/Tasks/TeacherLiveNoticeTask.php b/app/Console/Tasks/TeacherLiveNoticeTask.php index e8e982f6..6b3ddb0d 100644 --- a/app/Console/Tasks/TeacherLiveNoticeTask.php +++ b/app/Console/Tasks/TeacherLiveNoticeTask.php @@ -9,7 +9,7 @@ namespace App\Console\Tasks; use App\Models\ChapterLive as ChapterLiveModel; use App\Repos\ChapterLive as ChapterLiveRepo; -use App\Services\Logic\Notice\DingTalk\TeacherLive as TeacherLiveNotice; +use App\Services\Logic\Notice\External\DingTalk\TeacherLive as TeacherLiveNotice; use Phalcon\Mvc\Model\Resultset; use Phalcon\Mvc\Model\ResultsetInterface; diff --git a/app/Http/Admin/Controllers/TestController.php b/app/Http/Admin/Controllers/TestController.php index e72d30a8..e7c4a5c5 100644 --- a/app/Http/Admin/Controllers/TestController.php +++ b/app/Http/Admin/Controllers/TestController.php @@ -13,8 +13,8 @@ use App\Http\Admin\Services\WxpayTest as WxpayTestService; use App\Services\Captcha as CaptchaService; use App\Services\DingTalkNotice as DingTalkNoticeService; use App\Services\Live as LiveService; -use App\Services\Logic\Notice\Mail\Test as MailTestService; -use App\Services\Logic\Notice\Sms\Test as SmsTestService; +use App\Services\Logic\Notice\External\Mail\Test as MailTestService; +use App\Services\Logic\Notice\External\Sms\Test as SmsTestService; use App\Services\MyStorage as StorageService; use App\Services\Vod as VodService; use App\Services\WeChat as WeChatService; diff --git a/app/Http/Admin/Services/Answer.php b/app/Http/Admin/Services/Answer.php index 7a1cf0aa..1b2f527a 100644 --- a/app/Http/Admin/Services/Answer.php +++ b/app/Http/Admin/Services/Answer.php @@ -21,9 +21,9 @@ use App\Repos\Report as ReportRepo; use App\Repos\User as UserRepo; use App\Services\Logic\Answer\AnswerDataTrait; use App\Services\Logic\Answer\AnswerInfo as AnswerInfoService; -use App\Services\Logic\Notice\System\AnswerApproved as AnswerApprovedNotice; -use App\Services\Logic\Notice\System\AnswerRejected as AnswerRejectedNotice; -use App\Services\Logic\Notice\System\QuestionAnswered as QuestionAnsweredNotice; +use App\Services\Logic\Notice\Internal\AnswerApproved as AnswerApprovedNotice; +use App\Services\Logic\Notice\Internal\AnswerRejected as AnswerRejectedNotice; +use App\Services\Logic\Notice\Internal\QuestionAnswered as QuestionAnsweredNotice; use App\Services\Logic\Point\History\AnswerPost as AnswerPostPointHistory; use App\Validators\Answer as AnswerValidator; diff --git a/app/Http/Admin/Services/Article.php b/app/Http/Admin/Services/Article.php index e796ee74..3ba1443e 100644 --- a/app/Http/Admin/Services/Article.php +++ b/app/Http/Admin/Services/Article.php @@ -24,8 +24,8 @@ use App\Repos\User as UserRepo; use App\Services\Logic\Article\ArticleDataTrait; use App\Services\Logic\Article\ArticleInfo as ArticleInfoService; use App\Services\Logic\Article\XmTagList as XmTagListService; -use App\Services\Logic\Notice\System\ArticleApproved as ArticleApprovedNotice; -use App\Services\Logic\Notice\System\ArticleRejected as ArticleRejectedNotice; +use App\Services\Logic\Notice\Internal\ArticleApproved as ArticleApprovedNotice; +use App\Services\Logic\Notice\Internal\ArticleRejected as ArticleRejectedNotice; use App\Services\Logic\Point\History\ArticlePost as ArticlePostPointHistory; use App\Services\Sync\ArticleIndex as ArticleIndexSync; use App\Validators\Article as ArticleValidator; diff --git a/app/Http/Admin/Services/Consult.php b/app/Http/Admin/Services/Consult.php index e0c416b8..4934ff69 100644 --- a/app/Http/Admin/Services/Consult.php +++ b/app/Http/Admin/Services/Consult.php @@ -16,7 +16,7 @@ use App\Repos\Chapter as ChapterRepo; use App\Repos\Consult as ConsultRepo; use App\Repos\Course as CourseRepo; use App\Services\Logic\Consult\ConsultInfo as ConsultInfoService; -use App\Services\Logic\Notice\ConsultReply as ConsultReplyNotice; +use App\Services\Logic\Notice\External\ConsultReply as ConsultReplyNotice; use App\Validators\Consult as ConsultValidator; class Consult extends Service diff --git a/app/Http/Admin/Services/PointGiftRedeem.php b/app/Http/Admin/Services/PointGiftRedeem.php index da0705f4..e6ba897c 100644 --- a/app/Http/Admin/Services/PointGiftRedeem.php +++ b/app/Http/Admin/Services/PointGiftRedeem.php @@ -11,7 +11,7 @@ use App\Library\Paginator\Query as PagerQuery; use App\Models\PointGift as PointGiftModel; use App\Models\PointGiftRedeem as PointGiftRedeemModel; use App\Repos\PointGiftRedeem as PointGiftRedeemRepo; -use App\Services\Logic\Notice\PointGoodsDeliver as PointGoodsDeliverNotice; +use App\Services\Logic\Notice\External\PointGoodsDeliver as PointGoodsDeliverNotice; use App\Validators\PointGiftRedeem as PointGiftRedeemValidator; class PointGiftRedeem extends Service diff --git a/app/Http/Admin/Services/Question.php b/app/Http/Admin/Services/Question.php index 71caa2b8..d882b35d 100644 --- a/app/Http/Admin/Services/Question.php +++ b/app/Http/Admin/Services/Question.php @@ -20,8 +20,8 @@ use App\Repos\Category as CategoryRepo; use App\Repos\Question as QuestionRepo; use App\Repos\Report as ReportRepo; use App\Repos\User as UserRepo; -use App\Services\Logic\Notice\System\QuestionApproved as QuestionApprovedNotice; -use App\Services\Logic\Notice\System\QuestionRejected as QuestionRejectedNotice; +use App\Services\Logic\Notice\Internal\QuestionApproved as QuestionApprovedNotice; +use App\Services\Logic\Notice\Internal\QuestionRejected as QuestionRejectedNotice; use App\Services\Logic\Point\History\QuestionPost as QuestionPostPointHistory; use App\Services\Logic\Question\QuestionDataTrait; use App\Services\Logic\Question\QuestionInfo as QuestionInfoService; diff --git a/app/Http/Api/Services/Connect.php b/app/Http/Api/Services/Connect.php index fde7af49..5d334be4 100644 --- a/app/Http/Api/Services/Connect.php +++ b/app/Http/Api/Services/Connect.php @@ -12,7 +12,7 @@ use App\Models\User as UserModel; use App\Repos\Connect as ConnectRepo; use App\Repos\User as UserRepo; use App\Services\Auth\Api as ApiAuthService; -use App\Services\Logic\Notice\AccountLogin as AccountLoginNoticeService; +use App\Services\Logic\Notice\External\AccountLogin as AccountLoginNoticeService; use App\Services\OAuth\QQ as QQAuth; use App\Services\OAuth\WeChat as WeChatAuth; use App\Services\OAuth\WeiBo as WeiBoAuth; diff --git a/app/Http/Home/Services/Connect.php b/app/Http/Home/Services/Connect.php index df7b7c9f..f2c1eabf 100644 --- a/app/Http/Home/Services/Connect.php +++ b/app/Http/Home/Services/Connect.php @@ -16,7 +16,7 @@ use App\Repos\WeChatSubscribe as WeChatSubscribeRepo; use App\Services\Auth\Home as AuthService; use App\Services\Auth\Home as HomeAuthService; use App\Services\Logic\Account\Register as RegisterService; -use App\Services\Logic\Notice\AccountLogin as AccountLoginNotice; +use App\Services\Logic\Notice\External\AccountLogin as AccountLoginNotice; use App\Services\OAuth\QQ as QQAuth; use App\Services\OAuth\WeiBo as WeiBoAuth; use App\Services\OAuth\WeiXin as WeiXinAuth; diff --git a/app/Listeners/Account.php b/app/Listeners/Account.php index de016130..ee2ffda9 100644 --- a/app/Listeners/Account.php +++ b/app/Listeners/Account.php @@ -8,7 +8,7 @@ namespace App\Listeners; use App\Models\User as UserModel; -use App\Services\Logic\Notice\AccountLogin as AccountLoginNoticeService; +use App\Services\Logic\Notice\External\AccountLogin as AccountLoginNoticeService; use App\Services\Logic\Point\History\AccountRegister as AccountRegisterPointHistory; use Phalcon\Events\Event as PhEvent; diff --git a/app/Models/Task.php b/app/Models/Task.php index 70ba6e03..2a0851dd 100644 --- a/app/Models/Task.php +++ b/app/Models/Task.php @@ -35,7 +35,7 @@ class Task extends Model const TYPE_STAFF_NOTICE_CONSULT_CREATE = 31; // 咨询创建通知 const TYPE_STAFF_NOTICE_TEACHER_LIVE = 32; // 直播讲师通知 const TYPE_STAFF_NOTICE_SERVER_MONITOR = 33; // 服务监控通知 - const TYPE_STAFF_NOTICE_CUSTOM_SERVICE = 34; // 客服消息通知 + const TYPE_STAFF_NOTICE_CUSTOM_SERVICE = 34; // 客服消息通知(废弃) const TYPE_STAFF_NOTICE_POINT_GIFT_REDEEM = 35; // 积分兑换通知 const TYPE_STAFF_NOTICE_LUCKY_GIFT_REDEEM = 36; // 抽奖兑换通知 diff --git a/app/Services/LiveNotify.php b/app/Services/LiveNotify.php index bb1b5d46..5ae0554c 100644 --- a/app/Services/LiveNotify.php +++ b/app/Services/LiveNotify.php @@ -12,7 +12,7 @@ use App\Models\Chapter as ChapterModel; use App\Models\ChapterLive as ChapterLiveModel; use App\Repos\Chapter as ChapterRepo; use App\Repos\CourseUser as CourseUserRepo; -use App\Services\Logic\Notice\LiveBegin as LiveBeginNotice; +use App\Services\Logic\Notice\External\LiveBegin as LiveBeginNotice; use Phalcon\Logger\Adapter\File as FileLogger; class LiveNotify extends Service diff --git a/app/Services/Logic/Answer/AnswerAccept.php b/app/Services/Logic/Answer/AnswerAccept.php index 61c7dcde..c005e43e 100644 --- a/app/Services/Logic/Answer/AnswerAccept.php +++ b/app/Services/Logic/Answer/AnswerAccept.php @@ -10,7 +10,7 @@ namespace App\Services\Logic\Answer; use App\Models\Answer as AnswerModel; use App\Models\User as UserModel; use App\Services\Logic\AnswerTrait; -use App\Services\Logic\Notice\System\AnswerAccepted as AnswerAcceptedNotice; +use App\Services\Logic\Notice\Internal\AnswerAccepted as AnswerAcceptedNotice; use App\Services\Logic\Point\History\AnswerAccepted as AnswerAcceptPointHistory; use App\Services\Logic\QuestionTrait; use App\Services\Logic\Service as LogicService; diff --git a/app/Services/Logic/Answer/AnswerCreate.php b/app/Services/Logic/Answer/AnswerCreate.php index 1d8579ad..bee9d861 100644 --- a/app/Services/Logic/Answer/AnswerCreate.php +++ b/app/Services/Logic/Answer/AnswerCreate.php @@ -13,7 +13,7 @@ use App\Models\User as UserModel; use App\Repos\Question as QuestionRepo; use App\Repos\User as UserRepo; use App\Services\Logic\AnswerTrait; -use App\Services\Logic\Notice\System\QuestionAnswered as QuestionAnsweredNotice; +use App\Services\Logic\Notice\Internal\QuestionAnswered as QuestionAnsweredNotice; use App\Services\Logic\Point\History\AnswerPost as AnswerPostPointHistory; use App\Services\Logic\QuestionTrait; use App\Services\Logic\Service as LogicService; diff --git a/app/Services/Logic/Answer/AnswerLike.php b/app/Services/Logic/Answer/AnswerLike.php index f0ff5e9b..f27fc3f4 100644 --- a/app/Services/Logic/Answer/AnswerLike.php +++ b/app/Services/Logic/Answer/AnswerLike.php @@ -12,7 +12,7 @@ use App\Models\AnswerLike as AnswerLikeModel; use App\Models\User as UserModel; use App\Repos\AnswerLike as AnswerLikeRepo; use App\Services\Logic\AnswerTrait; -use App\Services\Logic\Notice\System\AnswerLiked as AnswerLikedNotice; +use App\Services\Logic\Notice\Internal\AnswerLiked as AnswerLikedNotice; use App\Services\Logic\Point\History\AnswerLiked as AnswerLikedPointHistory; use App\Services\Logic\Service as LogicService; use App\Validators\UserLimit as UserLimitValidator; diff --git a/app/Services/Logic/Article/ArticleFavorite.php b/app/Services/Logic/Article/ArticleFavorite.php index 143b3f37..abebf979 100644 --- a/app/Services/Logic/Article/ArticleFavorite.php +++ b/app/Services/Logic/Article/ArticleFavorite.php @@ -12,7 +12,7 @@ use App\Models\ArticleFavorite as ArticleFavoriteModel; use App\Models\User as UserModel; use App\Repos\ArticleFavorite as ArticleFavoriteRepo; use App\Services\Logic\ArticleTrait; -use App\Services\Logic\Notice\System\ArticleFavorited as ArticleFavoritedNotice; +use App\Services\Logic\Notice\Internal\ArticleFavorited as ArticleFavoritedNotice; use App\Services\Logic\Service as LogicService; use App\Validators\UserLimit as UserLimitValidator; diff --git a/app/Services/Logic/Article/ArticleLike.php b/app/Services/Logic/Article/ArticleLike.php index f4786206..76ee55b3 100644 --- a/app/Services/Logic/Article/ArticleLike.php +++ b/app/Services/Logic/Article/ArticleLike.php @@ -12,7 +12,7 @@ use App\Models\ArticleLike as ArticleLikeModel; use App\Models\User as UserModel; use App\Repos\ArticleLike as ArticleLikeRepo; use App\Services\Logic\ArticleTrait; -use App\Services\Logic\Notice\System\ArticleLiked as ArticleLikedNotice; +use App\Services\Logic\Notice\Internal\ArticleLiked as ArticleLikedNotice; use App\Services\Logic\Point\History\ArticleLiked as ArticleLikedPointHistory; use App\Services\Logic\Service as LogicService; use App\Validators\UserLimit as UserLimitValidator; diff --git a/app/Services/Logic/Comment/AfterCreateTrait.php b/app/Services/Logic/Comment/AfterCreateTrait.php index 7da45c12..9dc674cc 100644 --- a/app/Services/Logic/Comment/AfterCreateTrait.php +++ b/app/Services/Logic/Comment/AfterCreateTrait.php @@ -11,10 +11,10 @@ use App\Models\Answer as AnswerModel; use App\Models\Article as ArticleModel; use App\Models\Comment as CommentModel; use App\Models\Question as QuestionModel; -use App\Services\Logic\Notice\System\AnswerCommented as AnswerCommentedNotice; -use App\Services\Logic\Notice\System\ArticleCommented as ArticleCommentedNotice; -use App\Services\Logic\Notice\System\CommentReplied as CommentRepliedNotice; -use App\Services\Logic\Notice\System\QuestionCommented as QuestionCommentedNotice; +use App\Services\Logic\Notice\Internal\AnswerCommented as AnswerCommentedNotice; +use App\Services\Logic\Notice\Internal\ArticleCommented as ArticleCommentedNotice; +use App\Services\Logic\Notice\Internal\CommentReplied as CommentRepliedNotice; +use App\Services\Logic\Notice\Internal\QuestionCommented as QuestionCommentedNotice; use App\Services\Logic\Point\History\CommentPost as CommentPostPointHistory; trait AfterCreateTrait diff --git a/app/Services/Logic/Comment/CommentLike.php b/app/Services/Logic/Comment/CommentLike.php index 481ae526..33d77a83 100644 --- a/app/Services/Logic/Comment/CommentLike.php +++ b/app/Services/Logic/Comment/CommentLike.php @@ -12,7 +12,7 @@ use App\Models\CommentLike as CommentLikeModel; use App\Models\User as UserModel; use App\Repos\CommentLike as CommentLikeRepo; use App\Services\Logic\CommentTrait; -use App\Services\Logic\Notice\System\CommentLiked as CommentLikedNotice; +use App\Services\Logic\Notice\Internal\CommentLiked as CommentLikedNotice; use App\Services\Logic\Service as LogicService; use App\Validators\UserLimit as UserLimitValidator; diff --git a/app/Services/Logic/Consult/ConsultCreate.php b/app/Services/Logic/Consult/ConsultCreate.php index 0cfe85fd..28f52634 100644 --- a/app/Services/Logic/Consult/ConsultCreate.php +++ b/app/Services/Logic/Consult/ConsultCreate.php @@ -15,7 +15,7 @@ use App\Repos\Chapter as ChapterRepo; use App\Repos\Course as CourseRepo; use App\Services\Logic\ChapterTrait; use App\Services\Logic\CourseTrait; -use App\Services\Logic\Notice\DingTalk\ConsultCreate as ConsultCreateNotice; +use App\Services\Logic\Notice\External\DingTalk\ConsultCreate as ConsultCreateNotice; use App\Services\Logic\Service as LogicService; use App\Traits\Client as ClientTrait; use App\Validators\Consult as ConsultValidator; diff --git a/app/Services/Logic/Consult/ConsultLike.php b/app/Services/Logic/Consult/ConsultLike.php index ffb68d73..c062d22c 100644 --- a/app/Services/Logic/Consult/ConsultLike.php +++ b/app/Services/Logic/Consult/ConsultLike.php @@ -12,7 +12,7 @@ use App\Models\ConsultLike as ConsultLikeModel; use App\Models\User as UserModel; use App\Repos\ConsultLike as ConsultLikeRepo; use App\Services\Logic\ConsultTrait; -use App\Services\Logic\Notice\System\ConsultLiked as ConsultLikedNotice; +use App\Services\Logic\Notice\Internal\ConsultLiked as ConsultLikedNotice; use App\Services\Logic\Service as LogicService; use App\Validators\UserLimit as UserLimitValidator; diff --git a/app/Services/Logic/Consult/ConsultReply.php b/app/Services/Logic/Consult/ConsultReply.php index 9ee6f491..91ab3fc5 100644 --- a/app/Services/Logic/Consult/ConsultReply.php +++ b/app/Services/Logic/Consult/ConsultReply.php @@ -9,7 +9,7 @@ namespace App\Services\Logic\Consult; use App\Models\Consult as ConsultModel; use App\Services\Logic\ConsultTrait; -use App\Services\Logic\Notice\ConsultReply as ConsultReplyNotice; +use App\Services\Logic\Notice\External\ConsultReply as ConsultReplyNotice; use App\Services\Logic\Service as LogicService; use App\Validators\Consult as ConsultValidator; diff --git a/app/Services/Logic/Notice/DingTalk/CustomService.php b/app/Services/Logic/Notice/DingTalk/CustomService.php deleted file mode 100644 index aa04eda8..00000000 --- a/app/Services/Logic/Notice/DingTalk/CustomService.php +++ /dev/null @@ -1,68 +0,0 @@ -enabled) return; - - $messageRepo = new ImMessageRepo(); - - $message = $messageRepo->findById($task->item_id); - - $userRepo = new UserRepo(); - - $sender = $userRepo->findById($message->sender_id); - - $content = kg_ph_replace("{user.name} 通过在线客服给你发送了消息:{message.content}", [ - 'user.name' => $sender->name, - 'message.content' => $message->content, - ]); - - $this->atCustomService($content); - } - - public function createTask(ImMessageModel $message) - { - if (!$this->enabled) return; - - $keyName = "dingtalk_custom_service_notice:{$message->sender_id}"; - - $cache = $this->getCache(); - - $content = $cache->get($keyName); - - if ($content) return; - - $cache->save($keyName, 1, 3600); - - $task = new TaskModel(); - - $itemInfo = [ - 'im_message' => ['id' => $message->id], - ]; - - $task->item_id = $message->id; - $task->item_info = $itemInfo; - $task->item_type = TaskModel::TYPE_STAFF_NOTICE_CUSTOM_SERVICE; - $task->priority = TaskModel::PRIORITY_MIDDLE; - $task->status = TaskModel::STATUS_PENDING; - - $task->create(); - } - -} \ No newline at end of file diff --git a/app/Services/Logic/Notice/AccountLogin.php b/app/Services/Logic/Notice/External/AccountLogin.php similarity index 93% rename from app/Services/Logic/Notice/AccountLogin.php rename to app/Services/Logic/Notice/External/AccountLogin.php index 34f866f9..a98aa06d 100644 --- a/app/Services/Logic/Notice/AccountLogin.php +++ b/app/Services/Logic/Notice/External/AccountLogin.php @@ -5,12 +5,12 @@ * @link https://www.koogua.com */ -namespace App\Services\Logic\Notice; +namespace App\Services\Logic\Notice\External; use App\Models\Task as TaskModel; use App\Models\User as UserModel; use App\Repos\WeChatSubscribe as WeChatSubscribeRepo; -use App\Services\Logic\Notice\WeChat\AccountLogin as WeChatAccountLoginNotice; +use App\Services\Logic\Notice\External\WeChat\AccountLogin as WeChatAccountLoginNotice; use App\Services\Logic\Service as LogicService; use App\Traits\Client as ClientTrait; diff --git a/app/Services/Logic/Notice/ConsultReply.php b/app/Services/Logic/Notice/External/ConsultReply.php similarity index 94% rename from app/Services/Logic/Notice/ConsultReply.php rename to app/Services/Logic/Notice/External/ConsultReply.php index 75fe438f..a5d7a35a 100644 --- a/app/Services/Logic/Notice/ConsultReply.php +++ b/app/Services/Logic/Notice/External/ConsultReply.php @@ -5,7 +5,7 @@ * @link https://www.koogua.com */ -namespace App\Services\Logic\Notice; +namespace App\Services\Logic\Notice\External; use App\Models\Consult as ConsultModel; use App\Models\Task as TaskModel; @@ -13,8 +13,8 @@ use App\Repos\Consult as ConsultRepo; use App\Repos\Course as CourseRepo; use App\Repos\User as UserRepo; use App\Repos\WeChatSubscribe as WeChatSubscribeRepo; -use App\Services\Logic\Notice\Sms\ConsultReply as SmsConsultReplyNotice; -use App\Services\Logic\Notice\WeChat\ConsultReply as WeChatConsultReplyNotice; +use App\Services\Logic\Notice\External\Sms\ConsultReply as SmsConsultReplyNotice; +use App\Services\Logic\Notice\External\WeChat\ConsultReply as WeChatConsultReplyNotice; use App\Services\Logic\Service as LogicService; class ConsultReply extends LogicService diff --git a/app/Services/Logic/Notice/DingTalk/ConsultCreate.php b/app/Services/Logic/Notice/External/DingTalk/ConsultCreate.php similarity index 97% rename from app/Services/Logic/Notice/DingTalk/ConsultCreate.php rename to app/Services/Logic/Notice/External/DingTalk/ConsultCreate.php index f0f348e7..6ffd9c00 100644 --- a/app/Services/Logic/Notice/DingTalk/ConsultCreate.php +++ b/app/Services/Logic/Notice/External/DingTalk/ConsultCreate.php @@ -5,7 +5,7 @@ * @link https://www.koogua.com */ -namespace App\Services\Logic\Notice\DingTalk; +namespace App\Services\Logic\Notice\External\DingTalk; use App\Models\Consult as ConsultModel; use App\Models\Task as TaskModel; diff --git a/app/Services/Logic/Notice/DingTalk/PointGiftRedeem.php b/app/Services/Logic/Notice/External/DingTalk/PointGiftRedeem.php similarity index 96% rename from app/Services/Logic/Notice/DingTalk/PointGiftRedeem.php rename to app/Services/Logic/Notice/External/DingTalk/PointGiftRedeem.php index 8da60655..7ca2f9a1 100644 --- a/app/Services/Logic/Notice/DingTalk/PointGiftRedeem.php +++ b/app/Services/Logic/Notice/External/DingTalk/PointGiftRedeem.php @@ -5,7 +5,7 @@ * @link https://www.koogua.com */ -namespace App\Services\Logic\Notice\DingTalk; +namespace App\Services\Logic\Notice\External\DingTalk; use App\Models\PointGift as PointGiftModel; use App\Models\PointGiftRedeem as PointGiftRedeemModel; diff --git a/app/Services/Logic/Notice/DingTalk/ServerMonitor.php b/app/Services/Logic/Notice/External/DingTalk/ServerMonitor.php similarity index 94% rename from app/Services/Logic/Notice/DingTalk/ServerMonitor.php rename to app/Services/Logic/Notice/External/DingTalk/ServerMonitor.php index c64d1e69..01045ab5 100644 --- a/app/Services/Logic/Notice/DingTalk/ServerMonitor.php +++ b/app/Services/Logic/Notice/External/DingTalk/ServerMonitor.php @@ -5,7 +5,7 @@ * @link https://www.koogua.com */ -namespace App\Services\Logic\Notice\DingTalk; +namespace App\Services\Logic\Notice\External\DingTalk; use App\Models\Task as TaskModel; use App\Services\DingTalkNotice; diff --git a/app/Services/Logic/Notice/DingTalk/TeacherLive.php b/app/Services/Logic/Notice/External/DingTalk/TeacherLive.php similarity index 96% rename from app/Services/Logic/Notice/DingTalk/TeacherLive.php rename to app/Services/Logic/Notice/External/DingTalk/TeacherLive.php index df9e62f9..5f3ac152 100644 --- a/app/Services/Logic/Notice/DingTalk/TeacherLive.php +++ b/app/Services/Logic/Notice/External/DingTalk/TeacherLive.php @@ -5,7 +5,7 @@ * @link https://www.koogua.com */ -namespace App\Services\Logic\Notice\DingTalk; +namespace App\Services\Logic\Notice\External\DingTalk; use App\Models\ChapterLive as ChapterLiveModel; use App\Models\Task as TaskModel; diff --git a/app/Services/Logic/Notice/LiveBegin.php b/app/Services/Logic/Notice/External/LiveBegin.php similarity index 94% rename from app/Services/Logic/Notice/LiveBegin.php rename to app/Services/Logic/Notice/External/LiveBegin.php index b61bd0fb..84633e69 100644 --- a/app/Services/Logic/Notice/LiveBegin.php +++ b/app/Services/Logic/Notice/External/LiveBegin.php @@ -5,7 +5,7 @@ * @link https://www.koogua.com */ -namespace App\Services\Logic\Notice; +namespace App\Services\Logic\Notice\External; use App\Models\Chapter as ChapterModel; use App\Models\CourseUser as CourseUserModel; @@ -14,8 +14,8 @@ use App\Repos\Chapter as ChapterRepo; use App\Repos\Course as CourseRepo; use App\Repos\User as UserRepo; use App\Repos\WeChatSubscribe as WeChatSubscribeRepo; -use App\Services\Logic\Notice\Sms\LiveBegin as SmsLiveBeginNotice; -use App\Services\Logic\Notice\WeChat\LiveBegin as WeChatLiveBeginNotice; +use App\Services\Logic\Notice\External\Sms\LiveBegin as SmsLiveBeginNotice; +use App\Services\Logic\Notice\External\WeChat\LiveBegin as WeChatLiveBeginNotice; use App\Services\Logic\Service as LogicService; class LiveBegin extends LogicService diff --git a/app/Services/Logic/Notice/Mail/Test.php b/app/Services/Logic/Notice/External/Mail/Test.php similarity index 94% rename from app/Services/Logic/Notice/Mail/Test.php rename to app/Services/Logic/Notice/External/Mail/Test.php index c4a245c7..313a5e55 100644 --- a/app/Services/Logic/Notice/Mail/Test.php +++ b/app/Services/Logic/Notice/External/Mail/Test.php @@ -5,7 +5,7 @@ * @link https://www.koogua.com */ -namespace App\Services\Logic\Notice\Mail; +namespace App\Services\Logic\Notice\External\Mail; use App\Services\Mailer; diff --git a/app/Services/Logic/Notice/Mail/Verify.php b/app/Services/Logic/Notice/External/Mail/Verify.php similarity index 96% rename from app/Services/Logic/Notice/Mail/Verify.php rename to app/Services/Logic/Notice/External/Mail/Verify.php index 12365c09..b760afaa 100644 --- a/app/Services/Logic/Notice/Mail/Verify.php +++ b/app/Services/Logic/Notice/External/Mail/Verify.php @@ -5,7 +5,7 @@ * @link https://www.koogua.com */ -namespace App\Services\Logic\Notice\Mail; +namespace App\Services\Logic\Notice\External\Mail; use App\Services\Mailer as MailerService; use App\Services\Verify as VerifyService; diff --git a/app/Services/Logic/Notice/OrderFinish.php b/app/Services/Logic/Notice/External/OrderFinish.php similarity index 93% rename from app/Services/Logic/Notice/OrderFinish.php rename to app/Services/Logic/Notice/External/OrderFinish.php index 449b4cd2..05ffd272 100644 --- a/app/Services/Logic/Notice/OrderFinish.php +++ b/app/Services/Logic/Notice/External/OrderFinish.php @@ -5,15 +5,15 @@ * @link https://www.koogua.com */ -namespace App\Services\Logic\Notice; +namespace App\Services\Logic\Notice\External; use App\Models\Order as OrderModel; use App\Models\Task as TaskModel; use App\Repos\Order as OrderRepo; use App\Repos\User as UserRepo; use App\Repos\WeChatSubscribe as WeChatSubscribeRepo; -use App\Services\Logic\Notice\Sms\OrderFinish as SmsOrderFinishNotice; -use App\Services\Logic\Notice\WeChat\OrderFinish as WeChatOrderFinishNotice; +use App\Services\Logic\Notice\External\Sms\OrderFinish as SmsOrderFinishNotice; +use App\Services\Logic\Notice\External\WeChat\OrderFinish as WeChatOrderFinishNotice; use App\Services\Logic\Service as LogicService; class OrderFinish extends LogicService diff --git a/app/Services/Logic/Notice/PointGoodsDeliver.php b/app/Services/Logic/Notice/External/PointGoodsDeliver.php similarity index 93% rename from app/Services/Logic/Notice/PointGoodsDeliver.php rename to app/Services/Logic/Notice/External/PointGoodsDeliver.php index b5946db7..ab886944 100644 --- a/app/Services/Logic/Notice/PointGoodsDeliver.php +++ b/app/Services/Logic/Notice/External/PointGoodsDeliver.php @@ -5,15 +5,15 @@ * @link https://www.koogua.com */ -namespace App\Services\Logic\Notice; +namespace App\Services\Logic\Notice\External; use App\Models\PointGiftRedeem as PointGiftRedeemModel; use App\Models\Task as TaskModel; use App\Repos\PointGiftRedeem as PointGiftRedeemRepo; use App\Repos\User as UserRepo; use App\Repos\WeChatSubscribe as WeChatSubscribeRepo; -use App\Services\Logic\Notice\Sms\GoodsDeliver as SmsGoodsDeliverNotice; -use App\Services\Logic\Notice\WeChat\GoodsDeliver as WeChatGoodsDeliverNotice; +use App\Services\Logic\Notice\External\Sms\GoodsDeliver as SmsGoodsDeliverNotice; +use App\Services\Logic\Notice\External\WeChat\GoodsDeliver as WeChatGoodsDeliverNotice; use App\Services\Logic\Service as LogicService; class PointGoodsDeliver extends LogicService diff --git a/app/Services/Logic/Notice/RefundFinish.php b/app/Services/Logic/Notice/External/RefundFinish.php similarity index 93% rename from app/Services/Logic/Notice/RefundFinish.php rename to app/Services/Logic/Notice/External/RefundFinish.php index 8c8d83ef..baaefe5f 100644 --- a/app/Services/Logic/Notice/RefundFinish.php +++ b/app/Services/Logic/Notice/External/RefundFinish.php @@ -5,15 +5,15 @@ * @link https://www.koogua.com */ -namespace App\Services\Logic\Notice; +namespace App\Services\Logic\Notice\External; use App\Models\Refund as RefundModel; use App\Models\Task as TaskModel; use App\Repos\Refund as RefundRepo; use App\Repos\User as UserRepo; use App\Repos\WeChatSubscribe as WeChatSubscribeRepo; -use App\Services\Logic\Notice\Sms\RefundFinish as SmsRefundFinishNotice; -use App\Services\Logic\Notice\WeChat\RefundFinish as WeChatRefundFinishNotice; +use App\Services\Logic\Notice\External\Sms\RefundFinish as SmsRefundFinishNotice; +use App\Services\Logic\Notice\External\WeChat\RefundFinish as WeChatRefundFinishNotice; use App\Services\Logic\Service as LogicService; class RefundFinish extends LogicService diff --git a/app/Services/Logic/Notice/Sms/ConsultReply.php b/app/Services/Logic/Notice/External/Sms/ConsultReply.php similarity index 94% rename from app/Services/Logic/Notice/Sms/ConsultReply.php rename to app/Services/Logic/Notice/External/Sms/ConsultReply.php index e58f9ef9..74ee6a63 100644 --- a/app/Services/Logic/Notice/Sms/ConsultReply.php +++ b/app/Services/Logic/Notice/External/Sms/ConsultReply.php @@ -5,7 +5,7 @@ * @link https://www.koogua.com */ -namespace App\Services\Logic\Notice\Sms; +namespace App\Services\Logic\Notice\External\Sms; use App\Models\User as UserModel; use App\Repos\Account as AccountRepo; diff --git a/app/Services/Logic/Notice/Sms/GoodsDeliver.php b/app/Services/Logic/Notice/External/Sms/GoodsDeliver.php similarity index 95% rename from app/Services/Logic/Notice/Sms/GoodsDeliver.php rename to app/Services/Logic/Notice/External/Sms/GoodsDeliver.php index 958f6ade..69324c56 100644 --- a/app/Services/Logic/Notice/Sms/GoodsDeliver.php +++ b/app/Services/Logic/Notice/External/Sms/GoodsDeliver.php @@ -5,7 +5,7 @@ * @link https://www.koogua.com */ -namespace App\Services\Logic\Notice\Sms; +namespace App\Services\Logic\Notice\External\Sms; use App\Models\User as UserModel; use App\Repos\Account as AccountRepo; diff --git a/app/Services/Logic/Notice/Sms/LiveBegin.php b/app/Services/Logic/Notice/External/Sms/LiveBegin.php similarity index 95% rename from app/Services/Logic/Notice/Sms/LiveBegin.php rename to app/Services/Logic/Notice/External/Sms/LiveBegin.php index 7b2f4620..0ee9bf9f 100644 --- a/app/Services/Logic/Notice/Sms/LiveBegin.php +++ b/app/Services/Logic/Notice/External/Sms/LiveBegin.php @@ -5,7 +5,7 @@ * @link https://www.koogua.com */ -namespace App\Services\Logic\Notice\Sms; +namespace App\Services\Logic\Notice\External\Sms; use App\Models\User as UserModel; use App\Repos\Account as AccountRepo; diff --git a/app/Services/Logic/Notice/Sms/OrderFinish.php b/app/Services/Logic/Notice/External/Sms/OrderFinish.php similarity index 94% rename from app/Services/Logic/Notice/Sms/OrderFinish.php rename to app/Services/Logic/Notice/External/Sms/OrderFinish.php index 851ebabb..8ae436f6 100644 --- a/app/Services/Logic/Notice/Sms/OrderFinish.php +++ b/app/Services/Logic/Notice/External/Sms/OrderFinish.php @@ -5,7 +5,7 @@ * @link https://www.koogua.com */ -namespace App\Services\Logic\Notice\Sms; +namespace App\Services\Logic\Notice\External\Sms; use App\Models\User as UserModel; use App\Repos\Account as AccountRepo; diff --git a/app/Services/Logic/Notice/Sms/RefundFinish.php b/app/Services/Logic/Notice/External/Sms/RefundFinish.php similarity index 94% rename from app/Services/Logic/Notice/Sms/RefundFinish.php rename to app/Services/Logic/Notice/External/Sms/RefundFinish.php index fd577b81..2d7c59b3 100644 --- a/app/Services/Logic/Notice/Sms/RefundFinish.php +++ b/app/Services/Logic/Notice/External/Sms/RefundFinish.php @@ -5,7 +5,7 @@ * @link https://www.koogua.com */ -namespace App\Services\Logic\Notice\Sms; +namespace App\Services\Logic\Notice\External\Sms; use App\Models\User as UserModel; use App\Repos\Account as AccountRepo; diff --git a/app/Services/Logic/Notice/Sms/Test.php b/app/Services/Logic/Notice/External/Sms/Test.php similarity index 89% rename from app/Services/Logic/Notice/Sms/Test.php rename to app/Services/Logic/Notice/External/Sms/Test.php index 9b06aa4b..99660fbd 100644 --- a/app/Services/Logic/Notice/Sms/Test.php +++ b/app/Services/Logic/Notice/External/Sms/Test.php @@ -5,7 +5,7 @@ * @link https://www.koogua.com */ -namespace App\Services\Logic\Notice\Sms; +namespace App\Services\Logic\Notice\External\Sms; use App\Services\Smser; diff --git a/app/Services/Logic/Notice/Sms/Verify.php b/app/Services/Logic/Notice/External/Sms/Verify.php similarity index 93% rename from app/Services/Logic/Notice/Sms/Verify.php rename to app/Services/Logic/Notice/External/Sms/Verify.php index e43eb4ee..a4c983ef 100644 --- a/app/Services/Logic/Notice/Sms/Verify.php +++ b/app/Services/Logic/Notice/External/Sms/Verify.php @@ -5,7 +5,7 @@ * @link https://www.koogua.com */ -namespace App\Services\Logic\Notice\Sms; +namespace App\Services\Logic\Notice\External\Sms; use App\Services\Smser as SmserService; use App\Services\Verify as VerifyService; diff --git a/app/Services/Logic/Notice/WeChat/AccountLogin.php b/app/Services/Logic/Notice/External/WeChat/AccountLogin.php similarity index 96% rename from app/Services/Logic/Notice/WeChat/AccountLogin.php rename to app/Services/Logic/Notice/External/WeChat/AccountLogin.php index 7ae8e998..09410124 100644 --- a/app/Services/Logic/Notice/WeChat/AccountLogin.php +++ b/app/Services/Logic/Notice/External/WeChat/AccountLogin.php @@ -5,7 +5,7 @@ * @link https://www.koogua.com */ -namespace App\Services\Logic\Notice\WeChat; +namespace App\Services\Logic\Notice\External\WeChat; use App\Models\WeChatSubscribe as WeChatSubscribeModel; use App\Services\WeChatNotice; diff --git a/app/Services/Logic/Notice/WeChat/ConsultReply.php b/app/Services/Logic/Notice/External/WeChat/ConsultReply.php similarity index 95% rename from app/Services/Logic/Notice/WeChat/ConsultReply.php rename to app/Services/Logic/Notice/External/WeChat/ConsultReply.php index 548fba29..ad13f2c3 100644 --- a/app/Services/Logic/Notice/WeChat/ConsultReply.php +++ b/app/Services/Logic/Notice/External/WeChat/ConsultReply.php @@ -5,7 +5,7 @@ * @link https://www.koogua.com */ -namespace App\Services\Logic\Notice\WeChat; +namespace App\Services\Logic\Notice\External\WeChat; use App\Models\WeChatSubscribe as WeChatSubscribeModel; use App\Services\WeChatNotice; diff --git a/app/Services/Logic/Notice/WeChat/GoodsDeliver.php b/app/Services/Logic/Notice/External/WeChat/GoodsDeliver.php similarity index 95% rename from app/Services/Logic/Notice/WeChat/GoodsDeliver.php rename to app/Services/Logic/Notice/External/WeChat/GoodsDeliver.php index 75f33c53..7d61787d 100644 --- a/app/Services/Logic/Notice/WeChat/GoodsDeliver.php +++ b/app/Services/Logic/Notice/External/WeChat/GoodsDeliver.php @@ -5,7 +5,7 @@ * @link https://www.koogua.com */ -namespace App\Services\Logic\Notice\WeChat; +namespace App\Services\Logic\Notice\External\WeChat; use App\Models\WeChatSubscribe as WeChatSubscribeModel; use App\Services\WeChatNotice; diff --git a/app/Services/Logic/Notice/WeChat/LiveBegin.php b/app/Services/Logic/Notice/External/WeChat/LiveBegin.php similarity index 95% rename from app/Services/Logic/Notice/WeChat/LiveBegin.php rename to app/Services/Logic/Notice/External/WeChat/LiveBegin.php index cd987666..228e9d2d 100644 --- a/app/Services/Logic/Notice/WeChat/LiveBegin.php +++ b/app/Services/Logic/Notice/External/WeChat/LiveBegin.php @@ -5,7 +5,7 @@ * @link https://www.koogua.com */ -namespace App\Services\Logic\Notice\WeChat; +namespace App\Services\Logic\Notice\External\WeChat; use App\Models\WeChatSubscribe as WeChatSubscribeModel; use App\Services\WeChatNotice; diff --git a/app/Services/Logic/Notice/WeChat/OrderFinish.php b/app/Services/Logic/Notice/External/WeChat/OrderFinish.php similarity index 95% rename from app/Services/Logic/Notice/WeChat/OrderFinish.php rename to app/Services/Logic/Notice/External/WeChat/OrderFinish.php index 6a4b509c..a8927dcc 100644 --- a/app/Services/Logic/Notice/WeChat/OrderFinish.php +++ b/app/Services/Logic/Notice/External/WeChat/OrderFinish.php @@ -5,7 +5,7 @@ * @link https://www.koogua.com */ -namespace App\Services\Logic\Notice\WeChat; +namespace App\Services\Logic\Notice\External\WeChat; use App\Models\WeChatSubscribe as WeChatSubscribeModel; use App\Services\WeChatNotice; diff --git a/app/Services/Logic/Notice/WeChat/RefundFinish.php b/app/Services/Logic/Notice/External/WeChat/RefundFinish.php similarity index 95% rename from app/Services/Logic/Notice/WeChat/RefundFinish.php rename to app/Services/Logic/Notice/External/WeChat/RefundFinish.php index 35387dc8..11d4e91c 100644 --- a/app/Services/Logic/Notice/WeChat/RefundFinish.php +++ b/app/Services/Logic/Notice/External/WeChat/RefundFinish.php @@ -5,7 +5,7 @@ * @link https://www.koogua.com */ -namespace App\Services\Logic\Notice\WeChat; +namespace App\Services\Logic\Notice\External\WeChat; use App\Models\WeChatSubscribe as WeChatSubscribeModel; use App\Services\WeChatNotice; diff --git a/app/Services/Logic/Notice/System/AnswerAccepted.php b/app/Services/Logic/Notice/Internal/AnswerAccepted.php similarity index 96% rename from app/Services/Logic/Notice/System/AnswerAccepted.php rename to app/Services/Logic/Notice/Internal/AnswerAccepted.php index 6f8ffb15..4e13b1ff 100644 --- a/app/Services/Logic/Notice/System/AnswerAccepted.php +++ b/app/Services/Logic/Notice/Internal/AnswerAccepted.php @@ -5,7 +5,7 @@ * @link https://www.koogua.com */ -namespace App\Services\Logic\Notice\System; +namespace App\Services\Logic\Notice\Internal; use App\Models\Answer as AnswerModel; use App\Models\Notification as NotificationModel; diff --git a/app/Services/Logic/Notice/System/AnswerApproved.php b/app/Services/Logic/Notice/Internal/AnswerApproved.php similarity index 96% rename from app/Services/Logic/Notice/System/AnswerApproved.php rename to app/Services/Logic/Notice/Internal/AnswerApproved.php index 6a0a8e37..1f834b91 100644 --- a/app/Services/Logic/Notice/System/AnswerApproved.php +++ b/app/Services/Logic/Notice/Internal/AnswerApproved.php @@ -5,7 +5,7 @@ * @link https://www.koogua.com */ -namespace App\Services\Logic\Notice\System; +namespace App\Services\Logic\Notice\Internal; use App\Models\Answer as AnswerModel; use App\Models\Notification as NotificationModel; diff --git a/app/Services/Logic/Notice/System/AnswerCommented.php b/app/Services/Logic/Notice/Internal/AnswerCommented.php similarity index 96% rename from app/Services/Logic/Notice/System/AnswerCommented.php rename to app/Services/Logic/Notice/Internal/AnswerCommented.php index 4d19f15c..bfd4aa62 100644 --- a/app/Services/Logic/Notice/System/AnswerCommented.php +++ b/app/Services/Logic/Notice/Internal/AnswerCommented.php @@ -5,7 +5,7 @@ * @link https://www.koogua.com */ -namespace App\Services\Logic\Notice\System; +namespace App\Services\Logic\Notice\Internal; use App\Models\Answer as AnswerModel; use App\Models\Comment as CommentModel; diff --git a/app/Services/Logic/Notice/System/AnswerLiked.php b/app/Services/Logic/Notice/Internal/AnswerLiked.php similarity index 96% rename from app/Services/Logic/Notice/System/AnswerLiked.php rename to app/Services/Logic/Notice/Internal/AnswerLiked.php index 761b5b80..45795352 100644 --- a/app/Services/Logic/Notice/System/AnswerLiked.php +++ b/app/Services/Logic/Notice/Internal/AnswerLiked.php @@ -5,7 +5,7 @@ * @link https://www.koogua.com */ -namespace App\Services\Logic\Notice\System; +namespace App\Services\Logic\Notice\Internal; use App\Models\Answer as AnswerModel; use App\Models\Notification as NotificationModel; diff --git a/app/Services/Logic/Notice/System/AnswerRejected.php b/app/Services/Logic/Notice/Internal/AnswerRejected.php similarity index 96% rename from app/Services/Logic/Notice/System/AnswerRejected.php rename to app/Services/Logic/Notice/Internal/AnswerRejected.php index 9c19ee78..23d6c2ad 100644 --- a/app/Services/Logic/Notice/System/AnswerRejected.php +++ b/app/Services/Logic/Notice/Internal/AnswerRejected.php @@ -5,7 +5,7 @@ * @link https://www.koogua.com */ -namespace App\Services\Logic\Notice\System; +namespace App\Services\Logic\Notice\Internal; use App\Models\Answer as AnswerModel; use App\Models\Notification as NotificationModel; diff --git a/app/Services/Logic/Notice/System/ArticleApproved.php b/app/Services/Logic/Notice/Internal/ArticleApproved.php similarity index 95% rename from app/Services/Logic/Notice/System/ArticleApproved.php rename to app/Services/Logic/Notice/Internal/ArticleApproved.php index 1ac5d67f..ea841823 100644 --- a/app/Services/Logic/Notice/System/ArticleApproved.php +++ b/app/Services/Logic/Notice/Internal/ArticleApproved.php @@ -5,7 +5,7 @@ * @link https://www.koogua.com */ -namespace App\Services\Logic\Notice\System; +namespace App\Services\Logic\Notice\Internal; use App\Models\Article as ArticleModel; use App\Models\Notification as NotificationModel; diff --git a/app/Services/Logic/Notice/System/ArticleCommented.php b/app/Services/Logic/Notice/Internal/ArticleCommented.php similarity index 95% rename from app/Services/Logic/Notice/System/ArticleCommented.php rename to app/Services/Logic/Notice/Internal/ArticleCommented.php index 35e5e800..f8ceb1f7 100644 --- a/app/Services/Logic/Notice/System/ArticleCommented.php +++ b/app/Services/Logic/Notice/Internal/ArticleCommented.php @@ -5,7 +5,7 @@ * @link https://www.koogua.com */ -namespace App\Services\Logic\Notice\System; +namespace App\Services\Logic\Notice\Internal; use App\Models\Article as ArticleModel; use App\Models\Comment as CommentModel; diff --git a/app/Services/Logic/Notice/System/ArticleDeleted.php b/app/Services/Logic/Notice/Internal/ArticleDeleted.php similarity index 95% rename from app/Services/Logic/Notice/System/ArticleDeleted.php rename to app/Services/Logic/Notice/Internal/ArticleDeleted.php index 5274dd0b..fc96da72 100644 --- a/app/Services/Logic/Notice/System/ArticleDeleted.php +++ b/app/Services/Logic/Notice/Internal/ArticleDeleted.php @@ -5,7 +5,7 @@ * @link https://www.koogua.com */ -namespace App\Services\Logic\Notice\System; +namespace App\Services\Logic\Notice\Internal; use App\Models\Article as ArticleModel; use App\Models\Notification as NotificationModel; diff --git a/app/Services/Logic/Notice/System/ArticleFavorited.php b/app/Services/Logic/Notice/Internal/ArticleFavorited.php similarity index 95% rename from app/Services/Logic/Notice/System/ArticleFavorited.php rename to app/Services/Logic/Notice/Internal/ArticleFavorited.php index 1da199f5..d3272302 100644 --- a/app/Services/Logic/Notice/System/ArticleFavorited.php +++ b/app/Services/Logic/Notice/Internal/ArticleFavorited.php @@ -5,7 +5,7 @@ * @link https://www.koogua.com */ -namespace App\Services\Logic\Notice\System; +namespace App\Services\Logic\Notice\Internal; use App\Models\Article as ArticleModel; use App\Models\Notification as NotificationModel; diff --git a/app/Services/Logic/Notice/System/ArticleLiked.php b/app/Services/Logic/Notice/Internal/ArticleLiked.php similarity index 95% rename from app/Services/Logic/Notice/System/ArticleLiked.php rename to app/Services/Logic/Notice/Internal/ArticleLiked.php index 9c817675..220ec0e5 100644 --- a/app/Services/Logic/Notice/System/ArticleLiked.php +++ b/app/Services/Logic/Notice/Internal/ArticleLiked.php @@ -5,7 +5,7 @@ * @link https://www.koogua.com */ -namespace App\Services\Logic\Notice\System; +namespace App\Services\Logic\Notice\Internal; use App\Models\Article as ArticleModel; use App\Models\Notification as NotificationModel; diff --git a/app/Services/Logic/Notice/System/ArticleRejected.php b/app/Services/Logic/Notice/Internal/ArticleRejected.php similarity index 95% rename from app/Services/Logic/Notice/System/ArticleRejected.php rename to app/Services/Logic/Notice/Internal/ArticleRejected.php index 33c5c975..6d94e887 100644 --- a/app/Services/Logic/Notice/System/ArticleRejected.php +++ b/app/Services/Logic/Notice/Internal/ArticleRejected.php @@ -5,7 +5,7 @@ * @link https://www.koogua.com */ -namespace App\Services\Logic\Notice\System; +namespace App\Services\Logic\Notice\Internal; use App\Models\Article as ArticleModel; use App\Models\Notification as NotificationModel; diff --git a/app/Services/Logic/Notice/System/ChapterCommented.php b/app/Services/Logic/Notice/Internal/ChapterCommented.php similarity index 88% rename from app/Services/Logic/Notice/System/ChapterCommented.php rename to app/Services/Logic/Notice/Internal/ChapterCommented.php index 23094b65..dc9f6018 100644 --- a/app/Services/Logic/Notice/System/ChapterCommented.php +++ b/app/Services/Logic/Notice/Internal/ChapterCommented.php @@ -5,7 +5,7 @@ * @link https://www.koogua.com */ -namespace App\Services\Logic\Notice\System; +namespace App\Services\Logic\Notice\Internal; use App\Models\Comment as CommentModel; use App\Services\Logic\Service as LogicService; diff --git a/app/Services/Logic/Notice/System/CommentLiked.php b/app/Services/Logic/Notice/Internal/CommentLiked.php similarity index 95% rename from app/Services/Logic/Notice/System/CommentLiked.php rename to app/Services/Logic/Notice/Internal/CommentLiked.php index 7a33edf5..6c250b6b 100644 --- a/app/Services/Logic/Notice/System/CommentLiked.php +++ b/app/Services/Logic/Notice/Internal/CommentLiked.php @@ -5,7 +5,7 @@ * @link https://www.koogua.com */ -namespace App\Services\Logic\Notice\System; +namespace App\Services\Logic\Notice\Internal; use App\Models\Comment as CommentModel; use App\Models\Notification as NotificationModel; diff --git a/app/Services/Logic/Notice/System/CommentReplied.php b/app/Services/Logic/Notice/Internal/CommentReplied.php similarity index 96% rename from app/Services/Logic/Notice/System/CommentReplied.php rename to app/Services/Logic/Notice/Internal/CommentReplied.php index 1608daf0..c7cace7f 100644 --- a/app/Services/Logic/Notice/System/CommentReplied.php +++ b/app/Services/Logic/Notice/Internal/CommentReplied.php @@ -5,7 +5,7 @@ * @link https://www.koogua.com */ -namespace App\Services\Logic\Notice\System; +namespace App\Services\Logic\Notice\Internal; use App\Models\Comment as CommentModel; use App\Models\Notification as NotificationModel; diff --git a/app/Services/Logic/Notice/System/ConsultLiked.php b/app/Services/Logic/Notice/Internal/ConsultLiked.php similarity index 96% rename from app/Services/Logic/Notice/System/ConsultLiked.php rename to app/Services/Logic/Notice/Internal/ConsultLiked.php index 98459fb4..bb40c7c2 100644 --- a/app/Services/Logic/Notice/System/ConsultLiked.php +++ b/app/Services/Logic/Notice/Internal/ConsultLiked.php @@ -5,7 +5,7 @@ * @link https://www.koogua.com */ -namespace App\Services\Logic\Notice\System; +namespace App\Services\Logic\Notice\Internal; use App\Models\Consult as ConsultModel; use App\Models\Notification as NotificationModel; diff --git a/app/Services/Logic/Notice/System/QuestionAnswered.php b/app/Services/Logic/Notice/Internal/QuestionAnswered.php similarity index 96% rename from app/Services/Logic/Notice/System/QuestionAnswered.php rename to app/Services/Logic/Notice/Internal/QuestionAnswered.php index 6b5e8518..0ab81dd6 100644 --- a/app/Services/Logic/Notice/System/QuestionAnswered.php +++ b/app/Services/Logic/Notice/Internal/QuestionAnswered.php @@ -5,7 +5,7 @@ * @link https://www.koogua.com */ -namespace App\Services\Logic\Notice\System; +namespace App\Services\Logic\Notice\Internal; use App\Models\Answer as AnswerModel; use App\Models\Notification as NotificationModel; diff --git a/app/Services/Logic/Notice/System/QuestionApproved.php b/app/Services/Logic/Notice/Internal/QuestionApproved.php similarity index 95% rename from app/Services/Logic/Notice/System/QuestionApproved.php rename to app/Services/Logic/Notice/Internal/QuestionApproved.php index 51501f06..1e498da4 100644 --- a/app/Services/Logic/Notice/System/QuestionApproved.php +++ b/app/Services/Logic/Notice/Internal/QuestionApproved.php @@ -5,7 +5,7 @@ * @link https://www.koogua.com */ -namespace App\Services\Logic\Notice\System; +namespace App\Services\Logic\Notice\Internal; use App\Models\Notification as NotificationModel; use App\Models\Question as QuestionModel; diff --git a/app/Services/Logic/Notice/System/QuestionCommented.php b/app/Services/Logic/Notice/Internal/QuestionCommented.php similarity index 95% rename from app/Services/Logic/Notice/System/QuestionCommented.php rename to app/Services/Logic/Notice/Internal/QuestionCommented.php index 19f51028..9e8b5771 100644 --- a/app/Services/Logic/Notice/System/QuestionCommented.php +++ b/app/Services/Logic/Notice/Internal/QuestionCommented.php @@ -5,7 +5,7 @@ * @link https://www.koogua.com */ -namespace App\Services\Logic\Notice\System; +namespace App\Services\Logic\Notice\Internal; use App\Models\Comment as CommentModel; use App\Models\Notification as NotificationModel; diff --git a/app/Services/Logic/Notice/System/QuestionFavorited.php b/app/Services/Logic/Notice/Internal/QuestionFavorited.php similarity index 95% rename from app/Services/Logic/Notice/System/QuestionFavorited.php rename to app/Services/Logic/Notice/Internal/QuestionFavorited.php index 2b43edba..9238652a 100644 --- a/app/Services/Logic/Notice/System/QuestionFavorited.php +++ b/app/Services/Logic/Notice/Internal/QuestionFavorited.php @@ -5,7 +5,7 @@ * @link https://www.koogua.com */ -namespace App\Services\Logic\Notice\System; +namespace App\Services\Logic\Notice\Internal; use App\Models\Notification as NotificationModel; use App\Models\Question as QuestionModel; diff --git a/app/Services/Logic/Notice/System/QuestionLiked.php b/app/Services/Logic/Notice/Internal/QuestionLiked.php similarity index 95% rename from app/Services/Logic/Notice/System/QuestionLiked.php rename to app/Services/Logic/Notice/Internal/QuestionLiked.php index 4ee98640..574720b9 100644 --- a/app/Services/Logic/Notice/System/QuestionLiked.php +++ b/app/Services/Logic/Notice/Internal/QuestionLiked.php @@ -5,7 +5,7 @@ * @link https://www.koogua.com */ -namespace App\Services\Logic\Notice\System; +namespace App\Services\Logic\Notice\Internal; use App\Models\Notification as NotificationModel; use App\Models\Question as QuestionModel; diff --git a/app/Services/Logic/Notice/System/QuestionRejected.php b/app/Services/Logic/Notice/Internal/QuestionRejected.php similarity index 95% rename from app/Services/Logic/Notice/System/QuestionRejected.php rename to app/Services/Logic/Notice/Internal/QuestionRejected.php index 9627ffd5..6aed9e36 100644 --- a/app/Services/Logic/Notice/System/QuestionRejected.php +++ b/app/Services/Logic/Notice/Internal/QuestionRejected.php @@ -5,7 +5,7 @@ * @link https://www.koogua.com */ -namespace App\Services\Logic\Notice\System; +namespace App\Services\Logic\Notice\Internal; use App\Models\Notification as NotificationModel; use App\Models\Question as QuestionModel; diff --git a/app/Services/Logic/Notice/System/ReviewLiked.php b/app/Services/Logic/Notice/Internal/ReviewLiked.php similarity index 96% rename from app/Services/Logic/Notice/System/ReviewLiked.php rename to app/Services/Logic/Notice/Internal/ReviewLiked.php index 69371a7a..05b39573 100644 --- a/app/Services/Logic/Notice/System/ReviewLiked.php +++ b/app/Services/Logic/Notice/Internal/ReviewLiked.php @@ -5,7 +5,7 @@ * @link https://www.koogua.com */ -namespace App\Services\Logic\Notice\System; +namespace App\Services\Logic\Notice\Internal; use App\Models\Notification as NotificationModel; use App\Models\Review as ReviewModel; diff --git a/app/Services/Logic/Question/QuestionFavorite.php b/app/Services/Logic/Question/QuestionFavorite.php index 3280d5ef..a2495b0f 100644 --- a/app/Services/Logic/Question/QuestionFavorite.php +++ b/app/Services/Logic/Question/QuestionFavorite.php @@ -11,7 +11,7 @@ use App\Models\Question as QuestionModel; use App\Models\QuestionFavorite as QuestionFavoriteModel; use App\Models\User as UserModel; use App\Repos\QuestionFavorite as QuestionFavoriteRepo; -use App\Services\Logic\Notice\System\QuestionFavorited as QuestionFavoritedNotice; +use App\Services\Logic\Notice\Internal\QuestionFavorited as QuestionFavoritedNotice; use App\Services\Logic\QuestionTrait; use App\Services\Logic\Service as LogicService; use App\Validators\UserLimit as UserLimitValidator; diff --git a/app/Services/Logic/Question/QuestionLike.php b/app/Services/Logic/Question/QuestionLike.php index d8ecb9bf..0f01de50 100644 --- a/app/Services/Logic/Question/QuestionLike.php +++ b/app/Services/Logic/Question/QuestionLike.php @@ -11,7 +11,7 @@ use App\Models\Question as QuestionModel; use App\Models\QuestionLike as QuestionLikeModel; use App\Models\User as UserModel; use App\Repos\QuestionLike as QuestionLikeRepo; -use App\Services\Logic\Notice\System\QuestionLiked as QuestionLikedNotice; +use App\Services\Logic\Notice\Internal\QuestionLiked as QuestionLikedNotice; use App\Services\Logic\Point\History\QuestionLiked as QuestionLikedPointHistory; use App\Services\Logic\QuestionTrait; use App\Services\Logic\Service as LogicService; diff --git a/app/Services/Logic/Review/ReviewLike.php b/app/Services/Logic/Review/ReviewLike.php index c0351269..8efd4000 100644 --- a/app/Services/Logic/Review/ReviewLike.php +++ b/app/Services/Logic/Review/ReviewLike.php @@ -11,7 +11,7 @@ use App\Models\Review as ReviewModel; use App\Models\ReviewLike as ReviewLikeModel; use App\Models\User as UserModel; use App\Repos\ReviewLike as ReviewLikeRepo; -use App\Services\Logic\Notice\System\ReviewLiked as ReviewLikedNotice; +use App\Services\Logic\Notice\Internal\ReviewLiked as ReviewLikedNotice; use App\Services\Logic\ReviewTrait; use App\Services\Logic\Service as LogicService; use App\Validators\UserLimit as UserLimitValidator; diff --git a/app/Services/Logic/Verify/MailCode.php b/app/Services/Logic/Verify/MailCode.php index 20bc4567..48b317b7 100644 --- a/app/Services/Logic/Verify/MailCode.php +++ b/app/Services/Logic/Verify/MailCode.php @@ -7,7 +7,7 @@ namespace App\Services\Logic\Verify; -use App\Services\Logic\Notice\Mail\Verify as MailVerifyService; +use App\Services\Logic\Notice\External\Mail\Verify as MailVerifyService; use App\Services\Logic\Service as LogicService; use App\Validators\Captcha as CaptchaValidator; use App\Validators\Verify as VerifyValidator; diff --git a/app/Services/Logic/Verify/SmsCode.php b/app/Services/Logic/Verify/SmsCode.php index 5e54575b..b7ad8c71 100644 --- a/app/Services/Logic/Verify/SmsCode.php +++ b/app/Services/Logic/Verify/SmsCode.php @@ -7,7 +7,7 @@ namespace App\Services\Logic\Verify; -use App\Services\Logic\Notice\Sms\Verify as SmsVerifyService; +use App\Services\Logic\Notice\External\Sms\Verify as SmsVerifyService; use App\Services\Logic\Service as LogicService; use App\Validators\Captcha as CaptchaValidator; use App\Validators\Verify as VerifyValidator;