Search in sources :

Example 16 with Card

use of com.ikoori.vip.common.persistence.model.Card in project vip by guangdada.

the class CouponController method couponAdd.

/**
 * 跳转到添加优惠券
 */
@Permission
@RequestMapping("/coupon_add")
public String couponAdd(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<Store> stores = storeService.selectByCondition(condition);
    model.addAttribute("stores", stores);
    // 查询会员卡
    List<Card> cards = cardService.selectByCondition(condition);
    model.addAttribute("cards", cards);
    model.addAttribute("merchantName", merchant.getName());
    return PREFIX + "coupon_add.html";
}
Also used : Merchant(com.ikoori.vip.common.persistence.model.Merchant) HashMap(java.util.HashMap) Store(com.ikoori.vip.common.persistence.model.Store) Card(com.ikoori.vip.common.persistence.model.Card) Permission(com.ikoori.vip.common.annotion.Permission) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Aggregations

Card (com.ikoori.vip.common.persistence.model.Card)16 Merchant (com.ikoori.vip.common.persistence.model.Merchant)11 Permission (com.ikoori.vip.common.annotion.Permission)9 MemberCard (com.ikoori.vip.common.persistence.model.MemberCard)9 HashMap (java.util.HashMap)9 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)9 Member (com.ikoori.vip.common.persistence.model.Member)5 Transactional (org.springframework.transaction.annotation.Transactional)5 BussinessException (com.ikoori.vip.common.exception.BussinessException)4 Coupon (com.ikoori.vip.common.persistence.model.Coupon)4 Store (com.ikoori.vip.common.persistence.model.Store)3 Point (com.ikoori.vip.common.persistence.model.Point)2 Date (java.util.Date)2 JSONObject (com.alibaba.fastjson.JSONObject)1 EntityWrapper (com.baomidou.mybatisplus.mapper.EntityWrapper)1 CouponPayDo (com.ikoori.vip.common.dto.CouponPayDo)1 OrderItemPayDo (com.ikoori.vip.common.dto.OrderItemPayDo)1 CardRight (com.ikoori.vip.common.persistence.model.CardRight)1 CouponFetch (com.ikoori.vip.common.persistence.model.CouponFetch)1 CouponTrade (com.ikoori.vip.common.persistence.model.CouponTrade)1