package com.xxfc.platform.activity.rest;

import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
import com.xxfc.platform.activity.biz.ActivityPopularizeUserBiz;
import com.xxfc.platform.activity.biz.UserCouponBiz;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author libin
 * @version 1.0
 * @description
 * @data 2019/7/24 14:58
 */
@RestController
@RequestMapping("/activity_data")
public class DateController {

        @Autowired
        private ActivityPopularizeUserBiz activityPopularizeUserBiz;

        @Autowired
        private UserCouponBiz  userCouponBiz;


      @GetMapping("/clear")
      public ObjectRestResponse<Void> clearDate(@RequestParam(value = "userIds") List<Integer>  userIds){
          activityPopularizeUserBiz.deleteByUserIds(userIds);
          userCouponBiz.deleteByUserIds(userIds);
          return ObjectRestResponse.succ();
      }
}
