xiongzhu 4 年之前
父节点
当前提交
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)) {