/** mobileAppConfig.do?method=list 提交时,list()被调用 */
  @RequestMapping(params = "method=list")
  @ResponseBody
  public JsonResult list(HttpServletRequest request, MobileAppConfig entity, DataGridModel dm) {
    Map<String, Object> params = new HashMap<String, Object>();
    params.put("description", entity.getDescription());

    List<MobileAppConfig> list =
        mobileAppConfigService.findForPage(params, dm.getStartRow(), dm.getRows());

    Map<String, Object> statusMap = codeService.getCodeCacheMapByCategory("STATUS");
    for (MobileAppConfig mobileAppConfig : list) {
      String status = statusMap.get(mobileAppConfig.getStatus()).toString();
      mobileAppConfig.setStatus(status);
    }

    int totalCount = mobileAppConfigService.getTotalCount(params).intValue();

    JsonResult jsonResult = new JsonResult();
    jsonResult.setTotal(totalCount);
    jsonResult.setRows(list);
    return jsonResult;
  }