Beispiel #1
0
  @GET
  @Path("/{id}")
  public Viewable index(@Context HttpServletRequest request, @PathParam("id") String id) {
    MAppEntity app = appService.findById(MAppEntity.class, id);

    Map<String, Object> modelMap = Maps.newHashMap();
    modelMap.put("app", app);
    modelMap.put("appVo", appInformationService.getAppDetailByAppId(id));
    modelMap.put(
        "category", categoryService.findById(MAppCategoryEntity.class, app.getAppCategoryId()));
    PageData pageData =
        assessEntityService.findByPageData(
            MAppAssessEntity.class,
            "from MAppAssessEntity where appId = ? and delFlag='n'",
            new Object[] {app.getId()},
            1,
            5);
    modelMap.put("assess", pageData.getData());

    return new Viewable("/app/index", modelMap);
  }
Beispiel #2
0
 @GET
 @Path("/comments")
 public Viewable comments(@QueryParam("id") String id, @QueryParam("pageNo") Integer pageNo) {
   MAppEntity app = appService.findById(MAppEntity.class, id);
   Map<String, Object> modelMap = Maps.newHashMap();
   PageData pageData =
       assessEntityService.findByPageData(
           MAppAssessEntity.class,
           "from MAppAssessEntity where appId = ? and delFlag='n'",
           new Object[] {app.getId()},
           pageNo,
           10);
   modelMap.put("pageData", pageData);
   return new Viewable("/app/comment", modelMap);
 }