Merge remote-tracking branch 'origin/main'
# Conflicts: # src/main/java/com/dx/union/CheckLogin.java
This commit is contained in:
commit
8af5148f06
2
.gitignore
vendored
2
.gitignore
vendored
@ -19,6 +19,7 @@ buildNumber.properties
|
|||||||
.idea/jarRepositories.xml
|
.idea/jarRepositories.xml
|
||||||
.idea/compiler.xml
|
.idea/compiler.xml
|
||||||
.idea/libraries/
|
.idea/libraries/
|
||||||
|
.idea/*
|
||||||
*.iws
|
*.iws
|
||||||
*.iml
|
*.iml
|
||||||
*.ipr
|
*.ipr
|
||||||
@ -42,6 +43,7 @@ buildNumber.properties
|
|||||||
|
|
||||||
# Log file
|
# Log file
|
||||||
*.log
|
*.log
|
||||||
|
*.log.gz
|
||||||
|
|
||||||
# BlueJ files
|
# BlueJ files
|
||||||
*.ctxt
|
*.ctxt
|
||||||
|
@ -81,18 +81,18 @@ public class CheckLogin {
|
|||||||
boolean isSignSuccess = sign(user, singMark);
|
boolean isSignSuccess = sign(user, singMark);
|
||||||
if (isSignSuccess) {
|
if (isSignSuccess) {
|
||||||
log.info("{} 账号打卡成功", user.getUsername());
|
log.info("{} 账号打卡成功", user.getUsername());
|
||||||
|
String sign_time = DateUtil.date().toString();
|
||||||
|
if (isMorning) {
|
||||||
|
user.setIsStartWorkSign(sign_time);
|
||||||
|
} else {
|
||||||
|
if (StrUtil.isEmpty(user.getIsStartWorkSign())) {
|
||||||
|
user.setIsStartWorkSign("");
|
||||||
|
}
|
||||||
|
user.setIsEndWorkSign(sign_time);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
log.error("{} 账号打卡失败", user.getUsername());
|
log.error("{} 账号打卡失败", user.getUsername());
|
||||||
}
|
}
|
||||||
String sign_time = DateUtil.date().toString();
|
|
||||||
if (isMorning) {
|
|
||||||
user.setIsStartWorkSign(sign_time);
|
|
||||||
} else {
|
|
||||||
if (StrUtil.isEmpty(user.getIsStartWorkSign())) {
|
|
||||||
user.setIsStartWorkSign("");
|
|
||||||
}
|
|
||||||
user.setIsEndWorkSign(sign_time);
|
|
||||||
}
|
|
||||||
if (index + 1 == size) {
|
if (index + 1 == size) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -117,9 +117,11 @@ public class CheckLogin {
|
|||||||
public static boolean sign(User user, Integer signMark) {
|
public static boolean sign(User user, Integer signMark) {
|
||||||
boolean result = false;
|
boolean result = false;
|
||||||
try {
|
try {
|
||||||
log.info("开始{}打卡 {} 的账号,密码为:{}", signMark == 0 ? "上班" : "下班", user.getUsername(), user.getPassword());
|
HttpRequest.getCookieManager().getCookieStore().removeAll();
|
||||||
String password = encrypt2ToMD5(user.getPassword());
|
|
||||||
String username = user.getUsername();
|
String username = user.getUsername();
|
||||||
|
String password = user.getPassword();
|
||||||
|
log.info("开始{}打卡 {} 的账号,密码为:{}", signMark == 0 ? "上班" : "下班", username, password);
|
||||||
|
password = encrypt2ToMD5(password);
|
||||||
log.info("加密密码为:{}", password);
|
log.info("加密密码为:{}", password);
|
||||||
try (HttpResponse response = HttpRequest.post("https://login.oa.unionpay.com/idsapi/portal/Login")
|
try (HttpResponse response = HttpRequest.post("https://login.oa.unionpay.com/idsapi/portal/Login")
|
||||||
.form("username", username)
|
.form("username", username)
|
||||||
|
Loading…
Reference in New Issue
Block a user