Example #1
0
 @RequestMapping(value = "admin/activity/{activityId}/coupon")
 public ModelAndView indexPage(HttpServletRequest request, @PathVariable String activityId) {
   if (StringUtils.isEmpty(activityId)) {
     throw new SystemException("查询参数不符合");
   }
   ModelAndView mv = new ModelAndView("admin/coupon");
   Merchant merchant = adminService.getMerchant(getCurrentAdmin(request));
   mv.addObject("merchant", merchant);
   mv.addObject("activityId", activityId);
   return mv;
 }
Example #2
0
 @ResponseBody
 @RequestMapping(value = "admin/api/activity/{activityId}/coupon/list")
 public PageData<Coupon> getActivityCoupon(
     HttpServletRequest request, @PathVariable String activityId) {
   if (StringUtils.isEmpty(activityId)) {
     throw new SystemException("查询参数不符合");
   }
   IQueryParams queryParams =
       createQueryParams(request)
           .andEqual("activity.activitId", activityId)
           .andEqual("merchant.merchantId", getCurrentAdmin(request).getMerchant().getMerchantId())
           .andEqual("deleted", false);
   return this.couponService.getPageData(createPager(request), queryParams);
 }