Sfoglia il codice sorgente

增加测试代码

yujia 7 anni fa
parent
commit
582796b6f5

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

@@ -74,6 +74,7 @@ import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
 import static com.uas.platform.b2c.core.utils.NumberUtil.fractionNumCeil;
+import static com.uas.platform.b2c.external.erp.commodity.util.ModelConverter.dateFormat;
 
 @Service
 public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchService {
@@ -135,6 +136,8 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
     @Autowired
     private GoodsHistoryService goodsHistoryService;
 
+	private final Logger logger = Logger.getLogger(getClass());
+
 	/**
 	 * 控制任务提交速度的线程池
 	 */
@@ -163,8 +166,6 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
 		executor = new BoundedExecutor(executorService, 1600);
 	}
 
-    private final Logger logger = Logger.getLogger(getClass());
-
 	@Override
 	public ReleaseProductByBatch save(ReleaseProductByBatch releaseProductByBatch) {
 		return releaseProductByBatch;
@@ -337,6 +338,7 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
             }
 		}
 		if (!isAPerson && !isPcb) {
+			logger.info(String.format("%s 批次上架测试代码", dateFormat.format(new Date())));
             System.err.println("批次上架测试代码");
 			String publish = publishByBatch(batch, isPcb);
 			modelMap.put("publish", publish);
@@ -1717,6 +1719,7 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
 		if (CollectionUtils.isEmpty(releaseProductByBatchList)) {
 			return String.valueOf(IntegerConstant.NO_SHORT);
 		}
+		System.err.println("测试信息的1-1" + "---------------------");
 		Map<String, Object> map = convertProduct(releaseProductByBatchList, false, isPcb);
 		if (map == null || map.size() == 0) {
 			return "0";
@@ -1725,6 +1728,7 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
 		if (isPcb) {
 			savePcbInfo(idSet, map);
 		}
+		System.err.println("测试信息的1-2" + "---------------------");
 		Enterprise enterprise = SystemSession.getUser().getEnterprise();
         final Object[] obj = new Object[]{enterprise.getUu(), enterprise.getEnName(), batch};
         String sql = "/*#mycat:db_type=master*/ set @enuu = %s; set @enName = '%s'; set @batch = '%s'; call RELEASE_TO_GOODS_V5(@enuu, @enName, @batch, @out); select @out; commit;";