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