|
|
@@ -156,9 +156,9 @@ public class PerformanceApplyService {
|
|
|
// });
|
|
|
}
|
|
|
|
|
|
- /*
|
|
|
- 签到
|
|
|
- 由管理人员先登陆,进行签到
|
|
|
+ /**
|
|
|
+ *签到
|
|
|
+ *由管理人员先登陆,进行签到
|
|
|
*/
|
|
|
public PerformanceApply signIn(Long id, Long userId) {
|
|
|
PerformanceApply performanceApply = performanceApplyRepo.findById(id)
|
|
|
@@ -174,8 +174,8 @@ public class PerformanceApplyService {
|
|
|
return performanceApplyRepo.save(performanceApply);
|
|
|
}
|
|
|
|
|
|
- /*
|
|
|
- 扫描作品二维码,通过手机号获取身份
|
|
|
+ /**
|
|
|
+ *扫描作品二维码,通过手机号获取身份
|
|
|
*/
|
|
|
public Map<String, String> getAuth(Long id, String phone) {
|
|
|
PerformanceApply performanceApply = performanceApplyRepo.findById(id)
|
|
|
@@ -190,7 +190,7 @@ public class PerformanceApplyService {
|
|
|
|
|
|
List<String> phones = personRepo.findAllByPerformanceApplyId(id)
|
|
|
.stream()
|
|
|
- .map(Person::getName)
|
|
|
+ .map(Person::getPhone)
|
|
|
.collect(Collectors.toList());
|
|
|
if (phones.contains(phone)) {
|
|
|
map.put("phone", phone);
|
|
|
@@ -210,8 +210,8 @@ public class PerformanceApplyService {
|
|
|
return map;
|
|
|
}
|
|
|
|
|
|
- /*
|
|
|
- 评分
|
|
|
+ /**
|
|
|
+ *评分
|
|
|
*/
|
|
|
public void score(Long id, double score, Long userId) {
|
|
|
PerformanceApply apply = performanceApplyRepo.findById(id).orElseThrow(new BusinessException("无此表演"));
|
|
|
@@ -224,6 +224,10 @@ public class PerformanceApplyService {
|
|
|
if (LocalDateTime.now().isBefore(apply.getShowStartTime())) {
|
|
|
throw new BusinessException("节目暂未开始");
|
|
|
}
|
|
|
+ PerformanceScore score1 = performanceScoreRepo.findByPerformanceApplyIdAndUserId(id, userId);
|
|
|
+ if (ObjectUtil.isNotNull(score1)){
|
|
|
+ throw new BusinessException("已打分");
|
|
|
+ }
|
|
|
|
|
|
PerformanceScore performanceScore = PerformanceScore.builder()
|
|
|
.performanceApplyId(id)
|
|
|
@@ -243,8 +247,8 @@ public class PerformanceApplyService {
|
|
|
performanceApplyRepo.save(apply);
|
|
|
}
|
|
|
|
|
|
- /*
|
|
|
- 获取相关
|
|
|
+ /**
|
|
|
+ *获取相关
|
|
|
*/
|
|
|
public List<PerformanceApply> related(Long id) {
|
|
|
PerformanceApply apply = performanceApplyRepo.findById(id).orElseThrow(new BusinessException("无记录"));
|