Commit 5ca9ee2a authored by 覃振观's avatar 覃振观 👶

颜色表,ID 字段数据类型更改

parent c556c675
...@@ -106,7 +106,7 @@ public class ProductApplicationImpl implements ProductApplication { ...@@ -106,7 +106,7 @@ public class ProductApplicationImpl implements ProductApplication {
// --------------------------------- 版面查询 --------------------------------- // --------------------------------- 版面查询 ---------------------------------
if(productDetail != null) { if(productDetail != null) {
if(productDetail.getBackProductFaceId() != null) { if(productDetail.getBackProductFaceId() != null) {
ProductFace frontFace = faceRepository.findByProductFaceIdEquals(productDetail.getBackProductFaceId()); ProductFace frontFace = faceRepository.findByProductFaceId(productDetail.getBackProductFaceId());
ArrayList <ProductFaceColor> fronColors = ArrayList <ProductFaceColor> fronColors =
(ArrayList<ProductFaceColor>) faceColorRepository.findByProductFaceId(productDetail.getBackProductFaceId()); (ArrayList<ProductFaceColor>) faceColorRepository.findByProductFaceId(productDetail.getBackProductFaceId());
assemble.put("frontFace", frontFace); assemble.put("frontFace", frontFace);
...@@ -120,7 +120,7 @@ public class ProductApplicationImpl implements ProductApplication { ...@@ -120,7 +120,7 @@ public class ProductApplicationImpl implements ProductApplication {
assemble.put("fronColors", fronColors); assemble.put("fronColors", fronColors);
} }
if(productDetail.getBackProductFaceId() != null) { if(productDetail.getBackProductFaceId() != null) {
ProductFace backFace = faceRepository.findByProductFaceIdEquals(productDetail.getBackProductFaceId()); ProductFace backFace = faceRepository.findByProductFaceId(productDetail.getBackProductFaceId());
ArrayList <ProductFaceColor> backColors = ArrayList <ProductFaceColor> backColors =
(ArrayList<ProductFaceColor>) faceColorRepository.findByProductFaceId(productDetail.getBackProductFaceId()); (ArrayList<ProductFaceColor>) faceColorRepository.findByProductFaceId(productDetail.getBackProductFaceId());
assemble.put("backFace", backFace); assemble.put("backFace", backFace);
......
...@@ -66,14 +66,14 @@ public class ProductDetail implements Serializable { ...@@ -66,14 +66,14 @@ public class ProductDetail implements Serializable {
/** /**
* 产品背面ID * 产品背面ID
*/ */
@Column(name = "back_product_face_id", nullable = true, length = 32) @Column(name = "back_product_face_id", nullable = true)
private String backProductFaceId; private BigDecimal backProductFaceId;
/** /**
* 产品正面ID * 产品正面ID
*/ */
@Column(name = "right_product_face_id", nullable = true, length = 32) @Column(name = "right_product_face_id", nullable = true)
private String rightProductFaceId; private BigDecimal rightProductFaceId;
/** /**
* 产品承印物 * 产品承印物
...@@ -190,20 +190,20 @@ public class ProductDetail implements Serializable { ...@@ -190,20 +190,20 @@ public class ProductDetail implements Serializable {
this.productShortName = productShortName; this.productShortName = productShortName;
} }
public String getBackProductFaceId() { public BigDecimal getBackProductFaceId() {
return this.backProductFaceId; return this.backProductFaceId;
} }
public void setBackProductFaceId(String backProductFaceId) { public void setBackProductFaceId(String backProductFaceId) {
this.backProductFaceId = backProductFaceId; this.backProductFaceId = (backProductFaceId == null) || backProductFaceId.isEmpty() ? null : new BigDecimal(backProductFaceId);
} }
public String getRightProductFaceId() { public BigDecimal getRightProductFaceId() {
return this.rightProductFaceId; return this.rightProductFaceId;
} }
public void setRightProductFaceId(String rightProductFaceId) { public void setRightProductFaceId(String rightProductFaceId) {
this.rightProductFaceId = rightProductFaceId; this.rightProductFaceId = (rightProductFaceId == null) || rightProductFaceId.isEmpty() ? null : new BigDecimal(rightProductFaceId);
} }
public String getProductSubstrate() { public String getProductSubstrate() {
......
...@@ -34,13 +34,13 @@ public class ProductFaceColor implements Serializable { ...@@ -34,13 +34,13 @@ public class ProductFaceColor implements Serializable {
* 产品版面ID * 产品版面ID
*/ */
@Column(name = "product_face_id", nullable = true, length = 32) @Column(name = "product_face_id", nullable = true, length = 32)
private String productFaceId; private BigDecimal productFaceId;
/** /**
* 颜色ID * 颜色ID
*/ */
@Column(name = "color_id", nullable = true, length = 32) @Column(name = "color_id", nullable = true, length = 32)
private String colorId; private BigDecimal colorId;
/** /**
* 覆盖率(单位%) * 覆盖率(单位%)
...@@ -62,20 +62,20 @@ public class ProductFaceColor implements Serializable { ...@@ -62,20 +62,20 @@ public class ProductFaceColor implements Serializable {
this.productFaceColorId = (productFaceColorId == null) || productFaceColorId.isEmpty() ? null : new BigDecimal(productFaceColorId); this.productFaceColorId = (productFaceColorId == null) || productFaceColorId.isEmpty() ? null : new BigDecimal(productFaceColorId);
} }
public String getProductFaceId() { public BigDecimal getProductFaceId() {
return this.productFaceId; return this.productFaceId;
} }
public void setProductFaceId(String productFaceId) { public void setProductFaceId(String productFaceId) {
this.productFaceId = productFaceId; this.productFaceId = (productFaceId == null) || productFaceId.isEmpty() ? null : new BigDecimal(productFaceId);
} }
public String getColorId() { public BigDecimal getColorId() {
return this.colorId; return this.colorId;
} }
public void setColorId(String colorId) { public void setColorId(String colorId) {
this.colorId = colorId; this.colorId = (colorId == null) || colorId.isEmpty() ? null : new BigDecimal(colorId);
} }
public Double getCoverageRate() { public Double getCoverageRate() {
......
...@@ -3,6 +3,7 @@ package com.huigou.topsun.product.repository; ...@@ -3,6 +3,7 @@ package com.huigou.topsun.product.repository;
import com.huigou.topsun.product.domain.ProductFaceColor; import com.huigou.topsun.product.domain.ProductFaceColor;
import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaRepository;
import java.math.BigDecimal;
import java.util.List; import java.util.List;
/** /**
...@@ -11,5 +12,5 @@ import java.util.List; ...@@ -11,5 +12,5 @@ import java.util.List;
* @Description: * @Description:
*/ */
public interface ProductFaceColorRepository extends JpaRepository<ProductFaceColor,String> { public interface ProductFaceColorRepository extends JpaRepository<ProductFaceColor,String> {
List<ProductFaceColor> findByProductFaceId(String productFaceId); List<ProductFaceColor> findByProductFaceId(BigDecimal productFaceId);
} }
...@@ -3,11 +3,14 @@ package com.huigou.topsun.product.repository; ...@@ -3,11 +3,14 @@ package com.huigou.topsun.product.repository;
import com.huigou.topsun.product.domain.ProductFace; import com.huigou.topsun.product.domain.ProductFace;
import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaRepository;
import java.math.BigDecimal;
/** /**
* @Auther: xin.lu * @Auther: xin.lu
* @Date: 2023/11/22/10:41 * @Date: 2023/11/22/10:41
* @Description: * @Description:
*/ */
public interface ProductFaceRepository extends JpaRepository<ProductFace,String> { public interface ProductFaceRepository extends JpaRepository<ProductFace,String> {
ProductFace findByProductFaceId(BigDecimal productFaceId);
ProductFace findByProductFaceIdEquals(String productFaceId); ProductFace findByProductFaceIdEquals(String productFaceId);
} }
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