|
@ -9,8 +9,27 @@ import org.json.JSONObject;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
|
|
|
|
public class SendPatientUtil {
|
|
|
public static String sendToPatient(String from,String fromName,String to,String contentType,String content,String title,String type){
|
|
|
public class SendPatientUtil extends Thread {
|
|
|
private String from;
|
|
|
private String fromName;
|
|
|
private String to;
|
|
|
private String contentType;
|
|
|
private String content;
|
|
|
private String title;
|
|
|
private String type;
|
|
|
|
|
|
public SendPatientUtil(String from,String fromName,String to,String contentType,String content,String title,String type){
|
|
|
this.from = from;
|
|
|
this.fromName = fromName;
|
|
|
this.to = to;
|
|
|
this.contentType = contentType;
|
|
|
this.content = content;
|
|
|
this.title = title;
|
|
|
this.type = type;
|
|
|
}
|
|
|
|
|
|
|
|
|
public String sendToPatient(String from,String fromName,String to,String contentType,String content,String title,String type){
|
|
|
JSONObject participants = new JSONObject();
|
|
|
participants.put(from,2);
|
|
|
participants.put(to,0);
|
|
@ -24,4 +43,8 @@ public class SendPatientUtil {
|
|
|
JSONObject session = sessionJson.getJSONObject("data");
|
|
|
return ImUtill.sendImMsg(from,fromName,session.getString("id"),contentType,content,"1");
|
|
|
}
|
|
|
|
|
|
public void run(){
|
|
|
this.sendToPatient(from,fromName,to,contentType,content,title,type);
|
|
|
}
|
|
|
}
|