|
@@ -109,28 +109,27 @@ public class TempLittleArtistTrainingCampServiceImpl extends ServiceImpl<TempLit
|
|
SysUser user = getUser();
|
|
SysUser user = getUser();
|
|
Date now = DateUtil.toDate(LocalDate.now().toString());
|
|
Date now = DateUtil.toDate(LocalDate.now().toString());
|
|
checkDateTime(dto, now);
|
|
checkDateTime(dto, now);
|
|
- TempLittleArtistTrainingCamp entity = Optional.ofNullable(dto.getId())
|
|
|
|
- .map(this::getById)
|
|
|
|
- .orElseThrow(() -> new BizException("训练营不存在"));
|
|
|
|
|
|
+ Optional.ofNullable(dto.getId()).map(this::getById).orElseThrow(() -> new BizException("训练营不存在"));
|
|
/*int count = tempLittleArtistTrainingCampUserRelationService.count(Wrappers.<TempLittleArtistTrainingCampUserRelation>lambdaQuery()
|
|
/*int count = tempLittleArtistTrainingCampUserRelationService.count(Wrappers.<TempLittleArtistTrainingCampUserRelation>lambdaQuery()
|
|
.eq(TempLittleArtistTrainingCampUserRelation::getActivityId, entity.getId()));
|
|
.eq(TempLittleArtistTrainingCampUserRelation::getActivityId, entity.getId()));
|
|
if (count > 0) {
|
|
if (count > 0) {
|
|
throw new BizException("训练营已有学生报名,无法修改");
|
|
throw new BizException("训练营已有学生报名,无法修改");
|
|
}*/
|
|
}*/
|
|
- entity.setName(dto.getName());
|
|
|
|
- entity.setApplyStartDate(dto.getApplyStartDate());
|
|
|
|
- entity.setApplyEndDate(dto.getApplyEndDate());
|
|
|
|
- entity.setTrainStartDate(dto.getTrainStartDate());
|
|
|
|
- entity.setTrainEndDate(dto.getTrainEndDate());
|
|
|
|
- entity.setPicUrl(dto.getPicUrl());
|
|
|
|
- entity.setEnableFlag(dto.getEnableFlag());
|
|
|
|
- entity.setMusicGroupIds(dto.getMusicGroupIds());
|
|
|
|
- entity.setOrganIds(dto.getOrganIds());
|
|
|
|
- entity.setSignStandard(dto.getSignStandard());
|
|
|
|
- entity.setStandardDays(dto.getStandardDays());
|
|
|
|
- entity.setUpdateBy(user.getId());
|
|
|
|
- entity.setUpdateTime(new Date());
|
|
|
|
- this.updateById(entity);
|
|
|
|
|
|
+ this.lambdaUpdate()
|
|
|
|
+ .set(TempLittleArtistTrainingCamp::getName,dto.getName())
|
|
|
|
+ .set(TempLittleArtistTrainingCamp::getApplyStartDate,dto.getApplyStartDate())
|
|
|
|
+ .set(TempLittleArtistTrainingCamp::getApplyEndDate,dto.getApplyEndDate())
|
|
|
|
+ .set(TempLittleArtistTrainingCamp::getTrainStartDate,dto.getTrainStartDate())
|
|
|
|
+ .set(TempLittleArtistTrainingCamp::getTrainEndDate,dto.getTrainEndDate())
|
|
|
|
+ .set(TempLittleArtistTrainingCamp::getPicUrl,dto.getPicUrl())
|
|
|
|
+ .set(TempLittleArtistTrainingCamp::getEnableFlag,dto.getEnableFlag())
|
|
|
|
+ .set(TempLittleArtistTrainingCamp::getMusicGroupIds,dto.getMusicGroupIds())
|
|
|
|
+ .set(TempLittleArtistTrainingCamp::getOrganIds,dto.getOrganIds())
|
|
|
|
+ .set(TempLittleArtistTrainingCamp::getSignStandard,dto.getSignStandard())
|
|
|
|
+ .set(TempLittleArtistTrainingCamp::getStandardDays,dto.getStandardDays())
|
|
|
|
+ .set(TempLittleArtistTrainingCamp::getUpdateBy,user.getId())
|
|
|
|
+ .set(TempLittleArtistTrainingCamp::getUpdateTime,new Date())
|
|
|
|
+ .eq(TempLittleArtistTrainingCamp::getId,dto.getId()).update();
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|