package com.chinacreator.video.web;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.chinacreator.video.annotation.Log;
import com.chinacreator.video.bean.OrderInfo;
import com.chinacreator.video.dto.DataOutPipe;
import com.chinacreator.video.dto.IncrDataOutPipe;
import com.chinacreator.video.service.HandleService;


@RestController
public class HanddleControl {

	/**
	 * 订购改造 暂定延迟上线
	 */
	/*	private static Logger logger = Logger.getLogger("handdleControl");*/


	@Autowired
	private HandleService handleService;
	
	@Log
	@RequestMapping("/handle")
	public DataOutPipe<?> handle(OrderInfo orderInfo) throws Exception {
		IncrDataOutPipe outpipe = new IncrDataOutPipe();
		orderInfo.setInvokeface("handle");
		handleService.check(orderInfo);
		handleService.handle(orderInfo);
		return outpipe;
	}
}
