package com.fs.hisStore.service.impl;

import java.util.List;
import com.fs.common.utils.DateUtils;
import com.fs.hisStore.param.FsUsePromoterApplyParam;
import com.fs.hisStore.vo.FsUserPromoterApplyVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.fs.hisStore.mapper.FsUserPromoterApplyScrmMapper;
import com.fs.hisStore.domain.FsUserPromoterApplyScrm;
import com.fs.hisStore.service.IFsUserPromoterApplyScrmService;

/**
 * 推广员申请Service业务层处理
 * 
 * @author fs
 * @date 2023-02-28
 */
@Service
public class FsUserPromoterApplyScrmServiceImpl implements IFsUserPromoterApplyScrmService
{
    @Autowired
    private FsUserPromoterApplyScrmMapper fsUserPromoterApplyMapper;

    /**
     * 查询推广员申请
     * 
     * @param applyId 推广员申请ID
     * @return 推广员申请
     */
    @Override
    public FsUserPromoterApplyScrm selectFsUserPromoterApplyById(Long applyId)
    {
        return fsUserPromoterApplyMapper.selectFsUserPromoterApplyById(applyId);
    }

    /**
     * 查询推广员申请列表
     * 
     * @param fsUserPromoterApply 推广员申请
     * @return 推广员申请
     */
    @Override
    public List<FsUserPromoterApplyScrm> selectFsUserPromoterApplyList(FsUserPromoterApplyScrm fsUserPromoterApply)
    {
        return fsUserPromoterApplyMapper.selectFsUserPromoterApplyList(fsUserPromoterApply);
    }

    /**
     * 新增推广员申请
     * 
     * @param fsUserPromoterApply 推广员申请
     * @return 结果
     */
    @Override
    public int insertFsUserPromoterApply(FsUserPromoterApplyScrm fsUserPromoterApply)
    {
        fsUserPromoterApply.setCreateTime(DateUtils.getNowDate());
        return fsUserPromoterApplyMapper.insertFsUserPromoterApply(fsUserPromoterApply);
    }

    /**
     * 修改推广员申请
     * 
     * @param fsUserPromoterApply 推广员申请
     * @return 结果
     */
    @Override
    public int updateFsUserPromoterApply(FsUserPromoterApplyScrm fsUserPromoterApply)
    {
        return fsUserPromoterApplyMapper.updateFsUserPromoterApply(fsUserPromoterApply);
    }

    /**
     * 批量删除推广员申请
     * 
     * @param applyIds 需要删除的推广员申请ID
     * @return 结果
     */
    @Override
    public int deleteFsUserPromoterApplyByIds(Long[] applyIds)
    {
        return fsUserPromoterApplyMapper.deleteFsUserPromoterApplyByIds(applyIds);
    }

    /**
     * 删除推广员申请信息
     * 
     * @param applyId 推广员申请ID
     * @return 结果
     */
    @Override
    public int deleteFsUserPromoterApplyById(Long applyId)
    {
        return fsUserPromoterApplyMapper.deleteFsUserPromoterApplyById(applyId);
    }

    @Override
    public FsUserPromoterApplyScrm selectFsUserPromoterApplyByUserId(long userId) {
        return fsUserPromoterApplyMapper.selectFsUserPromoterApplyByUserId(userId);
    }

    @Override
    public List<FsUserPromoterApplyVO> selectFsUserPromoterApplyListVO(FsUsePromoterApplyParam fsUserPromoterApply) {
        return fsUserPromoterApplyMapper.selectFsUserPromoterApplyListVO(fsUserPromoterApply);
    }
}
