use student id as primary key instead.

This commit is contained in:
Sola
2015-11-26 15:58:56 +08:00
parent c2b2f89805
commit c0f72f4d70
8 changed files with 136 additions and 23 deletions

View File

@@ -45,7 +45,7 @@ public class GetUser extends HttpServlet {
out.println(gson.toJson(new Response(Response.ResponseCode.PARAMETER_REQUIRED)));
} else if (id != null) {
try {
User u = TableUser.getUserById(Integer.parseInt(id));
User u = TableUser.getUserById(Long.parseLong(id));
if (u == null)
out.println(gson.toJson(new Response(Response.ResponseCode.USER_NOT_FOUND)));
else