Search in sources :

Example 1 with StoreWarpper

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

the class StoreController 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<Store> page = new PageFactory<Store>().defaultPage();
    List<Map<String, Object>> result = storeService.getStoreList(page, condition, page.getOrderByField(), page.isAsc(), merchant.getId());
    page.setRecords((List<Store>) new StoreWarpper(result).warp());
    return super.packForBT(page);
}
Also used : Merchant(com.ikoori.vip.common.persistence.model.Merchant) StoreWarpper(com.ikoori.vip.server.modular.biz.warpper.StoreWarpper) Store(com.ikoori.vip.common.persistence.model.Store) 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 Store (com.ikoori.vip.common.persistence.model.Store)1 StoreWarpper (com.ikoori.vip.server.modular.biz.warpper.StoreWarpper)1 Map (java.util.Map)1 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)1 ResponseBody (org.springframework.web.bind.annotation.ResponseBody)1