Browse Source

add 提醒老师填写月度报告定时任务

周箭河 5 years ago
parent
commit
c6f3301e53

+ 1 - 1
mec-web/src/main/java/com/ym/mec/web/config/ResourceServerConfig.java

@@ -26,7 +26,7 @@ public class ResourceServerConfig extends ResourceServerConfigurerAdapter {
 	public void configure(HttpSecurity http) throws Exception {
 		http.csrf().disable().exceptionHandling().accessDeniedHandler(baseAccessDeniedHandler).authenticationEntryPoint(baseAuthenticationEntryPoint).and()
 				.authorizeRequests().antMatchers("/task/**").hasIpAddress("0.0.0.0/0")
-				.antMatchers("/v2/api-docs", "/classGroup/highClassGroups", "/code/*", "/api/*", "/appVersionInfo/queryByPlatform","/practiceGroupManage/getReviews").permitAll().anyRequest()
+				.antMatchers("/v2/api-docs", "/classGroup/highClassGroups", "/code/*", "/api/*", "/appVersionInfo/queryByPlatform").permitAll().anyRequest()
 				.authenticated().and().httpBasic();
 	}
 

+ 18 - 18
mec-web/src/main/java/com/ym/mec/web/controller/PracticeGroupManageController.java

@@ -93,25 +93,25 @@ public class PracticeGroupManageController extends BaseController {
 
     @ApiOperation(value = "评论管理")
     @GetMapping("getReviews")
-    //@PreAuthorize("@pcs.hasPermissions('practiceGroupManage/getReviews')")
+    @PreAuthorize("@pcs.hasPermissions('practiceGroupManage/getReviews')")
     public Object getReviews(PracticeGroupQueryInfo queryInfo) {
-//        SysUser sysUser = sysUserFeignService.queryUserInfo();
-//        if (sysUser == null) {
-//            return failed("用户信息获取失败");
-//        }
-//        if (!sysUser.getIsSuperAdmin()) {
-//            Employee employee = employeeDao.get(sysUser.getId());
-//            if (StringUtils.isEmpty(queryInfo.getOrganId())) {
-//                queryInfo.setOrganId(employee.getOrganIdList());
-//            } else if (StringUtils.isEmpty(employee.getOrganIdList())) {
-//                return failed("用户所在分部异常");
-//            } else {
-//                List<String> list = Arrays.asList(employee.getOrganIdList().split(","));
-//                if (!list.containsAll(Arrays.asList(queryInfo.getOrganId().split(",")))) {
-//                    return failed("非法请求");
-//                }
-//            }
-//        }
+        SysUser sysUser = sysUserFeignService.queryUserInfo();
+        if (sysUser == null) {
+            return failed("用户信息获取失败");
+        }
+        if (!sysUser.getIsSuperAdmin()) {
+            Employee employee = employeeDao.get(sysUser.getId());
+            if (StringUtils.isEmpty(queryInfo.getOrganId())) {
+                queryInfo.setOrganId(employee.getOrganIdList());
+            } else if (StringUtils.isEmpty(employee.getOrganIdList())) {
+                return failed("用户所在分部异常");
+            } else {
+                List<String> list = Arrays.asList(employee.getOrganIdList().split(","));
+                if (!list.containsAll(Arrays.asList(queryInfo.getOrganId().split(",")))) {
+                    return failed("非法请求");
+                }
+            }
+        }
         return succeed(practiceGroupService.findPracticeGroupReviews(queryInfo));
     }