diff --git a/app/Http/Home/Views/course/show_meta.volt b/app/Http/Home/Views/course/show_meta.volt index 13559c68..e480730d 100644 --- a/app/Http/Home/Views/course/show_meta.volt +++ b/app/Http/Home/Views/course/show_meta.volt @@ -48,10 +48,10 @@ {%- macro meta_expiry_info(course) %}

学习期限 - {{ course.study_expiry }}个月 + {{ course.study_expiry }} 个月 {% if course.refund_expiry > 0 %} 退款期限 - {{ course.refund_expiry }}天 + {{ course.refund_expiry }} 天 {% else %} 退款期限 不支持 @@ -109,17 +109,17 @@

内容实用 {{ star_info(course.ratings.rating1) }} - {{ "%0.1f"|format(course.ratings.rating1) }}分 + {{ "%0.1f"|format(course.ratings.rating1) }} 分

简洁易懂 {{ star_info(course.ratings.rating2) }} - {{ "%0.1f"|format(course.ratings.rating2) }}分 + {{ "%0.1f"|format(course.ratings.rating2) }} 分

逻辑清晰 {{ star_info(course.ratings.rating3) }} - {{ "%0.1f"|format(course.ratings.rating3) }}分 + {{ "%0.1f"|format(course.ratings.rating3) }} 分

\ No newline at end of file diff --git a/app/Models/Question.php b/app/Models/Question.php index c6f3d809..47a6be3d 100644 --- a/app/Models/Question.php +++ b/app/Models/Question.php @@ -38,7 +38,7 @@ class Question extends Model public $category_id = 0; /** - * 提问者 + * 提问者编号 * * @var integer */ diff --git a/app/Repos/Article.php b/app/Repos/Article.php index 9f964e1b..cc721085 100644 --- a/app/Repos/Article.php +++ b/app/Repos/Article.php @@ -57,6 +57,14 @@ class Article extends Repository } } + if (!empty($where['owner_id'])) { + if (is_array($where['owner_id'])) { + $builder->inWhere('owner_id', $where['owner_id']); + } else { + $builder->andWhere('owner_id = :owner_id:', ['owner_id' => $where['owner_id']]); + } + } + if (!empty($where['source_type'])) { if (is_array($where['source_type'])) { $builder->inWhere('source_type', $where['source_type']); @@ -73,10 +81,6 @@ class Article extends Repository } } - if (!empty($where['owner_id'])) { - $builder->andWhere('owner_id = :owner_id:', ['owner_id' => $where['owner_id']]); - } - if (!empty($where['title'])) { $builder->andWhere('title LIKE :title:', ['title' => "%{$where['title']}%"]); } diff --git a/app/Repos/Question.php b/app/Repos/Question.php index 8db156ad..ae6a5118 100644 --- a/app/Repos/Question.php +++ b/app/Repos/Question.php @@ -58,6 +58,14 @@ class Question extends Repository } } + if (!empty($where['owner_id'])) { + if (is_array($where['owner_id'])) { + $builder->inWhere('owner_id', $where['owner_id']); + } else { + $builder->andWhere('owner_id = :owner_id:', ['owner_id' => $where['owner_id']]); + } + } + if (!empty($where['published'])) { if (is_array($where['published'])) { $builder->inWhere('published', $where['published']); @@ -72,10 +80,6 @@ class Question extends Repository $builder->betweenWhere('create_time', $startTime, $endTime); } - if (!empty($where['owner_id'])) { - $builder->andWhere('owner_id = :owner_id:', ['owner_id' => $where['owner_id']]); - } - if (!empty($where['title'])) { $builder->andWhere('title LIKE :title:', ['title' => "%{$where['title']}%"]); }