Commit 1e8b4259 by 刘鹏

fix:IM模块确认订单传serviceId

parent 576cae68
......@@ -10,7 +10,7 @@ ext {
"m-fm" : "0.0.30.03",
"m-user" : "0.0.61.31",
"m-home" : "0.0.22.61",
"m-im" : "0.0.18.58",
"m-im" : "0.0.18.59",
"m-dynamic" : "0.0.7.22",
"m-article" : "0.0.0.8",
......@@ -93,7 +93,7 @@ ext {
"m-fm" : "0.0.30.01",
"m-user" : "0.0.61.31",
"m-home" : "0.0.22.61",
"m-im" : "0.0.18.58",
"m-im" : "0.0.18.59",
"m-dynamic" : "0.0.7.22",
"m-article" : "0.0.0.6",
......
......@@ -8,6 +8,7 @@ public class CustomAttachmentConfirmOrder extends CustomAttachment {
private static final String BOOKINGTIME = "bookingTime";///咨询时间
private static final String SERVICETYPE = "serviceType";//服务方式
private static final String ORDERID = "orderId";//订单号
private static final String SERVICEID = "serviceId";//订单号
private static final String NEWSORDERID = "newsOrderId";//用于跳转新版订单详情
private static final String URL = "url";//跳转链接
......@@ -35,6 +36,7 @@ public class CustomAttachmentConfirmOrder extends CustomAttachment {
this.bookingTime = data.getString(BOOKINGTIME);
this.servicetype = data.getString(SERVICETYPE);
this.orderId = data.getString(ORDERID);
this.serviceId = data.getString(SERVICEID);
this.newsOrderId = data.getString(NEWSORDERID);
this.url = data.getString(URL);
......@@ -48,6 +50,7 @@ public class CustomAttachmentConfirmOrder extends CustomAttachment {
data.put(BOOKINGTIME, bookingTime);
data.put(SERVICETYPE, servicetype);
data.put(ORDERID, orderId);
data.put(SERVICEID, serviceId);
data.put(NEWSORDERID, newsOrderId);
data.put(URL, url);
return data;
......
......@@ -50,6 +50,8 @@ public class MsgViewHolderConfirmOrder extends MsgViewHolderBase {
public String url;
/***订单id*/
public String orderId;
/***服务单id*/
public String serviceId;
/***0 未确认 1已确认*/
public int flag;
public boolean isSureed = false;//是否已确认
......@@ -98,6 +100,7 @@ public class MsgViewHolderConfirmOrder extends MsgViewHolderBase {
tv_type.setText(customAttachment.servicetype == null ? "" : customAttachment.servicetype);
url = customAttachment.url;
orderId = customAttachment.orderId;
serviceId = customAttachment.serviceId;
flag = customAttachment.status;
if (flag == 1) {
......@@ -120,7 +123,7 @@ public class MsgViewHolderConfirmOrder extends MsgViewHolderBase {
//确认接口
ToastUtil.toastShort(context, "发送中...");
String str = new Gson().toJson(new OrderStatusBean(orderId, String.valueOf(flag)));
String str = new Gson().toJson(new OrderStatusBean(serviceId != null ? serviceId : orderId, String.valueOf(flag)));
RequestBody body = RequestBody.create(MediaType.parse("application/json; charset=utf-8"), str);
Disposable subscribe = ImRetrofitApi.Companion.getImRetrofitApi().standardOrderServiceOperation(body)
......@@ -138,34 +141,35 @@ public class MsgViewHolderConfirmOrder extends MsgViewHolderBase {
}
try {
Map<String,Object> map = message.getLocalExtension();
if (map!=null){
Map<String, Object> map = message.getLocalExtension();
if (map != null) {
Object obj = map.get("isSure");
Object exp = map.get("isExpired");
if (obj!=null){
if (obj != null) {
boolean b = (boolean) obj;
if (flag == 1 || b){
if (flag == 1 || b) {
updateSureView("已确认");
}
}else if (exp!=null){
} else if (exp != null) {
boolean expb = (boolean) exp;
if (expb){
if (expb) {
updateSureView("已确认");
}
}else {
} else {
isSureed = false;
tv_submit.setText("确认");
tv_submit.setEnabled(true);
tv_submit.setBackground(ContextCompat.getDrawable(context,R.drawable.bg_radius_green_linear_12));
tv_submit.setBackground(ContextCompat.getDrawable(context, R.drawable.bg_radius_green_linear_12));
}
}else {
} else {
isSureed = false;
tv_submit.setText("确认");
tv_submit.setEnabled(true);
tv_submit.setBackground(ContextCompat.getDrawable(context,R.drawable.bg_radius_green_linear_12));
tv_submit.setBackground(ContextCompat.getDrawable(context, R.drawable.bg_radius_green_linear_12));
}
}catch (Exception e){}
} catch (Exception e) {
}
hideItemBg();
}
......
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