Ejemplo n.º 1
0
 /**
  * @Method toCreateOrder
  *
  * @exception 创建订单
  * @param artwork_id 艺术品ID
  * @param request 请求
  * @param response 响应
  * @return
  * @author echo
  * @time 2015年12月31日
  */
 @RequestMapping("/mall/jsp/buy/createOrder")
 @isUser
 public String toCreateOrder(
     Long artwork_id, HttpServletRequest request, HttpServletResponse response) {
   HttpSession session = request.getSession();
   User user = (User) session.getAttribute("user");
   request.setAttribute("artwork", buyService.getArtworkById(artwork_id));
   if (user != null) {
     request.setAttribute("address", user.getAddress());
   }
   request.setAttribute("addressList", buyService.getAddressListByUser(user));
   return "/mall/jsp/buy/createOrder";
 }
Ejemplo n.º 2
0
 /**
  * @Method toConfirmCustomOrder
  *
  * @exception 确认生成定制订单
  * @param shop_id 店铺ID
  * @param request 请求
  * @param response 响应
  * @return
  * @author echo
  * @time 2015年12月31日
  */
 @RequestMapping("/mall/jsp/buy/confirmCustomOrder")
 @isUser
 public String toConfirmCustomOrder(
     Long shop_id, HttpServletRequest request, HttpServletResponse response) {
   request.setAttribute("shop", buyService.getShopById(shop_id));
   return "/mall/jsp/buy/confirmCustomOrder";
 }
Ejemplo n.º 3
0
 /**
  * @Method payDeposit
  *
  * @exception 付押金JSON
  * @param lot_id 竞价品ID
  * @param request 请求
  * @param response 响应
  * @return JSON
  * @author echo
  * @time 2015年12月31日
  */
 @RequestMapping("/deposit.json")
 @ResponseBody
 public JSON payDeposit(Long lot_id, HttpServletRequest request, HttpServletResponse response) {
   HttpSession session = request.getSession();
   User user = (User) session.getAttribute("user");
   return buyService.createDeposit(lot_id, user);
 }
Ejemplo n.º 4
0
 /**
  * @Method pay
  *
  * @exception 付款JSON
  * @param payment_id 代付款ID
  * @param request 请求
  * @param response 响应
  * @return JSON
  * @author echo
  * @time 2016年1月17日
  */
 @RequestMapping("/pay.json")
 @ResponseBody
 public JSON pay(Long payment_id, HttpServletRequest request, HttpServletResponse response) {
   HttpSession session = request.getSession();
   User user = (User) session.getAttribute("user");
   return buyService.setPay(payment_id, user);
 }
Ejemplo n.º 5
0
 /**
  * @Method bid
  *
  * @exception 叫价JSON
  * @param lot_id 竞价品ID
  * @param money 出价
  * @param request 请求
  * @param response 响应
  * @return JSON
  * @author echo
  * @time 2015年12月31日
  */
 @RequestMapping("/bid.json")
 @ResponseBody
 public JSON bid(
     Long lot_id, Double money, HttpServletRequest request, HttpServletResponse response) {
   HttpSession session = request.getSession();
   User user = (User) session.getAttribute("user");
   return buyService.createBid(lot_id, money, user);
 }
Ejemplo n.º 6
0
 /**
  * @Method createOrder
  *
  * @exception 生成订单JSON
  * @param artwork_id 艺术品ID
  * @param address_id 送货定制ID
  * @param request 请求
  * @param response 响应
  * @return JSON
  * @author echo
  * @time 2015年12月31日
  */
 @RequestMapping("/createOrder.json")
 @ResponseBody
 public JSON createOrder(
     Long artwork_id, Long address_id, HttpServletRequest request, HttpServletResponse response) {
   HttpSession session = request.getSession();
   User user = (User) session.getAttribute("user");
   return buyService.createOrder(artwork_id, address_id, user);
 }
Ejemplo n.º 7
0
 /**
  * @Method toPay
  *
  * @exception 进入付款页面
  * @param payment_id 代付款记录ID
  * @param request 请求
  * @param response 响应
  * @return
  * @author echo
  * @time 2015年12月31日
  */
 @RequestMapping("/mall/jsp/buy/pay")
 @isUser
 public String toPay(Long payment_id, HttpServletRequest request, HttpServletResponse response) {
   HttpSession session = request.getSession();
   User user = (User) session.getAttribute("user");
   Payment payment = buyService.getPaymentById(payment_id, user);
   request.setAttribute("payment", payment);
   return "/mall/jsp/buy/pay";
 }
Ejemplo n.º 8
0
 /**
  * @Method saveCustomOrder
  *
  * @exception 保存定制订单JSON
  * @param artwork 艺术品
  * @param category_id 分类ID
  * @param shop_id 店铺ID
  * @param request 请求
  * @param response 响应
  * @return JSON
  * @author echo
  * @time 2015年12月31日
  */
 @RequestMapping("/saveCustomOrder.json")
 @ResponseBody
 public JSON saveCustomOrder(
     Artwork artwork,
     Long category_id,
     Long shop_id,
     HttpServletRequest request,
     HttpServletResponse response) {
   HttpSession session = request.getSession();
   User user = (User) session.getAttribute("user");
   return buyService.saveCustomOrder(artwork, category_id, shop_id, user);
 }
Ejemplo n.º 9
0
 /**
  * @Method toDeposit
  *
  * @exception 进入交押金页面
  * @param lot_id 竞价品ID
  * @param request 请求
  * @param response 响应
  * @return
  * @author echo
  * @time 2015年12月31日
  */
 @RequestMapping("/mall/jsp/buy/deposit")
 @isUser
 public String toDeposit(Long lot_id, HttpServletRequest request, HttpServletResponse response) {
   request.setAttribute("lot", buyService.getLotById(lot_id));
   return "/mall/jsp/buy/deposit";
 }