use of com.ikoori.vip.common.annotion.Permission in project vip by guangdada.
the class CouponCodeController method add.
/**
* 批量生成券号
*/
@RequestMapping(value = "/add")
@Permission
@ResponseBody
public Object add(Integer num) {
Long userId = Long.valueOf(ShiroKit.getUser().getId());
Merchant merchant = merchantService.getMerchantUserId(userId);
String batchNo = couponCodeService.genarateCode(merchant.getId(), num);
if (batchNo == null) {
throw new BussinessException(500, "生成券号失败");
}
return batchNo;
}
use of com.ikoori.vip.common.annotion.Permission in project vip by guangdada.
the class CouponCodeController method list.
/**
* 获取券码管理列表
*/
@Permission
@RequestMapping(value = "/list")
@ResponseBody
public Object list(String batchNo, String verifyCode, String verifyNo, Long couponId, Integer useStatus, Model model) {
Long userId = Long.valueOf(ShiroKit.getUser().getId());
Merchant merchant = merchantService.getMerchantUserId(userId);
Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage();
List<Map<String, Object>> result = couponCodeService.getCouponCodeList(page, batchNo, verifyCode, verifyNo, useStatus, couponId, merchant.getId(), page.getOrderByField(), page.isAsc());
page.setRecords((List<Map<String, Object>>) new CouponCodeWarpper(result).warp());
return super.packForBT(page);
}
use of com.ikoori.vip.common.annotion.Permission in project vip by guangdada.
the class CouponFetchController method list.
/**
* 获取领取记录列表
*/
@RequestMapping(value = "/list")
@ResponseBody
@Permission
public Object list(String couponName, Integer isUsed, Integer type, String mobile, 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 = couponFetchService.selectByCondition(verifyCode, nickname, type, mobile, isUsed, page, couponName, page.getOrderByField(), page.isAsc(), merchant.getId());
page.setRecords((List<Object>) new CouponFetchWarpper(result).warp());
return super.packForBT(page);
}
use of com.ikoori.vip.common.annotion.Permission in project vip by guangdada.
the class CouponFetchController method couponFetchUpdate.
/**
* 跳转到修改领取记录
*/
@Permission
@RequestMapping("/couponFetch_update/{couponFetchId}")
public String couponFetchUpdate(@PathVariable Long couponFetchId, Model model) {
CouponFetch couponFetch = couponFetchService.selectById(couponFetchId);
model.addAttribute(couponFetch);
return PREFIX + "couponFetch_edit.html";
}
use of com.ikoori.vip.common.annotion.Permission in project vip by guangdada.
the class MemberCardController method list.
/**
* 获取领取记录列表
*/
@Permission
@RequestMapping(value = "/list")
@ResponseBody
public Object list(String cardNumber, String cardName, Long cardId, String mobile, String nickname, Integer state, Integer grantType) {
Long userId = Long.valueOf(ShiroKit.getUser().getId());
Merchant merchant = merchantService.getMerchantUserId(userId);
Page<MemberCard> page = new PageFactory<MemberCard>().defaultPage();
List<Map<String, Object>> result = memberCardService.getMemberCardList(cardId, grantType, state, mobile, page, nickname, page.getOrderByField(), page.isAsc(), merchant.getId(), cardNumber);
page.setRecords((List<MemberCard>) new MemberCardWarpper(result).warp());
return super.packForBT(page);
}
Aggregations