Showing
1 changed file
with
7 additions
and
5 deletions
@@ -24,17 +24,19 @@ public class ReleaseCheck { | @@ -24,17 +24,19 @@ public class ReleaseCheck { | ||
24 | */ | 24 | */ |
25 | public BaseResponse check(String workid,HttpSession httpSession) { | 25 | public BaseResponse check(String workid,HttpSession httpSession) { |
26 | BaseResponse rtnResponse=new BaseResponse(); | 26 | BaseResponse rtnResponse=new BaseResponse(); |
27 | - rtnResponse.setCode(201); | ||
28 | - rtnResponse.setMessage("用户无工单处理权限"); | 27 | + |
29 | User user = (User) httpSession.getAttribute("user"); | 28 | User user = (User) httpSession.getAttribute("user"); |
30 | Map<String,String> map = new HashMap<>(); | 29 | Map<String,String> map = new HashMap<>(); |
31 | if (!StringUtils.equals("release0",workid)){//查询用户是否有工单处理权限 | 30 | if (!StringUtils.equals("release0",workid)){//查询用户是否有工单处理权限 |
32 | map.put("id",workid); | 31 | map.put("id",workid); |
33 | map.put("user",user.getName()); | 32 | map.put("user",user.getName()); |
34 | BaseResponse baseResponse = httpRestClient.defaultGet(HttpUriContants.CHECK_JOB_BY_OPERATOR,BaseResponse.class,map); | 33 | BaseResponse baseResponse = httpRestClient.defaultGet(HttpUriContants.CHECK_JOB_BY_OPERATOR,BaseResponse.class,map); |
35 | - if (baseResponse!=null&&baseResponse.getCode() == 200){ | ||
36 | - rtnResponse.setCode(200); | ||
37 | - rtnResponse.setMessage(""); | 34 | + if (baseResponse==null){ |
35 | + rtnResponse.setCode(201); | ||
36 | + rtnResponse.setMessage("工单处理权限检查异常"); | ||
37 | + }else if(200!=baseResponse.getCode()){ | ||
38 | + rtnResponse.setCode(baseResponse.getCode()); | ||
39 | + rtnResponse.setMessage(baseResponse.getMessage()); | ||
38 | } | 40 | } |
39 | } | 41 | } |
40 | return rtnResponse; | 42 | return rtnResponse; |
-
Please register or login to post a comment