|
@@ -493,7 +493,7 @@ public class AssetService {
|
|
|
assetRepo.saveAndFlush(asset);
|
|
assetRepo.saveAndFlush(asset);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- public void cancelConsignmentAndStore(Long id) {
|
|
|
|
|
|
|
+ public Asset cancelConsignmentAndStore(Long id) {
|
|
|
Asset asset = assetRepo.findById(id).orElseThrow(new BusinessException("无记录"));
|
|
Asset asset = assetRepo.findById(id).orElseThrow(new BusinessException("无记录"));
|
|
|
if (!asset.getUserId().equals(SecurityUtils.getAuthenticatedUser().getId())) {
|
|
if (!asset.getUserId().equals(SecurityUtils.getAuthenticatedUser().getId())) {
|
|
|
throw new BusinessException("此藏品不属于你");
|
|
throw new BusinessException("此藏品不属于你");
|
|
@@ -515,7 +515,7 @@ public class AssetService {
|
|
|
asset.setConsignment(false);
|
|
asset.setConsignment(false);
|
|
|
asset.setPublicShow(false);
|
|
asset.setPublicShow(false);
|
|
|
asset.setStatus(AssetStatus.DESTROYING);
|
|
asset.setStatus(AssetStatus.DESTROYING);
|
|
|
- assetRepo.saveAndFlush(asset);
|
|
|
|
|
|
|
+ return assetRepo.saveAndFlush(asset);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public void cancelConsignment(Long id) {
|
|
public void cancelConsignment(Long id) {
|