|
|
@@ -16,10 +16,7 @@ import com.uas.platform.b2c.prod.commodity.constant.DoubleConstant;
|
|
|
import com.uas.platform.b2c.prod.commodity.constant.ErrorInfoConstant;
|
|
|
import com.uas.platform.b2c.prod.commodity.constant.ShortConstant;
|
|
|
import com.uas.platform.b2c.prod.commodity.constant.UploadConstant;
|
|
|
-import com.uas.platform.b2c.prod.commodity.dao.GoodsDao;
|
|
|
-import com.uas.platform.b2c.prod.commodity.dao.ProductDao;
|
|
|
-import com.uas.platform.b2c.prod.commodity.dao.ProductPrivateDao;
|
|
|
-import com.uas.platform.b2c.prod.commodity.dao.ReleaseProductByBatchDao;
|
|
|
+import com.uas.platform.b2c.prod.commodity.dao.*;
|
|
|
import com.uas.platform.b2c.prod.commodity.model.*;
|
|
|
import com.uas.platform.b2c.prod.commodity.service.GoodsService;
|
|
|
import com.uas.platform.b2c.prod.commodity.service.ReleaseProductByBatchService;
|
|
|
@@ -106,6 +103,9 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
|
|
|
@Autowired
|
|
|
private ProductPrivateDao productPrivateDao;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private ProductPersonDao productPersonDao;
|
|
|
+
|
|
|
@Value("#{sys.productServiceIp}")
|
|
|
private String productServiceIp;
|
|
|
|
|
|
@@ -210,10 +210,13 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
|
|
|
List<Product> productList = productDao.findByEnUUAndPcmpcodeAndPbrandenAndB2cEnabled(enUU,releaseProductByBatch.getB2cCode(),
|
|
|
releaseProductByBatch.getB2cBranden(),IntegerConstant.YES_SHORT);
|
|
|
if (!CollectionUtils.isEmpty(productList)) {
|
|
|
- releaseProductByBatch.setErrmsg(ErrorInfoConstant.REPEAT_INFO.getInfo());
|
|
|
- releaseProductByBatch.setReleaseCode(ReleaseStatus.had_exists.value());
|
|
|
- releaseProductByBatch.setReleaseStatus(ReleaseStatus.had_exists.getPhrase());
|
|
|
- total --;
|
|
|
+ List<ProductPerson> productPersonList = productPersonDao.findByProductId(productList.get(0).getId());
|
|
|
+ if (!CollectionUtils.isEmpty(productPersonList)) {
|
|
|
+ releaseProductByBatch.setErrmsg(ErrorInfoConstant.REPEAT_INFO.getInfo());
|
|
|
+ releaseProductByBatch.setReleaseCode(ReleaseStatus.had_exists.value());
|
|
|
+ releaseProductByBatch.setReleaseStatus(ReleaseStatus.had_exists.getPhrase());
|
|
|
+ total --;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|