Search in sources :

Example 1 with MemberCardWarpper

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

the class MemberCardController method list.

/**
 * 获取领取记录列表
 */
@Permission
@RequestMapping(value = "/list")
@ResponseBody
public Object list(String cardNumber, String cardName, Long cardId, String mobile, String nickname, Integer state, Integer grantType) {
    Long userId = Long.valueOf(ShiroKit.getUser().getId());
    Merchant merchant = merchantService.getMerchantUserId(userId);
    Page<MemberCard> page = new PageFactory<MemberCard>().defaultPage();
    List<Map<String, Object>> result = memberCardService.getMemberCardList(cardId, grantType, state, mobile, page, nickname, page.getOrderByField(), page.isAsc(), merchant.getId(), cardNumber);
    page.setRecords((List<MemberCard>) new MemberCardWarpper(result).warp());
    return super.packForBT(page);
}
Also used : MemberCard(com.ikoori.vip.common.persistence.model.MemberCard) Merchant(com.ikoori.vip.common.persistence.model.Merchant) MemberCardWarpper(com.ikoori.vip.server.modular.biz.warpper.MemberCardWarpper) 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 MemberCard (com.ikoori.vip.common.persistence.model.MemberCard)1 Merchant (com.ikoori.vip.common.persistence.model.Merchant)1 MemberCardWarpper (com.ikoori.vip.server.modular.biz.warpper.MemberCardWarpper)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