Search in sources :

Example 1 with PointWarpper

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

the class PointController method list.

/**
 * 获取积分管理列表
 */
@RequestMapping(value = "/list")
@Permission
@ResponseBody
public Object list(String condition) {
    Page<Point> page = new PageFactory<Point>().defaultPage();
    Long userId = Long.valueOf(ShiroKit.getUser().getId());
    Merchant merchant = merchantService.getMerchantUserId(userId);
    List<Map<String, Object>> result = pointService.getPointList(page, condition, page.getOrderByField(), page.isAsc(), merchant.getId());
    page.setRecords((List<Point>) new PointWarpper(result).warp());
    return super.packForBT(page);
}
Also used : Merchant(com.ikoori.vip.common.persistence.model.Merchant) Point(com.ikoori.vip.common.persistence.model.Point) Map(java.util.Map) PointWarpper(com.ikoori.vip.server.modular.biz.warpper.PointWarpper) 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 Point (com.ikoori.vip.common.persistence.model.Point)1 PointWarpper (com.ikoori.vip.server.modular.biz.warpper.PointWarpper)1 Map (java.util.Map)1 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)1 ResponseBody (org.springframework.web.bind.annotation.ResponseBody)1