yonge 3 年之前
父节点
当前提交
af2beacede

+ 1 - 1
cms/src/main/java/com/ym/mec/cms/controller/NewsController.java

@@ -111,7 +111,7 @@ public class NewsController extends BaseController {
 	@GetMapping(value = "/queryPage")
 	@GetMapping(value = "/queryPage")
 	public Object queryPage(NewsInformationQueryInfo queryInfo) {
 	public Object queryPage(NewsInformationQueryInfo queryInfo) {
 		
 		
-		if(queryInfo.getType() == 6 || queryInfo.getType() == 7){
+		if(queryInfo.getType() != null && (queryInfo.getType() == 6 || queryInfo.getType() == 7)){
 			queryInfo.setTenantId(-1);
 			queryInfo.setTenantId(-1);
 		}
 		}
 		
 		

+ 1 - 1
cms/src/main/java/com/ym/mec/cms/interceptor/TenantInterceptor.java

@@ -29,7 +29,7 @@ public class TenantInterceptor extends HandlerInterceptorAdapter {
 		
 		
 		SysUser sysUser = sysUserFeignService.queryUserInfo();
 		SysUser sysUser = sysUserFeignService.queryUserInfo();
 		
 		
-		if(sysUser != null){
+		if(sysUser != null && sysUser.getId() != null){
 			TenantContextHolder.setTenantId(sysUser.getTenantId());
 			TenantContextHolder.setTenantId(sysUser.getTenantId());
 			
 			
 			TenantInfo tenantInfo = tenantInfoService.get(sysUser.getTenantId());
 			TenantInfo tenantInfo = tenantInfoService.get(sysUser.getTenantId());

+ 1 - 1
cms/src/main/resources/config/mybatis/SysNewsInformationMapper.xml

@@ -269,7 +269,7 @@
 				and find_in_set(#{subjectId},sni.subject_id_list_)
 				and find_in_set(#{subjectId},sni.subject_id_list_)
 			</if>
 			</if>
 			<if test="organId != null">
 			<if test="organId != null">
-				and (find_in_set(#{organId},sni.organ_id_list_) or sni.organ_id_list_ is null)
+				and (find_in_set(#{organId},sni.organ_id_list_) or sni.organ_id_list_ is null or sni.organ_id_list_ = '')
 			</if>
 			</if>
 		<if test="clientName != 'manage'">
 		<if test="clientName != 'manage'">
 			<choose>
 			<choose>