|
@@ -130,14 +130,7 @@ public class DomainOrderController extends BaseController {
|
|
|
public void addHyperLink(@RequestParam Long collectionId, @RequestParam("openHyperLink") boolean openHyperLink,
|
|
public void addHyperLink(@RequestParam Long collectionId, @RequestParam("openHyperLink") boolean openHyperLink,
|
|
|
@RequestParam("hyperLinkType") HyperLinkType hyperLinkType,
|
|
@RequestParam("hyperLinkType") HyperLinkType hyperLinkType,
|
|
|
@RequestParam("address") String address) {
|
|
@RequestParam("address") String address) {
|
|
|
- // Collection collection = collectionRepo.findById(collectionId).orElseThrow(new BusinessException("没找到记录"));
|
|
|
|
|
- Asset asset = assetRepo.findByIdAndStatus(collectionId, AssetStatus.NORMAL).orElseThrow(new BusinessException("没找到记录"));
|
|
|
|
|
- DomainOrder domainOrder = domainOrderRepo.findById(asset.getCollectionId()).orElseThrow(new BusinessException("没找到记录"));
|
|
|
|
|
- domainOrder.setOpenHyperLink(openHyperLink);
|
|
|
|
|
- domainOrder.setHyperLinkType(hyperLinkType);
|
|
|
|
|
- domainOrder.setAddress(address);
|
|
|
|
|
- domainOrder.setCurrentOwnerId(SecurityUtils.getAuthenticatedUser().getId());
|
|
|
|
|
- domainOrderRepo.save(domainOrder);
|
|
|
|
|
|
|
+ domainOrderService.addHyperLink(collectionId, openHyperLink, hyperLinkType, address);
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|