package com.dayou.service.impl;

import com.dayou.entity.BrokerageMarketerSettled;
import com.dayou.mapper.BrokerageMarketerSettledMapper;
import com.dayou.service.IBrokerageMarketerSettledService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.dayou.utils.ExcelUtil;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.CellStyle;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.springframework.web.multipart.MultipartFile;
import java.util.List;
import java.util.ArrayList;
import org.springframework.transaction.annotation.Transactional;
import com.dayou.enums.BatchTaskTypeEnum;

/**
 * <p>
 * 客户经理已结算回款表 服务实现类
 * </p>
 *
 * @author wucl
 * @since 2023-09-26
 */
@Service
public class BrokerageMarketerSettledServiceImpl extends ServiceImpl<BrokerageMarketerSettledMapper, BrokerageMarketerSettled> implements IBrokerageMarketerSettledService {


    @Override
    @SuppressWarnings("unchecked")
    public Page<BrokerageMarketerSettled> selectPage(Page page,BrokerageMarketerSettled brokerageMarketerSettled){
        return this.page(page, new QueryWrapper<BrokerageMarketerSettled>(brokerageMarketerSettled));
    }


    @Override
    public BrokerageMarketerSettled detail(Long id){
        return this.getById(id);
    }

    @Override
    public Boolean add(BrokerageMarketerSettled brokerageMarketerSettled){
        return  this.save(brokerageMarketerSettled);
    }

    @Override
    public Boolean update(BrokerageMarketerSettled brokerageMarketerSettled){
        return  this.updateById(brokerageMarketerSettled);
    }

    @Override
    public Boolean delete(Long id){
        //逻辑删除
        return this.removeById(id);
    }
}
