Commit f5667298 authored by 覃振观's avatar 覃振观 👶

Entity 遗漏

parent 3bbc22a0
......@@ -80,7 +80,7 @@ public class ProductApplicationImpl implements ProductApplication {
@Override
public Map<String, Object> queryDetailAll(Product product) {
Map<String, Object> resultMap = new HashMap<>(200);
BigDecimal productId = product.getProductId();
String productId = product.getProductId();
ProductDetail productDetail = detailRepository.findByProductId(productId);
ProductTechnology productTechnology = technologyRepository.findByProductId(productId);
......@@ -181,7 +181,7 @@ public class ProductApplicationImpl implements ProductApplication {
List<Product> products = query.getResultList();
if(product != null) {
BigDecimal id = product.getProductId();
String id = product.getProductId();
if(id == null) {
product.setProductId(String.valueOf(Snowflake.nextId()));
entityManager.persist(product);
......@@ -189,7 +189,7 @@ public class ProductApplicationImpl implements ProductApplication {
entityManager.merge(product);
}
if(productDetail != null) {
BigDecimal id = productDetail.getProductDetailId();
String id = productDetail.getProductDetailId();
if(id == null) {
productDetail.setProductDetailId(String.valueOf(Snowflake.nextId()));
entityManager.persist(productDetail);
......@@ -197,7 +197,7 @@ public class ProductApplicationImpl implements ProductApplication {
entityManager.merge(productDetail);
}
if(productLooked != null) {
BigDecimal id = productLooked.getProductLookedId();
String id = productLooked.getProductLookedId();
if(id == null) {
productLooked.setProductLookedId(String.valueOf(Snowflake.nextId()));
entityManager.persist(productLooked);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment