package com.fs.hisStore.service.impl;

import java.util.List;
import com.fs.common.utils.DateUtils;
import com.fs.hisStore.param.FsStoreProductRelationParam;
import com.fs.hisStore.param.FsStoreProductRelationQueryParam;
import com.fs.hisStore.vo.FsStoreProductRelationQueryVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.fs.hisStore.mapper.FsStoreProductRelationScrmMapper;
import com.fs.hisStore.domain.FsStoreProductRelationScrm;
import com.fs.hisStore.service.IFsStoreProductRelationScrmService;

/**
 * 商品点赞和收藏Service业务层处理
 * 
 * @author fs
 * @date 2022-03-15
 */
@Service
public class FsStoreProductRelationScrmServiceImpl implements IFsStoreProductRelationScrmService
{
    @Autowired
    private FsStoreProductRelationScrmMapper fsStoreProductRelationMapper;

    /**
     * 查询商品点赞和收藏
     * 
     * @param id 商品点赞和收藏ID
     * @return 商品点赞和收藏
     */
    @Override
    public FsStoreProductRelationScrm selectFsStoreProductRelationById(Long id)
    {
        return fsStoreProductRelationMapper.selectFsStoreProductRelationById(id);
    }

    /**
     * 查询商品点赞和收藏列表
     * 
     * @param fsStoreProductRelation 商品点赞和收藏
     * @return 商品点赞和收藏
     */
    @Override
    public List<FsStoreProductRelationScrm> selectFsStoreProductRelationList(FsStoreProductRelationScrm fsStoreProductRelation)
    {
        return fsStoreProductRelationMapper.selectFsStoreProductRelationList(fsStoreProductRelation);
    }

    /**
     * 新增商品点赞和收藏
     * 
     * @param fsStoreProductRelation 商品点赞和收藏
     * @return 结果
     */
    @Override
    public int insertFsStoreProductRelation(FsStoreProductRelationScrm fsStoreProductRelation)
    {
        fsStoreProductRelation.setCreateTime(DateUtils.getNowDate());
        return fsStoreProductRelationMapper.insertFsStoreProductRelation(fsStoreProductRelation);
    }

    /**
     * 修改商品点赞和收藏
     * 
     * @param fsStoreProductRelation 商品点赞和收藏
     * @return 结果
     */
    @Override
    public int updateFsStoreProductRelation(FsStoreProductRelationScrm fsStoreProductRelation)
    {
        fsStoreProductRelation.setUpdateTime(DateUtils.getNowDate());
        return fsStoreProductRelationMapper.updateFsStoreProductRelation(fsStoreProductRelation);
    }

    /**
     * 批量删除商品点赞和收藏
     * 
     * @param ids 需要删除的商品点赞和收藏ID
     * @return 结果
     */
    @Override
    public int deleteFsStoreProductRelationByIds(Long[] ids)
    {
        return fsStoreProductRelationMapper.deleteFsStoreProductRelationByIds(ids);
    }

    /**
     * 删除商品点赞和收藏信息
     * 
     * @param id 商品点赞和收藏ID
     * @return 结果
     */
    @Override
    public int deleteFsStoreProductRelationById(Long id)
    {
        return fsStoreProductRelationMapper.deleteFsStoreProductRelationById(id);
    }

    @Override
    public List<FsStoreProductRelationQueryVO> selectFsStoreProductRelationListVOQuery(FsStoreProductRelationQueryParam param) {
        return fsStoreProductRelationMapper.selectFsStoreProductRelationListVOQuery(param);
    }

    @Override
    public List<FsStoreProductRelationQueryVO> selectFsStoreProductRelationListVO(FsStoreProductRelationParam param) {
        return fsStoreProductRelationMapper.selectFsStoreProductRelationListVO(param);
    }



}
