Ver código fonte

微信端推送方法分离

lyr 8 anos atrás
pai
commit
dacbd3e129
1 arquivos alterados com 1 adições e 9 exclusões
  1. 1 9
      src/doctor/models/patient.js

+ 1 - 9
src/doctor/models/patient.js

@ -81,15 +81,7 @@ class Patient extends BaseModel {
                modelUtil.emitData(self.eventEmitter, Doctor.fillMessages(msg));
                // 通过Web Socket推送给患者
                let patientClient = clientCache.findById(message.to);
                if (!patientClient) {
                    log.warn("User is not online, user id: ", message.to);
                    //发送微信模板消息
                    self.sendConsultWechatReplyTempMsg(message);
                    return;
                }
                patientClient.socketServer.sockets.emit('message', message);
                self.pushGroupMessage(message);
            });
            // 更新自身的聊天统计信息