|
|
@@ -13,12 +13,16 @@ import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
import java.util.List;
|
|
|
+import java.util.concurrent.ExecutorService;
|
|
|
+import java.util.concurrent.Executors;
|
|
|
|
|
|
@RestController
|
|
|
@RequestMapping("/bytedance/dianzhong")
|
|
|
@Api(tags = "点众拉取")
|
|
|
@Slf4j
|
|
|
public class DianZhongController {
|
|
|
+ private static final ExecutorService executorService = Executors.newFixedThreadPool(5);
|
|
|
+
|
|
|
@Autowired
|
|
|
private IDianZhongService dianZhongService;
|
|
|
|
|
|
@@ -45,7 +49,13 @@ public class DianZhongController {
|
|
|
|
|
|
@GetMapping("/getUrlData")
|
|
|
public void urlData(String statDate) {
|
|
|
- dianZhongService.getUrlData(statDate);
|
|
|
+ executorService.submit(new Runnable() {
|
|
|
+ @Override
|
|
|
+ public void run() {
|
|
|
+ dianZhongService.getUrlData(statDate);
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
}
|
|
|
|
|
|
}
|