同步专业版SDK
This commit is contained in:
+1
@@ -0,0 +1 @@
|
|||||||
|
alter table `t_messages` modify column `_target` varchar(129) NOT NULL;
|
||||||
+37
@@ -0,0 +1,37 @@
|
|||||||
|
alter table `t_messages` modify column `_target` varchar(129) NOT NULL;
|
||||||
|
alter table `t_messages_0` modify column `_target` varchar(129) NOT NULL;
|
||||||
|
alter table `t_messages_1` modify column `_target` varchar(129) NOT NULL;
|
||||||
|
alter table `t_messages_2` modify column `_target` varchar(129) NOT NULL;
|
||||||
|
alter table `t_messages_3` modify column `_target` varchar(129) NOT NULL;
|
||||||
|
alter table `t_messages_4` modify column `_target` varchar(129) NOT NULL;
|
||||||
|
alter table `t_messages_5` modify column `_target` varchar(129) NOT NULL;
|
||||||
|
alter table `t_messages_6` modify column `_target` varchar(129) NOT NULL;
|
||||||
|
alter table `t_messages_7` modify column `_target` varchar(129) NOT NULL;
|
||||||
|
alter table `t_messages_8` modify column `_target` varchar(129) NOT NULL;
|
||||||
|
alter table `t_messages_9` modify column `_target` varchar(129) NOT NULL;
|
||||||
|
alter table `t_messages_10` modify column `_target` varchar(129) NOT NULL;
|
||||||
|
alter table `t_messages_11` modify column `_target` varchar(129) NOT NULL;
|
||||||
|
alter table `t_messages_12` modify column `_target` varchar(129) NOT NULL;
|
||||||
|
alter table `t_messages_13` modify column `_target` varchar(129) NOT NULL;
|
||||||
|
alter table `t_messages_14` modify column `_target` varchar(129) NOT NULL;
|
||||||
|
alter table `t_messages_15` modify column `_target` varchar(129) NOT NULL;
|
||||||
|
alter table `t_messages_16` modify column `_target` varchar(129) NOT NULL;
|
||||||
|
alter table `t_messages_17` modify column `_target` varchar(129) NOT NULL;
|
||||||
|
alter table `t_messages_18` modify column `_target` varchar(129) NOT NULL;
|
||||||
|
alter table `t_messages_19` modify column `_target` varchar(129) NOT NULL;
|
||||||
|
alter table `t_messages_20` modify column `_target` varchar(129) NOT NULL;
|
||||||
|
alter table `t_messages_21` modify column `_target` varchar(129) NOT NULL;
|
||||||
|
alter table `t_messages_22` modify column `_target` varchar(129) NOT NULL;
|
||||||
|
alter table `t_messages_23` modify column `_target` varchar(129) NOT NULL;
|
||||||
|
alter table `t_messages_24` modify column `_target` varchar(129) NOT NULL;
|
||||||
|
alter table `t_messages_25` modify column `_target` varchar(129) NOT NULL;
|
||||||
|
alter table `t_messages_26` modify column `_target` varchar(129) NOT NULL;
|
||||||
|
alter table `t_messages_27` modify column `_target` varchar(129) NOT NULL;
|
||||||
|
alter table `t_messages_28` modify column `_target` varchar(129) NOT NULL;
|
||||||
|
alter table `t_messages_29` modify column `_target` varchar(129) NOT NULL;
|
||||||
|
alter table `t_messages_30` modify column `_target` varchar(129) NOT NULL;
|
||||||
|
alter table `t_messages_31` modify column `_target` varchar(129) NOT NULL;
|
||||||
|
alter table `t_messages_32` modify column `_target` varchar(129) NOT NULL;
|
||||||
|
alter table `t_messages_33` modify column `_target` varchar(129) NOT NULL;
|
||||||
|
alter table `t_messages_34` modify column `_target` varchar(129) NOT NULL;
|
||||||
|
alter table `t_messages_35` modify column `_target` varchar(129) NOT NULL;
|
||||||
@@ -139,6 +139,7 @@ public interface APIPath {
|
|||||||
String Robot_User_Info = "/robot/user_info";
|
String Robot_User_Info = "/robot/user_info";
|
||||||
String Robot_Get_Profile = "/robot/profile";
|
String Robot_Get_Profile = "/robot/profile";
|
||||||
String Robot_Message_Send = "/robot/message/send";
|
String Robot_Message_Send = "/robot/message/send";
|
||||||
|
String Robot_Message_Reply = "/robot/message/reply";
|
||||||
String Robot_Message_Recall = "/robot/message/recall";
|
String Robot_Message_Recall = "/robot/message/recall";
|
||||||
String Robot_Message_Update = "/robot/message/update";
|
String Robot_Message_Update = "/robot/message/update";
|
||||||
String Robot_Set_Callback = "/robot/set_callback";
|
String Robot_Set_Callback = "/robot/set_callback";
|
||||||
|
|||||||
@@ -0,0 +1,52 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of the Wildfire Chat package.
|
||||||
|
* (c) Heavyrain2012 <[email protected]>
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package cn.wildfirechat.pojos;
|
||||||
|
|
||||||
|
import cn.wildfirechat.proto.WFCMessage;
|
||||||
|
import io.netty.util.internal.StringUtil;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class ReplyMessageData {
|
||||||
|
private long messageUid;
|
||||||
|
private MessagePayload payload;
|
||||||
|
private boolean only2Sender;
|
||||||
|
|
||||||
|
public long getMessageUid() {
|
||||||
|
return messageUid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMessageUid(long messageUid) {
|
||||||
|
this.messageUid = messageUid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MessagePayload getPayload() {
|
||||||
|
return payload;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPayload(MessagePayload payload) {
|
||||||
|
this.payload = payload;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isOnly2Sender() {
|
||||||
|
return only2Sender;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOnly2Sender(boolean only2Sender) {
|
||||||
|
this.only2Sender = only2Sender;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean isValide(ReplyMessageData sendMessageData) {
|
||||||
|
if(sendMessageData.messageUid <=0 ||
|
||||||
|
sendMessageData.getPayload() == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -39,6 +39,15 @@ public class RobotService implements Closeable {
|
|||||||
return robotHttpUtils.httpJsonPost(path, messageData, SendMessageResult.class);
|
return robotHttpUtils.httpJsonPost(path, messageData, SendMessageResult.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public IMResult<SendMessageResult> replyMessage(long messageUid, MessagePayload payload, boolean only2Sender) throws Exception {
|
||||||
|
String path = APIPath.Robot_Message_Reply;
|
||||||
|
ReplyMessageData messageData = new ReplyMessageData();
|
||||||
|
messageData.setMessageUid(messageUid);
|
||||||
|
messageData.setOnly2Sender(only2Sender);
|
||||||
|
messageData.setPayload(payload);
|
||||||
|
return robotHttpUtils.httpJsonPost(path, messageData, SendMessageResult.class);
|
||||||
|
}
|
||||||
|
|
||||||
public IMResult<String> recallMessage(long messageUid) throws Exception {
|
public IMResult<String> recallMessage(long messageUid) throws Exception {
|
||||||
String path = APIPath.Robot_Message_Recall;
|
String path = APIPath.Robot_Message_Recall;
|
||||||
RecallMessageData messageData = new RecallMessageData();
|
RecallMessageData messageData = new RecallMessageData();
|
||||||
|
|||||||
Reference in New Issue
Block a user