Commit 9a8d1a29 by 梅存智

权限优化

parent d0d6bc39
...@@ -1502,9 +1502,17 @@ public class TrainingProjectServiceImpl extends ServiceImpl<TrainingProjectMappe ...@@ -1502,9 +1502,17 @@ public class TrainingProjectServiceImpl extends ServiceImpl<TrainingProjectMappe
TrainingActivityVO item = new TrainingActivityVO(); TrainingActivityVO item = new TrainingActivityVO();
//根据活动的可见范围显示日历 //根据活动的可见范围显示日历
//获取可见范围 // 可见范围
List<Long> visiableTpIds = trainingProjectMapper.getVisiables(context.getSiteId(), context.getOrgId(), context.getAccountId()); List<Long> relationIds = context.getRelationIds();
List<TrainingProjectVo> trainingProjectVos = trainingProjectMapper.apiPageListCount(visiableTpIds, null, context.getSiteId(), null, bizType); // 指定范围的可见
List<Long> visiableTpIds = null;
if (!CollectionUtils.isEmpty(relationIds)) {
visiableTpIds = tpAuthorizationRangeMapper.selectBizIdByRelationId(relationIds, context.getSiteId());
}
// 报名通过的
List<Long> passEnrollTpIds = tpStudentEnrollPassedMapper.selectTpIds(context.getAccountId());
List<TrainingProjectVo> trainingProjectVos = trainingProjectMapper.apiPageListCount(visiableTpIds, passEnrollTpIds, context.getSiteId(), null, bizType);
if(!CollectionUtils.isEmpty(trainingProjectVos)){ if(!CollectionUtils.isEmpty(trainingProjectVos)){
List<String> list = new ArrayList<String>(1); List<String> list = new ArrayList<String>(1);
trainingProjectVos.stream().forEach(trainingProjectVo -> { trainingProjectVos.stream().forEach(trainingProjectVo -> {
......
...@@ -21,6 +21,9 @@ public class LegacyDateUtils { ...@@ -21,6 +21,9 @@ public class LegacyDateUtils {
Calendar calendar = Calendar.getInstance(); Calendar calendar = Calendar.getInstance();
calendar.setTime(start); calendar.setTime(start);
//结束时间的时分秒统一为23:59:59,不然会少最后一天的(某天的 05:00:00至某天的04:00:00)
SimpleDateFormat formatEnd = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
end = formatEnd.parse(format.format(end) + " 23:59:59");
while (!calendar.getTime().after(end)) { while (!calendar.getTime().after(end)) {
dates.add(format.format(calendar.getTime())); dates.add(format.format(calendar.getTime()));
calendar.add(Calendar.DATE, 1); calendar.add(Calendar.DATE, 1);
......
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