package com.sptg.device.biz.service.impl;

import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.sptg.common.core.beans.ResultBean;
import com.sptg.common.core.beans.ResultEnum;
import com.sptg.device.api.entity.InstructPublishLogDustbin;
import com.sptg.device.biz.mapper.InstructPublishLogDustbinMapper;
import com.sptg.device.biz.service.InstructPublishLogDustbinService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import org.springframework.util.Assert;

import java.util.List;


/**
 *
 *
 * description:
 */
@Service
@RequiredArgsConstructor
public class InstructPublishLogDustbinServiceImpl extends ServiceImpl<InstructPublishLogDustbinMapper, InstructPublishLogDustbin>
        implements InstructPublishLogDustbinService {

    @Override
    public ResultBean<Boolean> insertLogDustbin(InstructPublishLogDustbin instructPublishLogDustbin){
        Assert.isTrue(instructPublishLogDustbin != null,"数据不能为空");
        return new ResultBean<>(ResultEnum.SUCCESS,this.insert(instructPublishLogDustbin));
    }

    @Override
    public ResultBean<Boolean> insertLogDustbinList(List<InstructPublishLogDustbin> logDustbins){
        Assert.isTrue(logDustbins != null,"数据不能为空");
        return new ResultBean<>(ResultEnum.SUCCESS,this.insertBatch(logDustbins));
    }
}
