|
|
@@ -1695,6 +1695,9 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
|
|
|
|
|
|
@Override
|
|
|
public String publishByBatch(String batch, boolean isPcb) {
|
|
|
+ if (StringUtils.isEmpty(batch)) {
|
|
|
+ return "0";
|
|
|
+ }
|
|
|
List<ReleaseProductByBatch> releaseProductByBatchList =
|
|
|
releaseProductByBatchDao.findByRelbatchid(batch);
|
|
|
if (CollectionUtils.isEmpty(releaseProductByBatchList)) {
|
|
|
@@ -1702,7 +1705,7 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
|
|
|
}
|
|
|
Map<String, Object> map = convertProduct(releaseProductByBatchList, false, isPcb);
|
|
|
if (map == null || map.size() == 0) {
|
|
|
- return "fail";
|
|
|
+ return "0";
|
|
|
}
|
|
|
Set<Long> idSet = (Set<Long>) map.get("prIds");
|
|
|
if (isPcb) {
|
|
|
@@ -1922,10 +1925,10 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
|
|
|
* 批量发布之后,需要做的事情,内部使用线程,不需要让用户等结果
|
|
|
*/
|
|
|
public void afterPublishToGoodsDo(final List<Long> productIds, final Set<Long> reIds, String batchid) {
|
|
|
- final List<Goods> goodses = goodsService.findByBatchId(batchid);
|
|
|
- if (CollectionUtils.isEmpty(productIds)) {
|
|
|
+ if (CollectionUtils.isEmpty(productIds) || StringUtils.isEmpty(batchid)) {
|
|
|
return ;
|
|
|
}
|
|
|
+ final List<Goods> goodses = goodsService.findByBatchId(batchid);
|
|
|
final Runnable afterPublishToGoodsRunnable = new Runnable() {
|
|
|
@Override
|
|
|
public void run() {
|