feat(erp): 实现按用户地区隔离的最新产品查询逻辑

- 修改AmazonController以支持按用户和区域筛选最新会话数据
- 更新AmazonProductRepository中的findLatestProducts方法,增加region参数实现数据隔离
-优化AmazonScrapingServiceImpl的数据处理流程,增强缓存清理机制
- 调整GenmaiServiceImpl的token验证逻辑并改进Chrome启动配置- 升级系统版本至2.5.5并完善相关依赖管理
- 改进前端设置对话框中关于缓存清理描述的信息准确性
-重构SystemController接口,移除不必要的用户名参数传递- 强化GenmaiAccountController和服务层的安全校验逻辑
This commit is contained in:
2025-10-27 13:34:25 +08:00
parent 0be60bc103
commit 7e065c1a0b
10 changed files with 62 additions and 62 deletions

View File

@@ -7,6 +7,7 @@ import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpMethod;
import org.springframework.http.ResponseEntity;
import org.springframework.web.client.RestTemplate;
@@ -76,10 +77,11 @@ public class GenmaiAccountServiceImpl implements IGenmaiAccountService {
@Override
public boolean validateToken(String token) {
try {
HttpEntity<String> entity = new HttpEntity<>(null, null);
HttpHeaders headers = new HttpHeaders();
headers.set("Token", token);
ResponseEntity<String> response = restTemplate.exchange(
"https://www.genmaijl.com/manage/user/balance",
HttpMethod.GET, entity, String.class);
HttpMethod.GET, new HttpEntity<>(headers), String.class);
return objectMapper.readTree(response.getBody()).get("code").asInt() == 0;
} catch (Exception e) {
return false;