|
@@ -39,7 +39,7 @@ public class AssetPostService {
|
|
|
*/
|
|
*/
|
|
|
public AssetPost assetPost(Long userId, Long assetId, Long addressId) {
|
|
public AssetPost assetPost(Long userId, Long assetId, Long addressId) {
|
|
|
Asset asset = assetRepo.findById(assetId).orElseThrow(new BusinessException("无此衍生品"));
|
|
Asset asset = assetRepo.findById(assetId).orElseThrow(new BusinessException("无此衍生品"));
|
|
|
- if (userId.equals(asset.getUserId())) {
|
|
|
|
|
|
|
+ if (!userId.equals(asset.getUserId())) {
|
|
|
throw new BusinessException("此衍生品不属于你");
|
|
throw new BusinessException("此衍生品不属于你");
|
|
|
}
|
|
}
|
|
|
if (asset.isPublicShow()) {
|
|
if (asset.isPublicShow()) {
|
|
@@ -48,7 +48,7 @@ public class AssetPostService {
|
|
|
}
|
|
}
|
|
|
throw new BusinessException("请先取消公开展示");
|
|
throw new BusinessException("请先取消公开展示");
|
|
|
}
|
|
}
|
|
|
- if (AssetStatus.POSTED.equals(asset.getStatus())) {
|
|
|
|
|
|
|
+ if (AssetStatus.POSTED.equals(asset.getStatus()) || AssetStatus.POSTING.equals(asset.getStatus())) {
|
|
|
throw new BusinessException("已邮寄,无需再邮寄");
|
|
throw new BusinessException("已邮寄,无需再邮寄");
|
|
|
}
|
|
}
|
|
|
if (!AssetStatus.NORMAL.equals(asset.getStatus())) {
|
|
if (!AssetStatus.NORMAL.equals(asset.getStatus())) {
|