临时工作进度

This commit is contained in:
2025-11-16 04:26:20 +08:00
parent edcbfd4ffd
commit bf29e34d2e
8 changed files with 114 additions and 62 deletions

View File

@@ -20,9 +20,8 @@ import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import java.lang.reflect.Method;
@Aspect
@Component
@Aspect
public class RequireAuthAndProxyAspect {
@Autowired
@@ -58,6 +57,9 @@ public class RequireAuthAndProxyAspect {
throw new RuntimeException("鉴权登录失败");
}
}
else if (!EmoneyClient.relogin()) {
throw new RuntimeException("检查重鉴权失败");
}
return pjp.proceed();
}

View File

@@ -19,6 +19,8 @@ import com.baomidou.mybatisplus.extension.spring.MybatisSqlSessionFactoryBean;
@Configuration
@MapperScan(basePackages = "quant.rich.emoney.mapper.postgre", sqlSessionTemplateRef = "postgreSqlSessionTemplate")
public class PostgreMybatisConfig {
public static final String POSTGRE_TRANSACTION_MANAGER = "postgreTransactionManager";
@Bean("postgreSqlSessionFactory")
public SqlSessionFactory postgreSqlSessionFactory(
@@ -40,7 +42,7 @@ public class PostgreMybatisConfig {
return new SqlSessionTemplate(sqlSessionFactory);
}
@Bean("postgreTransactionManager")
@Bean(POSTGRE_TRANSACTION_MANAGER)
public DataSourceTransactionManager postgreTransacetionManager(@Qualifier("postgreDataSource") DataSource dataSource) {
return new DataSourceTransactionManager(dataSource);
}

View File

@@ -121,7 +121,7 @@ public class SqliteMybatisConfig {
return new SqlSessionTemplate(sqlSessionFactory);
}
@Bean("sqliteTransactionManager")
@Bean(SQLITE_TRANSACTION_MANAGER)
public DataSourceTransactionManager postgreTransacetionManager(@Qualifier("sqliteDataSource") DataSource dataSource) {
return new DataSourceTransactionManager(dataSource);
}

View File

@@ -1,5 +1,7 @@
package quant.rich.emoney.entity.postgre;
import java.time.LocalDateTime;
import lombok.Data;
import lombok.experimental.Accessors;
@@ -12,6 +14,18 @@ public class StockStrategy {
private String tsCode;
private LocalDateTime date;
private String strategyName;
private Integer strategyId;
private String poolName;
private String type;
private Integer poolId;
public StockStrategy setTsCodeFromGoodsId(Integer goodsId) {
// 自动将益盟 goodsId 转换成 tsCode
// 1301325 -> 301325.SZ