Search in sources :

Example 1 with SignWarpper

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

the class SignController method list.

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