This commit is contained in:
2025-09-24 11:10:42 +08:00
parent a72b60be98
commit 05b923b1ac
348 changed files with 611 additions and 8472 deletions

View File

@@ -67,6 +67,12 @@ public class AuthController {
return ResponseEntity.ok(result);
}
@PostMapping("/logout")
public ResponseEntity<?> logout(@RequestBody Map<String, Object> data) {
authService.logout();
return ResponseEntity.ok(Map.of("code", 0, "message", "退出成功"));
}
@GetMapping("/check-username")
public ResponseEntity<?> checkUsername(@RequestParam String username) {
if (username == null || username.trim().isEmpty()) {

View File

@@ -79,12 +79,8 @@ public class RakutenController {
log.info("采集完成: {}, 数量: {}", currentShopName, fresh.size());
}
}
// 3. 处理新采集的数据,存储并生成 sessionId
List<RakutenProduct> newProducts = allProducts.stream().filter(p -> !skippedShops.contains(p.getOriginalShopName())).toList();
if (!newProducts.isEmpty()) {
// 使用已有 sessionId 保存
rakutenCacheService.saveProductsWithSessionId(newProducts, batchId);
}
// 4. 上报缓存数据使用情况

View File

@@ -29,7 +29,7 @@ public class RakutenProduct {
private Double freight;
private Double median;
private String weight;
private String skuPriceJson;
@Override
public String toString() {
return "RakutenProduct{" +

View File

@@ -32,6 +32,8 @@ public interface IAuthService {
*/
String getClientId();
void logout();
/**
* 验证token
*/

View File

@@ -6,7 +6,6 @@ import java.util.regex.Pattern;
public class SeleniumWithProfile {
private static final Pattern WEIGHT_PATTERN = Pattern.compile("\"(?:unitWeight|weight)\":(\\d+(?:\\.\\d+)?)");
public static void main(String[] args) {
String uuid = "";
try {

View File

@@ -51,7 +51,7 @@ public class RakutenProxyUtil {
}
}
enableProcess.waitFor();
// ProxyEnable为1继续检查ProxyServer配置
String command = "reg query \"HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\" /v ProxyServer";
Process process = Runtime.getRuntime().exec(command);