$id, 'reply' => $params['reply'], ]; } $goods_comment = new GoodsComment; $goods_comment->saveAll($data); return true; } /** * @notes 删除评价 * @param $params * @return bool * @author ljj * @date 2021/9/9 11:20 上午 */ public function del($params) { return GoodsComment::destroy($params['id']); } /** * @notes 修改评价审核状态 * @param $params * @return bool * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\DbException * @throws \think\db\exception\ModelNotFoundException * @author ljj * @date 2021/9/9 2:41 下午 */ public function status($params) { $data = []; foreach ($params['id'] as $id) { $data[] = [ 'id' => $id, 'status' => $params['status'], ]; } $goods_comment = new GoodsComment; $goods_comment->saveAll($data); return true; } }