/**
  * 添加
  *
  * @param inv
  * @param actPintuConf
  * @param startTime
  * @param endTime
  * @param userPluginId
  * @return
  * @throws Exception
  */
 @Post("add_do")
 public String add_do(
     final Invocation inv,
     ActPintuConf actPintuConf,
     @Param("activityTime") final String activityTime,
     @Param("userPluginId") final Integer userPluginId)
     throws Exception {
   if (activityTime == null
       || activityTime.length() == 0
       || actPintuConf.getAwards() == null
       || actPintuConf.getAwards().toString().length() == 0) {
     inv.addModel("tip", "非法操作,请重试");
     inv.addModel(
         "backUrl", ReadProperties.getPara("httpPath") + "/pluginadmin/pintu/add/" + userPluginId);
     return "../pc/tip.jsp";
   }
   if (activityTime.length() != 0) {
     String[] time = activityTime.split(" - ");
     actPintuConf.setStartTime(DateUtils.converDate(time[0]));
     actPintuConf.setEndTime(DateUtils.converDate(time[1]));
   }
   actPintuConf.setCreateTime(new Date());
   actPintuConfService.save(actPintuConf, userPluginId);
   actPintuConfService.savePrize(
       actPintuConf.getActivityId(), actPintuConf.getAwards().toString());
   inv.getResponse().sendRedirect(WebApplicationUtils.getBasePath() + "/pc/my/actList");
   return null;
 }
 /**
  * 修改
  *
  * @param inv
  * @param actGuessGameConf
  * @param startTime
  * @param endTime
  * @return
  * @throws Exception
  */
 @Post("edit_do")
 public String edit_do(
     final Invocation inv,
     ActGuessGameConf actGuessGameConf,
     @Param("createTime") final Date createTime,
     @Param("activityTime") final String activityTime)
     throws Exception {
   if (activityTime == null || activityTime.length() == 0) {
     inv.addModel("tip", "非法操作,请重试");
     inv.addModel(
         "backUrl",
         ReadProperties.getPara("httpPath")
             + "/pluginadmin/guessgame/edit/"
             + actGuessGameConf.getActivityId());
     return "../pc/tip.jsp";
   }
   if (activityTime.length() != 0) {
     String[] time = activityTime.split(" - ");
     actGuessGameConf.setStartTime(DateUtils.converDate(time[0]));
     actGuessGameConf.setEndTime(DateUtils.converDate(time[1]));
   }
   actGuessGameConf.setCreateTime(createTime);
   actGuessGameConfService.update(actGuessGameConf);
   inv.getResponse().sendRedirect(WebApplicationUtils.getBasePath() + "/pc/my/actList");
   return null;
 }
 @ActOptRequired
 @Get("rank/{activityId:[0-9]+}")
 public String rank(
     final Invocation inv,
     @Param("activityId") final Integer activityId,
     @Param("currentPage") final int currentPage,
     @Param("count") final int count,
     @Param("upid") final Integer userPluginId) {
   Pagination<ActPintuRecord> paginationRecord =
       actPintuConfService.getRankPage(activityId, currentPage, Globals.PAGE_SHOW_NUMBER);
   inv.addModel("recordVos", paginationRecord);
   inv.addModel("activityId", activityId);
   inv.addModel("userPluginId", userPluginId);
   inv.addModel("rankUrl", ReadProperties.getPara("httpPath") + "/cj/pintu/rank/" + activityId);
   return "pintu/rank";
 }