Browse Source

1.添加医生打分功能

王鹏鹏 2 years ago
parent
commit
38592ea918

+ 7 - 0
baselib/src/main/java/com/yingyangfly/baselib/db/DoctorBean.java

@@ -120,6 +120,13 @@ public class DoctorBean implements Serializable {
         return goodRate;
     }
 
+    public String getGoodRateInfo() {
+        if (TextUtils.isEmpty(getGoodRate())) {
+            return "";
+        }
+        return getGoodRate() + "%";
+    }
+
     public void setGoodRate(String goodRate) {
         this.goodRate = goodRate;
     }

+ 1 - 1
healthconsultation/src/main/res/layout/activity_doctor_details.xml

@@ -166,7 +166,7 @@
                         android:layout_height="wrap_content"
                         android:layout_marginTop="@dimen/divider_23px"
                         android:layout_marginEnd="@dimen/divider_26px"
-                        android:text='@{"好评率"+data.goodRate}'
+                        android:text='@{"好评率"+data.getGoodRateInfo()}'
                         android:textColor="@color/color_FFFF9E05"
                         android:textSize="@dimen/divider_24px"
                         app:layout_constraintEnd_toEndOf="parent"