|
|
|
@ -9,7 +9,9 @@ import org.springframework.web.bind.annotation.PathVariable; |
|
|
|
import org.springframework.web.bind.annotation.RequestMapping; |
|
|
|
import org.springframework.web.bind.annotation.RestController; |
|
|
|
|
|
|
|
import java.util.HashMap; |
|
|
|
import java.util.List; |
|
|
|
import java.util.Optional; |
|
|
|
|
|
|
|
@RestController |
|
|
|
@RequestMapping("/v1/pair") |
|
|
|
@ -23,4 +25,12 @@ public class CollectController { |
|
|
|
|
|
|
|
return AjaxResult.success("success",collectList); |
|
|
|
} |
|
|
|
|
|
|
|
@RequestMapping("/one/{id}") |
|
|
|
public JSONObject gone(@PathVariable("id") int id){ |
|
|
|
Optional<Collect> collect = collectService.findById(id); |
|
|
|
HashMap map = new HashMap(); |
|
|
|
map.put("at",collect.get()); |
|
|
|
return AjaxResult.success("success",map); |
|
|
|
} |
|
|
|
} |
|
|
|
|