1
This commit is contained in:
@@ -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()) {
|
||||
|
||||
@@ -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. 上报缓存数据使用情况
|
||||
|
||||
@@ -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{" +
|
||||
|
||||
@@ -32,6 +32,8 @@ public interface IAuthService {
|
||||
*/
|
||||
String getClientId();
|
||||
|
||||
void logout();
|
||||
|
||||
/**
|
||||
* 验证token
|
||||
*/
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user