傅行帆 5 years ago
parent
commit
b80fc3799e

+ 5
- 0
src/main/java/com/huiju/estateagents/entity/TaBuilding.java View File

319
      */
319
      */
320
     @TableField(exist = false)
320
     @TableField(exist = false)
321
     private String priceType;
321
     private String priceType;
322
+
323
+    /**
324
+     * 项目亮点
325
+     */
326
+    private String highlights;
322
 }
327
 }

+ 22
- 10
src/main/java/com/huiju/estateagents/service/impl/TaBuildingServiceImpl.java View File

142
                 if (null != taBuildingProjectType){
142
                 if (null != taBuildingProjectType){
143
                     Integer startPrice = taBuildingProjectType.getStartPrice();
143
                     Integer startPrice = taBuildingProjectType.getStartPrice();
144
                     Integer endPrice = taBuildingProjectType.getEndPrice();
144
                     Integer endPrice = taBuildingProjectType.getEndPrice();
145
-                    if (null != startPrice || null != endPrice){
146
-                        if (startPrice.equals(endPrice)){
147
-                            taBuilding.setPrice(String.valueOf(startPrice));
148
-                        }else {
149
-                            taBuilding.setPrice(startPrice + "--" + endPrice);
150
-                        }
145
+                    if (null != startPrice && null == endPrice){
146
+                        taBuilding.setPrice(String.valueOf(startPrice));
147
+                    }else if (null == startPrice && null != endPrice){
148
+                        taBuilding.setPrice(String.valueOf(endPrice));
149
+                    }else if(null != startPrice && null != endPrice){
150
+                       if (startPrice.equals(endPrice)){
151
+                           taBuilding.setPrice(String.valueOf(startPrice));
152
+                       }else{
153
+                           taBuilding.setPrice(startPrice + "--" + endPrice);
154
+                       }
155
+                    }else{
156
+                        taBuilding.setPrice(null);
151
                     }
157
                     }
152
                     taBuilding.setPriceType(taBuildingProjectType.getPriceType());
158
                     taBuilding.setPriceType(taBuildingProjectType.getPriceType());
153
-                }else {
159
+                } else {
154
                     taBuilding.setPrice(null);
160
                     taBuilding.setPrice(null);
155
                 }
161
                 }
156
             }
162
             }
764
                 if (null != taBuildingProjectType){
770
                 if (null != taBuildingProjectType){
765
                     Integer startPrice = taBuildingProjectType.getStartPrice();
771
                     Integer startPrice = taBuildingProjectType.getStartPrice();
766
                     Integer endPrice = taBuildingProjectType.getEndPrice();
772
                     Integer endPrice = taBuildingProjectType.getEndPrice();
767
-                    if (null != startPrice || null != endPrice){
773
+                    if (null != startPrice && null == endPrice){
774
+                        build.setPrice(String.valueOf(startPrice));
775
+                    }else if (null == startPrice && null != endPrice){
776
+                        build.setPrice(String.valueOf(endPrice));
777
+                    }else if(null != startPrice && null != endPrice){
768
                         if (startPrice.equals(endPrice)){
778
                         if (startPrice.equals(endPrice)){
769
                             build.setPrice(String.valueOf(startPrice));
779
                             build.setPrice(String.valueOf(startPrice));
770
-                        }else {
780
+                        }else{
771
                             build.setPrice(startPrice + "--" + endPrice);
781
                             build.setPrice(startPrice + "--" + endPrice);
772
                         }
782
                         }
783
+                    }else{
784
+                        build.setPrice(null);
773
                     }
785
                     }
774
                     build.setPriceType(taBuildingProjectType.getPriceType());
786
                     build.setPriceType(taBuildingProjectType.getPriceType());
775
-                }else {
787
+                } else {
776
                     build.setPrice(null);
788
                     build.setPrice(null);
777
                 }
789
                 }
778
             }
790
             }