勋章等级配置限制

This commit is contained in:
2025-06-09 18:35:00 +08:00
parent 9ad34d1310
commit 1dd600014f

View File

@@ -54,6 +54,10 @@ public class MedalSeriesAdminService {
if (!medal.getEnable().equals(Boolean.TRUE)) { if (!medal.getEnable().equals(Boolean.TRUE)) {
throw new AdminServiceException(String.format("勋章ID:%s状态为无效", medalSeriesRef.getMedalId())); throw new AdminServiceException(String.format("勋章ID:%s状态为无效", medalSeriesRef.getMedalId()));
} }
List<MedalSeriesRef> seriesRefs = medalSeriesRefService.listByMedalIds(Arrays.asList(medalSeriesRef.getMedalId()));
if (CollectionUtils.isNotEmpty(seriesRefs)) {
throw new AdminServiceException(String.format("勋章ID:%s已经配置等级配置id为:%s", medalSeriesRef.getMedalId(), seriesRefs.get(0).getSeriesId()));
}
} }
MedalSeries medalSeries = new MedalSeries(); MedalSeries medalSeries = new MedalSeries();
BeanUtils.copyProperties(medalSeriesAdminVo, medalSeries); BeanUtils.copyProperties(medalSeriesAdminVo, medalSeries);