|
|
@@ -1,5 +1,6 @@
|
|
|
package com.izouma.nineth.service;
|
|
|
|
|
|
+import com.izouma.nineth.config.GeneralProperties;
|
|
|
import com.izouma.nineth.domain.*;
|
|
|
import com.izouma.nineth.dto.PageQuery;
|
|
|
import com.izouma.nineth.dto.oasis.OasisDistrictCollectionDTO;
|
|
|
@@ -32,6 +33,7 @@ public class CompanyCollectionService {
|
|
|
private CollectionPrivilegeRepo collectionPrivilegeRepo;
|
|
|
private SysConfigService sysConfigService;
|
|
|
private AssetRepo assetRepo;
|
|
|
+ private GeneralProperties generalProperties;
|
|
|
|
|
|
public Page<CompanyCollection> all(PageQuery pageQuery) {
|
|
|
return companyCollectionRepo.findAll(JpaUtils.toSpecification(pageQuery, CompanyCollection.class), JpaUtils
|
|
|
@@ -125,6 +127,10 @@ public class CompanyCollectionService {
|
|
|
oasisDistrictCollectionDTO.setStatus(asset.getStatus().getDescription());
|
|
|
} else {
|
|
|
if (asset.isPublicShow()) {
|
|
|
+ Collection collection = collectionRepo.findFirstByOnShelfAndAssetId(true, asset.getId());
|
|
|
+ oasisDistrictCollectionDTO.setUrl(
|
|
|
+ generalProperties.getHost() + "/9th/productDetail/" + collection
|
|
|
+ .getId() + "?id=" + collection.getId());
|
|
|
if (asset.isConsignment()) {
|
|
|
oasisDistrictCollectionDTO.setStatus("寄售中");
|
|
|
} else {
|
|
|
@@ -150,6 +156,9 @@ public class CompanyCollectionService {
|
|
|
oasisDistrictCollectionDTO.setCollectionId(collection.getId());
|
|
|
oasisDistrictCollectionDTO.setSource("官方");
|
|
|
if (collection.isOnShelf()) {
|
|
|
+ oasisDistrictCollectionDTO.setUrl(
|
|
|
+ generalProperties.getHost() + "/9th/productDetail/" + collection
|
|
|
+ .getId() + "?id=" + collection.getId());
|
|
|
if (collection.isSalable()) {
|
|
|
oasisDistrictCollectionDTO.setStatus("在售");
|
|
|
if (collection.getStock() == 0) {
|