diff --git a/src/main/java/com/phy/ebuy/controller/EbuyController.java b/src/main/java/com/phy/ebuy/controller/EbuyController.java index b4c7fea..c0fe91f 100644 --- a/src/main/java/com/phy/ebuy/controller/EbuyController.java +++ b/src/main/java/com/phy/ebuy/controller/EbuyController.java @@ -101,6 +101,12 @@ public class EbuyController { return "/account/personalHomepage/toBeEvaluated.html"; } + //购物车页面 + @RequestMapping("/cart") + public String cart() { + return "/cart.html"; + } + //验证登录 @ResponseBody @RequestMapping("/verifyLogin") @@ -139,8 +145,19 @@ public class EbuyController { //获取全部订单 @RequestMapping("/allOrderTable") @ResponseBody - public List> allOrderTable() { - List> result = ebuyService.allOrderTable(); + public List> allOrderTable(@RequestParam("orderStatus") String orderStatus) { + List> result = ebuyService.allOrderTable(orderStatus); + return result; + } + + //获取商品分类 + @RequestMapping("/commodityType") + @ResponseBody + public List> commodityType(String typeDowns) { + String str = typeDowns.substring(typeDowns.indexOf("[")+2,typeDowns.indexOf("]")-1); + String[] typeDownsArr = str.split("\",\""); + List> result = new ArrayList<>(); + result = ebuyService.typeDown(typeDownsArr); return result; } diff --git a/src/main/java/com/phy/ebuy/dao/EbuyMapper.java b/src/main/java/com/phy/ebuy/dao/EbuyMapper.java index 9b9d904..aad5a6a 100644 --- a/src/main/java/com/phy/ebuy/dao/EbuyMapper.java +++ b/src/main/java/com/phy/ebuy/dao/EbuyMapper.java @@ -1,6 +1,7 @@ package com.phy.ebuy.dao; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.One; import org.apache.ibatis.annotations.Select; import java.util.List; @@ -21,10 +22,16 @@ public interface EbuyMapper { /** * 所有订单Table */ - List> allOrderTable(); + List> allOrderTable(String orderStatus); /** * 查询字典表 */ List> queryDictionary(String[] ids); + + /** + * 获取商品分类 + */ + String[] typeDown(String typeDown); + } diff --git a/src/main/java/com/phy/ebuy/dao/mapping/EbuyMapper.xml b/src/main/java/com/phy/ebuy/dao/mapping/EbuyMapper.xml index 5daf66b..7a5618b 100644 --- a/src/main/java/com/phy/ebuy/dao/mapping/EbuyMapper.xml +++ b/src/main/java/com/phy/ebuy/dao/mapping/EbuyMapper.xml @@ -31,7 +31,7 @@ - SELECT o.creat_time creat_time, o.order_id order_id, @@ -47,6 +47,10 @@ FROM ebuy_order o INNER JOIN ebuy_businesses b ON o.businesses_id = b.business_id INNER JOIN ebuy_commodity c ON o.commodity_id = c.commodity_id + where 1 = 1 + + and order_status=#{orderStatus} + @@ -61,4 +65,14 @@ WHERE #{id} + + + \ No newline at end of file diff --git a/src/main/java/com/phy/ebuy/service/EbuyService.java b/src/main/java/com/phy/ebuy/service/EbuyService.java index 51cee53..b56efdd 100644 --- a/src/main/java/com/phy/ebuy/service/EbuyService.java +++ b/src/main/java/com/phy/ebuy/service/EbuyService.java @@ -18,5 +18,10 @@ public interface EbuyService{ /** * 所有订单Table */ - List> allOrderTable(); + List> allOrderTable(String orderStatus); + + /** + * 获取商品分类 + */ + List> typeDown(String[] typeDown); } diff --git a/src/main/java/com/phy/ebuy/service/impl/EbuyServiceImpl.java b/src/main/java/com/phy/ebuy/service/impl/EbuyServiceImpl.java index 1e2b830..96d8d79 100644 --- a/src/main/java/com/phy/ebuy/service/impl/EbuyServiceImpl.java +++ b/src/main/java/com/phy/ebuy/service/impl/EbuyServiceImpl.java @@ -5,6 +5,7 @@ import com.phy.ebuy.service.EbuyService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import java.io.File; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -46,8 +47,11 @@ public class EbuyServiceImpl implements EbuyService { } @Override - public List> allOrderTable() { - List> result = ebuyMapper.allOrderTable(); + public List> allOrderTable(String orderStatus) { + if ("05".equals(orderStatus)) { + orderStatus = null; + } + List> result = ebuyMapper.allOrderTable(orderStatus); for (Map map : result ) { String ids = (String) map.get("commodity_attribute"); String[] idses = ids.split(","); @@ -62,4 +66,14 @@ public class EbuyServiceImpl implements EbuyService { } return result; } + + @Override + public List> typeDown(String[] typeDowns) { + List> result = new ArrayList<>(); + for (int i = 0; i < typeDowns.length; i++) { + String[] one = {}; + one = ebuyMapper.typeDown(typeDowns[i]); + } + return result; + } } diff --git a/src/main/java/com/phy/ebuy/util/Folder.java b/src/main/java/com/phy/ebuy/util/Folder.java new file mode 100644 index 0000000..7ed48e3 --- /dev/null +++ b/src/main/java/com/phy/ebuy/util/Folder.java @@ -0,0 +1,36 @@ +/* +package com.phy.ebuy.util; + +import com.phy.ebuy.dao.EbuyMapper; + + +import java.io.File; +import java.util.List; +import java.util.Map; + +*/ +/** + * 建文件夹 + *//* + +public class Folder{ + public static void main(String[] args) { + EbuyMapper ebuyMapper = null; + List> list = ebuyMapper.file(); + for ( Map one : list) { + File file=new File("D:\\work\\IDEAwork\\ebuy\\src\\main\\webapp\\static\\img\\commodity\\"+one.get("type_down")); + if(!file.exists()){//如果文件夹不存在 + file.mkdir();//创建文件夹 + } + File file1=new File("D:\\work\\IDEAwork\\ebuy\\src\\main\\webapp\\static\\img\\commodity\\"+one.get("type_down")+"\\"+one.get("type_down_details")); + if(!file1.exists()){//如果文件夹不存在 + file1.mkdir();//创建文件夹 + } + } + + System.out.println("已创建文件夹"); + } + + +} +*/ diff --git a/src/main/webapp/WEB-INF/view/account/personalHomepage/pendingPayment.html b/src/main/webapp/WEB-INF/view/account/personalHomepage/pendingPayment.html index 2309e4c..abce185 100644 --- a/src/main/webapp/WEB-INF/view/account/personalHomepage/pendingPayment.html +++ b/src/main/webapp/WEB-INF/view/account/personalHomepage/pendingPayment.html @@ -4,13 +4,14 @@ 待付款 + + + + +
- - - -
宝贝
@@ -22,175 +23,11 @@
交易操作
- -
-
-
-
2020-01-13
-
订单号: 814491555504605953
-
-
- 幽炫数码专营店 -
-
-
-
- -
-
【活动】威刚16G 8G 4G 2666 2400 2133笔记本电脑内存条ddr4高速 [交易快照]
-
内存频率:2400MHz颜色分类:威刚 8G DDR4 笔记本内存条
-
-
-
- ¥229.00 -
-
1
-
- 违规举报 -
-
- ¥241.00 - (含运费:¥12.00) -
-
- 等待买家付款 - 订单详情 -
-
- - 找朋友帮忙付 - 取消订单 - 修改订单 -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/view/account/personalHomepage/toBeEvaluated.html b/src/main/webapp/WEB-INF/view/account/personalHomepage/toBeEvaluated.html index 401b333..e74731d 100644 --- a/src/main/webapp/WEB-INF/view/account/personalHomepage/toBeEvaluated.html +++ b/src/main/webapp/WEB-INF/view/account/personalHomepage/toBeEvaluated.html @@ -4,13 +4,13 @@ 待评价 + + + +
-
- - 订单搜索 -
宝贝
@@ -22,175 +22,11 @@
交易操作
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
2020-01-13
-
订单号: 814491555504605953
-
-
- 幽炫数码专营店 -
-
-
-
- -
-
【活动】威刚16G 8G 4G 2666 2400 2133笔记本电脑内存条ddr4高速 [交易快照]
-
内存频率:2400MHz颜色分类:威刚 8G DDR4 笔记本内存条
-
-
-
- ¥229.00 -
-
1
-
- 退款/退货 -
-
- ¥241.00 - (含运费:¥12.00) -
-
- 买家已付款 - 订单详情 -
-
- 提醒卖家发货 -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/view/account/personalHomepage/toBeReceived.html b/src/main/webapp/WEB-INF/view/account/personalHomepage/toBeReceived.html index 50d720f..3755ef0 100644 --- a/src/main/webapp/WEB-INF/view/account/personalHomepage/toBeReceived.html +++ b/src/main/webapp/WEB-INF/view/account/personalHomepage/toBeReceived.html @@ -4,13 +4,14 @@ 待收货 + + + + +
- - - -
宝贝
@@ -22,175 +23,12 @@
交易操作
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
2020-01-13
-
订单号: 814491555504605953
-
-
- 幽炫数码专营店 -
-
-
-
- -
-
【活动】威刚16G 8G 4G 2666 2400 2133笔记本电脑内存条ddr4高速 [交易快照]
-
内存频率:2400MHz颜色分类:威刚 8G DDR4 笔记本内存条
-
-
-
- ¥229.00 -
-
1
-
- 退款/退换货 - 投诉商家 - 退运保险 -
-
- ¥241.00 - (含运费:¥12.00) -
-
- 等待买家付款 - 订单详情 - 花呗账单 - 查看物流 -
-
- - 申请开票 -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/view/account/personalHomepage/toBeShipped.html b/src/main/webapp/WEB-INF/view/account/personalHomepage/toBeShipped.html index 8da1f05..c13cd42 100644 --- a/src/main/webapp/WEB-INF/view/account/personalHomepage/toBeShipped.html +++ b/src/main/webapp/WEB-INF/view/account/personalHomepage/toBeShipped.html @@ -4,15 +4,13 @@ 待发货 - + + +
- - - -
宝贝
@@ -24,179 +22,12 @@
交易操作
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
2020-01-13
-
订单号: 814491555504605953
-
-
- 幽炫数码专营店 -
-
-
-
- -
-
【活动】威刚16G 8G 4G 2666 2400 2133笔记本电脑内存条ddr4高速 [交易快照]
-
内存频率:2400MHz颜色分类:威刚 8G DDR4 笔记本内存条
-
-
-
- ¥229.00 -
-
1
-
- 申请售后 - 投诉商家 -
-
- ¥241.00 - (含运费:¥12.00) -
-
- 交易成功 - 订单详情 - 花呗账单 - 查看物流 -
-
-
评价
-
-
-
- - + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/view/cart.html b/src/main/webapp/WEB-INF/view/cart.html new file mode 100644 index 0000000..ffbf310 --- /dev/null +++ b/src/main/webapp/WEB-INF/view/cart.html @@ -0,0 +1,88 @@ + + + + + 我的购物车 + + + + + + + + +
+ + +
+
+
+
+
商品信息
+
+
单价
+
数量
+
金额
+
操作
+
+
+
+
+ + 店铺: + CEDY潮牌店 +
+
+
+ +
+
+ +
+ ins嘻哈国潮棉服oversize宽松大毛领连帽中长款男女情侣棉衣外套 +
+
+
+ 修改 + +

颜色:米白色(现货)

+

尺码:XL

+
+
+ ¥268.00 +
+
+
+
-
+ +
+
+
+
+
¥268.00
+
+

移入收藏夹

+

删除

+

相似宝贝

+
+
+
+
+
+ + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/view/middle.html b/src/main/webapp/WEB-INF/view/middle.html index 50c0e20..f5bca6a 100644 --- a/src/main/webapp/WEB-INF/view/middle.html +++ b/src/main/webapp/WEB-INF/view/middle.html @@ -7,6 +7,7 @@ +
@@ -33,19 +34,15 @@