package com.bonus.core.marketing.coupon.controller;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollUtil;
import com.bonus.common.core.web.domain.AjaxResult;
import com.bonus.core.marketing.coupon.param.MktCouponMobileUsableParam;
import com.bonus.core.marketing.coupon.service.MktCouponService;
import com.bonus.core.marketing.coupon.vo.MktCouponMobileUsableVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Collection;
import java.util.List;

@RestController
@RequestMapping({"/api/v2/mkt/coupon"})
@Api(
   value = "营销中心/餐券",
   tags = {"营销中心/餐券"}
)
public class MktCouponController {
   private static final Logger log = LoggerFactory.getLogger(MktCouponController.class);
   @Autowired
   @Lazy
   private MktCouponService mktCouponService;

   @ApiOperation("获取可用的电子餐券列表")
   @PostMapping({"/list-electron-mobile-usable"})
//   @RequiresGuest
   public AjaxResult listElecMobileUsable(@RequestBody MktCouponMobileUsableParam request) {
      return AjaxResult.success(this.mktCouponService.listElecMobileUsable(request));
   }
}
