@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