コード例 #1
0
  /**
   * 修改广告 V1.0.00.14
   *
   * @param
   * @return
   */
  public ActionForward updateAds(
      ActionMapping mapping,
      ActionForm form,
      HttpServletRequest request,
      HttpServletResponse response)
      throws Exception {
    log.info("更新广告操作");

    CommonActionForm aForm = (CommonActionForm) form;
    Dto inDto = aForm.getParamAsDto(request);

    String id = inDto.getAsString("id");
    log.info("查询此广告是否存在 id =" + id);
    Integer totalCount =
        (Integer) urmReader.queryForObject("SignalingLoadNumConfig.getNameByUpdate", inDto);

    log.info("数据库中存在该广告的条数为:" + totalCount);
    inDto.put("sum", totalCount);
    String account = WebUtils.getSessionContainer(request).getUserInfo().getAccount();
    Dto dto = new BaseDto();
    dto.put("account", account);

    Dto userDto = organizationService.getUserInfo(dto);
    UserInfoVo user = (UserInfoVo) userDto.get("userInfo");
    inDto.put("oper_id", user.getUserid());
    inDto.put("dept_id", user.getDeptid());

    Dto outDto = adsService.updateAds(inDto);
    String retString = JsonHelper.encodeObject2Json(outDto);
    write(retString, response);
    setOkTipMsg("广告修改成功", response);
    return mapping.findForward(null);
  }
コード例 #2
0
  /** 新增阈值全量同步 */
  public ActionForward saveCacheContor(
      ActionMapping mapping,
      ActionForm form,
      HttpServletRequest request,
      HttpServletResponse response)
      throws Exception {
    CommonActionForm aForm = (CommonActionForm) form;
    Dto inDto = aForm.getParamAsDto(request);
    //		String account = request.getParameter("account");
    String account = WebUtils.getSessionContainer(request).getUserInfo().getAccount();
    Dto dto = new BaseDto();
    inDto.put("account", account);
    dto.put("account", account);

    Dto userDto = organizationService.getUserInfo(dto);
    UserInfoVo userInfo = (UserInfoVo) userDto.get("userInfo");
    inDto.put("oper_id", userInfo.getUserid());
    inDto.put("dept_id", userInfo.getDeptid());
    inDto.put("operpassword", userInfo.getOperpassword());

    Dto outDto = adsService.saveCacheContor(inDto);
    String jsonString = JsonHelper.encodeObject2Json(outDto);
    write(jsonString, response);
    return mapping.findForward(null);
  }
コード例 #3
0
 /**
  * 删除网络区域
  *
  * @param
  * @return
  */
 public ActionForward deleteAds(
     ActionMapping mapping,
     ActionForm form,
     HttpServletRequest request,
     HttpServletResponse response)
     throws Exception {
   String strChecked = request.getParameter("strChecked");
   Dto inDto = new BaseDto();
   inDto.put("strChecked", strChecked);
   String account = WebUtils.getSessionContainer(request).getUserInfo().getAccount();
   Dto dto = new BaseDto();
   dto.put("account", account);
   Dto userDto = organizationService.getUserInfo(dto);
   UserInfoVo user = (UserInfoVo) userDto.get("userInfo");
   inDto.put("oper_id", user.getUserid());
   inDto.put("dept_id", user.getDeptid());
   Dto outDto = adsService.deleteAds(inDto);
   String retString = JsonHelper.encodeObject2Json(outDto);
   write(retString, response);
   //		setOkTipMsg("网络区域删除成功", response);
   return mapping.findForward(null);
 }