|
|
@@ -339,6 +339,7 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
|
|
|
if (!isAPerson && !isPcb) {
|
|
|
String publish = publishByBatch(batch, isPcb);
|
|
|
modelMap.put("publish", publish);
|
|
|
+ System.err.println("批次上架");
|
|
|
}
|
|
|
modelMap.put("total", total);
|
|
|
modelMap.put("success", success);
|
|
|
@@ -1739,12 +1740,15 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
|
|
|
return "0";
|
|
|
}
|
|
|
});
|
|
|
+ System.err.println("测试信息的1" + "---------------------");
|
|
|
String updateReleaseSql = "/*#mycat:db_type=master*/ update trade$releasebybatch set rel_releasecode = 101,rel_releasestatus = '已发布' where (rel_releasecode = 112 OR rel_releasecode = 113) and rel_batchid = '%s';";
|
|
|
final String updateRelease = String.format(updateReleaseSql, new Object[]{batch});
|
|
|
jdbcTemplate.execute(updateRelease);
|
|
|
+ System.err.println("测试信息的2" + "---------------------");
|
|
|
ArrayList<Long> list = new ArrayList<>();
|
|
|
list.addAll((Set<Long>)map.get("prIds"));
|
|
|
afterPublishToGoodsDo(list, (Set<Long>)map.get("reIds"), batch);
|
|
|
+ System.err.println("测试信息的3" + "---------------------");
|
|
|
return StringUtilB2C.getStr(num);
|
|
|
}
|
|
|
|
|
|
@@ -1944,7 +1948,6 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
|
|
|
if (CollectionUtils.isEmpty(productIds) || StringUtils.isEmpty(batchid)) {
|
|
|
return ;
|
|
|
}
|
|
|
-// final List<Goods> goodses = goodsService.findByBatchId(batchid);
|
|
|
final Runnable afterPublishToGoodsRunnable = new Runnable() {
|
|
|
@Override
|
|
|
public void run() {
|
|
|
@@ -1968,15 +1971,6 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
|
|
|
List<Goods> goodses = goodsDao.findByProductIds(prIds);
|
|
|
goodsService.updateSpecByProducts(products, goodses);
|
|
|
}
|
|
|
-
|
|
|
-// List<GoodsHistory> list = new ArrayList<>();
|
|
|
-// for (Goods goodse : goodses) {
|
|
|
-// GoodsHistory goodsHistory = goodsHistoryService.converTGoodsHist(goodse, GoodsHistory.OperateType.Publish.getPhrase(), false);
|
|
|
-// list.add(goodsHistory);
|
|
|
-// }
|
|
|
-// if (CollectionUtils.isNotEmpty(list)) {
|
|
|
-// commonDao.save(list, GoodsHistory.class);
|
|
|
-// }
|
|
|
}
|
|
|
};
|
|
|
try {
|