package com.ruoyi.busi.service.impl;

import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.busi.domain.BusiEvaluate;
import com.ruoyi.busi.mapper.BusiEvaluateMapper;
import com.ruoyi.busi.service.IBusiEvaluateService;
import com.ruoyi.busi.vo.BusiEvaluateVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 评价Service业务层处理
 * 
 * @author 朱春云
 * @date 2025-03-17
 */
@Service
public class BusiEvaluateServiceImpl extends ServiceImpl<BusiEvaluateMapper,BusiEvaluate>  implements IBusiEvaluateService
{
    @Autowired
    private BusiEvaluateMapper busiEvaluateMapper;

    @Override
    public IPage<BusiEvaluate> queryListPage(BusiEvaluate pageReqVO, Page<BusiEvaluate> page) {
        return busiEvaluateMapper.queryListPage(pageReqVO, page);
    }

    /**
     * 通过被评价人用户id查询评价内容
     *
     * @param userId 被评价人用户id
     * @return java.util.List<com.ruoyi.busi.domain.BusiEvaluate>
     * @author PQZ
     * @date 14:16 2025/3/21
     **/
    @Override
    public List<BusiEvaluateVO> listByToUserId(Long userId) {
        return busiEvaluateMapper.listByToUserId(userId);
    }
}
