package com.bonus.sgzb.system.service.impl;

import com.bonus.sgzb.base.api.domain.BmStorageLog;
import com.bonus.sgzb.system.mapper.BmStorageLogMapper;
import com.fasterxml.jackson.databind.ObjectMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
@Slf4j
public class BmStorageLogService {

    @Autowired
    private BmStorageLogMapper bmStorageLogMapper;

    private static ObjectMapper objectMapper = new ObjectMapper();

    public int deleteByPrimaryKey(Integer id) {
        return bmStorageLogMapper.deleteByPrimaryKey(id);
    }
    
//    public int insert(BmStorageLog record) {
//        return bmStorageLogMapper.insert(record);
//    }

    public int batchInsert(List<BmStorageLog> records) {
        log.info("batch insert log {}", records);
        return bmStorageLogMapper.batchInsert(records);
    }

    public List<BmStorageLog> selectAll(BmStorageLog record) {
        return bmStorageLogMapper.selectAll(record);
    }

    public int insertSelective(BmStorageLog record) {
        return bmStorageLogMapper.insertSelective(record);
    }

    
    public BmStorageLog selectByPrimaryKey(Integer id) {
        return bmStorageLogMapper.selectByPrimaryKey(id);
    }

    
    public int updateByPrimaryKeySelective(BmStorageLog record) {
        return bmStorageLogMapper.updateByPrimaryKeySelective(record);
    }

    
    public int updateByPrimaryKey(BmStorageLog record) {
        return bmStorageLogMapper.updateByPrimaryKey(record);
    }

}
