diff --git a/app/Builders/AnswerList.php b/app/Builders/AnswerList.php
index 7e47e5b4..0c3b0b99 100644
--- a/app/Builders/AnswerList.php
+++ b/app/Builders/AnswerList.php
@@ -58,7 +58,7 @@ class AnswerList extends Builder
$userRepo = new UserRepo();
- $users = $userRepo->findByIds($ids, ['id', 'name', 'avatar']);
+ $users = $userRepo->findShallowUserByIds($ids);
$baseUrl = kg_cos_url();
diff --git a/app/Builders/ArticleList.php b/app/Builders/ArticleList.php
index 7edf86f8..7ef8ca46 100644
--- a/app/Builders/ArticleList.php
+++ b/app/Builders/ArticleList.php
@@ -71,7 +71,7 @@ class ArticleList extends Builder
$userRepo = new UserRepo();
- $users = $userRepo->findByIds($ids, ['id', 'name', 'avatar']);
+ $users = $userRepo->findShallowUserByIds($ids);
$baseUrl = kg_cos_url();
diff --git a/app/Builders/CategoryTreeList.php b/app/Builders/CategoryTreeList.php
index ab23e991..6944aea8 100644
--- a/app/Builders/CategoryTreeList.php
+++ b/app/Builders/CategoryTreeList.php
@@ -69,6 +69,7 @@ class CategoryTreeList extends Builder
$query->where('parent_id = 0');
$query->andWhere('published = 1');
+ $query->andWhere('deleted = 0');
$query->andWhere('type = :type:', ['type' => $type]);
$query->orderBy('priority ASC');
@@ -84,6 +85,7 @@ class CategoryTreeList extends Builder
$query = CategoryModel::query();
$query->where('published = 1');
+ $query->where('deleted = 0');
$query->andWhere('parent_id = :parent_id:', ['parent_id' => $parentId]);
$query->orderBy('priority ASC');
diff --git a/app/Builders/CommentList.php b/app/Builders/CommentList.php
index f300ecda..e0eb0059 100644
--- a/app/Builders/CommentList.php
+++ b/app/Builders/CommentList.php
@@ -32,7 +32,7 @@ class CommentList extends Builder
$userRepo = new UserRepo();
- $users = $userRepo->findByIds($ids, ['id', 'name', 'avatar']);
+ $users = $userRepo->findShallowUserByIds($ids);
$baseUrl = kg_cos_url();
diff --git a/app/Builders/ConsultList.php b/app/Builders/ConsultList.php
index b356276b..a06e667c 100644
--- a/app/Builders/ConsultList.php
+++ b/app/Builders/ConsultList.php
@@ -79,7 +79,7 @@ class ConsultList extends Builder
$userRepo = new UserRepo();
- $users = $userRepo->findByIds($ids, ['id', 'name', 'avatar']);
+ $users = $userRepo->findShallowUserByIds($ids);
$baseUrl = kg_cos_url();
diff --git a/app/Builders/CourseList.php b/app/Builders/CourseList.php
index 25c821e4..e5a3c383 100644
--- a/app/Builders/CourseList.php
+++ b/app/Builders/CourseList.php
@@ -62,7 +62,7 @@ class CourseList extends Builder
$userRepo = new UserRepo();
- $users = $userRepo->findByIds($ids, ['id', 'name', 'avatar']);
+ $users = $userRepo->findShallowUserByIds($ids);
$baseUrl = kg_cos_url();
diff --git a/app/Builders/DanmuList.php b/app/Builders/DanmuList.php
index 8adf3c09..2ee29569 100644
--- a/app/Builders/DanmuList.php
+++ b/app/Builders/DanmuList.php
@@ -87,7 +87,7 @@ class DanmuList extends Builder
$userRepo = new UserRepo();
- $users = $userRepo->findByIds($ids, ['id', 'name', 'avatar']);
+ $users = $userRepo->findShallowUserByIds($ids);
$baseUrl = kg_cos_url();
diff --git a/app/Builders/ImMessageList.php b/app/Builders/ImMessageList.php
index 0026bfbc..03fce797 100644
--- a/app/Builders/ImMessageList.php
+++ b/app/Builders/ImMessageList.php
@@ -29,7 +29,7 @@ class ImMessageList extends Builder
$userRepo = new UserRepo();
- $users = $userRepo->findByIds($ids, ['id', 'name', 'avatar']);
+ $users = $userRepo->findShallowUserByIds($ids);
$baseUrl = kg_cos_url();
diff --git a/app/Builders/LiveList.php b/app/Builders/LiveList.php
index 734e4d2d..8f8102e2 100644
--- a/app/Builders/LiveList.php
+++ b/app/Builders/LiveList.php
@@ -48,7 +48,7 @@ class LiveList extends Builder
$userRepo = new UserRepo();
- $users = $userRepo->findByIds($teacherIds, ['id', 'name', 'title', 'avatar', 'about']);
+ $users = $userRepo->findShallowUserByIds($teacherIds);
$baseUrl = kg_cos_url();
diff --git a/app/Builders/NavTreeList.php b/app/Builders/NavTreeList.php
index 185e3fa7..6801c2a5 100644
--- a/app/Builders/NavTreeList.php
+++ b/app/Builders/NavTreeList.php
@@ -68,6 +68,7 @@ class NavTreeList extends Builder
return NavModel::query()
->where('parent_id = :parent_id:', ['parent_id' => $navId])
->andWhere('published = 1')
+ ->andWhere('deleted = 0')
->orderBy('priority ASC')
->execute();
}
@@ -80,7 +81,9 @@ class NavTreeList extends Builder
{
return NavModel::query()
->where('position = :position:', ['position' => $position])
- ->andWhere('level = 1 AND published = 1')
+ ->andWhere('level = 1')
+ ->andWhere('published = 1')
+ ->andWhere('deleted = 0')
->orderBy('priority ASC')
->execute();
}
diff --git a/app/Builders/NotificationList.php b/app/Builders/NotificationList.php
index 73067c4a..6670553d 100644
--- a/app/Builders/NotificationList.php
+++ b/app/Builders/NotificationList.php
@@ -32,7 +32,7 @@ class NotificationList extends Builder
$userRepo = new UserRepo();
- $users = $userRepo->findByIds($ids, ['id', 'name', 'avatar']);
+ $users = $userRepo->findShallowUserByIds($ids);
$baseUrl = kg_cos_url();
diff --git a/app/Builders/OrderList.php b/app/Builders/OrderList.php
index cfcdae2d..d317d604 100644
--- a/app/Builders/OrderList.php
+++ b/app/Builders/OrderList.php
@@ -186,7 +186,7 @@ class OrderList extends Builder
$userRepo = new UserRepo();
- $users = $userRepo->findByIds($ids, ['id', 'name']);
+ $users = $userRepo->findShallowUserByIds($ids);
$result = [];
diff --git a/app/Builders/QuestionFavoriteList.php b/app/Builders/QuestionFavoriteList.php
index c7675389..7d5185de 100644
--- a/app/Builders/QuestionFavoriteList.php
+++ b/app/Builders/QuestionFavoriteList.php
@@ -72,7 +72,7 @@ class QuestionFavoriteList extends Builder
$userRepo = new UserRepo();
- $users = $userRepo->findByIds($ids, ['id', 'name', 'avatar']);
+ $users = $userRepo->findShallowUserByIds($ids);
$baseUrl = kg_cos_url();
diff --git a/app/Builders/QuestionList.php b/app/Builders/QuestionList.php
index 3cb04d76..10a40a3c 100644
--- a/app/Builders/QuestionList.php
+++ b/app/Builders/QuestionList.php
@@ -74,7 +74,7 @@ class QuestionList extends Builder
$userRepo = new UserRepo();
- $users = $userRepo->findByIds($ids, ['id', 'name', 'avatar']);
+ $users = $userRepo->findShallowUserByIds($ids);
$baseUrl = kg_cos_url();
diff --git a/app/Builders/RefundList.php b/app/Builders/RefundList.php
index 4328431d..396bdd44 100644
--- a/app/Builders/RefundList.php
+++ b/app/Builders/RefundList.php
@@ -58,11 +58,14 @@ class RefundList extends Builder
$userRepo = new UserRepo();
- $users = $userRepo->findByIds($ids, ['id', 'name']);
+ $users = $userRepo->findShallowUserByIds($ids);
+
+ $baseUrl = kg_cos_url();
$result = [];
foreach ($users->toArray() as $user) {
+ $user['avatar'] = $baseUrl . $user['avatar'];
$result[$user['id']] = $user;
}
diff --git a/app/Builders/ReportList.php b/app/Builders/ReportList.php
index f858ede8..89c67218 100644
--- a/app/Builders/ReportList.php
+++ b/app/Builders/ReportList.php
@@ -29,7 +29,7 @@ class ReportList extends Builder
$userRepo = new UserRepo();
- $users = $userRepo->findByIds($ids, ['id', 'name', 'avatar']);
+ $users = $userRepo->findShallowUserByIds($ids);
$baseUrl = kg_cos_url();
diff --git a/app/Builders/ReviewList.php b/app/Builders/ReviewList.php
index 2cbb354a..5a931902 100644
--- a/app/Builders/ReviewList.php
+++ b/app/Builders/ReviewList.php
@@ -58,7 +58,7 @@ class ReviewList extends Builder
$userRepo = new UserRepo();
- $users = $userRepo->findByIds($ids, ['id', 'name', 'avatar']);
+ $users = $userRepo->findShallowUserByIds($ids);
$baseUrl = kg_cos_url();
diff --git a/app/Builders/TradeList.php b/app/Builders/TradeList.php
index aa62d73d..40d17a92 100644
--- a/app/Builders/TradeList.php
+++ b/app/Builders/TradeList.php
@@ -58,11 +58,14 @@ class TradeList extends Builder
$userRepo = new UserRepo();
- $users = $userRepo->findByIds($ids, ['id', 'name']);
+ $users = $userRepo->findShallowUserByIds($ids);
+
+ $baseUrl = kg_cos_url();
$result = [];
foreach ($users->toArray() as $user) {
+ $user['avatar'] = $baseUrl . $user['avatar'];
$result[$user['id']] = $user;
}
diff --git a/app/Caches/CategoryList.php b/app/Caches/CategoryList.php
index 8f7b6b59..5d436aa8 100644
--- a/app/Caches/CategoryList.php
+++ b/app/Caches/CategoryList.php
@@ -38,6 +38,7 @@ class CategoryList extends Cache
->columns(['id', 'parent_id', 'name', 'priority', 'level', 'path'])
->where('type = :type:', ['type' => $type])
->andWhere('published = 1')
+ ->andWhere('deleted = 0')
->execute();
if ($categories->count() == 0) {
diff --git a/app/Caches/CourseRecommendedList.php b/app/Caches/CourseRecommendedList.php
index b9c27f20..51ed746d 100644
--- a/app/Caches/CourseRecommendedList.php
+++ b/app/Caches/CourseRecommendedList.php
@@ -70,7 +70,9 @@ class CourseRecommendedList extends Cache
public function findCourses($limit = 5)
{
return CourseModel::query()
- ->where('published = 1 AND market_price > 0')
+ ->where('market_price > 0')
+ ->andWhere('published = 1')
+ ->andWhere('deleted = 0')
->orderBy('RAND()')
->limit($limit)
->execute();
diff --git a/app/Caches/CourseTeacherList.php b/app/Caches/CourseTeacherList.php
index f6a3c583..70314edc 100644
--- a/app/Caches/CourseTeacherList.php
+++ b/app/Caches/CourseTeacherList.php
@@ -51,6 +51,7 @@ class CourseTeacherList extends Cache
'id' => $user->id,
'name' => $user->name,
'avatar' => $user->avatar,
+ 'vip' => $user->vip,
'title' => $user->title,
'about' => $user->about,
];
diff --git a/app/Caches/HelpList.php b/app/Caches/HelpList.php
index a253c3d5..2899bbd8 100644
--- a/app/Caches/HelpList.php
+++ b/app/Caches/HelpList.php
@@ -73,7 +73,9 @@ class HelpList extends Cache
{
return CategoryModel::query()
->where('type = :type:', ['type' => CategoryModel::TYPE_HELP])
- ->andWhere('level = 1 AND published = 1')
+ ->andWhere('level = 1')
+ ->andWhere('published = 1')
+ ->andWhere('deleted = 0')
->orderBy('priority ASC')
->execute();
}
@@ -87,6 +89,7 @@ class HelpList extends Cache
return HelpModel::query()
->where('category_id = :category_id:', ['category_id' => $categoryId])
->andWhere('published = 1')
+ ->andWhere('deleted = 0')
->orderBy('priority ASC')
->execute();
}
diff --git a/app/Caches/HotQuestionList.php b/app/Caches/HotQuestionList.php
index e09b517d..dea5c8a4 100644
--- a/app/Caches/HotQuestionList.php
+++ b/app/Caches/HotQuestionList.php
@@ -111,7 +111,8 @@ class HotQuestionList extends Cache
{
return QuestionModel::query()
->where('create_time > :create_time:', ['create_time' => $createTime])
- ->andWhere('published = 1 AND deleted = 0')
+ ->andWhere('published = :published:', ['published' => QuestionModel::PUBLISH_APPROVED])
+ ->andWhere('deleted = 0')
->orderBy('score DESC')
->limit($limit)
->execute();
diff --git a/app/Caches/ImActiveGroupList.php b/app/Caches/ImActiveGroupList.php
index 24a0759d..581d3044 100644
--- a/app/Caches/ImActiveGroupList.php
+++ b/app/Caches/ImActiveGroupList.php
@@ -72,6 +72,8 @@ class ImActiveGroupList extends Cache
->orderBy('total_count DESC')
->where('receiver_type = :type:', ['type' => ImMessageModel::TYPE_GROUP])
->betweenWhere('create_time', $startTime, $endTime)
+ ->andWhere('published = 1')
+ ->andWhere('deleted = 0')
->limit($limit)
->execute();
diff --git a/app/Caches/ImNewGroupList.php b/app/Caches/ImNewGroupList.php
index 03cb1f5f..b76e0495 100644
--- a/app/Caches/ImNewGroupList.php
+++ b/app/Caches/ImNewGroupList.php
@@ -70,6 +70,7 @@ class ImNewGroupList extends Cache
{
return ImGroupModel::query()
->where('published = 1')
+ ->andWhere('deleted = 0')
->orderBy('id DESC')
->limit($limit)
->execute();
diff --git a/app/Caches/IndexArticleList.php b/app/Caches/IndexArticleList.php
index 0f03cc0f..6b6f20cc 100644
--- a/app/Caches/IndexArticleList.php
+++ b/app/Caches/IndexArticleList.php
@@ -30,7 +30,10 @@ class IndexArticleList extends Cache
{
$articleRepo = new ArticleRepo();
- $where = ['published' => ArticleModel::PUBLISH_APPROVED];
+ $where = [
+ 'published' => ArticleModel::PUBLISH_APPROVED,
+ 'deleted' => 0,
+ ];
$pager = $articleRepo->paginate($where, 'latest', 1, 10);
diff --git a/app/Caches/IndexFeaturedCourseList.php b/app/Caches/IndexFeaturedCourseList.php
index 7fe31e94..9ef38676 100644
--- a/app/Caches/IndexFeaturedCourseList.php
+++ b/app/Caches/IndexFeaturedCourseList.php
@@ -94,7 +94,9 @@ class IndexFeaturedCourseList extends Cache
{
return CategoryModel::query()
->where('type = :type:', ['type' => CategoryModel::TYPE_COURSE])
- ->andWhere('level = 1 AND published = 1')
+ ->andWhere('level = 1')
+ ->andWhere('published = 1')
+ ->andWhere('deleted = 0')
->orderBy('priority ASC')
->limit($limit)
->execute();
@@ -113,8 +115,9 @@ class IndexFeaturedCourseList extends Cache
return CourseModel::query()
->inWhere('category_id', $categoryIds)
- ->andWhere('published = 1')
->andWhere('featured = 1')
+ ->andWhere('published = 1')
+ ->andWhere('deleted = 0')
->orderBy('id DESC')
->limit($limit)
->execute();
diff --git a/app/Caches/IndexFreeCourseList.php b/app/Caches/IndexFreeCourseList.php
index 071ba74c..ecd23215 100644
--- a/app/Caches/IndexFreeCourseList.php
+++ b/app/Caches/IndexFreeCourseList.php
@@ -94,7 +94,9 @@ class IndexFreeCourseList extends Cache
{
return CategoryModel::query()
->where('type = :type:', ['type' => CategoryModel::TYPE_COURSE])
- ->andWhere('level = 1 AND published = 1')
+ ->andWhere('level = 1')
+ ->andWhere('published = 1')
+ ->andWhere('deleted = 0')
->orderBy('priority ASC')
->limit($limit)
->execute();
@@ -113,8 +115,9 @@ class IndexFreeCourseList extends Cache
return CourseModel::query()
->inWhere('category_id', $categoryIds)
- ->andWhere('published = 1')
->andWhere('market_price = 0')
+ ->andWhere('published = 1')
+ ->andWhere('deleted = 0')
->orderBy('score DESC')
->limit($limit)
->execute();
diff --git a/app/Caches/IndexLiveList.php b/app/Caches/IndexLiveList.php
index 6eaab7bf..6d5d0836 100644
--- a/app/Caches/IndexLiveList.php
+++ b/app/Caches/IndexLiveList.php
@@ -132,6 +132,8 @@ class IndexLiveList extends Cache
->addFrom(ChapterLiveModel::class, 'cl')
->join(ChapterModel::class, 'cl.chapter_id = c.id', 'c')
->betweenWhere('start_time', $startTime, $endTime)
+ ->andWhere('published = 1')
+ ->andWhere('deleted = 0')
->orderBy('start_time ASC')
->getQuery()
->execute();
diff --git a/app/Caches/IndexNewCourseList.php b/app/Caches/IndexNewCourseList.php
index 6f4c9f50..1049d2c2 100644
--- a/app/Caches/IndexNewCourseList.php
+++ b/app/Caches/IndexNewCourseList.php
@@ -94,7 +94,9 @@ class IndexNewCourseList extends Cache
{
return CategoryModel::query()
->where('type = :type:', ['type' => CategoryModel::TYPE_COURSE])
- ->andWhere('level = 1 AND published = 1')
+ ->andWhere('level = 1')
+ ->andWhere('published = 1')
+ ->andWhere('deleted = 0')
->orderBy('priority ASC')
->limit($limit)
->execute();
@@ -114,6 +116,7 @@ class IndexNewCourseList extends Cache
return CourseModel::query()
->inWhere('category_id', $categoryIds)
->andWhere('published = 1')
+ ->andWhere('deleted = 0')
->orderBy('id DESC')
->limit($limit)
->execute();
diff --git a/app/Caches/IndexQuestionList.php b/app/Caches/IndexQuestionList.php
index 9c301b1a..b79db98b 100644
--- a/app/Caches/IndexQuestionList.php
+++ b/app/Caches/IndexQuestionList.php
@@ -30,7 +30,10 @@ class IndexQuestionList extends Cache
{
$questionRepo = new QuestionRepo();
- $where = ['published' => QuestionModel::PUBLISH_APPROVED];
+ $where = [
+ 'published' => QuestionModel::PUBLISH_APPROVED,
+ 'deleted' => 0,
+ ];
$pager = $questionRepo->paginate($where, 'latest', 1, 10);
diff --git a/app/Caches/IndexSimpleFeaturedCourseList.php b/app/Caches/IndexSimpleFeaturedCourseList.php
index a933b7cc..f3588fed 100644
--- a/app/Caches/IndexSimpleFeaturedCourseList.php
+++ b/app/Caches/IndexSimpleFeaturedCourseList.php
@@ -65,8 +65,9 @@ class IndexSimpleFeaturedCourseList extends Cache
protected function findCourses($limit = 8)
{
return CourseModel::query()
- ->where('published = 1')
- ->andWhere('featured = 1')
+ ->where('featured = 1')
+ ->andWhere('published = 1')
+ ->andWhere('deleted = 0')
->orderBy('id DESC')
->limit($limit)
->execute();
diff --git a/app/Caches/IndexSimpleFreeCourseList.php b/app/Caches/IndexSimpleFreeCourseList.php
index b7f187ea..a37e8779 100644
--- a/app/Caches/IndexSimpleFreeCourseList.php
+++ b/app/Caches/IndexSimpleFreeCourseList.php
@@ -65,8 +65,9 @@ class IndexSimpleFreeCourseList extends Cache
protected function findCourses($limit = 8)
{
return CourseModel::query()
- ->where('published = 1')
- ->andWhere('market_price = 0')
+ ->where('market_price = 0')
+ ->andWhere('published = 1')
+ ->andWhere('deleted = 0')
->orderBy('score DESC')
->limit($limit)
->execute();
diff --git a/app/Caches/IndexSimpleNewCourseList.php b/app/Caches/IndexSimpleNewCourseList.php
index 94c0b5e2..b43166a9 100644
--- a/app/Caches/IndexSimpleNewCourseList.php
+++ b/app/Caches/IndexSimpleNewCourseList.php
@@ -66,6 +66,7 @@ class IndexSimpleNewCourseList extends Cache
{
return CourseModel::query()
->where('published = 1')
+ ->andWhere('deleted = 0')
->orderBy('id DESC')
->limit($limit)
->execute();
diff --git a/app/Caches/IndexSimpleVipCourseList.php b/app/Caches/IndexSimpleVipCourseList.php
index cda3478f..d4474287 100644
--- a/app/Caches/IndexSimpleVipCourseList.php
+++ b/app/Caches/IndexSimpleVipCourseList.php
@@ -65,9 +65,10 @@ class IndexSimpleVipCourseList extends Cache
protected function findCourses($limit = 8)
{
return CourseModel::query()
- ->where('published = 1')
- ->andWhere('market_price > vip_price')
+ ->where('market_price > vip_price')
->andWhere('vip_price >= 0')
+ ->andWhere('published = 1')
+ ->andWhere('deleted = 0')
->orderBy('score DESC')
->limit($limit)
->execute();
diff --git a/app/Caches/IndexSlideList.php b/app/Caches/IndexSlideList.php
index e8ca5e71..abc7d28c 100644
--- a/app/Caches/IndexSlideList.php
+++ b/app/Caches/IndexSlideList.php
@@ -68,6 +68,7 @@ class IndexSlideList extends Cache
{
return SlideModel::query()
->where('published = 1')
+ ->andWhere('deleted = 0')
->orderBy('priority ASC')
->limit($limit)
->execute();
diff --git a/app/Caches/IndexTeacherList.php b/app/Caches/IndexTeacherList.php
index 2decb09d..df9d2056 100644
--- a/app/Caches/IndexTeacherList.php
+++ b/app/Caches/IndexTeacherList.php
@@ -60,6 +60,7 @@ class IndexTeacherList extends Cache
{
return UserModel::query()
->where('edu_role = :edu_role:', ['edu_role' => UserModel::EDU_ROLE_TEACHER])
+ ->andWhere('deleted = 0')
->orderBy('RAND()')
->limit($limit)
->execute();
diff --git a/app/Caches/IndexVipCourseList.php b/app/Caches/IndexVipCourseList.php
index 201edb71..163bff1f 100644
--- a/app/Caches/IndexVipCourseList.php
+++ b/app/Caches/IndexVipCourseList.php
@@ -94,7 +94,9 @@ class IndexVipCourseList extends Cache
{
return CategoryModel::query()
->where('type = :type:', ['type' => CategoryModel::TYPE_COURSE])
- ->andWhere('level = 1 AND published = 1')
+ ->andWhere('level = 1')
+ ->andWhere('published = 1')
+ ->andWhere('deleted = 0')
->orderBy('priority ASC')
->limit($limit)
->execute();
@@ -113,9 +115,10 @@ class IndexVipCourseList extends Cache
return CourseModel::query()
->inWhere('category_id', $categoryIds)
- ->andWhere('published = 1')
->andWhere('market_price > vip_price')
->andWhere('vip_price >= 0')
+ ->andWhere('published = 1')
+ ->andWhere('deleted = 0')
->orderBy('score DESC')
->limit($limit)
->execute();
diff --git a/app/Caches/PointHotGiftList.php b/app/Caches/PointHotGiftList.php
index 7b89f3cf..5fe9213a 100644
--- a/app/Caches/PointHotGiftList.php
+++ b/app/Caches/PointHotGiftList.php
@@ -76,6 +76,7 @@ class PointHotGiftList extends Cache
{
return PointGiftModel::query()
->where('published = 1')
+ ->andWhere('deleted = 0')
->orderBy('redeem_count DESC')
->limit($limit)
->execute();
diff --git a/app/Caches/TaggedArticleList.php b/app/Caches/TaggedArticleList.php
index 88ad3f5d..8113b4f8 100644
--- a/app/Caches/TaggedArticleList.php
+++ b/app/Caches/TaggedArticleList.php
@@ -34,6 +34,7 @@ class TaggedArticleList extends Cache
$where = [
'tag_id' => $id,
'published' => ArticleModel::PUBLISH_APPROVED,
+ 'deleted' => 0,
];
$pager = $articleRepo->paginate($where);
diff --git a/app/Caches/TaggedQuestionList.php b/app/Caches/TaggedQuestionList.php
index ee7ef9c9..d563dabe 100644
--- a/app/Caches/TaggedQuestionList.php
+++ b/app/Caches/TaggedQuestionList.php
@@ -35,6 +35,7 @@ class TaggedQuestionList extends Cache
$where = [
'tag_id' => $id,
'published' => QuestionModel::PUBLISH_APPROVED,
+ 'deleted' => 0,
];
$pager = $questionRepo->paginate($where);
diff --git a/app/Console/Tasks/ArticleIndexTask.php b/app/Console/Tasks/ArticleIndexTask.php
index 77b5ff2d..017a2577 100644
--- a/app/Console/Tasks/ArticleIndexTask.php
+++ b/app/Console/Tasks/ArticleIndexTask.php
@@ -124,6 +124,7 @@ class ArticleIndexTask extends Task
{
return ArticleModel::query()
->where('published = :published:', ['published' => ArticleModel::PUBLISH_APPROVED])
+ ->andWhere('deleted = 0')
->execute();
}
diff --git a/app/Console/Tasks/CourseIndexTask.php b/app/Console/Tasks/CourseIndexTask.php
index f757883b..ed568faf 100644
--- a/app/Console/Tasks/CourseIndexTask.php
+++ b/app/Console/Tasks/CourseIndexTask.php
@@ -124,6 +124,7 @@ class CourseIndexTask extends Task
{
return CourseModel::query()
->where('published = 1')
+ ->where('deleted = 0')
->execute();
}
diff --git a/app/Console/Tasks/GroupIndexTask.php b/app/Console/Tasks/GroupIndexTask.php
index 8147ef37..cad23dbf 100644
--- a/app/Console/Tasks/GroupIndexTask.php
+++ b/app/Console/Tasks/GroupIndexTask.php
@@ -124,6 +124,7 @@ class GroupIndexTask extends Task
{
return GroupModel::query()
->where('published = 1')
+ ->andWhere('deleted = 0')
->execute();
}
diff --git a/app/Console/Tasks/QuestionIndexTask.php b/app/Console/Tasks/QuestionIndexTask.php
index 6594881c..886d0aea 100644
--- a/app/Console/Tasks/QuestionIndexTask.php
+++ b/app/Console/Tasks/QuestionIndexTask.php
@@ -124,6 +124,7 @@ class QuestionIndexTask extends Task
{
return QuestionModel::query()
->where('published = :published:', ['published' => QuestionModel::PUBLISH_APPROVED])
+ ->andWhere('deleted = 0')
->execute();
}
diff --git a/app/Console/Tasks/UserIndexTask.php b/app/Console/Tasks/UserIndexTask.php
index 674d12ee..77b0db5d 100644
--- a/app/Console/Tasks/UserIndexTask.php
+++ b/app/Console/Tasks/UserIndexTask.php
@@ -139,6 +139,7 @@ class UserIndexTask extends Task
protected function findUsers($limit, $offset)
{
return UserModel::query()
+ ->where('deleted = 0')
->limit($limit, $offset)
->execute();
}
diff --git a/app/Http/Api/Controllers/AnswerController.php b/app/Http/Api/Controllers/AnswerController.php
index 979f5827..d49ed3ae 100644
--- a/app/Http/Api/Controllers/AnswerController.php
+++ b/app/Http/Api/Controllers/AnswerController.php
@@ -7,6 +7,7 @@
namespace App\Http\Api\Controllers;
+use App\Models\Answer as AnswerModel;
use App\Services\Logic\Answer\AnswerAccept as AnswerAcceptService;
use App\Services\Logic\Answer\AnswerCreate as AnswerCreateService;
use App\Services\Logic\Answer\AnswerDelete as AnswerDeleteService;
@@ -30,6 +31,17 @@ class AnswerController extends Controller
$answer = $service->handle($id);
+ if ($answer['deleted'] == 1) {
+ $this->notFound();
+ }
+
+ $approved = $answer['published'] != AnswerModel::PUBLISH_APPROVED;
+ $owned = $answer['me']['owned'] == 1;
+
+ if (!$approved && !$owned) {
+ $this->notFound();
+ }
+
return $this->jsonSuccess(['answer' => $answer]);
}
diff --git a/app/Http/Api/Controllers/ArticleController.php b/app/Http/Api/Controllers/ArticleController.php
index 0ad2e498..c61ac491 100644
--- a/app/Http/Api/Controllers/ArticleController.php
+++ b/app/Http/Api/Controllers/ArticleController.php
@@ -7,6 +7,7 @@
namespace App\Http\Api\Controllers;
+use App\Models\Article as ArticleModel;
use App\Services\Logic\Article\ArticleClose as ArticleCloseService;
use App\Services\Logic\Article\ArticleDelete as ArticleDeleteService;
use App\Services\Logic\Article\ArticleFavorite as ArticleFavoriteService;
@@ -56,6 +57,22 @@ class ArticleController extends Controller
$article = $service->handle($id);
+ if ($article['deleted'] == 1) {
+ $this->notFound();
+ }
+
+ $approved = $article['published'] == ArticleModel::PUBLISH_APPROVED;
+ $owned = $article['me']['owned'] == 1;
+ $private = $article['private'] == 1;
+
+ if (!$approved && !$owned) {
+ $this->notFound();
+ }
+
+ if ($private && !$owned) {
+ $this->forbidden();
+ }
+
return $this->jsonSuccess(['article' => $article]);
}
diff --git a/app/Http/Api/Controllers/ChapterController.php b/app/Http/Api/Controllers/ChapterController.php
index 63ca974f..1b96f7c5 100644
--- a/app/Http/Api/Controllers/ChapterController.php
+++ b/app/Http/Api/Controllers/ChapterController.php
@@ -65,8 +65,16 @@ class ChapterController extends Controller
$chapter = $service->handle($id);
+ if ($chapter['deleted'] == 1) {
+ $this->notFound();
+ }
+
+ if ($chapter['published'] == 0) {
+ $this->notFound();
+ }
+
if ($chapter['me']['owned'] == 0) {
- return $this->jsonError(['msg' => '没有访问章节权限']);
+ $this->forbidden();
}
return $this->jsonSuccess(['chapter' => $chapter]);
diff --git a/app/Http/Api/Controllers/ConsultController.php b/app/Http/Api/Controllers/ConsultController.php
index 4a9b1386..45db1c0e 100644
--- a/app/Http/Api/Controllers/ConsultController.php
+++ b/app/Http/Api/Controllers/ConsultController.php
@@ -7,6 +7,7 @@
namespace App\Http\Api\Controllers;
+use App\Models\Consult as ConsultModel;
use App\Services\Logic\Consult\ConsultCreate as ConsultCreateService;
use App\Services\Logic\Consult\ConsultDelete as ConsultDeleteService;
use App\Services\Logic\Consult\ConsultInfo as ConsultInfoService;
@@ -28,6 +29,17 @@ class ConsultController extends Controller
$consult = $service->handle($id);
+ if ($consult['deleted'] == 1) {
+ $this->notFound();
+ }
+
+ $approved = $consult['published'] == ConsultModel::PUBLISH_APPROVED;
+ $owned = $consult['me']['owned'] == 1;
+
+ if (!$approved && !$owned) {
+ $this->notFound();
+ }
+
return $this->jsonSuccess(['consult' => $consult]);
}
diff --git a/app/Http/Api/Controllers/CourseController.php b/app/Http/Api/Controllers/CourseController.php
index 5c449652..62c8596b 100644
--- a/app/Http/Api/Controllers/CourseController.php
+++ b/app/Http/Api/Controllers/CourseController.php
@@ -55,6 +55,14 @@ class CourseController extends Controller
$course = $service->handle($id);
+ if ($course['deleted'] == 1) {
+ $this->notFound();
+ }
+
+ if ($course['published'] == 0) {
+ $this->notFound();
+ }
+
return $this->jsonSuccess(['course' => $course]);
}
diff --git a/app/Http/Api/Controllers/HelpController.php b/app/Http/Api/Controllers/HelpController.php
index e944dc47..06dc00c1 100644
--- a/app/Http/Api/Controllers/HelpController.php
+++ b/app/Http/Api/Controllers/HelpController.php
@@ -37,6 +37,14 @@ class HelpController extends Controller
$help = $service->handle($id);
+ if ($help['deleted'] == 1) {
+ $this->notFound();
+ }
+
+ if ($help['published'] == 0) {
+ $this->notFound();
+ }
+
return $this->jsonSuccess(['help' => $help]);
}
diff --git a/app/Http/Api/Controllers/ImGroupController.php b/app/Http/Api/Controllers/ImGroupController.php
index e8d53e2f..5e199b08 100644
--- a/app/Http/Api/Controllers/ImGroupController.php
+++ b/app/Http/Api/Controllers/ImGroupController.php
@@ -39,6 +39,14 @@ class ImGroupController extends Controller
$group = $service->handle($id);
+ if ($group['deleted'] == 1) {
+ $this->notFound();
+ }
+
+ if ($group['published'] == 0) {
+ $this->notFound();
+ }
+
return $this->jsonSuccess(['group' => $group]);
}
diff --git a/app/Http/Api/Controllers/OrderController.php b/app/Http/Api/Controllers/OrderController.php
index dbd9dc47..cd5fb1f3 100644
--- a/app/Http/Api/Controllers/OrderController.php
+++ b/app/Http/Api/Controllers/OrderController.php
@@ -29,6 +29,10 @@ class OrderController extends Controller
$order = $service->handle($sn);
+ if ($order['deleted'] == 1) {
+ $this->notFound();
+ }
+
return $this->jsonSuccess(['order' => $order]);
}
diff --git a/app/Http/Api/Controllers/PageController.php b/app/Http/Api/Controllers/PageController.php
index 7ef38905..e8094151 100644
--- a/app/Http/Api/Controllers/PageController.php
+++ b/app/Http/Api/Controllers/PageController.php
@@ -24,6 +24,14 @@ class PageController extends Controller
$page = $service->handle($id);
+ if ($page['deleted'] == 1) {
+ $this->notFound();
+ }
+
+ if ($page['published'] == 0) {
+ $this->notFound();
+ }
+
return $this->jsonSuccess(['page' => $page]);
}
diff --git a/app/Http/Api/Controllers/QuestionController.php b/app/Http/Api/Controllers/QuestionController.php
index 3ba26c90..a3e402d3 100644
--- a/app/Http/Api/Controllers/QuestionController.php
+++ b/app/Http/Api/Controllers/QuestionController.php
@@ -7,6 +7,7 @@
namespace App\Http\Api\Controllers;
+use App\Models\Question as QuestionModel;
use App\Services\Logic\Question\AnswerList as AnswerListService;
use App\Services\Logic\Question\CategoryList as CategoryListService;
use App\Services\Logic\Question\CommentList as CommentListService;
@@ -55,6 +56,17 @@ class QuestionController extends Controller
$question = $service->handle($id);
+ if ($question['deleted'] == 1) {
+ $this->notFound();
+ }
+
+ $approved = $question['published'] == QuestionModel::PUBLISH_APPROVED;
+ $owned = $question['me']['owned'] == 1;
+
+ if (!$approved && !$owned) {
+ $this->notFound();
+ }
+
return $this->jsonSuccess(['question' => $question]);
}
diff --git a/app/Http/Api/Controllers/RefundController.php b/app/Http/Api/Controllers/RefundController.php
index 8f5249d3..17c8e692 100644
--- a/app/Http/Api/Controllers/RefundController.php
+++ b/app/Http/Api/Controllers/RefundController.php
@@ -43,6 +43,14 @@ class RefundController extends Controller
$refund = $service->handle($sn);
+ if ($refund['deleted'] == 1) {
+ $this->notFound();
+ }
+
+ if ($refund['me']['owned'] == 0) {
+ $this->forbidden();
+ }
+
return $this->jsonSuccess(['refund' => $refund]);
}
diff --git a/app/Http/Api/Controllers/ReviewController.php b/app/Http/Api/Controllers/ReviewController.php
index 1c88a173..2f6d0e9d 100644
--- a/app/Http/Api/Controllers/ReviewController.php
+++ b/app/Http/Api/Controllers/ReviewController.php
@@ -7,6 +7,7 @@
namespace App\Http\Api\Controllers;
+use App\Models\Review as ReviewModel;
use App\Services\Logic\Review\ReviewCreate as ReviewCreateService;
use App\Services\Logic\Review\ReviewDelete as ReviewDeleteService;
use App\Services\Logic\Review\ReviewInfo as ReviewInfoService;
@@ -28,6 +29,17 @@ class ReviewController extends Controller
$review = $service->handle($id);
+ if ($review['deleted'] == 1) {
+ $this->notFound();
+ }
+
+ $approved = $review['published'] == ReviewModel::PUBLISH_APPROVED;
+ $owned = $review['me']['owned'] == 1;
+
+ if (!$approved && !$owned) {
+ $this->notFound();
+ }
+
return $this->jsonSuccess(['review' => $review]);
}
diff --git a/app/Http/Api/Controllers/TradeController.php b/app/Http/Api/Controllers/TradeController.php
index bb03665d..99cd5b13 100644
--- a/app/Http/Api/Controllers/TradeController.php
+++ b/app/Http/Api/Controllers/TradeController.php
@@ -27,6 +27,14 @@ class TradeController extends Controller
$trade = $service->handle($sn);
+ if ($trade['deleted'] == 1) {
+ $this->notFound();
+ }
+
+ if ($trade['me']['owned'] == 0) {
+ $this->forbidden();
+ }
+
return $this->jsonSuccess(['trade' => $trade]);
}
diff --git a/app/Http/Api/Controllers/UserController.php b/app/Http/Api/Controllers/UserController.php
index 6bb5ecfa..13d3a078 100644
--- a/app/Http/Api/Controllers/UserController.php
+++ b/app/Http/Api/Controllers/UserController.php
@@ -30,6 +30,10 @@ class UserController extends Controller
$user = $service->handle($id);
+ if ($user['deleted'] == 1) {
+ $this->notFound();
+ }
+
return $this->jsonSuccess(['user' => $user]);
}
diff --git a/app/Http/Home/Controllers/AnswerController.php b/app/Http/Home/Controllers/AnswerController.php
index 0a09e4d7..a833382b 100644
--- a/app/Http/Home/Controllers/AnswerController.php
+++ b/app/Http/Home/Controllers/AnswerController.php
@@ -57,8 +57,15 @@ class AnswerController extends Controller
$answer = $service->handle($id);
- if ($answer['published'] != AnswerModel::PUBLISH_APPROVED) {
- return $this->notFound();
+ if ($answer['deleted'] == 1) {
+ $this->notFound();
+ }
+
+ $approved = $answer['published'] != AnswerModel::PUBLISH_APPROVED;
+ $owned = $answer['me']['owned'] == 1;
+
+ if (!$approved && !$owned) {
+ $this->notFound();
}
$questionId = $answer['question']['id'];
diff --git a/app/Http/Home/Controllers/ArticleController.php b/app/Http/Home/Controllers/ArticleController.php
index 9f199c3c..cbd48b8f 100644
--- a/app/Http/Home/Controllers/ArticleController.php
+++ b/app/Http/Home/Controllers/ArticleController.php
@@ -105,16 +105,20 @@ class ArticleController extends Controller
$article = $service->handle($id);
- if ($article['published'] != ArticleModel::PUBLISH_APPROVED) {
- return $this->notFound();
+ if ($article['deleted'] == 1) {
+ $this->notFound();
}
+ $approved = $article['published'] == ArticleModel::PUBLISH_APPROVED;
+ $owned = $article['me']['owned'] == 1;
$private = $article['private'] == 1;
- $owned = $this->authUser->id == $article['owner']['id'];
+ if (!$approved && !$owned) {
+ $this->notFound();
+ }
if ($private && !$owned) {
- return $this->forbidden();
+ $this->forbidden();
}
$this->seo->prependTitle(['专栏', $article['title']]);
diff --git a/app/Http/Home/Controllers/ChapterController.php b/app/Http/Home/Controllers/ChapterController.php
index c1a75bff..6e2ba588 100644
--- a/app/Http/Home/Controllers/ChapterController.php
+++ b/app/Http/Home/Controllers/ChapterController.php
@@ -39,20 +39,24 @@ class ChapterController extends Controller
*/
public function showAction($id)
{
- $service = new ChapterInfoService();
-
- $chapter = $service->handle($id);
-
- if ($chapter['published'] == 0) {
- return $this->notFound();
- }
-
if ($this->authUser->id == 0) {
return $this->response->redirect(['for' => 'home.account.login']);
}
+ $service = new ChapterInfoService();
+
+ $chapter = $service->handle($id);
+
+ if ($chapter['deleted'] == 1) {
+ $this->notFound();
+ }
+
+ if ($chapter['published'] == 0) {
+ $this->notFound();
+ }
+
if ($chapter['me']['owned'] == 0) {
- return $this->forbidden();
+ $this->forbidden();
}
$service = new CourseInfoService();
diff --git a/app/Http/Home/Controllers/ConsultController.php b/app/Http/Home/Controllers/ConsultController.php
index d1d78730..dfacf179 100644
--- a/app/Http/Home/Controllers/ConsultController.php
+++ b/app/Http/Home/Controllers/ConsultController.php
@@ -7,6 +7,7 @@
namespace App\Http\Home\Controllers;
+use App\Models\Consult as ConsultModel;
use App\Services\Logic\Consult\ConsultCreate as ConsultCreateService;
use App\Services\Logic\Consult\ConsultDelete as ConsultDeleteService;
use App\Services\Logic\Consult\ConsultInfo as ConsultInfoService;
@@ -37,6 +38,17 @@ class ConsultController extends Controller
$consult = $service->handle($id);
+ if ($consult['deleted'] == 1) {
+ $this->notFound();
+ }
+
+ $approved = $consult['published'] == ConsultModel::PUBLISH_APPROVED;
+ $owned = $consult['me']['owned'] == 1;
+
+ if (!$approved && !$owned) {
+ $this->notFound();
+ }
+
$this->view->setVar('consult', $consult);
}
diff --git a/app/Http/Home/Controllers/CourseController.php b/app/Http/Home/Controllers/CourseController.php
index ec180bb5..bc1ae450 100644
--- a/app/Http/Home/Controllers/CourseController.php
+++ b/app/Http/Home/Controllers/CourseController.php
@@ -77,8 +77,12 @@ class CourseController extends Controller
$course = $service->handle($id);
+ if ($course['deleted'] == 1) {
+ $this->notFound();
+ }
+
if ($course['published'] == 0) {
- return $this->notFound();
+ $this->notFound();
}
$service = new CourseChapterListService();
diff --git a/app/Http/Home/Controllers/HelpController.php b/app/Http/Home/Controllers/HelpController.php
index db5cbe88..e41ccb9a 100644
--- a/app/Http/Home/Controllers/HelpController.php
+++ b/app/Http/Home/Controllers/HelpController.php
@@ -40,8 +40,12 @@ class HelpController extends Controller
$help = $service->handle($id);
+ if ($help['deleted'] == 1) {
+ $this->notFound();
+ }
+
if ($help['published'] == 0) {
- return $this->notFound();
+ $this->notFound();
}
$featuredCourses = $this->getFeaturedCourses();
diff --git a/app/Http/Home/Controllers/ImGroupController.php b/app/Http/Home/Controllers/ImGroupController.php
index 858c9374..fdabf072 100644
--- a/app/Http/Home/Controllers/ImGroupController.php
+++ b/app/Http/Home/Controllers/ImGroupController.php
@@ -51,8 +51,12 @@ class ImGroupController extends Controller
$group = $service->getGroup($id);
+ if ($group['deleted'] == 1) {
+ $this->notFound();
+ }
+
if ($group['published'] == 0) {
- return $this->notFound();
+ $this->notFound();
}
$this->seo->prependTitle(['群组', $group['name']]);
diff --git a/app/Http/Home/Controllers/OrderController.php b/app/Http/Home/Controllers/OrderController.php
index 70a74c56..98310103 100644
--- a/app/Http/Home/Controllers/OrderController.php
+++ b/app/Http/Home/Controllers/OrderController.php
@@ -45,6 +45,14 @@ class OrderController extends Controller
$order = $service->handle($sn);
+ if ($order['deleted'] == 1) {
+ $this->notFound();
+ }
+
+ if ($order['me']['owned'] == 0) {
+ $this->forbidden();
+ }
+
$this->view->setRenderLevel(View::LEVEL_ACTION_VIEW);
$this->view->setVar('order', $order);
}
diff --git a/app/Http/Home/Controllers/PackageController.php b/app/Http/Home/Controllers/PackageController.php
index 67e739f1..0baf6299 100644
--- a/app/Http/Home/Controllers/PackageController.php
+++ b/app/Http/Home/Controllers/PackageController.php
@@ -27,7 +27,7 @@ class PackageController extends Controller
$package = $service->handle($id);
if ($package['published'] == 0) {
- return $this->notFound();
+ $this->notFound();
}
$this->seo->prependTitle(['套餐', $package['title']]);
diff --git a/app/Http/Home/Controllers/PageController.php b/app/Http/Home/Controllers/PageController.php
index 286d63fe..5689b2c9 100644
--- a/app/Http/Home/Controllers/PageController.php
+++ b/app/Http/Home/Controllers/PageController.php
@@ -25,8 +25,12 @@ class PageController extends Controller
$page = $service->handle($id);
+ if ($page['deleted'] == 1) {
+ $this->notFound();
+ }
+
if ($page['published'] == 0) {
- return $this->notFound();
+ $this->notFound();
}
$featuredCourses = $this->getFeaturedCourses();
diff --git a/app/Http/Home/Controllers/PointGiftController.php b/app/Http/Home/Controllers/PointGiftController.php
index 2023605b..f6c50caa 100644
--- a/app/Http/Home/Controllers/PointGiftController.php
+++ b/app/Http/Home/Controllers/PointGiftController.php
@@ -68,8 +68,12 @@ class PointGiftController extends Controller
$gift = $service->handle($id);
+ if ($gift['deleted'] == 1) {
+ $this->notFound();
+ }
+
if ($gift['published'] == 0) {
- return $this->notFound();
+ $this->notFound();
}
$hotGifts = $this->getHotGifts();
diff --git a/app/Http/Home/Controllers/QuestionController.php b/app/Http/Home/Controllers/QuestionController.php
index a2f406fb..7c92df29 100644
--- a/app/Http/Home/Controllers/QuestionController.php
+++ b/app/Http/Home/Controllers/QuestionController.php
@@ -102,8 +102,15 @@ class QuestionController extends Controller
$question = $service->handle($id);
- if ($question['published'] != QuestionModel::PUBLISH_APPROVED) {
- return $this->notFound();
+ if ($question['deleted'] == 1) {
+ $this->notFound();
+ }
+
+ $approved = $question['published'] == QuestionModel::PUBLISH_APPROVED;
+ $owned = $question['me']['owned'] == 1;
+
+ if (!$approved && !$owned) {
+ $this->notFound();
}
$this->seo->prependTitle(['问答', $question['title']]);
diff --git a/app/Http/Home/Controllers/RefundController.php b/app/Http/Home/Controllers/RefundController.php
index 591f579e..ba01b011 100644
--- a/app/Http/Home/Controllers/RefundController.php
+++ b/app/Http/Home/Controllers/RefundController.php
@@ -63,6 +63,14 @@ class RefundController extends Controller
$refund = $service->handle($sn);
+ if ($refund['deleted'] == 1) {
+ $this->notFound();
+ }
+
+ if ($refund['me']['owned'] == 0) {
+ $this->forbidden();
+ }
+
$this->view->setRenderLevel(View::LEVEL_ACTION_VIEW);
$this->view->setVar('refund', $refund);
}
diff --git a/app/Http/Home/Controllers/ReviewController.php b/app/Http/Home/Controllers/ReviewController.php
index 5b3db66c..2b6ab9f6 100644
--- a/app/Http/Home/Controllers/ReviewController.php
+++ b/app/Http/Home/Controllers/ReviewController.php
@@ -7,6 +7,7 @@
namespace App\Http\Home\Controllers;
+use App\Models\Review as ReviewModel;
use App\Services\Logic\Review\ReviewCreate as ReviewCreateService;
use App\Services\Logic\Review\ReviewDelete as ReviewDeleteService;
use App\Services\Logic\Review\ReviewInfo as ReviewInfoService;
@@ -50,6 +51,17 @@ class ReviewController extends Controller
$review = $service->handle($id);
+ if ($review['deleted'] == 1) {
+ $this->notFound();
+ }
+
+ $approved = $review['published'] == ReviewModel::PUBLISH_APPROVED;
+ $owned = $review['me']['owned'] == 1;
+
+ if (!$approved && !$owned) {
+ $this->notFound();
+ }
+
return $this->jsonSuccess(['review' => $review]);
}
diff --git a/app/Http/Home/Controllers/TopicController.php b/app/Http/Home/Controllers/TopicController.php
index c6098c64..33ff9ad7 100644
--- a/app/Http/Home/Controllers/TopicController.php
+++ b/app/Http/Home/Controllers/TopicController.php
@@ -27,7 +27,7 @@ class TopicController extends Controller
$topic = $service->handle($id);
if ($topic['published'] == 0) {
- return $this->notFound();
+ $this->notFound();
}
$this->seo->prependTitle(['专题', $topic['title']]);
diff --git a/app/Http/Home/Controllers/UserController.php b/app/Http/Home/Controllers/UserController.php
index 80a09280..6870b2db 100644
--- a/app/Http/Home/Controllers/UserController.php
+++ b/app/Http/Home/Controllers/UserController.php
@@ -32,7 +32,7 @@ class UserController extends Controller
$user = $service->handle($id);
if ($user['deleted'] == 1) {
- return $this->notFound();
+ $this->notFound();
}
$this->seo->prependTitle(['空间', $user['name']]);
diff --git a/app/Http/Home/Views/refund/info.volt b/app/Http/Home/Views/refund/info.volt
index d2365231..400c00c5 100644
--- a/app/Http/Home/Views/refund/info.volt
+++ b/app/Http/Home/Views/refund/info.volt
@@ -21,7 +21,7 @@