public void execute() {
    ApplicationContext applicationContext = ApplicationContext.CTX;
    Map<String, String> parameters = applicationContext.getSimpleMapParameters();
    logger.debug("parameters={}", parameters);
    String pageCount = parameters.get("pageCount");
    String pageNo = parameters.get("pageNo");
    EntityDao<WeiSiteConfig> entityDAO = applicationContext.getEntityDAO(EntityNames.weiSiteConfig);
    List<Condition> conditionList = new ArrayList<Condition>(0);

    PageModel enityPageMode =
        entityDAO.inquirePageByCondition(
            conditionList, Integer.parseInt(pageNo), Integer.parseInt(pageCount));
    List<WeiSiteConfig> entityList = enityPageMode.getDataList();
    if (entityList != null) {
      if (!entityList.isEmpty()) {
        applicationContext.setEntityList(entityList);
        applicationContext.setCount(enityPageMode.getTotalCount());
        applicationContext.setTotalPage(applicationContext.getTotalPage());
        applicationContext.success();
      } else {
        applicationContext.noData();
      }
    } else {
      throw new RollBackException("操作失败");
    }
  }
 public void execute() {
   ApplicationContext applicationContext = ApplicationContext.CTX;
   Map<String, String> parameters = applicationContext.getSimpleMapParameters();
   logger.debug("parameters={}", parameters);
   EntityDao<EventConfig> entityDAO = applicationContext.getEntityDAO(EntityNames.eventConfig);
   List<Condition> conditionList = new ArrayList<Condition>(0);
   List<EventConfig> entityList = entityDAO.inquireByCondition(conditionList);
   if (entityList != null) {
     applicationContext.setEntityList(entityList);
     applicationContext.success();
   } else {
     throw new RollBackException("操作失败");
   }
 }
  public void execute() {
    ApplicationContext applicationContext = ApplicationContext.CTX;
    Map<String, String> parameters = applicationContext.getSimpleMapParameters();
    logger.debug("parameters={}", parameters);
    PrimaryKey primaryKey = new PrimaryKey();
    String weiSiteImageId = parameters.get("weiSiteImageId");
    primaryKey.putKeyField("weiSiteImageId", String.valueOf(weiSiteImageId));

    EntityDao<WeiSiteImage> entityDAO = applicationContext.getEntityDAO(EntityNames.weiSiteImage);
    WeiSiteImage entity = entityDAO.inqurieByKey(primaryKey);
    if (entity != null) {
      applicationContext.setEntityData(entity);
      applicationContext.success();
    } else {
      throw new RollBackException("操作失败");
    }
  }
 public void execute() {
   ApplicationContext applicationContext = ApplicationContext.CTX;
   Map<String, String> parameters = applicationContext.getSimpleMapParameters();
   long companyId = applicationContext.getUserId();
   logger.debug("parameters={}", parameters);
   EntityDao<Resources> entityDAO = applicationContext.getEntityDAO(EntityNames.resources);
   List<Condition> conditionList = new ArrayList<Condition>(0);
   Condition companyIdCondition =
       new Condition("companyId", ConditionTypeEnum.EQUAL, String.valueOf(companyId));
   conditionList.add(companyIdCondition);
   List<Resources> entityList = entityDAO.inquireByCondition(conditionList);
   if (entityList != null) {
     Map<String, String> resultMap;
     List<Map<String, String>> systemMapList = new ArrayList<Map<String, String>>(0);
     List<Map<String, String>> bussinessMapList = new ArrayList<Map<String, String>>(0);
     Map<String, String> resourceMap = null;
     for (Resources resources : entityList) {
       if (resources.getResourcesType() == SalesConstant.SYSTEM_RESOURCE_TYPE
           || resources.getResourcesType() == SalesConstant.CUSTOM_RESOURCE_TYPE
           || resources.getResourcesType() == SalesConstant.WEISITE_RESOURCE_TYPE) {
         resourceMap = new HashMap<String, String>(2);
         resourceMap.put("resourcesName", resources.getResourcesName());
         resourceMap.put("resourcesId", String.valueOf(resources.getResourcesId()));
         bussinessMapList.add(resourceMap);
       } else if (resources.getResourcesType() == SalesConstant.SINGLE__TEXT
           || resources.getResourcesType() == SalesConstant.SINGLE_IMAGE_TEXT
           || resources.getResourcesType() == SalesConstant.MULTI_IMAGE_TEXT) {
         resourceMap = new HashMap<String, String>(2);
         resourceMap.put("resourcesName", resources.getResourcesName());
         resourceMap.put("resourcesId", String.valueOf(resources.getResourcesId()));
         systemMapList.add(resourceMap);
       }
     }
     resultMap = new HashMap<String, String>(4, 1);
     resultMap.put("systemResource", JsonUtils.mapListToJsonArray(systemMapList));
     resultMap.put("businessResource", JsonUtils.mapListToJsonArray(bussinessMapList));
     applicationContext.setMapData(resultMap);
     applicationContext.success();
   }
 }
 public void execute() {
   ApplicationContext applicationContext = ApplicationContext.CTX;
   Map<String, String> parameters = applicationContext.getSimpleMapParameters();
   long companyId = applicationContext.getUserId();
   logger.debug("parameters={}", parameters);
   EntityDao<WeiSiteConfig> entityDAO = applicationContext.getEntityDAO(EntityNames.weiSiteConfig);
   List<Condition> conditionList = new ArrayList<Condition>(0);
   Condition companyIdCondition =
       new Condition("companyId", ConditionTypeEnum.EQUAL, String.valueOf(companyId));
   conditionList.add(companyIdCondition);
   List<WeiSiteConfig> entityList = entityDAO.inquireByCondition(conditionList);
   if (entityList != null) {
     if (!entityList.isEmpty()) {
       applicationContext.setEntityData(entityList.get(0));
       applicationContext.success();
     } else {
       applicationContext.fail();
     }
   } else {
     throw new RollBackException("操作失败");
   }
 }