package com.ywt.outpatient.service.rpc;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 公众号页面链接定义类
 */
@Service
public class UrlDefServiceProvider {
    @Autowired
    BizConfigurer bizConfigurer;

    /**
     * 太和互联网医生端公众号转诊聊天窗口地址
     */
    public String getThNetDocTransferChatUrl(int orderId, int doctorId) {
        return String.format("%s/thnetdocwe/diagnosis/twoWayChat/%d/%d?msg=1",
                bizConfigurer.getYwtHttpsMsiteDomain(), orderId, doctorId);
    }

    /**
     * 太和互联网医生端公众号转诊聊天窗口地址
     */
    public String getByNetDocTransferChatUrl(int orderId, int doctorId) {
        return String.format("%s/nfyybyfydocwe/diagnosis/twoWayChat/%d/%d?msg=1",
                bizConfigurer.getYwtHttpsMsiteDomain(), orderId, doctorId);
    }

    /**
     * 太和互联网医生端公众号远程会诊聊天窗口地址
     * @param orderId
     * @param doctorId
     * @param sessionId
     * @return
     */
    public String getThNetDoctTreatmentChatUrl(int orderId, int doctorId, String sessionId) {
        return String.format("%s/thnetdocwe/diagnosis/remoteChat/%d/%d/%s",
                bizConfigurer.getYwtHttpsMsiteDomain(), orderId, doctorId, sessionId);
    }

    public String getByNetDoctTreatmentChatUrl(int orderId, int doctorId, String sessionId) {
        return String.format("%s/nfyybyfydocwe/diagnosis/remoteChat/%d/%d/%s",
                bizConfigurer.getYwtHttpsMsiteDomain(), orderId, doctorId, sessionId);
    }

    /**
     * 太和互联网医生端公众号修改个人资料地址
     *
     * @return
     */
    public String getThNetDocEditUrl() {
        return bizConfigurer.getYwtHttpsMsiteDomain() + "/thnetdocwe/editInfo?msg=1";
    }


}
