Commit 80df33c5 authored by liming's avatar liming

报名修改报名数量

parent 2b5608a1
This diff is collapsed.
......@@ -81,7 +81,7 @@ public class SeriesService {
}
SeriesDetailsVO result = seriesConverter.toSeriesDetailVO(series, status);
SeriesApply apply = seriesBusinessMapper.getSeriesApply(id, sportUserId);
if(apply != null) {
if (apply != null) {
result.setAreaId(apply.getAreaId());
}
result.setNoticeList(seriesBusinessMapper.getSeriesNotice(id));
......@@ -111,6 +111,9 @@ public class SeriesService {
SeriesApply seriesApply = seriesConverter.toSeriesApply(dto);
seriesApply.setCreateTime(LocalDateTime.now());
Series series = seriesMapper.selectById(dto.getSeriesId());
series.setApplyNum(series.getApplyNum() == null ? 1 : series.getApplyNum() + 1);
seriesMapper.updateById(series);
seriesApplyMapper.insert(seriesApply);
}
......@@ -324,10 +327,10 @@ public class SeriesService {
*/
public SeriesMatchRecordInitVO seriesKnockoutMatchRecordInit(SeriesKnockoutMatchRecordInitDTO dto) {
QueryWrapper<SeriesMatchFinalists> finalistsQuery = new QueryWrapper<>();
finalistsQuery.lambda().eq(SeriesMatchFinalists::getMatchId,dto.getMatchId())
.eq(SeriesMatchFinalists::getSportUserId,dto.getSportUserId());
finalistsQuery.lambda().eq(SeriesMatchFinalists::getMatchId, dto.getMatchId())
.eq(SeriesMatchFinalists::getSportUserId, dto.getSportUserId());
SeriesMatchFinalists finalists = seriesMatchFinalistsMapper.selectOne(finalistsQuery);
if(finalists == null){
if (finalists == null) {
throw new BusinessException("抱歉,您没有入围当前比赛!");
}
SeriesMatchRecordInitVO result = new SeriesMatchRecordInitVO();
......@@ -355,7 +358,7 @@ public class SeriesService {
return result;
}
public List<SeriesMatchForGameServerVO> getSeriesMatchForGameServer(){
public List<SeriesMatchForGameServerVO> getSeriesMatchForGameServer() {
return seriesBusinessMapper.getSeriesMatchForGameServer(LocalDateTime.now());
}
......
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