浏览代码

个人 物料bug修复6

wangdy 8 年之前
父节点
当前提交
9095ad9764

+ 6 - 2
src/main/java/com/uas/platform/b2c/prod/commodity/service/impl/ReleaseProductByBatchServiceImpl.java

@@ -29,6 +29,7 @@ import com.uas.platform.b2c.prod.store.model.StoreIn;
 import com.uas.platform.b2c.prod.store.model.StoreStatus;
 import com.uas.platform.b2c.prod.store.service.StoreInService;
 import com.uas.platform.b2c.trade.order.StringConstant.Currency;
+import com.uas.platform.b2c.trade.presale.model.Collection;
 import com.uas.platform.core.exception.IllegalOperatorException;
 import com.uas.platform.core.model.PageInfo;
 import com.uas.platform.core.persistence.criteria.CriterionExpression;
@@ -1045,6 +1046,9 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
 		List<Long> productIds = null;
 		if (!CollectionUtils.isEmpty(releaseProductByBatchList)) {
 			List<com.uas.ps.entity.Product> products = convertProduct(releaseProductByBatchList,false);
+			if (CollectionUtils.isEmpty(products)) {
+
+			}
 			// TODO 什么接口
 			String result = restTemplate.postForEntity(productServiceIp + "/product/update", products, String.class).getBody();
 			productIds = JSON.parseArray(result, Long.class);
@@ -1125,8 +1129,8 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
 		}
 		List<com.uas.ps.entity.Product> products = new ArrayList<>();
 		for (ReleaseProductByBatch releaseProductByBatch : releaseProductByBatchList) {
-		    if (releaseProductByBatch.getReleaseCode().equals(ReleaseStatus.failure) ||
-                    releaseProductByBatch.getReleaseCode().equals(ReleaseStatus.success)) {
+		    if (releaseProductByBatch.getReleaseCode().equals(ReleaseStatus.failure.value()) ||
+                    releaseProductByBatch.getReleaseCode().equals(ReleaseStatus.success.value())) {
                 com.uas.ps.entity.Product product = new com.uas.ps.entity.Product();
                 // releaseProductByBatch.getCode(); 在公有库生成
                 product.setMinPack(releaseProductByBatch.getMinPackage());