Search in sources :

Example 76 with Permission

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

Example 77 with Permission

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);
}
Also used : Merchant(com.ikoori.vip.common.persistence.model.Merchant) HashMap(java.util.HashMap) LinkedHashMap(java.util.LinkedHashMap) Map(java.util.Map) CouponCodeWarpper(com.ikoori.vip.server.modular.biz.warpper.CouponCodeWarpper) Permission(com.ikoori.vip.common.annotion.Permission) RequestMapping(org.springframework.web.bind.annotation.RequestMapping) ResponseBody(org.springframework.web.bind.annotation.ResponseBody)

Example 78 with Permission

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);
}
Also used : Merchant(com.ikoori.vip.common.persistence.model.Merchant) CouponFetchWarpper(com.ikoori.vip.server.modular.biz.warpper.CouponFetchWarpper) 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 79 with Permission

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

Example 80 with Permission

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);
}
Also used : MemberCard(com.ikoori.vip.common.persistence.model.MemberCard) Merchant(com.ikoori.vip.common.persistence.model.Merchant) MemberCardWarpper(com.ikoori.vip.server.modular.biz.warpper.MemberCardWarpper) HashMap(java.util.HashMap) 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)

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