Created
January 11, 2016 15:59
-
-
Save lpand/b2e8163f3df60e929778 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@RestController @RequestMapping(path = "/act-tracking") | |
public class ActivityTrackingController { | |
@RequestMapping( | |
path = { "", "/" }, | |
method = RequestMethod.GET, | |
produces = MediaType.APPLICATION_JSON_VALUE) | |
public List<VActTracking> query( | |
@RequestParam(name="q", defaultValue="") String q, | |
@RequestParam(name="page", defaultValue="0") int page, | |
@RequestParam(name="size", defaultValue="150") int size, | |
@RequestParam(name="order", defaultValue="-id") String order | |
) { | |
if (q.isEmpty()) { | |
return tracking.find(pao.from(page, size, order)); | |
} | |
return tracking.find(q, pao.from(page, size, order)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment