package com.ruoyi.ss.intention.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.ss.intention.domain.Intention;
import com.ruoyi.ss.intention.domain.IntentionQuery;
import com.ruoyi.ss.intention.domain.IntentionVO;
import com.ruoyi.ss.intention.mapper.IntentionMapper;
import com.ruoyi.ss.intention.service.IIntentionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 合作意向Service业务层处理
 *
 * @author qzz
 * @date 2024-11-21
 */
@Service
public class IntentionServiceImpl implements IIntentionService
{
    @Autowired
    private IntentionMapper eIntentionMapper;

    /**
     * 查询合作意向
     *
     * @param intentionId 合作意向主键
     * @return 合作意向
     */
    @Override
    public IntentionVO selectEIntentionByIntentionId(Long intentionId)
    {
        return eIntentionMapper.selectEIntentionByIntentionId(intentionId);
    }

    /**
     * 查询合作意向列表
     *
     * @param eIntention 合作意向
     * @return 合作意向
     */
    @Override
    public List<IntentionVO> selectEIntentionList(IntentionQuery eIntention)
    {
        return eIntentionMapper.selectEIntentionList(eIntention);
    }

    @Override
    public int selectCount(IntentionQuery intention) {
        return eIntentionMapper.selectCount(intention);
    }

    /**
     * 新增合作意向
     *
     * @param eIntention 合作意向
     * @return 结果
     */
    @Override
    public int insertEIntention(Intention eIntention)
    {
        eIntention.setCreateTime(DateUtils.getNowDate());
        return eIntentionMapper.insertEIntention(eIntention);
    }

    /**
     * 修改合作意向
     *
     * @param eIntention 合作意向
     * @return 结果
     */
    @Override
    public int updateEIntention(Intention eIntention)
    {
        return eIntentionMapper.updateEIntention(eIntention);
    }

    /**
     * 批量删除合作意向
     *
     * @param intentionIds 需要删除的合作意向主键
     * @return 结果
     */
    @Override
    public int deleteEIntentionByIntentionIds(Long[] intentionIds)
    {
        return eIntentionMapper.deleteEIntentionByIntentionIds(intentionIds);
    }

    /**
     * 删除合作意向信息
     *
     * @param intentionId 合作意向主键
     * @return 结果
     */
    @Override
    public int deleteEIntentionByIntentionId(Long intentionId)
    {
        return eIntentionMapper.deleteEIntentionByIntentionId(intentionId);
    }
}
