更新为1.7.7
This commit is contained in:
@@ -17,6 +17,7 @@ import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
@UseModel
|
||||
public class TurnipProphet extends Model {
|
||||
public static class TurnipData {
|
||||
@@ -271,14 +272,19 @@ public class TurnipProphet extends Model {
|
||||
out.append("网页版:").append("\n").append(url).append("\n");
|
||||
out.append("祝好运 :)");
|
||||
|
||||
Log.i("TurnipProphet", out.toString()+"\n 发送QQ:"+sendQQ);
|
||||
if (ConfigTools.load(ConfigTools.CONFIG, ConfigTools.TURNIP_PROPHET_SEND_TMP_GROUP, Boolean.class)) {
|
||||
out.append("\n使用者:").append(sendQQ);
|
||||
sendQQ = 891655174L;
|
||||
}
|
||||
|
||||
Log.i("TurnipProphet", out.toString() + "\n 发送QQ:" + sendQQ);
|
||||
QQBotManager.getInstance().sendMessage(sendQQ, getMessage(out.toString()));
|
||||
return prArray.getJSONObject(0).getString(TurnipData.MODEL);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTime(Long qq,String time) {
|
||||
super.onTime(qq,time);
|
||||
public void onTime(Long qq, String time) {
|
||||
super.onTime(qq, time);
|
||||
nowTime = Integer.parseInt(time.split(":")[0]);
|
||||
}
|
||||
|
||||
@@ -295,16 +301,17 @@ public class TurnipProphet extends Model {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
TurnipProphet prophet = new TurnipProphet();
|
||||
String prices="108.93.89.84.79........";
|
||||
String pattern="0";
|
||||
Map<String,String >map=prophet.openTurnip(prices,pattern);
|
||||
prophet.sendQQ(map,prices,pattern);
|
||||
String prices = "108.93.89.84.79........";
|
||||
String pattern = "0";
|
||||
Map<String, String> map = prophet.openTurnip(prices, pattern);
|
||||
prophet.sendQQ(map, prices, pattern);
|
||||
|
||||
}
|
||||
|
||||
|
||||
public Map<String, String> openTurnip(String prices, String pattern) throws Exception {
|
||||
String url = String.format("http://192.168.31.88:7000/?prices=%s%s",
|
||||
String url = String.format("http://%s/?prices=%s%s",
|
||||
ConfigTools.load(ConfigTools.CONFIG, ConfigTools.TURNIP_PROPHET_SERVER, String.class),
|
||||
prices,
|
||||
pattern == null ? "" : "&pattern=" + pattern
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user