Search in sources :

Example 1 with RedpackWarpper

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

the class RedpackController method list.

/**
 * 获取红包列表
 */
@RequestMapping(value = "/list")
@ResponseBody
public Object list(String redpackName, Integer packType, Integer sendType) {
    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 = redpackService.getRedpackList(page, redpackName, packType, sendType, merchant.getId(), page.getOrderByField(), page.isAsc());
    page.setRecords((List<Map<String, Object>>) new RedpackWarpper(result).warp());
    return super.packForBT(page);
}
Also used : Merchant(com.ikoori.vip.common.persistence.model.Merchant) Map(java.util.Map) RedpackWarpper(com.ikoori.vip.server.modular.biz.warpper.RedpackWarpper) RequestMapping(org.springframework.web.bind.annotation.RequestMapping) ResponseBody(org.springframework.web.bind.annotation.ResponseBody)

Aggregations

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