Search in sources :

Example 1 with CardWarpper

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

the class CardController method list.

/**
 * 获取会员卡列表
 */
@RequestMapping(value = "/list")
@Permission
@ResponseBody
public Object list(String condition) {
    Long userId = Long.valueOf(ShiroKit.getUser().getId());
    Merchant merchant = merchantService.getMerchantUserId(userId);
    Page<Card> page = new PageFactory<Card>().defaultPage();
    List<Map<String, Object>> result = cardService.getCardList(page, condition, page.getOrderByField(), page.isAsc(), merchant.getId());
    page.setRecords((List<Card>) new CardWarpper(result).warp());
    return super.packForBT(page);
}
Also used : Merchant(com.ikoori.vip.common.persistence.model.Merchant) CardWarpper(com.ikoori.vip.server.modular.biz.warpper.CardWarpper) HashMap(java.util.HashMap) Map(java.util.Map) Card(com.ikoori.vip.common.persistence.model.Card) 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 Card (com.ikoori.vip.common.persistence.model.Card)1 Merchant (com.ikoori.vip.common.persistence.model.Merchant)1 CardWarpper (com.ikoori.vip.server.modular.biz.warpper.CardWarpper)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