Search in sources :

Example 31 with Permission

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

Example 32 with Permission

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

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

Example 34 with Permission

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);
}
Also used : MemberWarpper(com.ikoori.vip.server.modular.biz.warpper.MemberWarpper) 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)

Example 35 with Permission

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";
}
Also used : Merchant(com.ikoori.vip.common.persistence.model.Merchant) HashMap(java.util.HashMap) Card(com.ikoori.vip.common.persistence.model.Card) MemberCard(com.ikoori.vip.common.persistence.model.MemberCard) 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