xiongzhu 4 năm trước cách đây
mục cha
commit
92f228f920

+ 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)) {