package com.bizmatics.controller.web.es; import com.bizmatics.model.es.RtAnalog; import com.bizmatics.service.es.RtAnalogService; import com.bizmatics.service.job.RatAnalogTask; 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.RestController; import java.util.Date; import java.util.Iterator; import java.util.List; /** * @author yq * @date 2021/7/17 19:22 */ @RestController @RequestMapping("rtAnalog") public class RtAnalogControllerWeb { @Autowired private RtAnalogService rtAnalogService; @Autowired private RatAnalogTask ratAnalogTask; @GetMapping("/init") public void init(){ rtAnalogService.createIndex(); } @GetMapping("/all") public Iterator all(){ return rtAnalogService.findAll(); } @GetMapping("/delete") public void delete(){ rtAnalogService.deleteIndex("fiveep"); } @GetMapping("/addAll") public void addAll(Date startTime,Date endTime){ ratAnalogTask.addAll(startTime,endTime); } @GetMapping("/list") public List list(Integer userId, Date startTime,Date endTime){ return rtAnalogService.list(startTime,endTime,userId); } @GetMapping("/page") public List page(){ return rtAnalogService.page(); } }