|
@@ -32,6 +32,8 @@ import com.ym.mec.util.collection.MapUtil;
|
|
|
import com.ym.mec.web.WebFeignService;
|
|
|
import com.yonge.log.model.AuditLogAnnotation;
|
|
|
|
|
|
+import javax.servlet.http.HttpServletRequest;
|
|
|
+
|
|
|
@RestController
|
|
|
@RequestMapping("news")
|
|
|
@Api(tags = "资讯服务")
|
|
@@ -61,28 +63,33 @@ public class NewsController extends BaseController {
|
|
|
@ApiOperation("资讯列表分页查询")
|
|
|
@GetMapping(value = "/list")
|
|
|
public Object getList(NewsInformationQueryInfo queryInfo) {
|
|
|
-
|
|
|
SysUser user = sysUserFeignService.queryUserInfo();
|
|
|
-
|
|
|
+
|
|
|
String clientId = queryInfo.getClientId();
|
|
|
|
|
|
if (!StringUtils.equalsIgnoreCase("student", clientId)) {
|
|
|
queryInfo.setOrganIdList(webFeignService.queryOrganIdByUserId(user.getId(), clientId));
|
|
|
} else {
|
|
|
- SysConfig cloudTeacherActiveIds = sysConfigService.findByParamName(SysConfigService.CLOUD_TEACHER_ACTIVE_BANNER_IDS);
|
|
|
- List<Integer> excludeIds = new ArrayList<>();
|
|
|
- if(Objects.nonNull(cloudTeacherActiveIds)&&StringUtils.isNotBlank(cloudTeacherActiveIds.getParanValue())){
|
|
|
- excludeIds = Arrays.stream(cloudTeacherActiveIds.getParanValue().split(",")).map(id->Integer.valueOf(id)).collect(Collectors.toList());
|
|
|
- }
|
|
|
if (user == null || user.getId() == null) {
|
|
|
queryInfo.setOrganId(43);
|
|
|
- queryInfo.setExcludeIds(excludeIds);
|
|
|
} else {
|
|
|
queryInfo.setOrganId(user.getOrganId());
|
|
|
- int memberGroupNum = studentRegistrationDao.countStudentMemberGroupNum(user.getId());
|
|
|
- if(memberGroupNum>0){
|
|
|
- queryInfo.setExcludeIds(excludeIds);
|
|
|
- }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ SysConfig cloudTeacherActiveIds = sysConfigService.findByParamName(SysConfigService.CLOUD_TEACHER_ACTIVE_BANNER_IDS);
|
|
|
+ List<Integer> excludeIds = new ArrayList<>();
|
|
|
+ if(Objects.nonNull(cloudTeacherActiveIds)&&StringUtils.isNotBlank(cloudTeacherActiveIds.getParanValue())){
|
|
|
+ excludeIds = Arrays.stream(cloudTeacherActiveIds.getParanValue().split(",")).map(id->Integer.valueOf(id)).collect(Collectors.toList());
|
|
|
+ }
|
|
|
+ if (user == null || user.getId() == null) {
|
|
|
+ queryInfo.setOrganId(43);
|
|
|
+ queryInfo.setExcludeIds(excludeIds);
|
|
|
+ } else {
|
|
|
+ queryInfo.setOrganId(user.getOrganId());
|
|
|
+ int memberGroupNum = studentRegistrationDao.countStudentMemberGroupNum(user.getId());
|
|
|
+ if(memberGroupNum>0){
|
|
|
+ queryInfo.setExcludeIds(excludeIds);
|
|
|
}
|
|
|
}
|
|
|
|