临时工作进度
This commit is contained in:
34
pom.xml
34
pom.xml
@@ -9,7 +9,7 @@
|
|||||||
<version>3.3.0</version>
|
<version>3.3.0</version>
|
||||||
<relativePath /> <!-- lookup parent from repository -->
|
<relativePath /> <!-- lookup parent from repository -->
|
||||||
</parent>
|
</parent>
|
||||||
<groupId>top.at17.quant</groupId>
|
<groupId>quant.rich.emoney</groupId>
|
||||||
<artifactId>emo-grab</artifactId>
|
<artifactId>emo-grab</artifactId>
|
||||||
<version>0.0.1-SNAPSHOT</version>
|
<version>0.0.1-SNAPSHOT</version>
|
||||||
<name>EmoGrab</name>
|
<name>EmoGrab</name>
|
||||||
@@ -17,9 +17,9 @@
|
|||||||
<properties>
|
<properties>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||||
<java.version>18</java.version>
|
<java.version>22</java.version>
|
||||||
<maven.compiler.source>18</maven.compiler.source>
|
<maven.compiler.source>22</maven.compiler.source>
|
||||||
<maven.compiler.target>18</maven.compiler.target>
|
<maven.compiler.target>22</maven.compiler.target>
|
||||||
</properties>
|
</properties>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
@@ -244,9 +244,9 @@
|
|||||||
</dependency>
|
</dependency>
|
||||||
<!-- https://mvnrepository.com/artifact/com.google.guava/guava -->
|
<!-- https://mvnrepository.com/artifact/com.google.guava/guava -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.google.guava</groupId>
|
<groupId>com.google.guava</groupId>
|
||||||
<artifactId>guava</artifactId>
|
<artifactId>guava</artifactId>
|
||||||
<version>33.4.8-jre</version>
|
<version>33.4.8-jre</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>cn.hutool</groupId>
|
<groupId>cn.hutool</groupId>
|
||||||
@@ -278,23 +278,23 @@
|
|||||||
</dependency>
|
</dependency>
|
||||||
<!-- GraalVM JS runtime -->
|
<!-- GraalVM JS runtime -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.graalvm.polyglot</groupId>
|
<groupId>org.graalvm.polyglot</groupId>
|
||||||
<artifactId>polyglot</artifactId>
|
<artifactId>polyglot</artifactId>
|
||||||
<version>24.2.1</version>
|
<version>24.2.1</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- GraalVM JS engine 实现 -->
|
<!-- GraalVM JS engine 实现 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.graalvm.js</groupId>
|
<groupId>org.graalvm.js</groupId>
|
||||||
<artifactId>js-scriptengine</artifactId>
|
<artifactId>js-scriptengine</artifactId>
|
||||||
<version>24.2.1</version>
|
<version>24.2.1</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- https://mvnrepository.com/artifact/org.graalvm.js/js -->
|
<!-- https://mvnrepository.com/artifact/org.graalvm.js/js -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.graalvm.js</groupId>
|
<groupId>org.graalvm.js</groupId>
|
||||||
<artifactId>js</artifactId>
|
<artifactId>js</artifactId>
|
||||||
<version>24.2.1</version>
|
<version>24.2.1</version>
|
||||||
<type>pom</type>
|
<type>pom</type>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- https://mvnrepository.com/artifact/org.jsoup/jsoup -->
|
<!-- https://mvnrepository.com/artifact/org.jsoup/jsoup -->
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|||||||
@@ -20,9 +20,8 @@ import java.lang.annotation.RetentionPolicy;
|
|||||||
import java.lang.annotation.Target;
|
import java.lang.annotation.Target;
|
||||||
import java.lang.reflect.Method;
|
import java.lang.reflect.Method;
|
||||||
|
|
||||||
|
|
||||||
@Aspect
|
|
||||||
@Component
|
@Component
|
||||||
|
@Aspect
|
||||||
public class RequireAuthAndProxyAspect {
|
public class RequireAuthAndProxyAspect {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
@@ -58,6 +57,9 @@ public class RequireAuthAndProxyAspect {
|
|||||||
throw new RuntimeException("鉴权登录失败");
|
throw new RuntimeException("鉴权登录失败");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (!EmoneyClient.relogin()) {
|
||||||
|
throw new RuntimeException("检查重鉴权失败");
|
||||||
|
}
|
||||||
|
|
||||||
return pjp.proceed();
|
return pjp.proceed();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,6 +19,8 @@ import com.baomidou.mybatisplus.extension.spring.MybatisSqlSessionFactoryBean;
|
|||||||
@Configuration
|
@Configuration
|
||||||
@MapperScan(basePackages = "quant.rich.emoney.mapper.postgre", sqlSessionTemplateRef = "postgreSqlSessionTemplate")
|
@MapperScan(basePackages = "quant.rich.emoney.mapper.postgre", sqlSessionTemplateRef = "postgreSqlSessionTemplate")
|
||||||
public class PostgreMybatisConfig {
|
public class PostgreMybatisConfig {
|
||||||
|
|
||||||
|
public static final String POSTGRE_TRANSACTION_MANAGER = "postgreTransactionManager";
|
||||||
|
|
||||||
@Bean("postgreSqlSessionFactory")
|
@Bean("postgreSqlSessionFactory")
|
||||||
public SqlSessionFactory postgreSqlSessionFactory(
|
public SqlSessionFactory postgreSqlSessionFactory(
|
||||||
@@ -40,7 +42,7 @@ public class PostgreMybatisConfig {
|
|||||||
return new SqlSessionTemplate(sqlSessionFactory);
|
return new SqlSessionTemplate(sqlSessionFactory);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Bean("postgreTransactionManager")
|
@Bean(POSTGRE_TRANSACTION_MANAGER)
|
||||||
public DataSourceTransactionManager postgreTransacetionManager(@Qualifier("postgreDataSource") DataSource dataSource) {
|
public DataSourceTransactionManager postgreTransacetionManager(@Qualifier("postgreDataSource") DataSource dataSource) {
|
||||||
return new DataSourceTransactionManager(dataSource);
|
return new DataSourceTransactionManager(dataSource);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ public class SqliteMybatisConfig {
|
|||||||
return new SqlSessionTemplate(sqlSessionFactory);
|
return new SqlSessionTemplate(sqlSessionFactory);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Bean("sqliteTransactionManager")
|
@Bean(SQLITE_TRANSACTION_MANAGER)
|
||||||
public DataSourceTransactionManager postgreTransacetionManager(@Qualifier("sqliteDataSource") DataSource dataSource) {
|
public DataSourceTransactionManager postgreTransacetionManager(@Qualifier("sqliteDataSource") DataSource dataSource) {
|
||||||
return new DataSourceTransactionManager(dataSource);
|
return new DataSourceTransactionManager(dataSource);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
package quant.rich.emoney.entity.postgre;
|
package quant.rich.emoney.entity.postgre;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
@@ -12,6 +14,18 @@ public class StockStrategy {
|
|||||||
|
|
||||||
private String tsCode;
|
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) {
|
public StockStrategy setTsCodeFromGoodsId(Integer goodsId) {
|
||||||
// 自动将益盟 goodsId 转换成 tsCode
|
// 自动将益盟 goodsId 转换成 tsCode
|
||||||
// 1301325 -> 301325.SZ
|
// 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.jupiter.api.Test;
|
||||||
import org.junit.runner.RunWith;
|
import org.junit.runner.RunWith;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.boot.test.context.SpringBootTest;
|
import org.springframework.boot.test.context.SpringBootTest;
|
||||||
import org.springframework.test.context.ContextConfiguration;
|
import org.springframework.test.context.ContextConfiguration;
|
||||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
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 com.fasterxml.jackson.databind.node.ObjectNode;
|
||||||
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
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.StrategyMarkRequest.StrategyMark_Request;
|
||||||
import nano.StrategyMarkResponse.StrategyMark_Response;
|
import nano.StrategyMarkResponse.StrategyMark_Response;
|
||||||
import quant.rich.emoney.EmoneyAutoApplication;
|
|
||||||
import quant.rich.emoney.client.EmoneyClient;
|
import quant.rich.emoney.client.EmoneyClient;
|
||||||
|
|
||||||
|
|
||||||
@@ -30,7 +24,6 @@ class EmoneyStrategyMarkTests {
|
|||||||
@Test
|
@Test
|
||||||
void contextLoads() {
|
void contextLoads() {
|
||||||
EmoneyClient.relogin();
|
EmoneyClient.relogin();
|
||||||
|
|
||||||
StrategyMark_Request request = new StrategyMark_Request();
|
StrategyMark_Request request = new StrategyMark_Request();
|
||||||
|
|
||||||
request.setGoodsId(600325);
|
request.setGoodsId(600325);
|
||||||
@@ -1,34 +1,75 @@
|
|||||||
# emoney settings
|
server:
|
||||||
emoney-client:
|
port: 7790
|
||||||
emoney-login-form:
|
compression: #开启gzip压缩,返回内容大于2k的才会进行压缩
|
||||||
acc-id: emy1730978
|
enabled: true
|
||||||
acc-type: 1
|
mime-types: application/javascript,text/css,application/json,application/xml,text/html,text/xml,text/plain
|
||||||
app-version: 4.15.0
|
min-response-size: 2048
|
||||||
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
|
|
||||||
|
|
||||||
emoney-login-header:
|
logging.level:
|
||||||
emapp-view-mode: 1
|
'[quant.rich]': debug
|
||||||
x-android-agent: EMAPP/4.15.0(Android;22)
|
'[org.springframework.security]': info
|
||||||
x-protocol-id: user%2Fauth%2Flogin
|
'[org.springframework.boot.devtools.restart]': debug
|
||||||
authorization:
|
|
||||||
user-agent: okhttp/3.12.2
|
spring:
|
||||||
|
cache:
|
||||||
emoney-request-header:
|
type: redis
|
||||||
emapp-view-mode: 1
|
redis:
|
||||||
x-android-agent: EMAPP/4.15.0
|
key-prefix: 'emoney-auto:'
|
||||||
authorization:
|
use-key-prefix: true
|
||||||
user-agent: okhttp/3.12.2
|
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