|
@@ -68,11 +68,6 @@ public class ExhibitionServiceImpl extends IBaseServiceImpl<ExhibitionEntity, Lo
|
|
|
condition.and().orLike("name", "%" + searchKey + "%")
|
|
|
.orLike("userName", "%" + searchKey + "%");
|
|
|
}
|
|
|
-// String startTime = param.getStartTime();
|
|
|
-// String endTime = param.getEndTime();
|
|
|
-// if (StringUtils.isNotBlank(startTime) && StringUtils.isNotBlank(endTime) ) {
|
|
|
-// condition.and().andBetween("createTime", startTime, endTime);
|
|
|
-// }
|
|
|
String type = param.getType();
|
|
|
if (StringUtils.isNotBlank(type)) {
|
|
|
condition.and().andEqualTo("status", type);
|
|
@@ -88,8 +83,13 @@ public class ExhibitionServiceImpl extends IBaseServiceImpl<ExhibitionEntity, Lo
|
|
|
Long id = param.getId();
|
|
|
ExhibitionEntity entity = null;
|
|
|
if (id == null) {
|
|
|
+
|
|
|
entity = new ExhibitionEntity();
|
|
|
BeanUtils.copyProperties(param, entity);
|
|
|
+ // 用来过滤数据使用
|
|
|
+ if ("fixed".equals(param.getType())){
|
|
|
+ entity.setStatus("fixed");
|
|
|
+ }
|
|
|
entity.setUserName(getTokenUserName(request));
|
|
|
this.save(entity);
|
|
|
} else {
|
|
@@ -102,28 +102,8 @@ public class ExhibitionServiceImpl extends IBaseServiceImpl<ExhibitionEntity, Lo
|
|
|
this.update(entity);
|
|
|
}
|
|
|
|
|
|
- // 将模块id绑定到文件表
|
|
|
-// String fileIds = param.getFileIds();
|
|
|
-// if (StringUtils.isNotBlank(fileIds)) {
|
|
|
-// Long moduleId = entity.getId();
|
|
|
-// fileService.addModuleIdToFile(fileIds, moduleId, TypeCode.MODULE_EXHIBITION);
|
|
|
-//
|
|
|
-// // 设置初始封面
|
|
|
-// setIndex(fileIds, moduleId);
|
|
|
-// }
|
|
|
return Result.success(entity);
|
|
|
}
|
|
|
-
|
|
|
- private void setIndex(String fileIds, Long moduleId){
|
|
|
- List<FileEntity> entities = fileService.findIndexByModule(moduleId, TypeCode.MODULE_EXHIBITION);
|
|
|
- if (entities.size() == 0) {
|
|
|
- // 初始页面不存在,设置第一张为初始页面
|
|
|
- String[] split = fileIds.split(",");
|
|
|
- Long indexId = Long.valueOf(split[0]);
|
|
|
- fileService.indexEnabled(indexId);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
|
|
|
|
|
|
@Override
|
|
@@ -201,6 +181,7 @@ public class ExhibitionServiceImpl extends IBaseServiceImpl<ExhibitionEntity, Lo
|
|
|
LocalDateTime now = LocalDateTime.now();
|
|
|
// 查询未开始、开始中的数据
|
|
|
Condition condition = new Condition(ExhibitionEntity.class);
|
|
|
+ condition.and().andEqualTo("type", "time");
|
|
|
condition.and().andEqualTo("status", "unstart").orEqualTo("status", "start");
|
|
|
List<ExhibitionEntity> allList = this.findAll(condition);
|
|
|
log.info("需要检查状态的数据数量: {}", allList.size());
|