|
@ -243,6 +243,24 @@ public class MessageService extends BaseService {
|
|
familyMesJson.put("amount", 0);
|
|
familyMesJson.put("amount", 0);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
//专科消息
|
|
|
|
List<Message> specialistList = messageDao.getSpecialistUnRead(doctor);
|
|
|
|
JSONObject specialistMesJson = new JSONObject();
|
|
|
|
JSONArray jsonArray = new JSONArray();
|
|
|
|
if (specialistList != null && specialistList.size() > 0) {
|
|
|
|
specialistMesJson.put("amount", specialistList.size());
|
|
|
|
JSONObject specialistJson = new JSONObject();
|
|
|
|
specialistJson.put("title", specialistList.get(0).getTitle());
|
|
|
|
specialistJson.put("type", specialistList.get(0).getType());
|
|
|
|
specialistJson.put("msg", "您有"+specialistList.size()+"个专科服务消息,请查看!");
|
|
|
|
specialistJson.put("msgTime", DateUtil.dateToStrLong(specialistList.get(0).getCreateTime()));
|
|
|
|
specialistJson.put("relationCode",specialistList.get(0).getRelationCode());
|
|
|
|
specialistJson.put("reason",specialistList.get(0).getReason());
|
|
|
|
specialistMesJson.put("lastMessage", specialistJson);
|
|
|
|
}else{
|
|
|
|
specialistMesJson.put("amount", 0);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
JSONObject json = new JSONObject();
|
|
JSONObject json = new JSONObject();
|
|
json.put("imMsgCount", getImMsgAmount(doctor));//IM消息数量
|
|
json.put("imMsgCount", getImMsgAmount(doctor));//IM消息数量
|
|
@ -254,6 +272,7 @@ public class MessageService extends BaseService {
|
|
json.put("articleCheck", articleMesJson);//健康文章审核消息
|
|
json.put("articleCheck", articleMesJson);//健康文章审核消息
|
|
json.put("deviceUnbind",deviceMesJson);//设备解绑消息
|
|
json.put("deviceUnbind",deviceMesJson);//设备解绑消息
|
|
json.put("familyList",familyMesJson);//居民签约申请
|
|
json.put("familyList",familyMesJson);//居民签约申请
|
|
|
|
json.put("specialistList",specialistMesJson);//专科服务消息
|
|
return json;
|
|
return json;
|
|
}
|
|
}
|
|
|
|
|
|
@ -596,7 +615,7 @@ public class MessageService extends BaseService {
|
|
}
|
|
}
|
|
buffer.deleteCharAt(buffer.length()-1);
|
|
buffer.deleteCharAt(buffer.length()-1);
|
|
buffer.append(")");
|
|
buffer.append(")");
|
|
String sql = " update wlyy_message a set a.has_read = 0,a.over = '0' where a.receiver = ?1 and "+buffer;
|
|
|
|
|
|
String sql = " update wlyy_message a set a.has_read = 0,a.over = '0' where a.receiver = '"+doctor+"' and "+buffer;
|
|
int i = jdbcTemplate.update(sql);
|
|
int i = jdbcTemplate.update(sql);
|
|
return Integer.toString(i);
|
|
return Integer.toString(i);
|
|
|
|
|
|
@ -922,4 +941,5 @@ public class MessageService extends BaseService {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|