package com.fjs.scenic.service.ord.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.fjs.scenic.entity.order.OrderDetails;
import com.fjs.scenic.mapper.order.OrderDetailsMapper;
import com.fjs.scenic.service.ord.OrderDetailsService;

@Service
public class OrderDetailsServiceImpl implements OrderDetailsService{

	@Autowired
	private OrderDetailsMapper orderDetailsMapper;
	
	@Override
	public void insert(OrderDetails record) {
		orderDetailsMapper.insert(record);
	}

	@Override
	public List<OrderDetails> select(OrderDetails record) {
		return orderDetailsMapper.select(record);
	}

	@Override
	public void update(OrderDetails record) {
		orderDetailsMapper.update(record);
	}

	@Override
	public void delete(OrderDetails record) {
		orderDetailsMapper.delete(record);
	}

	@Override
	public List<OrderDetails> selectByParam(String field, String param) {
		Map<String, String> map = new HashMap<String, String>();
		map.put("field", field);
		map.put("param", param);
		return orderDetailsMapper.selectByParam(map);
	}

	@Override
	public void updateByParam(String param) {
		Map<String, String> map = new HashMap<String, String>();
		map.put("param", param);
		orderDetailsMapper.updateByParam(map);
	}

	@Override
	public void deleteByParam(String param) {
		Map<String, String> map = new HashMap<String, String>();
		map.put("param", param);
		orderDetailsMapper.deleteByParam(map);
	}

}
