whyczh
2021-05-10 65e448a1540efe51f74b79966c925ea58ea3be0a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package com.whyc.controller;
 
import com.whyc.dto.Response;
import com.whyc.dto.multiTree.MultiTree;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore;
 
/**
 * 作为功能测试接口,实际项目不可调用!
 */
@RestController
@RequestMapping("test")
@ApiIgnore
public class TestController {
 
    @GetMapping("test")
    public Response<MultiTree> test(){
        MultiTree multiTree = new MultiTree();
 
        String dates = "2020-01-02,2020-01-03,2020-02-03,2021-06-06,2021-05-06";
        String[] dateArr = dates.split(",");
 
        MultiTree tree = new MultiTree().saveAsTree(dateArr);
        return new Response<MultiTree>().set(1,tree);
    }
}