package com.xc.controller.protol; import com.xc.service.*; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; @Controller @RequestMapping("/task/api/") public class TaskApiController { @Autowired IUserPositionService iUserPositionService; @Autowired IStockMarketsDayService iStockMarketsDayService; @Autowired RealTimeService realTimeService; @Autowired IUserService iUserService; @Autowired NewsService newsService; @Autowired IStockService stockService; private static final Integer num = 10; private static final Integer start = 0; /** * 计算止盈止损 * StopProfitTargetTask * @return */ @RequestMapping("toStopProfitTarget.do") @ResponseBody public void toStopProfitTarget() throws Exception { iUserPositionService.toStopProfitTarget(); } /** * 扫描用户持仓 * ForceSellTask * @return */ @RequestMapping("forceSellTask.do") @ResponseBody public void forceSellTask() throws Exception { iUserService.ForceSellTask(); } /** * 收盘收取留仓费任务 * CloslingStayTask * */ @RequestMapping("doClosingStayTask.do") @ResponseBody public void doClosingStayTask() { this.iUserPositionService.calcDemurrage(); } /** * 扫描用户(指数)持仓 * ForceSellIndexTask * */ @RequestMapping("ForceSellIndexTask.do") @ResponseBody public void ForceSellIndexTask() { iUserService.ForceSellIndexTask(); } }