调整天使动漫签到时间
修复大头菜不记录上周趋势的BUG 调整汇报大头菜结果时加入网页地址
This commit is contained in:
parent
e0751972a3
commit
66ae1c4e8b
@ -116,6 +116,9 @@ public class TurnipProphet extends Model {
|
||||
if (StringUtils.isEmpty(data) || getDay() == 0) {
|
||||
array = new JSONArray();
|
||||
json = new JSONObject();
|
||||
if (getDay() == 0 && !StringUtils.isEmpty(data)) {
|
||||
json = JSONObject.parseObject(data);
|
||||
}
|
||||
array.add(-1);
|
||||
array.add(-1);
|
||||
array.add(-1);
|
||||
@ -145,21 +148,23 @@ public class TurnipProphet extends Model {
|
||||
}
|
||||
if (getDay() == 0) {
|
||||
if (json.containsKey("pattern")) {
|
||||
if (!json.containsKey("tmp_pattern")) {
|
||||
json.put("old_pattern", json.getString("pattern"));
|
||||
pattern = json.getString("pattern");
|
||||
}
|
||||
if (money >= 90 && money <= 110) {
|
||||
array.set(0, money);
|
||||
}
|
||||
} else {
|
||||
if (money >= 9 && money <= 660) {
|
||||
pattern = json.getString("old_pattern");
|
||||
}
|
||||
json.put("tmp_pattern", json.getString("pattern"));
|
||||
}
|
||||
array.set(0, money);
|
||||
} else {
|
||||
json.remove("tmp_pattern");
|
||||
if (getTime() < 12) {
|
||||
array.set(getDay() * 2 - 1, money);
|
||||
} else {
|
||||
array.set(getDay() * 2, money);
|
||||
}
|
||||
}
|
||||
}
|
||||
json.put("turnip", array);
|
||||
StringBuilder builder = new StringBuilder();
|
||||
for (Object o : array) {
|
||||
@ -202,11 +207,11 @@ public class TurnipProphet extends Model {
|
||||
}
|
||||
|
||||
private String sendQQ(Map<String, String> map, String prices, String pattern, long qq) {
|
||||
if (map == null) {
|
||||
String url = String.format("https://turnipprophet.io?prices=%s%s",
|
||||
prices,
|
||||
pattern == null ? "" : "&pattern=" + pattern
|
||||
);
|
||||
if (map == null) {
|
||||
QQBotManager.getInstance().sendMessage(qq, "没有结果,请检查数据是否有误。 \n网页预览:\n" + url);
|
||||
return null;
|
||||
}
|
||||
@ -243,6 +248,7 @@ public class TurnipProphet extends Model {
|
||||
out.append(tmp.getString(TurnipData.MODEL)).append(":").append(tmp.getString(TurnipData.PR)).append("\n");
|
||||
}
|
||||
out.append("------------").append("\n");
|
||||
out.append("网页版:").append("\n").append(url).append("\n");
|
||||
out.append("祝好运 :)");
|
||||
|
||||
Log.i("TurnipProphet", out.toString());
|
||||
@ -255,6 +261,7 @@ public class TurnipProphet extends Model {
|
||||
super.onTime(time);
|
||||
nowTime = Integer.parseInt(time.split(":")[0]);
|
||||
}
|
||||
|
||||
public int getTime() {
|
||||
if (nowTime == -1) {
|
||||
nowTime = Integer.parseInt(AppTools.getHours());
|
||||
|
@ -40,7 +40,7 @@ public class Tsdm extends Model {
|
||||
@Override
|
||||
public void onTime(String time) {
|
||||
super.onTime(time);
|
||||
if ("08:00:00".equals(time)) {
|
||||
if ("08:05:00".equals(time)) {
|
||||
Log.i("开始天使动漫签到");
|
||||
try {
|
||||
tsdmSign();
|
||||
|
Loading…
x
Reference in New Issue
Block a user