package com.pwt.web.service.impl;

import com.pwt.web.domain.PwtHolderBatteryStateCache;
import com.pwt.web.mapper.PwtHolderBatteryStateCacheMapper;
import com.pwt.web.service.IPwtHolderBatteryStateCacheService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.Collection;
import java.util.Map;


@Service
@Transactional(rollbackFor = Exception.class)
public class PwtHolderBatteryStateCacheServiceImpl implements IPwtHolderBatteryStateCacheService {

    private PwtHolderBatteryStateCacheMapper mapper;

    @Autowired
    public void setMapper(PwtHolderBatteryStateCacheMapper mapper) {
        this.mapper = mapper;
    }

    @Override
    public int updateBatteryStateCacheRecord(PwtHolderBatteryStateCache caches) {
        return mapper.updateBatteryStateCacheRecord(caches);
    }

    @Override
    public Map<Integer, PwtHolderBatteryStateCache> getBatteryStateCacheMap() {
        return mapper.getBatteryStateCacheMap();
    }
}
