xiongzhu 4 лет назад
Родитель
Сommit
92f228f920
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      src/main/java/com/izouma/nineth/service/GiftOrderService.java

+ 1 - 1
src/main/java/com/izouma/nineth/service/GiftOrderService.java

@@ -64,7 +64,7 @@ public class GiftOrderService {
     @Transactional
     public GiftOrder gift(Long userId, Long assetId, Long toUserId) {
         Asset asset = assetRepo.findById(assetId).orElseThrow(new BusinessException("资产不存在"));
-        if (asset.getUserId().equals(userId)) {
+        if (!asset.getUserId().equals(userId)) {
             throw new BusinessException("无权限");
         }
         if (!(asset.getStatus() == AssetStatus.NORMAL)) {