Commit d2b46243 authored by luzhuang's avatar luzhuang

feat: 测试完成 new

parent 124d3a02
...@@ -1101,7 +1101,7 @@ public class BLessonServiceImpl implements BLessonService { ...@@ -1101,7 +1101,7 @@ public class BLessonServiceImpl implements BLessonService {
throw new ServiceException(ResultServiceEnums.INVALID_PARAMETER_VALUE); throw new ServiceException(ResultServiceEnums.INVALID_PARAMETER_VALUE);
} }
return ListAllLesson; return addNew(ListAllLesson);
} }
@Override @Override
...@@ -1802,10 +1802,10 @@ public class BLessonServiceImpl implements BLessonService { ...@@ -1802,10 +1802,10 @@ public class BLessonServiceImpl implements BLessonService {
public List<BLesson> addNew(List<BLesson> result) { public List<BLesson> addNew(List<BLesson> result) {
//获取当前登录人信息 //获取当前登录人信息
CurUser curUser = UserUtil.getCurUser(); CurUser curUser = UserUtil.getCurUser();
String userId = curUser.getUserId(); // String userId = curUser.getUserId();
String corpId = curUser.getCorpId(); // String corpId = curUser.getCorpId();
// String userId = "1042237478105227265"; String userId = "1042237478105227265";
// String corpId = "6"; String corpId = "6";
log.info("-----------addNew---------当前登录人信息curUser----------"+curUser+"--------------------"); log.info("-----------addNew---------当前登录人信息curUser----------"+curUser+"--------------------");
BMessage bMessage = new BMessage(); BMessage bMessage = new BMessage();
bMessage.setName(MessageEnum.NEWNOTICE.getName()); bMessage.setName(MessageEnum.NEWNOTICE.getName());
...@@ -1870,29 +1870,4 @@ public class BLessonServiceImpl implements BLessonService { ...@@ -1870,29 +1870,4 @@ public class BLessonServiceImpl implements BLessonService {
log.info("-----------addNew---------首页查询课程或培训的总个数----------"+result.size()+"--------------------"); log.info("-----------addNew---------首页查询课程或培训的总个数----------"+result.size()+"--------------------");
return addNew(result); return addNew(result);
} }
public static void main(String[] args) {
//获取当前时间
Calendar c = Calendar.getInstance();
int time = 2;
//step 1 查询look表中是否有对应任何课程的点击记录
int flag =0;
//step 2 存在则返回,不存在则判断时间 满足条件 setIsNew()
if (flag <= 0) {
//flag <= 0 说明此用户未点击过该课程
Calendar c1 = Calendar.getInstance();
switch ("3"){
case "1" : c1.add(Calendar.HOUR, time); break;
case "2" : c1.add(Calendar.DAY_OF_MONTH, time); break;
case "3" : c1.add(Calendar.WEEK_OF_MONTH, time); break;
case "4" : c1.add(Calendar.MONTH, time); break;
}
log.info("-----------addNew-------当前时间--"+DateUtil.date(c)+"--new标志结束时间--"+DateUtil.date(c1));
log.info(c1.after(c)+"");
log.info(DateUtil.date(c1).after(DateUtil.date(c))+"");
}
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment