Search in sources :

Example 1 with MerchantWarpper

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

the class MerchantController method list.

/**
 * 获取商户列表
 */
@Permission
@RequestMapping(value = "/list", method = RequestMethod.POST)
@ResponseBody
public Object list(@RequestParam(name = "merName", required = false) String merName) {
    Page<Merchant> page = new PageFactory<Merchant>().defaultPage();
    List<Map<String, Object>> result = merchantDao.getMerchantList(page, merName, page.getOrderByField(), page.isAsc());
    page.setRecords((List<Merchant>) new MerchantWarpper(result).warp());
    return super.packForBT(page);
}
Also used : Merchant(com.ikoori.vip.common.persistence.model.Merchant) MerchantWarpper(com.ikoori.vip.server.modular.biz.warpper.MerchantWarpper) 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 MerchantWarpper (com.ikoori.vip.server.modular.biz.warpper.MerchantWarpper)1 Map (java.util.Map)1 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)1 ResponseBody (org.springframework.web.bind.annotation.ResponseBody)1