浏览代码

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

周箭河 5 年之前
父节点
当前提交
0370e12802

+ 2 - 2
mec-biz/src/main/resources/config/mybatis/PracticeGroupMapper.xml

@@ -296,11 +296,11 @@
                 <![CDATA[ AND pg.courses_expire_date_ <= NOW()
 			]]></if>
             <if test='hasReport !=null and hasReport=="0"'>
-                <![CDATA[AND cse.status =0
+                <![CDATA[AND cse.status_ =0
 			]]>
             </if>
             <if test='hasReport !=null and hasReport=="1"'>
-                <![CDATA[ AND cse.status = 1
+                <![CDATA[ AND cse.status_ = 1
 			]]></if>
         </where>
     </sql>

+ 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").permitAll().anyRequest()
+				.antMatchers("/v2/api-docs", "/classGroup/highClassGroups", "/code/*", "/api/*", "/appVersionInfo/queryByPlatform","/practiceGroupManage/getReviews").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));
     }