Ejemplo n.º 1
0
  /**
   * 获取当前线程的 fremarkManager
   *
   * @return
   */
  public static final FreeMarkerPaser getInstance() {

    if (managerLocal.get() == null) {
      throw new RuntimeException("freemarker paser is null");
    }
    FreeMarkerPaser fmp = managerLocal.get();

    fmp.setPageFolder(null);
    fmp.setWrapPath(true);
    // System.out.println(fmp);
    return fmp;
  }
 /*    */ public String getAllocationViewHtml(OrderItem item) /*    */ {
   /* 58 */ List storeList =
       this.goodsStoreManager.listProductAllo(item.getOrder_id(), item.getItem_id());
   /*    */
   /* 60 */ FreeMarkerPaser freeMarkerPaser = FreeMarkerPaser.getCurrInstance();
   /* 61 */ freeMarkerPaser.setClz(getClass());
   /* 62 */ freeMarkerPaser.putData("item", item);
   /* 63 */ freeMarkerPaser.putData("storeList", storeList);
   /* 64 */ freeMarkerPaser.setPageName("view_allocation");
   /* 65 */ return freeMarkerPaser.proessPageContent();
   /*    */ }
 /*    */ public String getAllocationStoreHtml(OrderItem item) /*    */ {
   /* 37 */ List storeList = this.goodsStoreManager.listProductStore(item.getProduct_id());
   /* 38 */ FreeMarkerPaser freeMarkerPaser = FreeMarkerPaser.getCurrInstance();
   /* 39 */ freeMarkerPaser.setClz(getClass());
   /* 40 */ freeMarkerPaser.putData("item", item);
   /* 41 */ freeMarkerPaser.putData("storeList", storeList);
   /* 42 */ return freeMarkerPaser.proessPageContent();
   /*    */ }
Ejemplo n.º 4
0
 /*     */ public String getAddHtml(HttpServletRequest request) {
   /*  75 */ FreeMarkerPaser freeMarkerPaser = FreeMarkerPaser.getInstance();
   /*  76 */ freeMarkerPaser.setPageName("album");
   /*  77 */ freeMarkerPaser.putData("image_default", null);
   /*  78 */ freeMarkerPaser.putData("thumbnail_images", null);
   /*  79 */ String html = freeMarkerPaser.proessPageContent();
   /*  80 */ return html;
   /*     */ }
Ejemplo n.º 5
0
 /*     */ public String getEditHtml(Map goods, HttpServletRequest request) /*     */ {
   /*  48 */ String contextPath = request.getContextPath();
   /*     */
   /*  50 */ FreeMarkerPaser freeMarkerPaser = FreeMarkerPaser.getInstance();
   /*     */
   /*  53 */ String image_default = null;
   /*  54 */ if ((goods.get("image_file") != null) && (goods.get("image_file") != "")) {
     /*  55 */ String image_file = goods.get("image_file").toString();
     /*  56 */ String[] thumbnail_images = StringUtils.split(image_file, ",");
     /*     */
     /*  58 */ image_default = (String) goods.get("image_default");
     /*  59 */ if (!StringUtil.isEmpty(image_default)) {
       /*  60 */ image_default = UploadUtil.replacePath(image_default);
       /*     */ }
     /*     */
     /*  64 */ freeMarkerPaser.putData("ctx", contextPath);
     /*  65 */ freeMarkerPaser.putData("image_default", image_default);
     /*  66 */ freeMarkerPaser.putData("thumbnail_images", thumbnail_images);
     /*     */ }
   /*     */
   /*  69 */ freeMarkerPaser.setPageName("album");
   /*  70 */ String html = freeMarkerPaser.proessPageContent();
   /*  71 */ return html;
   /*     */ }