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";
}
Aggregations