package com.ruoyi.applet.contoller;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.model.service.IAppMyEvaluateService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;


@Api(description = "评价")
@RestController
@RequestMapping("/applet/evaluate")
public class AppletEvaluateController extends BaseController {

    @Autowired
    private IAppMyEvaluateService appMyEvaluateService;

    /**
     * 根据被评价人的id查询所有评价信息
     * @param petId
     * @return
     */
    @ApiOperation("我的评价")
    @GetMapping("/myEvaluate/{petId}")
    public TableDataInfo getAppMyEvaluateByPetId(@PathVariable Long petId){
        return getDataTable(appMyEvaluateService.getAppMyEvaluateByPetId(petId));
    }
}
