package com.zehong.system.service.impl;

import java.util.List;
import com.zehong.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zehong.system.mapper.TEnterpriseRankingMapper;
import com.zehong.system.domain.TEnterpriseRanking;
import com.zehong.system.service.ITEnterpriseRankingService;

/**
 * 企业评价Service业务层处理
 * 
 * @author zehong
 * @date 2026-03-17
 */
@Service
public class TEnterpriseRankingServiceImpl implements ITEnterpriseRankingService 
{
    @Autowired
    private TEnterpriseRankingMapper tEnterpriseRankingMapper;

    /**
     * 查询企业评价
     * 
     * @param rankingId 企业评价ID
     * @return 企业评价
     */
    @Override
    public TEnterpriseRanking selectTEnterpriseRankingById(Long rankingId)
    {
        return tEnterpriseRankingMapper.selectTEnterpriseRankingById(rankingId);
    }

    /**
     * 查询企业评价列表
     * 
     * @param tEnterpriseRanking 企业评价
     * @return 企业评价
     */
    @Override
    public List<TEnterpriseRanking> selectTEnterpriseRankingList(TEnterpriseRanking tEnterpriseRanking)
    {
        return tEnterpriseRankingMapper.selectTEnterpriseRankingList(tEnterpriseRanking);
    }

    /**
     * 新增企业评价
     * 
     * @param tEnterpriseRanking 企业评价
     * @return 结果
     */
    @Override
    public int insertTEnterpriseRanking(TEnterpriseRanking tEnterpriseRanking)
    {
        tEnterpriseRanking.setCreateTime(DateUtils.getNowDate());
        return tEnterpriseRankingMapper.insertTEnterpriseRanking(tEnterpriseRanking);
    }

    /**
     * 修改企业评价
     * 
     * @param tEnterpriseRanking 企业评价
     * @return 结果
     */
    @Override
    public int updateTEnterpriseRanking(TEnterpriseRanking tEnterpriseRanking)
    {
        return tEnterpriseRankingMapper.updateTEnterpriseRanking(tEnterpriseRanking);
    }

    /**
     * 批量删除企业评价
     * 
     * @param rankingIds 需要删除的企业评价ID
     * @return 结果
     */
    @Override
    public int deleteTEnterpriseRankingByIds(Long[] rankingIds)
    {
        return tEnterpriseRankingMapper.deleteTEnterpriseRankingByIds(rankingIds);
    }

    /**
     * 删除企业评价信息
     * 
     * @param rankingId 企业评价ID
     * @return 结果
     */
    @Override
    public int deleteTEnterpriseRankingById(Long rankingId)
    {
        return tEnterpriseRankingMapper.deleteTEnterpriseRankingById(rankingId);
    }
}
