use of com.ikoori.vip.common.annotion.Permission in project vip by guangdada.
the class CouponCodeController method update.
/**
* 根据批次号修改券号状态为“已制卡”
*/
@RequestMapping(value = "/update")
@Permission
@ResponseBody
public Object update(@RequestParam String ids) {
if (ToolUtil.isEmpty(ids)) {
throw new BussinessException(500, "请选择数据");
}
String[] as = ids.split(",");
Long[] codeIds = new Long[as.length];
for (int i = 0; i < as.length; i++) {
codeIds[i] = Long.valueOf(as[i]);
}
Long userId = Long.valueOf(ShiroKit.getUser().getId());
Merchant merchant = merchantService.getMerchantUserId(userId);
Map<String, Object> params = new HashMap<String, Object>();
params.put("ids", codeIds);
params.put("merchantId", merchant.getId());
params.put("useStatus", CouponCodeStatus.madecard.getCode());
couponCodeService.updateUseStatus(params);
return super.SUCCESS_TIP;
}
use of com.ikoori.vip.common.annotion.Permission in project vip by guangdada.
the class CouponCodeController method couponCodeUpdate.
/**
* 跳转到修改券码管理
*/
@Permission
@RequestMapping("/couponCode_update/{couponCodeId}")
public String couponCodeUpdate(@PathVariable Long couponCodeId, Model model) {
CouponCode couponCode = couponCodeService.selectById(couponCodeId);
model.addAttribute(couponCode);
return PREFIX + "couponCode_edit.html";
}
use of com.ikoori.vip.common.annotion.Permission in project vip by guangdada.
the class MemberCardController method index.
/**
* 跳转到领取记录首页
*/
@Permission
@RequestMapping("")
public String index(Model model) {
Long userId = Long.valueOf(ShiroKit.getUser().getId());
Merchant merchant = merchantService.getMerchantUserId(userId);
Map<String, Object> condition = new HashMap<String, Object>();
condition.put("merchantId", merchant.getId());
model.addAttribute("grantType", CardGrantType.values());
model.addAttribute("state", MemCardState.values());
// 查询会员卡
List<Card> cards = cardService.selectByCondition(condition);
model.addAttribute("cards", cards);
return PREFIX + "memberCard.html";
}
use of com.ikoori.vip.common.annotion.Permission in project vip by guangdada.
the class MemberCardController method memberCardUpdate.
/**
* 跳转到修改领取记录
*/
@Permission
@RequestMapping("/memberCard_update/{memberCardId}")
public String memberCardUpdate(@PathVariable Long memberCardId, Model model) {
MemberCard memberCard = memberCardService.selectById(memberCardId);
model.addAttribute(memberCard);
return PREFIX + "memberCard_edit.html";
}
use of com.ikoori.vip.common.annotion.Permission in project vip by guangdada.
the class MerchantController method merchantUpdate.
/**
* 跳转到修改商户
*/
@Permission
@RequestMapping("/merchant_update/{merchantId}")
public String merchantUpdate(@PathVariable Long merchantId, Model model) {
log.info("--merchantId---", merchantId);
try {
Merchant merchant = merchantMapper.selectById(merchantId);
model.addAttribute(merchant);
} catch (Exception e) {
e.printStackTrace();
log.info("", e);
}
return PREFIX + "merchant_edit.html";
}
Aggregations