Browse Source

Merge remote-tracking branch 'origin/release-201844-wangcz' into release-201844-wangcz

wangcz 7 years ago
parent
commit
55d4e1c70f

+ 0 - 2
src/main/java/com/uas/platform/b2c/trade/presale/controller/CartController.java

@@ -83,8 +83,6 @@ public class CartController {
 	public Page<Cart> getPageInfo(@ApiParam(required = true, value = "分页参数") PageParams page) {
 		// 失效的批次信息可能获取不到。
 		PageInfo info = new PageInfo(page);
-		Long uu = SystemSession.getUser().getUserUU();
-		info.filter("uu", uu);
 		return cartService.findPageInfoByUu(info);
 	}
 

+ 3 - 4
src/main/java/com/uas/platform/b2c/trade/presale/service/impl/CartServiceImpl.java

@@ -410,14 +410,13 @@ public class CartServiceImpl implements CartService {
 	 */
 	@Override
 	public Page<Cart> findPageInfoByUu(final PageInfo info) {
+		Long uu = SystemSession.getUser().getUserUU();
+		info.filter("uu", uu);
 		if (SystemSession.getUser().getEnterprise() != null) {
 			info.filter("enuu", SystemSession.getUser().getEnterprise().getUu());
 		} else {
 			info.filter("dissociative", Type.PERSONAL.value());
 		}
-
-		Map<String, Object> map = new HashMap<String, Object>();
-		Map<String, List<Cart>> contentMap = new HashMap<>();
 //		info.sorting("storeUuid", Sort.Direction.DESC);
 //		info.sorting("id", Sort.Direction.DESC);
 		info.sorting(Sort.Direction.DESC, "storeUuid", "id");
@@ -448,7 +447,7 @@ public class CartServiceImpl implements CartService {
 		for (Cart cart : carts) {
 			batchCodes.add(cart.getBatchCode());
 		}
-		//从历史库存中获取上架信息
+		//从历史库存中获取最新的历史信息
 		List<Long> historyIds = goodsHistoryDao.findMaxIdByBatchCodes(batchCodes);
 		if (org.apache.commons.collections.CollectionUtils.isNotEmpty(historyIds)) {
 			List<GoodsHistory> histories = goodsHistoryDao.findAll(historyIds);