Search in sources :

Example 1 with CouponFetchWarpper

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

the class CouponFetchController method list.

/**
 * 获取领取记录列表
 */
@RequestMapping(value = "/list")
@ResponseBody
@Permission
public Object list(String couponName, Integer isUsed, Integer type, String mobile, String nickname, String verifyCode) {
    Long userId = Long.valueOf(ShiroKit.getUser().getId());
    Merchant merchant = merchantService.getMerchantUserId(userId);
    Page<Object> page = new PageFactory<Object>().defaultPage();
    List<Map<String, Object>> result = couponFetchService.selectByCondition(verifyCode, nickname, type, mobile, isUsed, page, couponName, page.getOrderByField(), page.isAsc(), merchant.getId());
    page.setRecords((List<Object>) new CouponFetchWarpper(result).warp());
    return super.packForBT(page);
}
Also used : Merchant(com.ikoori.vip.common.persistence.model.Merchant) CouponFetchWarpper(com.ikoori.vip.server.modular.biz.warpper.CouponFetchWarpper) 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 CouponFetchWarpper (com.ikoori.vip.server.modular.biz.warpper.CouponFetchWarpper)1 Map (java.util.Map)1 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)1 ResponseBody (org.springframework.web.bind.annotation.ResponseBody)1