コード例 #1
0
  // 审核通过,更新申请表
  public String passupdate() {
    String prolongapplyId = req.getParameter("id");
    String[] valus = new String[1];
    valus[0] = prolongapplyId;
    String userId = req.getParameter("CheckId");
    UserInfo user = userInfoService.findById(Integer.parseInt(userId));
    Date now = new Date();
    if (valus.length != 0) {
      for (int i = 0; i < valus.length; i++) {
        int modelId = Integer.parseInt(valus[i]);
        ProlongApply model = prolongApplyService.get(modelId);
        SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        model.setRemainchecktime("0");
        model.setCheckuserinfo(user);
        model.setCheckTime(dateFormat.format(now));
        model.setCheckIdea(req.getParameter("checkIdea"));
        model.setState("1");
        prolongApplyService.update(model); // 更新延长收货时间申请表

        // 更新订单表
        Order order = orderService.get(model.getOrder().getOrderid());
        order.setState("33"); // 审核通过,已经延长收货时间
        orderService.update(order);

        // 给买家发送消息
        /*messageService.sendMessage(messageService,"您申请的延长收货时间卖家已审核通过,请查看!",
        user.getUserinfoId(), model.getUserinfo().getUserinfoId(),
                    "prolongApplyAction_searchMyViewList.action","prolongId", modelId);*/
      }
    }
    jsonMap.put("isResult", "true");
    return "checkProlongApplyRedirect";
  }
コード例 #2
0
  // 修改提交
  public String alterUpdate() {
    Date now = new Date();
    SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
    String id = req.getParameter("id");
    ProlongApply model2 = prolongApplyService.get(Integer.parseInt(id));

    model2.setApplyTime(dateFormat.format(now));
    model2.setDayapply(req.getParameter("dayapply"));
    model2.setReason(req.getParameter("reason"));
    model2.setRemainchecktime("2");
    model2.setState("0");
    model2.setCheckTime("");
    model2.setCheckIdea("");
    prolongApplyService.update(model2); // 更新延长收货时间申请表

    // 更新订单表
    Order order = orderService.get(model2.getOrder().getOrderid());
    order.setState("31"); // 修改完毕,等待审核
    orderService.update(order);

    // request.put("msg_alterover", "修改已完成!");

    // 给卖家发送消息
    /*messageService.sendMessage(messageService,"您有一个订单买家申请延长收货时间,请审核!",
    model2.getUserinfo().getUserinfoId(), model2.getCheckuserinfo().getUserinfoId(),
                  "prolongApplyAction_searchMyCheckList.action","prolongId", model.getProlongapplyId());		*/

    // searchMyAlterList();
    // return "viewProlongApplyRedirect";
    jsonMap.put("isResult", "true");
    return "UpdataAlterProlongApply";
  }