Package com.lgx8.management.entities

Examples of com.lgx8.management.entities.Dictionary


  protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
   
    Map<Object, Object> root = new HashMap<Object, Object>();
    root.putAll(super.root);
    ApplicationContext ac = WebApplicationContextUtils.getWebApplicationContext(this.getServletContext());
    IGatewayService gatewayService = (IGatewayService) ac.getBean("gatewayService");
   
    List<Advertisement> advertisements = gatewayService.findAllAdvertisement();
   
    Template temp = getConfiguration().getTemplate("listAdvertisement.ftl");
   
    root.put("advertisements", advertisements);
   
View Full Code Here


    Map<Object, Object> root = new HashMap<Object, Object>();
    root.putAll(super.root);
    Template temp = getConfiguration().getTemplate("selectImage.ftl");
   
    ApplicationContext ac = WebApplicationContextUtils.getWebApplicationContext(this.getServletContext());
    IGatewayService gatewayService = (IGatewayService) ac.getBean("gatewayService");
   
    List<ProductImage> productImages = gatewayService.findProductImageListOrderByTime("desc");
   
    if(productImages!=null&&productImages.size()>0) {
      root.put("productImages", productImages);
    }
   
View Full Code Here

      String zipcode = decodeParameter(request,"zipcode");
      String tel = decodeParameter(request,"tel");
      String name = decodeParameter(request,"name");
      String syn = decodeParameter(request,"syn");
     
      Dictionary d0 = dictionaryDao.findByKindAndCode("province", province);
      Dictionary d1 = dictionaryDao.findByKindAndCode("city", city);
      Dictionary d2 = dictionaryDao.findByKindAndCode("county", region);
     
     
      addr.setCity(d1 != null ? d1.getDETAIL():"");
      addr.setAddress(address);
      addr.setIsdefault(Integer.parseInt(isdefault.trim()));
      addr.setName(name);
      addr.setProvince(d0 != null ? d0.getDETAIL():"");
      addr.setRegion(d2 != null ? d2.getDETAIL():"");
      addr.setTel(tel);
      addr.setZipcode(zipcode);
     
      if(addFlag){
        User user = userCardService.findUserById(RunTimeUser.getRunTimeUser(request).getId());
View Full Code Here

    String province = request.getParameter("province");
    String city = request.getParameter("city");
    String county = request.getParameter("county");
   
   
    Dictionary d0 = dictionaryDao.findByKindAndCode("province", province);
    Dictionary d1 = dictionaryDao.findByKindAndCode("city", city);
    Dictionary d2 = dictionaryDao.findByKindAndCode("county", county);
   
    Organization o = null;
    if (!StrUtil.isNullStr(organization)) {
      o = organizationDao.getOrganizationById(Long.parseLong(organization));
    }
    User u = null;
    if (!StrUtil.isNullStr(SJFRDB)) {
//      u = userDao.findUser("username", new Object[]{SJFRDB});
     
      u = userDao.findUserByUserName(SJFRDB);
      u.setUsertype(User.USER_TYPE_MERCHANT);
    }
    if (!StrUtil.isNullStr(SJID) && !"0".equals(SJID)){
      Merchant mr = merchantDao.getMerchantById(Integer.parseInt(SJID));
      mr.setSJMC(SJMC);
      mr.setSJLX(SJLX);
      mr.setSFSHSM(SFSHSM);
      mr.setYYKSSJ(YYKSSJ);
      mr.setYYJSSJ(YYJSSJ);
      mr.setSJFWXJ(SJFWXJ);
      mr.setSJDZ(SJDZ);
      mr.setSJDHHM(SJDHHM);
      mr.setSJGSZCBH(SJGSZCBH);
      if(o != null)mr.setOrganization(o);
      if(o != null)mr.setAreaNode(o.getJGSZQY());
      mr.setSJFRDB(u);
      mr.setUser(rtUser);
      mr.setRESERVATION01(RESERVATION01);
      mr.setRESERVATION02(RESERVATION02);
      mr.setRESERVATION03(RESERVATION03);
      mr.setRESERVATION04(RESERVATION04);
      mr.setRESERVATION05(RESERVATION05);
      mr.setRESERVATION06(RESERVATION06);
      mr.setDELETEFLAG("0");
     
      mr.setProvince(d0 != null ? d0.getDETAIL():province);
      mr.setCity(d1 != null ? d1.getDETAIL():city);
      mr.setCounty(d2 != null ? d2.getDETAIL():county);
     
      merchantDao.updateMerchant(mr);
     
      u.setOrganizationid(mr.getID());
     
      userDao.updateUser(u);
    } else {
      Merchant mr = new Merchant();
      mr.setSJMC(SJMC);
      mr.setSJLX(SJLX);
      mr.setSFSHSM(SFSHSM);
      mr.setYYKSSJ(YYKSSJ);
      mr.setYYJSSJ(YYJSSJ);
      mr.setSJFWXJ(SJFWXJ);
      mr.setSJDZ(SJDZ);
      mr.setSJDHHM(SJDHHM);
      mr.setSJGSZCBH(SJGSZCBH);
      if(o != null)mr.setOrganization(o);
      if(o != null)mr.setAreaNode(o.getJGSZQY());
      mr.setSJFRDB(u);
      mr.setUser(rtUser);
      mr.setSJTJSJ(new Date());
      mr.setRESERVATION01(RESERVATION01);
      mr.setRESERVATION02(RESERVATION02);
      mr.setRESERVATION03(RESERVATION03);
      mr.setRESERVATION04(RESERVATION04);
      mr.setRESERVATION05(RESERVATION05);
      mr.setRESERVATION06(RESERVATION06);
      mr.setDELETEFLAG("0");
     
      mr.setProvince(d0 != null ? d0.getDETAIL():province);
      mr.setCity(d1 != null ? d1.getDETAIL():city);
      mr.setCounty(d2 != null ? d2.getDETAIL():county);
     
      merchantDao.createMerchant(mr);
     
      u.setOrganizationid(mr.getID());
     
View Full Code Here

    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

 
  private List<City> initCitys(List<Dictionary> dics){
    if(null==dics)return new ArrayList<City>();
    List<City> citys = new ArrayList<City>();
    for(int i=0;i<dics.size();i++){
      Dictionary dic = dics.get(i);
      City city = new City();
      city.setName(dic.getDETAIL());
      city.setCode(dic.getCODE());
      citys.add(city);
    }
    return citys;
  }
View Full Code Here

  @RequestMapping("/recharge/initrecharge.do")
  public String initRechargePage(HttpServletRequest request,HttpServletResponse response){
    RunTimeUser rtUser = RunTimeUser.getRunTimeUser(request);
    if(rtUser!=null&&rtUser.getUsertype()==User.USER_TYPE_MERCHANT){
      long _mid = rtUser.getOrganizationid();
      Merchant _m = merchantDao.getMerchantById(_mid);
      request.setAttribute("merchant", _m);
    }
    return "/management/recharge/create_rechargehistory";
  }
View Full Code Here

  @RequestMapping("/recharge/initrechargeapply.do")
  public String initRechargePageApply(HttpServletRequest request,HttpServletResponse response){
    RunTimeUser rtUser = RunTimeUser.getRunTimeUser(request);
    if(rtUser!=null&&rtUser.getUsertype()==User.USER_TYPE_MERCHANT){
      long _mid = rtUser.getOrganizationid();
      Merchant _m = merchantDao.getMerchantById(_mid);
      request.setAttribute("merchant", _m);
    }
    return "/management/recharge/create_rechargeapply";
  }
View Full Code Here

    String czje = request.getParameter("czje");
    String czjf = "";
    String[] is_nore = request.getParameterValues("is_nore");
    if(rtUser!=null&&rtUser.getUsertype()==User.USER_TYPE_MERCHANT){
      long _mid = rtUser.getOrganizationid();
      Merchant _m = merchantDao.getMerchantById(_mid);
      Rechargehistory rechargeh = new Rechargehistory();
      rechargeh.setCZYHBH(rtUser);
      rechargeh.setCZSJ(new Date());
      rechargeh.setRESERVATION01(Rechargehistory.RECHARGEHISTORY_CZLX_SDCZ);
      rechargeh.setCzzt(Rechargehistory.RECHARGEHISTORY_INIT);
View Full Code Here

    RunTimeUser rtUser = RunTimeUser.getRunTimeUser(request);
    String czje = request.getParameter("czje");
    String czjf = "";
    String[] is_nore = request.getParameterValues("is_nore");
    if(rtUser!=null&&rtUser.getUsertype()==User.USER_TYPE_MERCHANT){
      Merchant _m = merchantDao.getMerchantById(rtUser.getOrganizationid());
      Rechargehistory rechargeh = new Rechargehistory();
      rechargeh.setCZYHBH(rtUser);
      rechargeh.setCZSJ(new Date());
      rechargeh.setCzzt(Rechargehistory.RECHARGEHISTORY_INIT);
      rechargeh.setCZJE(Double.parseDouble(czje==null?"0":czje));
View Full Code Here

TOP

Related Classes of com.lgx8.management.entities.Dictionary

Copyright © 2018 www.massapicom. 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.