package com.ruoyi.frequency.klkwithdrawalrecord.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.frequency.klkwithdrawalrecord.mapper.KlkWithdrawalRecordMapper;
import com.ruoyi.frequency.klkwithdrawalrecord.entity.KlkWithdrawalRecord;
import com.ruoyi.frequency.klkwithdrawalrecord.service.KlkWithdrawalRecordService;

/**
 * 卡拉卡平台提现记录Service业务层处理
 *
 * @author liwenlong
 * @date 2024-05-07
 */
@Service
public class KlkWithdrawalRecordServiceImpl extends ServiceImpl<KlkWithdrawalRecordMapper, KlkWithdrawalRecord>  implements KlkWithdrawalRecordService
{
    @Autowired
    private KlkWithdrawalRecordMapper klkWithdrawalRecordMapper;

    /**
     * 查询卡拉卡平台提现记录
     *
     * @param id 卡拉卡平台提现记录主键
     * @return 卡拉卡平台提现记录
     */
    @Override
    public KlkWithdrawalRecord selectKlkWithdrawalRecordById(Long id)
    {
        return klkWithdrawalRecordMapper.selectKlkWithdrawalRecordById(id);
    }

    /**
     * 查询卡拉卡平台提现记录列表
     *
     * @param klkWithdrawalRecord 卡拉卡平台提现记录
     * @return 卡拉卡平台提现记录
     */
    @Override
    public List<KlkWithdrawalRecord> selectKlkWithdrawalRecordList(KlkWithdrawalRecord klkWithdrawalRecord)
    {
        return klkWithdrawalRecordMapper.selectKlkWithdrawalRecordList(klkWithdrawalRecord);
    }

    /**
     * 新增卡拉卡平台提现记录
     *
     * @param klkWithdrawalRecord 卡拉卡平台提现记录
     * @return 结果
     */
    @Override
    public int insertKlkWithdrawalRecord(KlkWithdrawalRecord klkWithdrawalRecord)
    {
        klkWithdrawalRecord.setCreateData();
        return klkWithdrawalRecordMapper.insert(klkWithdrawalRecord);
    }

    /**
     * 修改卡拉卡平台提现记录
     *
     * @param klkWithdrawalRecord 卡拉卡平台提现记录
     * @return 结果
     */
    @Override
    public int updateKlkWithdrawalRecord(KlkWithdrawalRecord klkWithdrawalRecord)
    {
        klkWithdrawalRecord.setUpdateData();
        return klkWithdrawalRecordMapper.updateKlkWithdrawalRecord(klkWithdrawalRecord);
    }

    /**
     * 批量删除卡拉卡平台提现记录
     *
     * @param ids 需要删除的卡拉卡平台提现记录主键
     * @return 结果
     */
    @Override
    public int deleteKlkWithdrawalRecordByIds(Long[] ids,Integer delFlag)
    {
        this.lambdaUpdate().set(KlkWithdrawalRecord::getDelFlag,delFlag).in(KlkWithdrawalRecord::getId,ids).update();
        return ids.length;
    }

}
