use of com.ikoori.vip.server.modular.biz.warpper.CouponWarpper in project vip by guangdada.
the class CouponController method list.
/**
* 获取优惠券列表
*/
@RequestMapping(value = "/list")
@Permission
@ResponseBody
public Object list(String couponName, Long storeId, Boolean isExpired, Boolean isInvalid, Integer type) {
Long userId = Long.valueOf(ShiroKit.getUser().getId());
Merchant merchant = merchantService.getMerchantUserId(userId);
Page<Coupon> page = new PageFactory<Coupon>().defaultPage();
List<Map<String, Object>> result = couponService.getCouponList(merchant.getId(), isExpired, isInvalid, type, storeId, page, couponName, page.getOrderByField(), page.isAsc());
page.setRecords((List<Coupon>) new CouponWarpper(result).warp());
return super.packForBT(page);
}
Aggregations