Search in sources :

Example 1 with OrderWarpper

use of com.ikoori.vip.server.modular.biz.warpper.OrderWarpper in project vip by guangdada.

the class OrderController method list.

/**
 * 获取订单列表
 */
@Permission
@RequestMapping(value = "/list")
@ResponseBody
public Object list(String memName, Long storeId, String mobile, Long orderSource, String orderNo) {
    Long userId = Long.valueOf(ShiroKit.getUser().getId());
    Merchant merchant = merchantService.getMerchantUserId(userId);
    Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage();
    List<Map<String, Object>> result = orderService.getOrderList(page, memName, page.getOrderByField(), page.isAsc(), merchant.getId(), storeId, mobile, orderSource, orderNo);
    page.setRecords((List<Map<String, Object>>) new OrderWarpper(result).warp());
    return super.packForBT(page);
}
Also used : Merchant(com.ikoori.vip.common.persistence.model.Merchant) OrderWarpper(com.ikoori.vip.server.modular.biz.warpper.OrderWarpper) HashMap(java.util.HashMap) Map(java.util.Map) Permission(com.ikoori.vip.common.annotion.Permission) RequestMapping(org.springframework.web.bind.annotation.RequestMapping) ResponseBody(org.springframework.web.bind.annotation.ResponseBody)

Aggregations

Permission (com.ikoori.vip.common.annotion.Permission)1 Merchant (com.ikoori.vip.common.persistence.model.Merchant)1 OrderWarpper (com.ikoori.vip.server.modular.biz.warpper.OrderWarpper)1 HashMap (java.util.HashMap)1 Map (java.util.Map)1 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)1 ResponseBody (org.springframework.web.bind.annotation.ResponseBody)1