package com.changda.gjjapp.zhfwpt.service.impl.tyfb;
import java.util.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.changda.gjjapp.db.entity.M_LANMU;
import com.changda.gjjapp.zhfwpt.dao.tyfb.IM_LANMUDao;
import com.changda.gjjapp.zhfwpt.service.tyfb.IM_LANMUService;

@Service
public class M_LANMUService implements IM_LANMUService
{
 
 @Autowired
 private IM_LANMUDao m_lanmuDao;
 
 public List<M_LANMU> query(Map map)
 {
  return m_lanmuDao.query(map);
 }
 
 public M_LANMU queryByKey(Map map)
 {
  return m_lanmuDao.queryByKey(map);
 }
 
 @Override
 public int count(Map map)
 {
  return m_lanmuDao.count(map);
 }
 
 @Override
 public int countByKey()
 {
  Map<String,Object> inputmap = new HashMap<String,Object>();
  return m_lanmuDao.count(inputmap);
 }
 
 @Override
 public void insert(M_LANMU m_lanmu)
 {
  m_lanmuDao.insert(m_lanmu);
 }
 
 @Override
 public void delete(M_LANMU m_lanmu)
 {
  m_lanmuDao.delete(m_lanmu);
 }
 
 @Override
 public void deleteByKey()
 {
  M_LANMU m_lanmu = new M_LANMU();
  m_lanmuDao.delete(m_lanmu);
 }
 
 @Override
 public void update(M_LANMU m_lanmu)
 {
  m_lanmuDao.update(m_lanmu);
 }
 
 @Override
 @Transactional
 public void insert(List<M_LANMU> listm_lanmu)
 {
      for(M_LANMU m_lanmu:listm_lanmu)
      {
            m_lanmuDao.insert(m_lanmu);
      }

 }
 
 @Override
 @Transactional
 public void delete(List<M_LANMU> listm_lanmu)
 {
      for(M_LANMU m_lanmu:listm_lanmu)
      {
            m_lanmuDao.delete(m_lanmu);
      }

 }
 
 @Override
 @Transactional
 public void update(List<M_LANMU> listm_lanmu)
 {
      for(M_LANMU m_lanmu:listm_lanmu)
      {
            m_lanmuDao.update(m_lanmu);
      }

 }
}

