Explorar o código

.

(cherry picked from commit 2fa5e7c95165fba0ecdb902d6167bf953206011b)
xiongzhu %!s(int64=3) %!d(string=hai) anos
pai
achega
35b7da897f
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  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) {
         Asset asset = assetRepo.findById(id).orElseThrow(new BusinessException("无记录"));
+        if (asset.getName().contains("鬼卒-")) {
+            throw new BusinessException("此藏品当前无法上架");
+        }
         if (!asset.getUserId().equals(SecurityUtils.getAuthenticatedUser().getId())) {
             throw new BusinessException("此藏品不属于你");
         }