dataLists(new GoodsCommentLists()); } /** * @notes 服务评价分类 * @return \think\response\Json * @author ljj * @date 2022/2/18 2:10 下午 */ public function commentCategory() { $params = (new GoodsCommentValidate())->get()->goCheck('CommentCategory'); $result = (new GoodsCommentLogic())->commentCategory($params); return $this->success('',$result); } /** * @notes 评价商品列表 * @return \think\response\Json * @author ljj * @date 2022/2/21 6:00 下午 */ public function commentGoodsLists() { return $this->dataLists(new CommentGoodsLists()); } /** * @notes 评价服务信息 * @return \think\response\Json * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\DbException * @throws \think\db\exception\ModelNotFoundException * @author ljj * @date 2022/2/21 6:12 下午 */ public function commentGoodsInfo() { $params = (new GoodsCommentValidate())->goCheck('CommentGoodsInfo',['user_id'=>$this->userId]); $result = (new GoodsCommentLogic())->commentGoodsInfo($params); return $this->success('',$result); } /** * @notes 添加服务评价 * @return \think\response\Json * @author ljj * @date 2022/2/21 6:23 下午 */ public function add() { $params = (new GoodsCommentValidate())->post()->goCheck('add'); $params['user_id'] = $this->userId; $result = (new GoodsCommentLogic())->add($params); if (false === $result) { return $this->fail(GoodsCommentLogic::getError()); } return $this->success('评价成功',[],1,1); } /** * @notes 评价详情 * @return \think\response\Json * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\DbException * @throws \think\db\exception\ModelNotFoundException * @author ljj * @date 2024/7/31 下午5:37 */ public function commentDetail() { $params = (new GoodsCommentValidate())->goCheck('commentDetail',['user_id'=>$this->userId]); $result = (new GoodsCommentLogic())->commentDetail($params); return $this->success('',$result); } }