|
|
@@ -4,6 +4,7 @@ import com.uas.platform.b2c.common.account.model.User;
|
|
|
import com.uas.platform.b2c.common.search.service.SearcherService;
|
|
|
import com.uas.platform.b2c.core.support.SystemSession;
|
|
|
import com.uas.platform.b2c.prod.commodity.service.GoodsService;
|
|
|
+import com.uas.platform.b2c.prod.commodity.service.StockInOutHistService;
|
|
|
import com.uas.platform.b2c.prod.store.model.StoreIn;
|
|
|
import com.uas.platform.b2c.prod.store.service.StoreInService;
|
|
|
import com.uas.platform.b2c.trade.presale.service.StoreFocusService;
|
|
|
@@ -57,6 +58,9 @@ public class SearcherController {
|
|
|
@Autowired
|
|
|
private GoodsService goodsService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private StockInOutHistService stockInOutHistService;
|
|
|
+
|
|
|
/**
|
|
|
* 作搜索展示跳转
|
|
|
*
|
|
|
@@ -314,21 +318,24 @@ public class SearcherController {
|
|
|
PageInfo pageInfo = new PageInfo(params);
|
|
|
Page<StoreIn> stores = storeService.pageStoresByTypesAndKeyword(pageInfo, types, keyword);
|
|
|
List<Map<String, Object>> result = new ArrayList<>();
|
|
|
- Map<String, Object> a = new HashedMap();
|
|
|
- a.put("stores",stores);
|
|
|
- result.add(a);
|
|
|
+ Map<String, Object> storesMap = new HashedMap();
|
|
|
+ storesMap.put("stores",stores);
|
|
|
+ result.add(storesMap);
|
|
|
Map<String, Object> b = new HashedMap();
|
|
|
ArrayList<String> flag = new ArrayList<>();
|
|
|
ArrayList<Object> flag2 = new ArrayList<>();
|
|
|
+ ArrayList<Object> flag3 = new ArrayList<>();
|
|
|
b.put("isFocus",flag);
|
|
|
b.put("image",flag2);
|
|
|
+ b.put("sales",flag3);
|
|
|
result.add(b);
|
|
|
for (StoreIn storeIn : stores){
|
|
|
flag.add(storeFocusService.storeIfFocus(storeIn.getId()));
|
|
|
- PageInfo pageInfoCache = new PageInfo(1,4);
|
|
|
+ PageInfo pageInfoCache = new PageInfo(1,5);
|
|
|
//暂时只显示有图片的产品信息
|
|
|
pageInfoCache.expression(PredicateUtils.isNotNull("img"));
|
|
|
flag2.add(goodsService.pageCommoditiesByEnInfos(storeIn.getUuid(),null,null,pageInfoCache));
|
|
|
+ flag3.add(stockInOutHistService.getCountByenuuAndIoSellerType(storeIn.getEnUU(),1668));
|
|
|
}
|
|
|
return result;
|
|
|
}
|