Browse Source

单个物料保存增加物料信息日志显示,用于处理重复问题

hejq 7 years ago
parent
commit
1acdf6e2d5

+ 7 - 0
src/main/java/com/uas/platform/b2c/prod/commodity/service/impl/ProductServiceImpl.java

@@ -109,6 +109,7 @@ import javassist.NotFoundException;
 import org.apache.commons.beanutils.ConvertUtils;
 import org.apache.commons.beanutils.ConvertUtils;
 import org.apache.commons.collections.CollectionUtils;
 import org.apache.commons.collections.CollectionUtils;
 import org.apache.commons.collections.map.HashedMap;
 import org.apache.commons.collections.map.HashedMap;
+import org.apache.log4j.Logger;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.beans.factory.annotation.Value;
@@ -166,6 +167,11 @@ public class ProductServiceImpl implements ProductService {
      */
      */
     private static final UsageBufferedLogger LOGGER = BufferedLoggerManager.getLogger(UsageBufferedLogger.class);
     private static final UsageBufferedLogger LOGGER = BufferedLoggerManager.getLogger(UsageBufferedLogger.class);
 
 
+    /**
+     * 程序运行日志
+     */
+    private static final Logger INFO_LOGGER = Logger.getLogger(ProductServiceImpl.class);
+
     @Autowired
     @Autowired
     private ProductDao productDao;
     private ProductDao productDao;
 
 
@@ -2538,6 +2544,7 @@ public class ProductServiceImpl implements ProductService {
         // 最小起订量默认为最小包装数
         // 最小起订量默认为最小包装数
         Double minBuyQty = productInfo.getMinOrder() == null ? productInfo.getMinPackQty() : productInfo.getMinOrder();
         Double minBuyQty = productInfo.getMinOrder() == null ? productInfo.getMinPackQty() : productInfo.getMinOrder();
         productInfo.setMinOrder(minBuyQty);
         productInfo.setMinOrder(minBuyQty);
+        INFO_LOGGER.info("单个物料保存: " + FlexJsonUtils.toJson(productInfo));
         productInfo = productDao.save(productInfo);
         productInfo = productDao.save(productInfo);
         // 设置库存信息
         // 设置库存信息
         assignmentGoods(goods, productInfo);
         assignmentGoods(goods, productInfo);