临时工作进度
This commit is contained in:
8
pom.xml
8
pom.xml
@@ -9,7 +9,7 @@
|
||||
<version>3.3.0</version>
|
||||
<relativePath /> <!-- lookup parent from repository -->
|
||||
</parent>
|
||||
<groupId>top.at17.quant</groupId>
|
||||
<groupId>quant.rich.emoney</groupId>
|
||||
<artifactId>emo-grab</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<name>EmoGrab</name>
|
||||
@@ -17,9 +17,9 @@
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
<java.version>18</java.version>
|
||||
<maven.compiler.source>18</maven.compiler.source>
|
||||
<maven.compiler.target>18</maven.compiler.target>
|
||||
<java.version>22</java.version>
|
||||
<maven.compiler.source>22</maven.compiler.source>
|
||||
<maven.compiler.target>22</maven.compiler.target>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -20,6 +20,8 @@ import com.baomidou.mybatisplus.extension.spring.MybatisSqlSessionFactoryBean;
|
||||
@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(
|
||||
@Qualifier("postgreDataSource") DataSource dataSource) throws Exception {
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Binary file not shown.
@@ -1,8 +1,7 @@
|
||||
package quant.rich;
|
||||
package quant.rich.emoney;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.context.ContextConfiguration;
|
||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
@@ -11,13 +10,8 @@ import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.fasterxml.jackson.databind.node.ObjectNode;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import nano.CandleStickNewWithIndexExResponse.CandleStickNewWithIndexEx_Response;
|
||||
import nano.CandleStickRequest.CandleStick_Request;
|
||||
import nano.CandleStickWithIndexRequest.CandleStickWithIndex_Request;
|
||||
import nano.CandleStickWithIndexRequest.CandleStickWithIndex_Request.IndexInfo;
|
||||
import nano.StrategyMarkRequest.StrategyMark_Request;
|
||||
import nano.StrategyMarkResponse.StrategyMark_Response;
|
||||
import quant.rich.emoney.EmoneyAutoApplication;
|
||||
import quant.rich.emoney.client.EmoneyClient;
|
||||
|
||||
|
||||
@@ -30,7 +24,6 @@ class EmoneyStrategyMarkTests {
|
||||
@Test
|
||||
void contextLoads() {
|
||||
EmoneyClient.relogin();
|
||||
|
||||
StrategyMark_Request request = new StrategyMark_Request();
|
||||
|
||||
request.setGoodsId(600325);
|
||||
@@ -1,34 +1,75 @@
|
||||
# emoney settings
|
||||
emoney-client:
|
||||
emoney-login-form:
|
||||
acc-id: emy1730978
|
||||
acc-type: 1
|
||||
app-version: 4.15.0
|
||||
channel-id: 1711
|
||||
device-name: LIO-AN00
|
||||
real-ex-identify:
|
||||
imei:
|
||||
android-id: 6e530d685bac6e00
|
||||
mac:
|
||||
os-finger-print: asus/android_x86/x86:5.1.1/LMY47I/8.3.19:user/release-keys
|
||||
guid: 64de523312b56f1ab10c0423d537e2d6
|
||||
hardware: b271c744bf47f195c5786cbb95ea49f9
|
||||
hwTrackId:
|
||||
osVersion: 22
|
||||
platform: android
|
||||
product-id: 4
|
||||
pwd: 777988
|
||||
ssid: 0
|
||||
server:
|
||||
port: 7790
|
||||
compression: #开启gzip压缩,返回内容大于2k的才会进行压缩
|
||||
enabled: true
|
||||
mime-types: application/javascript,text/css,application/json,application/xml,text/html,text/xml,text/plain
|
||||
min-response-size: 2048
|
||||
|
||||
emoney-login-header:
|
||||
emapp-view-mode: 1
|
||||
x-android-agent: EMAPP/4.15.0(Android;22)
|
||||
x-protocol-id: user%2Fauth%2Flogin
|
||||
authorization:
|
||||
user-agent: okhttp/3.12.2
|
||||
logging.level:
|
||||
'[quant.rich]': debug
|
||||
'[org.springframework.security]': info
|
||||
'[org.springframework.boot.devtools.restart]': debug
|
||||
|
||||
emoney-request-header:
|
||||
emapp-view-mode: 1
|
||||
x-android-agent: EMAPP/4.15.0
|
||||
authorization:
|
||||
user-agent: okhttp/3.12.2
|
||||
spring:
|
||||
cache:
|
||||
type: redis
|
||||
redis:
|
||||
key-prefix: 'emoney-auto:'
|
||||
use-key-prefix: true
|
||||
devtools:
|
||||
restart:
|
||||
enabled: true
|
||||
additional-exclude:
|
||||
- '**/*.html'
|
||||
- '**/*.js'
|
||||
- '**/*.css'
|
||||
additional-paths: lib/
|
||||
jackson:
|
||||
date-format: yyyy-MM-dd HH:mm:ss
|
||||
time-zone: Asia/Shanghai
|
||||
profiles.active: remote
|
||||
session.timeout: 86400
|
||||
thymeleaf:
|
||||
prefix: classpath:/webpage/
|
||||
suffix: .html
|
||||
mode: HTML
|
||||
encoding: UTF-8
|
||||
cache: false
|
||||
|
||||
mybatis-plus-join.banner: false
|
||||
mybatis-plus:
|
||||
global-config:
|
||||
banner: false
|
||||
mapper-locations:
|
||||
- classpath*:mapper/postgre/*.xml
|
||||
- classpath*:mapper/sqlite/*.xml
|
||||
type-aliases-package:
|
||||
- quant.rich.emoney.entity.postgre
|
||||
- quant.rich.emoney.entity.sqlite
|
||||
type-handlers-package: quant.rich.emoney.mybatis.typehandler
|
||||
configuration:
|
||||
map-underscore-to-camel-case: true
|
||||
default-enum-type-handler: org.apache.ibatis.type.EnumOrdinalTypeHandler
|
||||
|
||||
kaptcha:
|
||||
border: "no"
|
||||
image:
|
||||
width: 130
|
||||
height: 38
|
||||
textproducer:
|
||||
char:
|
||||
length: 5
|
||||
font:
|
||||
color: 35,37,38,80
|
||||
size: 30
|
||||
names: Times New Roman,Sans,Microsoft Yahei UI,Consolas
|
||||
session:
|
||||
key: code
|
||||
noise:
|
||||
color: 35,37,38,80
|
||||
|
||||
# 程序默认配置,部分内容可以通过数据库覆写
|
||||
# 当数据库不存在配置时默认加载文件内配置
|
||||
emoney-auto-config:
|
||||
username: admin
|
||||
password: Em0nY_4u70~!
|
||||
Reference in New Issue
Block a user