use of com.ikoori.vip.common.annotion.Permission in project vip by guangdada.
the class CouponTradeController method couponTradeUpdate.
/**
* 跳转到修改使用记录
*/
@Permission
@RequestMapping("/couponTrade_update/{couponTradeId}")
public String couponTradeUpdate(@PathVariable Long couponTradeId, Model model) {
CouponTrade couponTrade = couponTradeService.selectById(couponTradeId);
model.addAttribute(couponTrade);
return PREFIX + "couponTrade_edit.html";
}
use of com.ikoori.vip.common.annotion.Permission in project vip by guangdada.
the class CouponTradeController method list.
/**
* 获取使用记录列表
*/
@Permission
@RequestMapping(value = "/list")
@ResponseBody
public Object list(String couponName, String mobile, Integer type, String nickname, String verifyCode) {
Long userId = Long.valueOf(ShiroKit.getUser().getId());
Merchant merchant = merchantService.getMerchantUserId(userId);
Page<Object> page = new PageFactory<Object>().defaultPage();
List<Map<String, Object>> result = couponTradeService.selectByCondition(verifyCode, nickname, type, mobile, page, couponName, page.getOrderByField(), page.isAsc(), merchant.getId());
page.setRecords((List<Object>) new CouponTradeWarpper(result).warp());
return super.packForBT(page);
}
use of com.ikoori.vip.common.annotion.Permission in project vip by guangdada.
the class MemberController 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());
List<Card> cards = cardService.findByCondition(condition);
model.addAttribute("cards", cards);
return PREFIX + "member.html";
}
use of com.ikoori.vip.common.annotion.Permission in project vip by guangdada.
the class MemberController method list.
/**
* 获取会员列表
*/
@RequestMapping(value = "/list")
@Permission
@ResponseBody
public Object list(String memName, String memMobile, Integer memSex, String memNickName, Long cardId, String cardNumber, Integer isActive, String unionid) {
Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage();
List<Map<String, Object>> result = memberService.getMemberList(page, memName, memSex, memNickName, memMobile, cardId, cardNumber, isActive, unionid, page.getOrderByField(), page.isAsc());
page.setRecords((List<Map<String, Object>>) new MemberWarpper(result).warp());
return super.packForBT(page);
}
use of com.ikoori.vip.common.annotion.Permission in project vip by guangdada.
the class MemberController method memberAdd.
/**
* 跳转到添加会员
*/
@Permission
@RequestMapping("/member_add")
public String memberAdd(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());
List<Card> cards = cardService.selectByCondition(condition);
// 会员卡
model.addAttribute("cards", cards);
return PREFIX + "member_add.html";
}
Aggregations