|
@ -66,10 +66,10 @@ public class ImJobService {
|
|
|
BaseSystemDialogSetting userSetting = dialogSettingDao.findBySystemTypeAndFunctionType(systemType,"4",1);
|
|
|
if(userSetting!=null){
|
|
|
String content = userSetting.getContent();
|
|
|
String time = timeTransfor(customerSetting.getTime(),customerSetting.getTimeUnit());
|
|
|
String time = timeTransfor(userSetting.getTime(),userSetting.getTimeUnit());
|
|
|
//查找未结束的在线导诊
|
|
|
String sql = "SELECT s.id from "+imDbName+".sessions s,"+imDbName+".doctors d WHERE " +
|
|
|
"s.type='"+type+"' and s.`status`='0' and s.last_message_time<='"+time+"' and s.last_sender_id=d.id ";
|
|
|
"s.type='"+type+"' and s.`status`='0' and s.last_message_time<='"+time+"' and s.last_sender_id=d.id and s.last_sender_id !='customer'";
|
|
|
List<Map<String,Object>> sessionList = jdbcTemplate.queryForList(sql);
|
|
|
for (Map<String,Object> map:sessionList){
|
|
|
String sessionId = map.get("id")+"";
|
|
@ -84,7 +84,7 @@ public class ImJobService {
|
|
|
BaseSystemDialogSetting endSetting = dialogSettingDao.findBySystemTypeAndFunctionType(systemType,"6",1);
|
|
|
if(endSetting!=null){
|
|
|
String content = endSetting.getContent();
|
|
|
String time = timeTransfor(customerSetting.getTime(),customerSetting.getTimeUnit());
|
|
|
String time = timeTransfor(endSetting.getTime(),endSetting.getTimeUnit());
|
|
|
//查找未结束的在线导诊
|
|
|
String sql = "SELECT s.id from im.sessions s WHERE " +
|
|
|
"s.type='"+type+"' and s.`status`='0' and s.last_message_time<='"+time+"' ";
|