浏览代码

update:2月1日下架网管课活动

yonge 4 年之前
父节点
当前提交
3bbfc4075d
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      cms/src/main/java/com/ym/mec/cms/service/impl/SysNewsInformationServiceImpl.java

+ 3 - 1
cms/src/main/java/com/ym/mec/cms/service/impl/SysNewsInformationServiceImpl.java

@@ -84,15 +84,17 @@ public class SysNewsInformationServiceImpl extends BaseServiceImpl<Long, SysNews
 		boolean isNewer = false;
 		Date date = new Date();
 		Date startDate = queryInfo.getDate();
+		Date endDate = null;
 		if (startDate == null) {
 			try {
 				String startDateStr = "2020-05-01";
 				startDate = sdf.parse(startDateStr);
+				endDate = sdf.parse("2021-02-01");
 			} catch (ParseException e) {
 				throw new RuntimeException(e);
 			}
 		}
-		if (queryInfo.getTenantId() == 1 && date.after(startDate)) {
+		if (queryInfo.getTenantId() == 1 && date.after(startDate) && date.before(endDate)) {
 			if (user != null && "18696158274".equals(user.getPhone()) == false) {
 				isNewer = webFeignService.isPurchasedPracticeCourse(user.getId()) == false;
 				SysNewsInformation info = new SysNewsInformation();