xiongzhu 3 лет назад
Родитель
Сommit
2fa5e7c951
1 измененных файлов с 3 добавлено и 0 удалено
  1. 3 0
      src/main/java/com/izouma/nineth/service/AssetService.java

+ 3 - 0
src/main/java/com/izouma/nineth/service/AssetService.java

@@ -149,6 +149,9 @@ public class AssetService {
 
 
     public void consignment(Long id, BigDecimal price) {
     public void consignment(Long id, BigDecimal price) {
         Asset asset = assetRepo.findById(id).orElseThrow(new BusinessException("无记录"));
         Asset asset = assetRepo.findById(id).orElseThrow(new BusinessException("无记录"));
+        if (asset.getName().contains("鬼卒-")) {
+            throw new BusinessException("此藏品当前无法上架");
+        }
         if (!asset.getUserId().equals(SecurityUtils.getAuthenticatedUser().getId())) {
         if (!asset.getUserId().equals(SecurityUtils.getAuthenticatedUser().getId())) {
             throw new BusinessException("此藏品不属于你");
             throw new BusinessException("此藏品不属于你");
         }
         }