package com.wechat.dao;

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

import org.springframework.stereotype.Repository;

import com.beust.jcommander.internal.Maps;
import com.wechat.global.base.dao.impl.BaseDao;
import com.wechat.model.responseDto.DPResp;
import com.wechat.model.responseDto.LVResp;
import com.wechat.model.responseDto.PhoneCodeResp;

@Repository
public class SysDictDao extends BaseDao {

	/**
	 * 获取所有省份
	 * 
	 * @param proviceId
	 * @return
	 */
	/*public List<SysDict> getAllProvice() {
		return super.select("SysDictMapper.getByAllProvice");

	}*/

	/**
	 * 获取所有的城市
	 * 
	 * @param list
	 * @return
	 */
	/*public List<SysDict> getAllCities(List<String> list) {
		return super.select("SysDictMapper.getAllCities", list);
	}

	public List<SysDict> getAllArea(List<String> list) {
		return super.select("SysDictMapper.getAllArea", list);
	}*/

	/*public List<DPResp> getSchoolList() {
		return super.select("SysDictMapper.getSchoolList");
	}*/

	public List<DPResp> getDictByType(String type,String lang) {
		Map<String,Object> maps = Maps.newHashMap();
		maps.put("type", type);
		maps.put("lang", lang);
		return super.select("SysDictMapper.getDictByType",maps);
	}
	/**
	 * 获取字典表中的数据 label(String) value(String)
	 * @param type
	 * @param lang
	 * @return
	 */
	public List<LVResp> getDictLVByType(String type,String lang) {
		Map<String,Object> maps = Maps.newHashMap();
		maps.put("type", type);
		maps.put("lang", lang);
		return super.select("SysDictMapper.getDictLVByType",maps);
	}
	/**
	 * 国家手机区号码（如中国 +86）
	 * @param type
	 * @param lang
	 * @return
	 */
	public List<PhoneCodeResp> getPhoneCode(String type,String lang) {
		Map<String,Object> maps = Maps.newHashMap();
		maps.put("type", type);
		maps.put("lang", lang);
		return super.select("SysDictMapper.getPhoneCode",maps);
	}
}
