From 0a851eab84db98a38e127e0e00fa341f6186b497 Mon Sep 17 00:00:00 2001 From: wangxinglong <2371974647@qq.com> Date: Wed, 22 Dec 2021 14:23:50 +0800 Subject: [PATCH] settter --- app/controller/api/Coupon.php | 2 +- app/controller/manager/Comment.php | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app/controller/api/Coupon.php b/app/controller/api/Coupon.php index 6483700..567cf0f 100644 --- a/app/controller/api/Coupon.php +++ b/app/controller/api/Coupon.php @@ -50,7 +50,7 @@ class Coupon extends Base try { $whereMap = []; - $sortOrder = ['received_time' => 'desc']; + $sortOrder = ['id' => 'desc']; $fields = [ 'id', 'is_verificated as isVerificated', diff --git a/app/controller/manager/Comment.php b/app/controller/manager/Comment.php index 84d6c0f..e5febce 100644 --- a/app/controller/manager/Comment.php +++ b/app/controller/manager/Comment.php @@ -177,7 +177,10 @@ class Comment extends Base $page = $this->request->param('page/d', 1); $size = $this->request->param('size/d', 30); - $whereMap = [["comment.is_delete", "=", CommentModel::COMMON_OFF]]; + $whereMap = [ + ["comment.is_delete", "=", CommentModel::COMMON_OFF], + ["comment.state", "in", [CommentModel::state_default,CommentModel::state_success]], + ]; $orders = ['comment.id' => 'desc']; if (!empty($keyword)) { $whereMap[] = ['account.nick_name|comment.comment', 'like', "%$keyword%"];