package com.cku.oa.show.web;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
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.ResponseBody;

import com.cku.core.ResultDto;
import com.cku.oa.show.service.ShowApplyDiscountService;
import com.cku.restful.v1.sys.web.BaseRestController;

@Controller
@RequestMapping(value = "${adminPath}/temp/showApplyDiscount")
public class ShowApplyDiscountController extends BaseRestController {

	@Autowired
	private ShowApplyDiscountService service;
	
	

	@GetMapping("/initialize")
	@ResponseBody
	public ResultDto<String> initialize(@RequestParam("mainShowId") String mainShowId) throws Exception {
		int result = service.initialize( mainShowId);
		return ResultDto.success("初始化成功"+result+"条满减记录！");
	}

	
}