yzc 1 vuosi sitten
vanhempi
commit
1814190f6f

+ 1 - 1
hx-item/src/main/java/com/fjhx/item/entity/product/dto/ProductInfoSelectDto.java

@@ -109,7 +109,7 @@ public class ProductInfoSelectDto extends BaseSelectDto {
     /**
      * 是否配置原材料 1有配置原材料 0没配置原材料的产品
      */
-    private Long isRawMaterial;
+    private Integer isRawMaterial;
 
 
 }

+ 4 - 4
hx-item/src/main/java/com/fjhx/item/service/product/impl/ProductInfoServiceImpl.java

@@ -105,14 +105,14 @@ public class ProductInfoServiceImpl extends ServiceImpl<ProductInfoMapper, Produ
         wrapper.eq(ProductInfo::getCompanyId, dto.getCompanyId());
 
         //过滤产品是否配置原材料
-        Long isRawMaterial = dto.getIsRawMaterial();
+        Integer isRawMaterial = dto.getIsRawMaterial();
         if (ObjectUtil.isNotEmpty(isRawMaterial)) {
             if (isRawMaterial.equals(1)) {
                 //过滤有配置原材料的产品
-                wrapper.isNotNull("pi.rawMaterialId");
+                wrapper.isNotNull("pi.raw_material_id");
             } else {
-                //过滤没配置原材料的产品
-                wrapper.isNull("pi.rawMaterialId");
+                //过滤没原材料的产品
+                wrapper.isNull("pi.raw_material_id");
             }
         }