Examples of IDictionaryDao


Examples of com.lgx8.management.dao.IDictionaryDao

   
    Template temp = getConfiguration().getTemplate("cityshop.ftl");
   
    ApplicationContext ac = WebApplicationContextUtils.getWebApplicationContext(this.getServletContext());
    IGatewayService gatewayService = (IGatewayService) ac.getBean("gatewayService");
    IDictionaryDao dictionaryDao = (IDictionaryDao) ac.getBean("dictionaryDao");
   
    GatewayCategory gatewayCategory = gatewayService.findGatewayCategoryById(GatewayConstants.CTC_TCSJ);
    root.put("gatewayCategory", gatewayCategory);
   
    //同城商家类型
    List<ProductVO> productVOs = gatewayService.initGatewayInfo(GatewayConstants.CTC_TCSJLX);
    root.put("productVOs", productVOs);
   
//    String orgId = request.getParameter("orgId");
   
    IPObject iPObject = (IPObject) request.getSession().getAttribute("iPObject");
   
    String pageno = request.getParameter("pageno1");
    String county = request.getParameter("county");

    String visibleType = request.getParameter("visibleType");
   
    if(StringUtil.isEmptyStr(visibleType))
    {
      visibleType = "0";
    }
   
    root.put("visibleType", visibleType);
   
    //处理当前页
    if(pageno==null) {
      pageno = "1";
    }
    int pagenum = 1;
    try {
      pagenum = Integer.parseInt(pageno);
    } catch (Exception e1) {
      pagenum = 1;
   
   
    root.put("county", county);
   
    PageList pageList = null;
   
    IAdvertisementDao advertisementDao = (IAdvertisementDao) ac.getBean("advertisementDao");
   
    pageList = advertisementDao.findAllAdvertisementByMerchant(iPObject==null?null:iPObject.getAreaNode(),county,"",pagenum,9);
   
    root.put("pageList", pageList);
   
    List<Dictionary> dictionarys = iPObject==null?null:dictionaryDao.listByKindAndCode("city", iPObject.getCode());
    root.put("dictionarys", dictionarys);
    /* 将模板和数据模型合并 */
    Writer out = response.getWriter();
    try {
      temp.process(root, out);
View Full Code Here

Examples of com.lgx8.management.dao.IDictionaryDao

   * 初始化省份和城市
   * */
  public void initProvinces(){
    ServletContext appcontext = getServletContext();
    ApplicationContext ac = WebApplicationContextUtils.getWebApplicationContext(this.getServletContext());
    IDictionaryDao dao = (IDictionaryDao) ac.getBean("dictionaryDao");
   
    List<Dictionary> prodic = dao.listByKind("province");
    List<Province> pros = new ArrayList<Province>();
    for(int i=0;i<prodic.size();i++){
      Dictionary dic = prodic.get(i);
      Province pro = new Province();
      pro.setCode(dic.getCODE());
      pro.setName(dic.getDETAIL());
      List<Dictionary> citydics = dao.listByKindAndCode(dic.getKIND(), dic.getCODE());
      List<City> citys = initCitys(citydics);
      pro.setCitys(citys);
      pros.add(pro);
    }
    appcontext.setAttribute("provinces",pros);
View Full Code Here

Examples of com.lgx8.management.dao.IDictionaryDao

   
    String kind = request.getParameter("kind");
    String code = request.getParameter("code");
   
    ApplicationContext ac = WebApplicationContextUtils.getWebApplicationContext(this.getServletContext());
    IDictionaryDao dao = (IDictionaryDao) ac.getBean("dictionaryDao");
   
   
    List<Dictionary> dictionarys = dao.listByKindAndCode(kind, code);
   
    String str = "";
   
    for(Dictionary d : dictionarys)
    {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.