Search in sources :

Example 1 with TicketWarpper

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

the class TicketController method list.

/**
 * 获取小票列表
 */
@Permission
@RequestMapping(value = "/list")
@ResponseBody
public Object list(String ticketName, Long storeId, Model model) {
    Long userId = Long.valueOf(ShiroKit.getUser().getId());
    Merchant merchant = merchantService.getMerchantUserId(userId);
    Page<Ticket> page = new PageFactory<Ticket>().defaultPage();
    List<Map<String, Object>> result = ticketService.getTicketList(page, ticketName, storeId, merchant.getId(), page.getOrderByField(), page.isAsc());
    page.setRecords((List<Ticket>) new TicketWarpper(result).warp());
    return super.packForBT(page);
}
Also used : Ticket(com.ikoori.vip.common.persistence.model.Ticket) Merchant(com.ikoori.vip.common.persistence.model.Merchant) TicketWarpper(com.ikoori.vip.server.modular.biz.warpper.TicketWarpper) 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 Ticket (com.ikoori.vip.common.persistence.model.Ticket)1 TicketWarpper (com.ikoori.vip.server.modular.biz.warpper.TicketWarpper)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