You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
1.5 KiB
43 lines
1.5 KiB
package com.fr.plugin.demo.message; |
|
|
|
import com.fr.decision.system.message.imagemessage.MessageImage; |
|
import com.fr.decision.system.message.type.MessageType; |
|
import com.fr.intelli.record.Focus; |
|
import com.fr.intelli.record.Original; |
|
|
|
import com.fr.plugin.templatemessage.message.entity.ImageMessage; |
|
import com.fr.record.analyzer.EnableMetrics; |
|
import com.fr.report.fun.impl.AbstractMessageObjectProvider; |
|
import com.fr.stable.collections.combination.Pair; |
|
|
|
|
|
@EnableMetrics |
|
public class WeChatMessageObject extends AbstractMessageObjectProvider { |
|
public MessageType getMessageType() { |
|
return WeChatMsgType.KEY; |
|
} |
|
|
|
public Pair<String, String>[] getValueEditorItems() { |
|
Pair<String, String>[] pairArray = new Pair[5]; |
|
pairArray[0] = new Pair<String, String>("ABC", "1001"); |
|
pairArray[1] = new Pair<String, String>("BCD", "1002"); |
|
pairArray[2] = new Pair<String, String>("DEF", "1003"); |
|
pairArray[3] = new Pair<String, String>("EFG", "1004"); |
|
pairArray[4] = new Pair<String, String>("GHL", "1005"); |
|
|
|
|
|
return pairArray; |
|
} |
|
|
|
@Focus(id = "com.fr.plugin.demo.message", text = "Fine-Plugin-Demo-message", source = Original.PLUGIN) |
|
public void sendMessage(MessageImage message) { |
|
try { |
|
ImageMessage imageMessage = (ImageMessage) message; |
|
System.out.println(imageMessage.getApplication() + imageMessage.getContent() + |
|
imageMessage.getLink() + imageMessage.getSenderId()); |
|
} catch (Exception e) { |
|
|
|
} |
|
} |
|
} |
|
|
|
|