Search in sources :

Example 56 with Permission

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;
}
Also used : Merchant(com.ikoori.vip.common.persistence.model.Merchant) Permission(com.ikoori.vip.common.annotion.Permission) RequestMapping(org.springframework.web.bind.annotation.RequestMapping) ResponseBody(org.springframework.web.bind.annotation.ResponseBody)

Example 57 with Permission

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;
}
Also used : Merchant(com.ikoori.vip.common.persistence.model.Merchant) Permission(com.ikoori.vip.common.annotion.Permission) RequestMapping(org.springframework.web.bind.annotation.RequestMapping) ResponseBody(org.springframework.web.bind.annotation.ResponseBody)

Example 58 with Permission

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);
}
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)

Example 59 with Permission

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";
}
Also used : Store(com.ikoori.vip.common.persistence.model.Store) Permission(com.ikoori.vip.common.annotion.Permission) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Example 60 with Permission

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";
}
Also used : WxConfig(com.ikoori.vip.common.persistence.model.WxConfig) Permission(com.ikoori.vip.common.annotion.Permission) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Aggregations

Permission (com.ikoori.vip.common.annotion.Permission)93 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)92 Merchant (com.ikoori.vip.common.persistence.model.Merchant)55 ResponseBody (org.springframework.web.bind.annotation.ResponseBody)47 HashMap (java.util.HashMap)31 Map (java.util.Map)23 BussinessException (com.ikoori.vip.common.exception.BussinessException)18 Store (com.ikoori.vip.common.persistence.model.Store)12 Coupon (com.ikoori.vip.common.persistence.model.Coupon)11 Card (com.ikoori.vip.common.persistence.model.Card)9 MemberCard (com.ikoori.vip.common.persistence.model.MemberCard)6 StoreCoupon (com.ikoori.vip.common.persistence.model.StoreCoupon)6 User (com.ikoori.vip.common.persistence.model.User)6 ShiroUser (com.ikoori.vip.server.core.shiro.ShiroUser)4 LinkedHashMap (java.util.LinkedHashMap)4 BussinessLog (com.ikoori.vip.common.annotion.log.BussinessLog)3 OperationLog (com.ikoori.vip.common.persistence.model.OperationLog)3 WxConfig (com.ikoori.vip.common.persistence.model.WxConfig)3 LogWarpper (com.ikoori.vip.server.modular.system.warpper.LogWarpper)3 EntityWrapper (com.baomidou.mybatisplus.mapper.EntityWrapper)2