浏览代码

Merge branch 'feature-refactor' of yeshijie/im.doctor into feature-refactor

yeshijie 7 年之前
父节点
当前提交
5613ca90d2
共有 2 个文件被更改,包括 7 次插入2 次删除
  1. 6 1
      src/server/models/client/wechat.client.js
  2. 1 1
      src/server/repository/mysql/participant.repo.js

+ 6 - 1
src/server/models/client/wechat.client.js

@ -265,6 +265,11 @@ class WechatClient extends RedisModel {
                            break;
                    }
                    let first = "您的健康咨询有新的回复";
                    if(targetUserId!=message.sender_id){
                        first = "您的家人("+message.sender_name+")的健康咨询有新的回复";
                    }
                    // 发送模板消息
                    WechatSDK.sendTemplateMessage({
                        touser: openid,
@ -272,7 +277,7 @@ class WechatClient extends RedisModel {
                        url: config.wechatConfig.baseUrl + "/wx/html/yszx/html/consulting-doctor.html?openid=" + openid +
                        "&consult=" + topic.id + "&toUser=" + targetUserId + "&toName=" + targetUserName+"&represented="+message.sender_id,
                        data: {
                            first: {value: "您的健康咨询有新的回复", color: "#000000"}
                            first: {value: first, color: "#000000"}
                            , remark: {value: "", color: "#000000"}
                            , keyword1: {value: topic.description, color: "#000000"}
                            , keyword2: {value: replyContent, color: "#000000"}

+ 1 - 1
src/server/repository/mysql/participant.repo.js

@ -91,7 +91,7 @@ class ParticipantRepo {
        let sql =
            "SELECT u.id, u.name, true is_patient, p.participant_role,u.avatar " +
            "FROM sessions s, participants p, patients u ,wlyy.wlyy_patient_family_member m " +
            "WHERE s.id = ? and s.id = p.session_id and p.participant_id = m.id AND m.family_member = u.id";
            "WHERE s.id = ? and s.id = p.session_id and p.participant_id = m.patient AND m.family_member = u.id and m.is_authorize = 1 ";
        //新增发送代理人
        ImDb.execQuery({