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

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

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