package com.iamberry.cms.service.admin.dao.impl;

import java.util.List;

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

import com.iamberry.cms.service.admin.dao.AdminLoginDAO;
import com.iamberry.cms.service.mapper.AdminChildPermissionsMapper;
import com.iamberry.cms.service.mapper.AdminInfoMapper;
import com.iamberry.wechat.core.entity.admin.AdminChildInfo;
import com.iamberry.wechat.core.entity.admin.AdminChildPermissionErmissions;
import com.iamberry.wechat.core.entity.admin.AdminChildPermissions;
import com.iamberry.wechat.core.entity.admin.AdminInfo;
import com.iamberry.wechat.core.entity.admin.AdminLoginDTO;
@Repository
public class AdminLoginDAOImpl implements AdminLoginDAO {
	
	@Autowired
	private AdminInfoMapper adminInfoMapper;
	
	@Autowired
	private AdminChildPermissionsMapper adminChildPermissionsMapper;
	
	@Override
	public AdminInfo selectAdminInfoByNameAndPwd(AdminLoginDTO dto) {
		return adminInfoMapper.selectAdminInfoByNameAndPwd(dto);
	}

	@Override
	public AdminChildInfo selectAdminChildInfoByNameAndPwd(AdminLoginDTO dto) {
		return adminInfoMapper.selectAdminChildInfoByNameAndPwd(dto);
	}

	@Override
	public List<AdminChildPermissionErmissions> selectAdminChildHavePermissionById(Integer id) {
		return adminChildPermissionsMapper.selectAdminChildHavePermissionById(id);
	}

	@Override
	public List<AdminChildPermissions> selectAdminMenuInfoByAdminId(Integer id) {
		return adminChildPermissionsMapper.selectAdminMenuInfoByAdminId(id);
	}

	@Override
	public List<AdminChildPermissions> selectAdinChildPermissionByAdminChildId(
			Integer id) {
		return adminChildPermissionsMapper.selectAdinChildPermissionByAdminChildId(id);
	}

	@Override
	public List<AdminChildPermissionErmissions> selectAdminChildPermissionEntityById(
			Integer id) {
		return adminChildPermissionsMapper.selectAdminChildPermissionEntityById(id);
	}

	@Override
	public List<AdminChildPermissions> selectAllPermission() {
		return adminChildPermissionsMapper.selectAllPermission();
	}
}
