Commit bf83b202 by 霍志良

feat:私聊列表咨询服务列表从小到大排序

parent af9255db
...@@ -156,7 +156,7 @@ public class ServiceItemBean { ...@@ -156,7 +156,7 @@ public class ServiceItemBean {
private String extRemark; private String extRemark;
public String minOrderTime; public String minOrderTime;
public String saleAmount; public String saleAmount;
public int sortIndex;
public long getId() { public long getId() {
return id; return id;
} }
...@@ -188,6 +188,13 @@ public class ServiceItemBean { ...@@ -188,6 +188,13 @@ public class ServiceItemBean {
public void setUid(int uid) { public void setUid(int uid) {
this.uid = uid; this.uid = uid;
} }
public int getsortIndex() {
return sortIndex;
}
public void setsortIndex(int sortIndex) {
this.sortIndex = sortIndex;
}
public String getName() { public String getName() {
return name; return name;
......
...@@ -125,7 +125,12 @@ class ExpertConsultServiceView : LinearLayout { ...@@ -125,7 +125,12 @@ class ExpertConsultServiceView : LinearLayout {
} }
} }
} }
lastList.sortedWith(mCompare).forEach { val sortedList= lastList.sortedBy { productsBean: ServiceItemBean.ProductsBean ->
productsBean.productDto.sortIndex
}
sortedList.sortedWith(mCompare).forEach {
val item = ExpertConsultServiceItemView(mContext!!, mListener) val item = ExpertConsultServiceItemView(mContext!!, mListener)
item.setData(it) item.setData(it)
expert_consult_service_service_list.addView(item) expert_consult_service_service_list.addView(item)
......
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