|
@@ -1,15 +1,18 @@
|
|
|
package com.uas.platform.b2c.trade.deprecated.service.impl;
|
|
package com.uas.platform.b2c.trade.deprecated.service.impl;
|
|
|
|
|
|
|
|
-import com.uas.platform.b2c.prod.product.component.dao.ComponentInfoDao;
|
|
|
|
|
-import com.uas.platform.b2c.prod.product.component.modal.ComponentInfo;
|
|
|
|
|
import com.uas.platform.b2c.prod.commodity.dao.GoodsDao;
|
|
import com.uas.platform.b2c.prod.commodity.dao.GoodsDao;
|
|
|
import com.uas.platform.b2c.prod.commodity.model.Goods;
|
|
import com.uas.platform.b2c.prod.commodity.model.Goods;
|
|
|
|
|
+import com.uas.platform.b2c.prod.product.component.dao.ComponentInfoDao;
|
|
|
|
|
+import com.uas.platform.b2c.prod.product.component.modal.ComponentInfo;
|
|
|
import com.uas.platform.b2c.trade.deprecated.service.RecommendService;
|
|
import com.uas.platform.b2c.trade.deprecated.service.RecommendService;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.data.domain.Page;
|
|
import org.springframework.data.domain.Page;
|
|
|
import org.springframework.data.domain.Pageable;
|
|
import org.springframework.data.domain.Pageable;
|
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
|
|
|
|
+import java.util.ArrayList;
|
|
|
|
|
+import java.util.List;
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* @author yangck
|
|
* @author yangck
|
|
|
*/
|
|
*/
|
|
@@ -38,8 +41,11 @@ public class RecommendServiceImpl implements RecommendService {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
- public Page<ComponentInfo> getRecommendCompsForUser(Long userUU, String usedFor, Pageable pageable) {
|
|
|
|
|
- Page<ComponentInfo> page = componentInfoDao.findByImgIsNotNull(pageable);
|
|
|
|
|
|
|
+ public List<ComponentInfo> getRecommendCompsForUser(Long userUU, String usedFor, Pageable pageable) {
|
|
|
|
|
+ if (pageable == null) {
|
|
|
|
|
+ return new ArrayList<>();
|
|
|
|
|
+ }
|
|
|
|
|
+ List<ComponentInfo> page = componentInfoDao.findByImgIsNotNull(pageable.getPageSize());
|
|
|
return page;
|
|
return page;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|