package com.cloudcross.ssp.back.service.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.cloudcross.ssp.back.model.UserLogin;
import com.cloudcross.ssp.back.service.IUserLoginService;
import com.cloudcross.ssp.base.dao.GenericIBatisDao;
import com.cloudcross.ssp.common.utils.Pager;
import com.cloudcross.ssp.pulgin.mybatis.plugin.PageView;
@Service
public class UserLoginService implements IUserLoginService {
	@Autowired
	private GenericIBatisDao myBatisDao;
	@Override
	public PageView query(PageView pageView, UserLogin t) {
		Map<String, Object> map = new HashMap<String, Object>();
		map.put("paging", pageView);
		map.put("t", t);
		List<UserLogin> list = myBatisDao.getList("back.userLoginSqlMapper.query", map);
		pageView.setRecords(list);
		return pageView;
	}

	@Override
	public List<UserLogin> queryAll(UserLogin t) {
		return myBatisDao.getList("back.userLoginSqlMapper.queryAll", t);
	}

	@Override
	public void delete(String id) throws Exception {
		myBatisDao.save("back.userLoginSqlMapper.delete", id);

	}

	@Override
	public void update(UserLogin t) throws Exception {
		myBatisDao.save("back.userLoginSqlMapper.update", t);

	}

	@Override
	public UserLogin getById(String id) {
		// TODO Auto-generated method stub
		return myBatisDao.get("back.userLoginSqlMapper.getById", id);
	}

	@Override
	public void add(UserLogin t) throws Exception {
		myBatisDao.save("back.userLoginSqlMapper.add", t);
	}

	@Override
	public int countByParams(Map<String, Object> paramMap) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public List<UserLogin> findByParams(Map<String, Object> paramMap,
			Pager pager) {
		// TODO Auto-generated method stub
		return null;
	}

}
