package com.ruixuan.bytedance.service.impl;

import com.ruixuan.bytedance.entity.BytedanceColonelActivity;
import com.ruixuan.bytedance.mapper.BytedanceColonelActivityMapper;
import com.ruixuan.bytedance.service.IBytedanceAccessTokenService;
import com.ruixuan.bytedance.service.IBytedanceColonelActivityService;
import com.ruixuan.common.utils.DateUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 团长活动 信息Service业务层处理
 *
 * @author ruoyi
 * @date 2023-08-11
 */
@Slf4j
@Service
public class BytedanceColonelActivityServiceImpl implements IBytedanceColonelActivityService {
    @Autowired
    private BytedanceColonelActivityMapper bytedanceColonelActivityMapper;

    @Autowired
    private IBytedanceAccessTokenService tokenService;

    /**
     * 查询团长活动 信息
     *
     * @param id 团长活动 信息主键
     * @return 团长活动 信息
     */
    @Override
    public BytedanceColonelActivity selectBytedanceColonelActivityById(Long id) {
        return bytedanceColonelActivityMapper.selectBytedanceColonelActivityById(id);
    }

    /**
     * 查询团长活动 信息列表
     *
     * @param bytedanceColonelActivity 团长活动 信息
     * @return 团长活动 信息
     */
    @Override
    public List<BytedanceColonelActivity> selectBytedanceColonelActivityList(BytedanceColonelActivity bytedanceColonelActivity) {
        return bytedanceColonelActivityMapper.selectBytedanceColonelActivityList(bytedanceColonelActivity);
    }


    /**
     * 修改团长活动 信息
     *
     * @param bytedanceColonelActivity 团长活动 信息
     * @return 结果
     */
    @Override
    public int updateBytedanceColonelActivity(BytedanceColonelActivity bytedanceColonelActivity) {
        bytedanceColonelActivity.setUpdateTime(DateUtils.getNowDate());
        return bytedanceColonelActivityMapper.updateBytedanceColonelActivity(bytedanceColonelActivity);
    }

    /**
     * 批量删除团长活动 信息
     *
     * @param ids 需要删除的团长活动 信息主键
     * @return 结果
     */
    @Override
    public int deleteBytedanceColonelActivityByIds(Long[] ids) {
        return bytedanceColonelActivityMapper.deleteBytedanceColonelActivityByIds(ids);
    }

    /**
     * 删除团长活动 信息信息
     *
     * @param id 团长活动 信息主键
     * @return 结果
     */
    @Override
    public int deleteBytedanceColonelActivityById(Long id) {
        return bytedanceColonelActivityMapper.deleteBytedanceColonelActivityById(id);
    }


}