Package com.lgx8.gateway.entities

Examples of com.lgx8.gateway.entities.Orders


   * @return
   */
  @RequestMapping("/order/ordersDealIni.do")
  public ModelAndView ordersDeal(HttpServletRequest request,HttpServletResponse response){
    String orderId = request.getParameter("id");
    Orders o = orderDao.findOrders(StrUtil.parseLong(orderId));
    return new ModelAndView("/management/order/orderDeal").addObject("Orders", o);
   
  }
View Full Code Here


   */
  @RequestMapping("/order/ordersSend.do")
  public ModelAndView ordersSend(HttpServletRequest request,HttpServletResponse response){
    String orderId = request.getParameter("id");
    request.setAttribute("orderid", orderId);
    Orders o = orderDao.findOrders(StrUtil.parseLong(orderId));
    //当“特快专递”、“货到付邮”时需要增加快递信息记录
    if("1".equals(o.getFareway()) || "2".equals(o.getFareway()))
    {
      return new ModelAndView(new RedirectView("../page/management/order/express.jsp?orderid="+orderId));
    }else
    {
      o.setStatus(3);
      orderDao.updateOrders(o);
      return new ModelAndView(new RedirectView("../page/management/order/orderlist.jsp"));
    }
  }
View Full Code Here

        //判断该笔订单是否在商户网站中已经做过处理(可参考“集成教程”中“3.4返回数据处理”)
        //如果没有做过处理,根据订单号(out_trade_no)在商户网站的订单系统中查到该笔订单的详细,并执行商户的业务程序
        //如果有做过处理,不执行商户的业务程序
        logger.debug("return WAIT_SELLER_SEND_GOODS[orderID:"+order_no+"]");
        if(order_no==null)order_no="-1";
        Orders o = orderService.queryOrderById(Long.parseLong(order_no.trim()));
        if(null!=o){
          if(o.getStatus()<Orders.STATUS_PAID){
            logger.debug("return WAIT_SELLER_SEND_GOODS[update orderID:"+order_no+"]");
            User user = userCardService.findUserById(o.getUser().getId() );
            double balance = user.getCard().getScore();
            o.setStatus(Orders.STATUS_PAID);
            o.setPaytime(new Date());
            orderService.updateOrder(o);
            user.getCard().setScore(balance-o.getScore());
            userCardService.updateUser(user);
          }
        }
      }
   
      if(trade_status.equals("TRADE_FINISHED")){
        //判断该笔订单是否在商户网站中已经做过处理(可参考“集成教程”中“3.4返回数据处理”)
        //如果没有做过处理,根据订单号(out_trade_no)在商户网站的订单系统中查到该笔订单的详细,并执行商户的业务程序
        //如果有做过处理,不执行商户的业务程序
        if(order_no==null)order_no="-1";
        Orders o = orderService.queryOrderById(Long.parseLong(order_no.trim()));
        logger.debug("return TRADE_FINISHED[orderID:"+order_no+"]");
        if(null!=o){
          if(o.getStatus()<Orders.STATUS_CONFIRM){
            logger.debug("return TRADE_FINISHED[update orderID:"+order_no+"]");
            o.setStatus(Orders.STATUS_CONFIRM);
            orderService.updateOrder(o);
          }
        }
      }
 
View Full Code Here

    String orderId = request.getParameter("orderid");
    String expcom = request.getParameter("expcom");
    String exporder = request.getParameter("exporder");
    String exptime = request.getParameter("exptime");
   
    Orders o = orderDao.findOrders(StrUtil.parseLong(orderId));
    o.setExpcom(expcom);
    o.setExporder(exporder);
    o.setExptime(exptime);
    o.setStatus(3);
    orderDao.updateOrders(o);
    return new ModelAndView(new RedirectView("../page/management/order/orderlist.jsp"));
  }
View Full Code Here

   * 同意退货请求
   */
  @RequestMapping("order/ordersAcceptReturn.do")
  public ModelAndView ordersAcceptReturn(HttpServletRequest request,HttpServletResponse response){
    String orderId = request.getParameter("id");
    Orders o = orderDao.findOrders(StrUtil.parseLong(orderId));
    o.setStatus(8);
    orderDao.updateOrders(o);
    return new ModelAndView(new RedirectView("../page/management/order/orderlist.jsp"));
  }
View Full Code Here

   * 拒绝退货申请
   */
  @RequestMapping("order/ordersRefuseReturn.do")
  public ModelAndView ordersRefuseReturn(HttpServletRequest request,HttpServletResponse response){
    String orderId = request.getParameter("id");
    Orders o = orderDao.findOrders(StrUtil.parseLong(orderId));
    o.setStatus(9);
    orderDao.updateOrders(o);
    return new ModelAndView(new RedirectView("../page/management/order/orderlist.jsp"));
  }
View Full Code Here

   * 完成退货流程
   */
  @RequestMapping("/order/ordersReturnOver.do")
  public ModelAndView ordersReturnOver(HttpServletRequest request,HttpServletResponse response) {
    String orderId = request.getParameter("id");
    Orders o = orderDao.findOrders(StrUtil.parseLong(orderId));
    o.setStatus(10);
    //返还积分
    User member = o.getUser();
    double score = member.getCard().getScore();
    double total = score +  o.getScore();
    member.getCard().setScore(total);
    orderDao.updateOrders(o);
    userDao.updateUser(member);
    return new ModelAndView(new RedirectView("../page/management/order/orderlist.jsp"));
  }
View Full Code Here

   */
 
  @RequestMapping("/order/orderdetail.do")
  public ModelAndView ordersDetail(HttpServletRequest request,HttpServletResponse response) {
    String orderId = request.getParameter("id");
    Orders o = orderDao.findOrders(StrUtil.parseLong(orderId));
   
    String fareway = o.getFareway();
    if(null!=fareway){
      String farewayId = "";
      if(fareway.indexOf(",")>-1){
        String[] array = fareway.split(",");
        if(null!=array&&array.length>0){
View Full Code Here

  public ModelAndView queryShoppCart(HttpServletRequest request,HttpServletResponse response){
    RunTimeUser currentUser = RunTimeUser.getRunTimeUser(request);
    String hql = " from Orders o where o.status="+ Orders.STATUS_CART +" and o.user.id = ?";
    List<Orders> orderList = orderService.queryOrders(hql, new Object[]{currentUser.getId()});
    if(null!=orderList&&orderList.size()>0){
      Orders order = orderList.get(0);
      request.setAttribute("shopcarts", order);
    }
    return new ModelAndView(MemberURLConst.URL_SHOPCART);
  }
View Full Code Here

        !request.getSession().getAttribute("rd").equals(rd)){
      request.getSession().setAttribute("rd", rd);
      long oid = Long.parseLong(orderId.trim());
      List<Orders> orderList = orderService.queryOrders("from Orders o where o.id=?", new Object[]{oid});
      if(null!=orderList&&orderList.size()>0){
        Orders order = orderList.get(0);
        order.setOrderProducts(new ArrayList<OrderProduct>());
        orderService.updateOrder(order);
        this.printResult(response, "ok");
        return null;
      }
    }
View Full Code Here

TOP

Related Classes of com.lgx8.gateway.entities.Orders

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.