From 0d64a57f4591a0b8caffd36b3c451fbd12e3a971 Mon Sep 17 00:00:00 2001 From: wangxinglong <2371974647@qq.com> Date: Wed, 22 Dec 2021 14:10:05 +0800 Subject: [PATCH] settter --- app/controller/api/Comment.php | 2 +- app/repository/CommentRepository.php | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/app/controller/api/Comment.php b/app/controller/api/Comment.php index 8a3b98f..a15837c 100644 --- a/app/controller/api/Comment.php +++ b/app/controller/api/Comment.php @@ -87,7 +87,7 @@ class Comment extends Base } catch (ValidateException $e) { return $this->json(4001, $e->getError()); } catch (RepositoryException $e) { - return $this->json(4001, $e->getError()); + return $this->json(4001, $e->getMessage()); } catch (Exception $e) { echo $e->getMessage(); return $this->json(5001, '服务器繁忙!获取用户个人信息失败'); diff --git a/app/repository/CommentRepository.php b/app/repository/CommentRepository.php index edac32f..59205c1 100644 --- a/app/repository/CommentRepository.php +++ b/app/repository/CommentRepository.php @@ -31,16 +31,16 @@ class CommentRepository extends Repository return CommentModel::alias("a") ->join("account b" ,"a.user_code = b.user_code") ->where($whereMap) - ->where(function ($q){ - $q->whereOr( - [ -// ["b.blank_time","=","null"], - ["b.blank_time","=",null], - ["b.blank_time","=",""], - ["b.blank_time","<",date("Y-m-d H:i:s")], - ] - ); - }) +// ->where(function ($q){ +// $q->whereOr( +// [ +// //["b.blank_time","=","null"], +// ["b.blank_time","=",null], +// ["b.blank_time","=",""], +// ["b.blank_time","<",date("Y-m-d H:i:s")], +// ] +// ); +// }) ->field([ "a.comment", "a.user_code as userCode",