张涛 1年前
父节点
当前提交
23756635ec

+ 3
- 2
application/src/main/java/com/lyg/application/controller/TaMandatoryLeaveController.java 查看文件

50
     @GetMapping("/taMandatoryLeave/{id}")
50
     @GetMapping("/taMandatoryLeave/{id}")
51
     public SaResult queryById(@ApiParam("对象ID") @PathVariable String id) throws Exception {
51
     public SaResult queryById(@ApiParam("对象ID") @PathVariable String id) throws Exception {
52
         TaMandatoryLeave taMandatoryLeave = taMandatoryLeaveService.getById(id);
52
         TaMandatoryLeave taMandatoryLeave = taMandatoryLeaveService.getById(id);
53
-        Boolean b = checkAuth() == null || checkAuth() == taMandatoryLeave.getCreateUser();
54
-
53
+        String isAdmin = checkAuth();
54
+        Boolean b = false;
55
+        b = (isAdmin == null) ? true : (isAdmin.equals(taMandatoryLeave.getCreateUser())) ? true : false;
55
         if (b) {
56
         if (b) {
56
             return SaResult.data(taMandatoryLeaveService.getById(id));
57
             return SaResult.data(taMandatoryLeaveService.getById(id));
57
         }
58
         }

+ 3
- 4
application/src/main/java/com/lyg/application/controller/TaMessageController.java 查看文件

44
     public SaResult queryById(@ApiParam("对象ID") @PathVariable String id) throws Exception {
44
     public SaResult queryById(@ApiParam("对象ID") @PathVariable String id) throws Exception {
45
         TaMessage taMessage = taMessageService.getById(id);
45
         TaMessage taMessage = taMessageService.getById(id);
46
 
46
 
47
-
48
-        System.out.println("checkAuth()" + checkAuth());
49
-        Boolean b = checkAuth() == null || checkAuth() == taMessage.getCreateUser();
50
-
47
+        String isAdmin = checkAuth();
48
+        Boolean b = false;
49
+        b = (isAdmin == null) ? true : (isAdmin.equals(taMessage.getCreateUser())) ? true : false;
51
         if (b) {
50
         if (b) {
52
             return SaResult.data(taMessageService.getById(id));
51
             return SaResult.data(taMessageService.getById(id));
53
         }
52
         }

+ 3
- 2
application/src/main/java/com/lyg/application/controller/TaRotationController.java 查看文件

55
     public SaResult queryById(@ApiParam("对象ID") @PathVariable String id) throws Exception {
55
     public SaResult queryById(@ApiParam("对象ID") @PathVariable String id) throws Exception {
56
 
56
 
57
         TaRotation taRotation = taRotationService.getById(id);
57
         TaRotation taRotation = taRotationService.getById(id);
58
-
59
-        Boolean b = checkAuth() == null || checkAuth() == taRotation.getCreateUser();
58
+        String isAdmin = checkAuth();
59
+        Boolean b = false;
60
+        b = isAdmin == null ? true : isAdmin.equals(taRotation.getCreateUser()) ? true : false;
60
         if (b) {
61
         if (b) {
61
             return SaResult.data(taRotationService.getById(id));
62
             return SaResult.data(taRotationService.getById(id));
62
         }
63
         }

+ 3
- 2
application/src/main/java/com/lyg/application/controller/TaSendingController.java 查看文件

43
     @GetMapping("/taSending/{id}")
43
     @GetMapping("/taSending/{id}")
44
     public SaResult queryById(@ApiParam("对象ID") @PathVariable String id) throws Exception {
44
     public SaResult queryById(@ApiParam("对象ID") @PathVariable String id) throws Exception {
45
         TaSending taSending = taSendingService.getById(id);
45
         TaSending taSending = taSendingService.getById(id);
46
-
47
-        Boolean b = checkAuth() == null || checkAuth() == taSending.getCreateUser();
46
+        String isAdmin = checkAuth();
47
+        Boolean b = false;
48
+        b = (isAdmin == null) ? true : (isAdmin.equals(taSending.getCreateUser())) ? true : false;
48
         if (b) {
49
         if (b) {
49
             return SaResult.data(taSendingService.getById(id));
50
             return SaResult.data(taSendingService.getById(id));
50
         }
51
         }