package com.service;

import com.jfinal.plugin.activerecord.Db;
import com.model.Orgtype;
import com.model.Reader;

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

public class OrgTypeService {

    public static final OrgTypeService me = new OrgTypeService();
    private Orgtype dao = new Orgtype().dao();

    public Map selectType(){

        Map map = new HashMap<String,List>();
        List orgtype = Db.find("select id,orgtype from t_orgtype");
        List schoolcategory = Db.find("SELECT id,category from t_schoolcategory");
        List schooltype = Db.find("SELECT id,schooltype from t_schooltype");
        List areatype = Db.find("select id,areatype from t_areatype");
        map.put("orgtype",orgtype);
        map.put("schoolcategory",schoolcategory);
        map.put("schooltype",schooltype);
        map.put("areatype",areatype);
        return map;
    }
}
