|
|
|
@ -53,11 +53,13 @@ public class OrderServiceImpl implements OrderService { |
|
|
|
Map retmap =new HashMap(); |
|
|
|
int starrs = page>1?(page-1)*limit:0; |
|
|
|
List<Order> orderList=orderMapper.getOrderList(qumap,starrs,limit); |
|
|
|
// 封装后的结果对象
|
|
|
|
Map tomap =new HashMap(); |
|
|
|
|
|
|
|
// 存放结果list
|
|
|
|
List relist = new ArrayList(); |
|
|
|
|
|
|
|
//拼装对象
|
|
|
|
for(Order od:orderList){ |
|
|
|
|
|
|
|
Map tomap =new HashMap(); |
|
|
|
//订单编号
|
|
|
|
tomap.put("batchcode",od.getBatchcode()); |
|
|
|
// 购买者
|
|
|
|
@ -106,6 +108,9 @@ public class OrderServiceImpl implements OrderService { |
|
|
|
tomap.put("type",od.getType()); |
|
|
|
tomap.put("status",od.getStatus()); |
|
|
|
tomap.put("id",od.getId()); |
|
|
|
|
|
|
|
//attention map 对象有小小的弊端
|
|
|
|
relist.add(tomap); |
|
|
|
} |
|
|
|
|
|
|
|
retmap.put("start",starrs+1); |
|
|
|
@ -113,7 +118,7 @@ public class OrderServiceImpl implements OrderService { |
|
|
|
retmap.put("end",page*limit); |
|
|
|
retmap.put("id",starrs); |
|
|
|
retmap.put("per_page",limit); |
|
|
|
retmap.put("data",tomap); |
|
|
|
retmap.put("data",relist); |
|
|
|
return retmap; |
|
|
|
} |
|
|
|
|
|
|
|
|