zoujiajian 2 éve
szülő
commit
98f7abc832

+ 1 - 1
netflix-service/src/main/java/com/cyksj/service/user/impl/UserServiceImpl.java

@@ -520,7 +520,7 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
 		if (giftCardUserRecord.getUserId().equals(userId)) {
 			throw BusinessRuntimeException.getInstance("无法领取自己购买的礼品卡");
 		}
-		if (giftCardUserRecord.getToUserId() != 0 && giftCardUserRecord.getToUserId().equals(userId)) {
+		if (giftCardUserRecord.getToUserId() != 0 && !giftCardUserRecord.getToUserId().equals(userId)) {
 			throw BusinessRuntimeException.getInstance("好友赠送礼品卡已被领取");
 		}
 		if (giftCardUserRecord.getToUserId().equals(userId)) {