|
@ -349,9 +349,9 @@ public class TalkGroupService extends BaseService {
|
|
|
if (result != null && result.length() > 0) {
|
|
|
for (int i = 0; i < result.length(); i++) {
|
|
|
JSONObject obj = result.getJSONObject(i);
|
|
|
if (obj.getInt("msg_type") == 1) {
|
|
|
if (obj.getInt("msg_type") == 1 && obj.get("peer_uid") != null) {
|
|
|
JSONObject objRe = new JSONObject();
|
|
|
Doctor fromDoctor = doctorDao.findByCode(obj.getString("peer_uid"));
|
|
|
Doctor fromDoctor = doctorDao.findByCode(obj.get("peer_uid").toString());
|
|
|
|
|
|
if(fromDoctor == null){
|
|
|
continue;
|
|
@ -363,14 +363,14 @@ public class TalkGroupService extends BaseService {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
objRe.put("uid",obj.getString("uid") != null ? obj.getString("uid") :"");
|
|
|
objRe.put("fromUid",obj.getString("peer_uid") != null ? obj.getString("peer_uid") : "");
|
|
|
objRe.put("uid",obj.get("uid") != null ? obj.getString("uid") :"");
|
|
|
objRe.put("fromUid",obj.get("peer_uid") != null ? obj.get("peer_uid").toString() : "");
|
|
|
objRe.put("fromName",fromDoctor.getName());
|
|
|
objRe.put("fromLevel",fromDoctor.getLevel());
|
|
|
objRe.put("photo",StringUtils.isEmpty(fromDoctor.getPhoto())?"":fromDoctor.getPhoto());
|
|
|
objRe.put("sex",fromDoctor.getSex());
|
|
|
objRe.put("lastContentType",obj.getInt("last_content_type"));
|
|
|
objRe.put("lastContent",new String(obj.getString("last_content").getBytes(),"utf-8"));
|
|
|
objRe.put("lastContent",obj.get("last_content") != null?new String(obj.getString("last_content").getBytes(),"utf-8"):"");
|
|
|
objRe.put("newMsgCount",obj.getInt("new_msg_count"));
|
|
|
objRe.put("lastMsgTime",obj.getLong("timestamp"));
|
|
|
|