|
@@ -8,6 +8,9 @@
|
|
|
|
|
|
package com.zskk.shop.controller.h5;
|
|
|
|
|
|
+import java.util.ArrayList;
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Controller;
|
|
|
import org.springframework.ui.Model;
|
|
@@ -15,6 +18,7 @@ import org.springframework.web.bind.annotation.PathVariable;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
|
|
import com.zskk.shop.controller.AbstractController;
|
|
|
+import com.zskk.shop.controller.bean.BuyOrderBean;
|
|
|
import com.zskk.shop.controller.bean.ControllerResult;
|
|
|
import com.zskk.shop.controller.bean.UserBean;
|
|
|
import com.zskk.shop.dao.entry.BuyOrder;
|
|
@@ -73,4 +77,19 @@ public class H5BuyOrderController extends AbstractController{
|
|
|
public String paySuccess(Model model){
|
|
|
return "/h5/";
|
|
|
}
|
|
|
+
|
|
|
+ @RequestMapping("/buy/mypayedorders")
|
|
|
+ public String myorders(Model model){
|
|
|
+ UserBean userBean = this.getUser();
|
|
|
+ String uid = userBean.getUserid();
|
|
|
+ List<BuyOrder> orders = buyOrderService.queryMyPayedOrders(uid);
|
|
|
+ List<BuyOrderBean> beans = new ArrayList<>(orders.size());
|
|
|
+ for (BuyOrder order: orders){
|
|
|
+ BuyOrderBean bean = buyOrderService.toBuyOrderBean(order);
|
|
|
+ beans.add(bean);
|
|
|
+ }
|
|
|
+ model.addAttribute("orders", beans);
|
|
|
+ this.initUser(model);
|
|
|
+ return "/h5/mypayedorders";
|
|
|
+ }
|
|
|
}
|