Skip to content
This repository has been archived by the owner on Jun 16, 2022. It is now read-only.

Commit

Permalink
fix(request): fix a submit bug
Browse files Browse the repository at this point in the history
  • Loading branch information
aowubulao committed Jan 8, 2021
1 parent e5f9051 commit f26a7b1
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 6 deletions.
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@

### 2、更新记录

**2021.01.08**

**重要更新:可以提交查寝了**(虽然已经放假了=w=),具体可以在配置文件中设置是否启用。**查寝的话经纬度需要在查寝范围内**

目前在测试中,应该没有问题。

**2021.01.07**

感谢[链接](https://github.com/ZimoLoveShuang/auto-sign/issues/38)提供的DES key =w=,更新了新的des key
Expand All @@ -24,13 +30,13 @@

删除了很蠢的更新机制,更新了API,以后如果打卡失败请及时提醒我更新API。

关于腾讯云函数登录失败的问题,我猜测可能是定时任务的问题,可以的话把定时任务执行的cron表达式改为
关于腾讯云函数登录失败的问题,把定时任务执行的cron表达式改为

```
0 0 9,20 * * * *
```

这表示每天9点、20点执行一次,应该能够解决,目前也还在测试当中...
这表示每天9点、20点执行一次

**2020.12.1**

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/daily/request/InitialRequest.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ private static boolean readDailyProps() {
AutoDailyCp.info.setPosition(props.getProperty("position"));
AutoDailyCp.info.setScKey(props.getProperty("scKey"));
AutoDailyCp.info.setActiveAttendance(true);
AutoDailyCp.info.setActiveAttendance(Boolean.getBoolean(props.getProperty("activeAttendance")));
AutoDailyCp.info.setActiveAttendance(Boolean.parseBoolean(props.getProperty("activeAttendance")));
return true;
} catch (IOException e) {
log.info("读取daily.properties错误: ", e);
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/daily/request/ServerChanRequest.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public class ServerChanRequest {
}

public static void sendMessage(String message, String description) {
if (!AutoDailyCp.info.getScKey().contains(KEY)) {
if (AutoDailyCp.info.getScKey().contains(KEY)) {
HttpRequest.post(URL)
.form("text", message)
.form("desp", description)
Expand Down
6 changes: 4 additions & 2 deletions src/main/java/daily/request/SignRequest.java
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,14 @@ public boolean submitMessage(MessageBox message, String cpExtension) {
String body;
// 查寝
if (message.getType() == 1) {
body = CpDaily.SUBMIT_INFO.replace("siWid", message.getSignWid())
log.info("===查寝===");
body = CpDaily.SUBMIT_INFO.replace("siWid", message.getSignInstanceWid())
.replace("r1", longitude)
.replace("r2", latitude)
.replace("local", position);
} else {
body = CpDaily.SIGN_INFO.replace("siWid", message.getSignWid())
log.info("===签到===");
body = CpDaily.SIGN_INFO.replace("siWid", message.getSignInstanceWid())
.replace("itemId", getExtraFieldItemWid(message.getSignInstanceWid(), message.getSignWid()))
.replace("r1", longitude)
.replace("r2", latitude)
Expand Down

0 comments on commit f26a7b1

Please sign in to comment.