Browse Source

Merge remote-tracking branch 'origin/release-201827-wangcz' into release-201827-wangcz

shenjj 7 years ago
parent
commit
62557dac47

+ 1 - 1
src/main/java/com/uas/platform/b2c/prod/commodity/controller/ReleaseProductByBatchController.java

@@ -249,7 +249,7 @@ public class ReleaseProductByBatchController {
      * 通过excel批量导入PCB商品发布(大量)
      * @param uploadItem 上传内容
      * @param currency 币别
-     * @param repeatImport 重复导入
+     * @param ignoreImport 重复导入
      * @return
      */
     @RequestMapping(value = "/release/excel/pcb", method = RequestMethod.POST)

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

@@ -30,6 +30,7 @@ import com.uas.platform.core.util.serializer.FlexJsonUtils;
 import org.apache.commons.collections.CollectionUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.data.domain.Page;
+import org.springframework.data.domain.Sort;
 import org.springframework.data.jpa.domain.Specification;
 import org.springframework.stereotype.Service;
 import org.springframework.util.StringUtils;
@@ -247,6 +248,7 @@ public class CommodityInOutboundServiceImpl implements CommodityInOutboundServic
         final PageInfo info = new PageInfo(params);
         Long enuu = SystemSession.getUser().getEnterprise().getUu();
         info.filter("enuu", enuu);
+        info.sorting("createTime", Sort.Direction.DESC);
         if (fromDate != null) {
             info.expression(PredicateUtils.gte("createTime", new Date(fromDate), false));
         }

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

@@ -1763,7 +1763,7 @@ public class ProductServiceImpl implements ProductService {
                 } else {
                     persistProduct.setSpec((String) specResultMap.getData());
                 }
-                if (productPrivate.getStandard() == IntegerConstant.NO_SHORT) {
+                if (productPrivate.getStandard() == IntegerConstant.NO_SHORT || StringUtils.isEmpty(productPrivate.getCmpUuId())) {
                     Component component = findBybrNameAndcmpCode(productPrivate.getPbranden(), productPrivate.getPcmpcode());
                     if (component != null) {
                         //更新物料信息
@@ -2160,7 +2160,7 @@ public class ProductServiceImpl implements ProductService {
                             ps.setObject(11, t.getB2cBranden());
                             ps.setObject(12, t.getBrandId());
                             ps.setObject(13, t.getBranduuid());
-                            ps.setObject(14, (t.getComponentUuId() == null ? 0 : 1));
+                            ps.setObject(14, (StringUtilB2C.isEmpty(t.getComponentUuId()) ? 0 : 1));
                             ps.setObject(15, new Date(System.currentTimeMillis()));
                             ps.setObject(16, t.getSpec());
                             ps.setObject(17, t.getKindName());
@@ -2388,8 +2388,9 @@ public class ProductServiceImpl implements ProductService {
             for (Integer id : list) {
                 prids.add(Long.valueOf(id));
             }
-            List<Product> products = productDao.findProductInId(prids);
-            return products;
+            if (CollectionUtils.isNotEmpty(prids)) {
+                return productDao.findProductInId(prids);
+            }
         }
         return new ArrayList<>();
     }