package com.sys.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.cku.core.BaseDAOMapper;
import com.cku.core.BaseService;
import com.cku.core.PageBeanResult;
import com.sys.dao.AreaMapper;
import com.sys.model.Area;

@Service("areaService")
public class AreaServiceImpl extends BaseService<Area>{
	@Autowired
	public AreaMapper areaMapper;
	
	@Override
	protected BaseDAOMapper<Area> getDAO() {
		return this.areaMapper;
	}
	
	public PageBeanResult<Area> getList(String cityCode){
		
		List<Area> list = areaMapper.selectByCityId(cityCode);
		
		PageBeanResult<Area> prResult = new PageBeanResult<Area>();
		prResult.list = list;
		prResult.totalCount = (long)list.size();
		
		return prResult;
	}

}
