use of com.ikoori.vip.common.annotion.Permission in project vip by guangdada.
the class SignController method add.
/**
* 新增签到规则
*/
@RequestMapping(value = "/add")
@Permission
@ResponseBody
public Object add(Sign sign) {
Long userId = Long.valueOf(ShiroKit.getUser().getId());
Merchant merchant = merchantService.getMerchantUserId(userId);
sign.setMerchantId(merchant.getId());
signService.insert(sign);
return super.SUCCESS_TIP;
}
use of com.ikoori.vip.common.annotion.Permission in project vip by guangdada.
the class StoreController method add.
/**
* 新增门店
*/
@RequestMapping(value = "/add")
@Permission
@ResponseBody
public Object add(Store store, String pics) {
Long userId = Long.valueOf(ShiroKit.getUser().getId());
Merchant merchant = merchantService.getMerchantUserId(userId);
store.setMerchantId(merchant.getId());
// storeService.insert(store);
storeService.saveStore(store, pics);
return super.SUCCESS_TIP;
}
use of com.ikoori.vip.common.annotion.Permission 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);
}
use of com.ikoori.vip.common.annotion.Permission in project vip by guangdada.
the class StoreController method storeUpdate.
/**
* 跳转到修改门店
*/
@Permission
@RequestMapping("/store_update/{storeId}")
public String storeUpdate(@PathVariable Long storeId, Model model) {
Store store = storeService.selectById(storeId);
String latitude = StringUtils.isNotBlank(store.getLatitude()) ? store.getLatitude() : "";
String longitude = StringUtils.isNotBlank(store.getLongitude()) ? store.getLongitude() : "";
String coordinate = longitude + "," + latitude;
model.addAttribute("coordinate", coordinate);
model.addAttribute(store);
model.addAttribute("storePhotos", storePhotoService.selectStorePhoto(storeId));
model.addAttribute("storeTypes", StoreType.values());
return PREFIX + "store_edit.html";
}
use of com.ikoori.vip.common.annotion.Permission in project vip by guangdada.
the class WxConfigController method wxConfigUpdate.
/**
* 跳转到修改公众号管理
*/
@Permission
@RequestMapping("/wxConfig_update/{wxConfigId}")
public String wxConfigUpdate(@PathVariable Integer wxConfigId, Model model) {
WxConfig wxConfig = wxConfigMapper.selectById(wxConfigId);
model.addAttribute(wxConfig);
return PREFIX + "wxConfig_edit.html";
}
Aggregations