|
@@ -56,8 +56,12 @@ public class UserAction {
|
|
|
public Map<String, Object> queryUserIdMax(){
|
|
|
|
|
|
try {
|
|
|
+ Integer user_id = ValidationUtil.checkAndAssignInt(req.getHeader("Authorization").split("&")[1]);
|
|
|
+ userAuthoricationService.queryUserAuthority(user_id, Roles.ADMIN);
|
|
|
|
|
|
- return JSONUtil.getJsonMap(200, true, HintMSG.QUERY_SUCCESS, null);
|
|
|
+ Integer maxUserId=userService.queryUserIdMax();
|
|
|
+ Integer max_No= maxUserId+1;
|
|
|
+ return JSONUtil.getJsonMap(200, true, HintMSG.QUERY_SUCCESS, max_No);
|
|
|
} catch (Exception e) {
|
|
|
return JSONUtil.getJsonMap(500, false, HintMSG.QUERY_FAIL+":"+e.getMessage(), null);
|
|
|
}
|
|
@@ -95,7 +99,6 @@ public class UserAction {
|
|
|
PageDTO pt = userService.queryUsers(mapToService);
|
|
|
return JSONUtil.getJsonMap(200, true, HintMSG.QUERY_SUCCESS,pt);
|
|
|
} catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
return JSONUtil.getJsonMap(500, false, HintMSG.QUERY_FAIL + ":" + e.getMessage(), null);
|
|
|
}
|
|
|
|