|
@@ -25,6 +25,8 @@ import java.io.FileOutputStream;
|
|
|
import java.io.UnsupportedEncodingException;
|
|
import java.io.UnsupportedEncodingException;
|
|
|
import java.util.*;
|
|
import java.util.*;
|
|
|
|
|
|
|
|
|
|
+import static sun.plugin2.os.windows.OSVERSIONINFOA.size;
|
|
|
|
|
+
|
|
|
@Service("ConversationContentService")
|
|
@Service("ConversationContentService")
|
|
|
public class ConversationContentServiceImpl implements ConversationContentService {
|
|
public class ConversationContentServiceImpl implements ConversationContentService {
|
|
|
|
|
|
|
@@ -149,13 +151,20 @@ public class ConversationContentServiceImpl implements ConversationContentServic
|
|
|
if(!msgtype.equals("text")){
|
|
if(!msgtype.equals("text")){
|
|
|
if (msgtype.equals("mixed")){
|
|
if (msgtype.equals("mixed")){
|
|
|
System.out.println(jsonObject);
|
|
System.out.println(jsonObject);
|
|
|
- for (int j = 0; j < jsonObject.getJSONArray("mixed").size(); j++) {
|
|
|
|
|
- String url=pushFileUrl(sdk,msgtype,jsonObject);
|
|
|
|
|
|
|
+ com.alibaba.fastjson.JSONArray mixed = jsonObject.getJSONArray("mixed");
|
|
|
|
|
+ for (int j = 0; j < mixed.size(); j++) {
|
|
|
|
|
+ com.alibaba.fastjson.JSONObject e = mixed.getJSONObject(j);
|
|
|
|
|
+ if (e.getString("msgtype").equals("text")){
|
|
|
|
|
+ String content = pushFileUrl(sdk,e.getString("msgtype"),e);
|
|
|
|
|
+ chatMsg.setContent(content);
|
|
|
|
|
+ }else {
|
|
|
|
|
+ String url = pushFileUrl(sdk,e.getString("msgtype"),e);
|
|
|
|
|
+ chatMsg.setMsgurl(url);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
}else {
|
|
}else {
|
|
|
String url=pushFileUrl(sdk,msgtype,jsonObject);
|
|
String url=pushFileUrl(sdk,msgtype,jsonObject);
|
|
|
- chatMsg.setContent(url);
|
|
|
|
|
|
|
+ chatMsg.setMsgurl(url);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
}
|
|
}
|