From 012bd1f58e8e1c37caeea774ee181f754374e7d5 Mon Sep 17 00:00:00 2001
From: Administrator <15274802129@163.com>
Date: Fri, 05 Jun 2026 11:29:44 +0800
Subject: [PATCH] refactor(api): 移除Huobi API相关代码并简化应用配置
---
/dev/null | 242 ----------------------
src/main/resources/application-okx.yml | 6
src/main/java/com/xcong/excoin/ExcoinApplication.java | 6
pom.xml | 277 ++++---------------------
src/main/resources/application.yml | 78 ------
5 files changed, 60 insertions(+), 549 deletions(-)
diff --git a/pom.xml b/pom.xml
index f10809c..5d01e62 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,65 +6,78 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.2.6.RELEASE</version>
- <relativePath/> <!-- lookup parent from repository -->
+ <relativePath/>
</parent>
<groupId>com.xcong</groupId>
<artifactId>excoin</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>excoin</name>
- <description>Demo project for Spring Boot</description>
+ <description>OKX Grid Trading Strategy</description>
<properties>
<java.version>1.8</java.version>
- <mysql-driver.version>8.0.17</mysql-driver.version>
- <alibaba-druid.version>1.1.18</alibaba-druid.version>
- <mybatis.version>2.0.1</mybatis.version>
- <mybatis-plus.version>3.3.1.tmp</mybatis-plus.version>
- <validation-api.version>2.0.1.Final</validation-api.version>
- <hibernate-validator.version>6.1.0.Final</hibernate-validator.version>
- <swagger.version>2.9.2</swagger.version>
- <io-swagger.version>1.5.23</io-swagger.version>
- <mapstruct.version>1.3.1.Final</mapstruct.version>
<hutool.version>5.3.1</hutool.version>
<fastjson.version>1.2.61</fastjson.version>
- <netty.version>4.1.33.Final</netty.version>
- <dom4j.version>1.6.1</dom4j.version>
- <m2e.apt.activation>jdt_apt</m2e.apt.activation>
<okhttp.version>3.6.0</okhttp.version>
- <aliyun-oss.version>3.8.0</aliyun-oss.version>
</properties>
<dependencies>
-
+ <!-- Spring Boot Web (嵌入式Tomcat) -->
<dependency>
- <groupId>ripple</groupId>
- <artifactId>ripple</artifactId>
- <version>0.0.1</version>
- <scope>system</scope>
- <systemPath>${basedir}/lib/ripple-core-0.0.1-SNAPSHOT.jar</systemPath>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-starter-web</artifactId>
</dependency>
+ <!-- Lombok -->
+ <dependency>
+ <groupId>org.projectlombok</groupId>
+ <artifactId>lombok</artifactId>
+ <optional>true</optional>
+ </dependency>
+
+ <!-- OKX REST API 用 OkHttp3 -->
+ <dependency>
+ <groupId>com.squareup.okhttp3</groupId>
+ <artifactId>okhttp</artifactId>
+ <version>${okhttp.version}</version>
+ </dependency>
+
+ <!-- OKX WebSocket 连接 -->
+ <dependency>
+ <groupId>org.java-websocket</groupId>
+ <artifactId>Java-WebSocket</artifactId>
+ <version>1.5.3</version>
+ </dependency>
+
+ <!-- JSON 解析 (FastJSON) -->
+ <dependency>
+ <groupId>com.alibaba</groupId>
+ <artifactId>fastjson</artifactId>
+ <version>${fastjson.version}</version>
+ </dependency>
+
+ <!-- JSON 解析 (org.json) -->
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20230618</version>
</dependency>
-
-
+ <!-- Hutool 工具库 -->
<dependency>
- <groupId>com.squareup.okhttp3</groupId>
- <artifactId>okhttp</artifactId>
- <!-- <version>3.6.0</version>-->
+ <groupId>cn.hutool</groupId>
+ <artifactId>hutool-all</artifactId>
+ <version>${hutool.version}</version>
</dependency>
- <!-- https://mvnrepository.com/artifact/com.squareup.okhttp3/logging-interceptor -->
+ <!-- Apache Commons Codec (钉钉Base64签名) -->
<dependency>
- <groupId>com.squareup.okhttp3</groupId>
- <artifactId>logging-interceptor</artifactId>
- <version>3.6.0</version>
+ <groupId>commons-codec</groupId>
+ <artifactId>commons-codec</artifactId>
+ <version>1.15</version>
</dependency>
+ <!-- 钉钉机器人 SDK (本地Jar) -->
<dependency>
<groupId>taobao</groupId>
<artifactId>taobao-sdk</artifactId>
@@ -73,54 +86,7 @@
<systemPath>${basedir}/lib/taobao-sdk-java.jar</systemPath>
</dependency>
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-web</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-aop</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-actuator</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-security</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-amqp</artifactId>
- </dependency>
-
-<!-- <dependency>-->
-<!-- <groupId>org.springframework.security</groupId>-->
-<!-- <artifactId>spring-security-test</artifactId>-->
-<!-- <scope>test</scope>-->
-<!-- </dependency>-->
-
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-data-redis</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-devtools</artifactId>
- <scope>runtime</scope>
- <optional>true</optional>
- </dependency>
-
- <dependency>
- <groupId>org.projectlombok</groupId>
- <artifactId>lombok</artifactId>
- <optional>true</optional>
- </dependency>
+ <!-- 单元测试 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
@@ -132,156 +98,6 @@
</exclusion>
</exclusions>
</dependency>
-
- <dependency>
- <groupId>org.mybatis.spring.boot</groupId>
- <artifactId>mybatis-spring-boot-starter</artifactId>
- <version>${mybatis.version}</version>
- </dependency>
- <dependency>
- <groupId>com.baomidou</groupId>
- <artifactId>mybatis-plus-boot-starter</artifactId>
- <version>${mybatis-plus.version}</version>
- </dependency>
-
- <dependency>
- <groupId>com.alibaba</groupId>
- <artifactId>druid-spring-boot-starter</artifactId>
- <version>${alibaba-druid.version}</version>
- </dependency>
-
- <dependency>
- <groupId>mysql</groupId>
- <artifactId>mysql-connector-java</artifactId>
- <version>${mysql-driver.version}</version>
- </dependency>
-
- <!-- 参数校验 start -->
- <dependency>
- <groupId>javax.validation</groupId>
- <artifactId>validation-api</artifactId>
- <version>${validation-api.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-validator</artifactId>
- <version>${hibernate-validator.version}</version>
- </dependency>
- <!-- 参数校验 end -->
-
- <!-- swagger2 start -->
- <dependency>
- <groupId>io.springfox</groupId>
- <artifactId>springfox-swagger2</artifactId>
- <version>${swagger.version}</version>
- </dependency>
- <dependency>
- <groupId>io.swagger</groupId>
- <artifactId>swagger-annotations</artifactId>
- <version>${io-swagger.version}</version>
- </dependency>
- <dependency>
- <groupId>io.swagger</groupId>
- <artifactId>swagger-models</artifactId>
- <version>${io-swagger.version}</version>
- </dependency>
- <dependency>
- <groupId>io.springfox</groupId>
- <artifactId>springfox-swagger-ui</artifactId>
- <version>${swagger.version}</version>
- </dependency>
- <!-- swagger2 end -->
-
- <!-- bean映射转化 -->
- <dependency>
- <groupId>org.mapstruct</groupId>
- <artifactId>mapstruct</artifactId>
- <version>${mapstruct.version}</version>
- </dependency>
-
- <dependency>
- <groupId>cn.hutool</groupId>
- <artifactId>hutool-all</artifactId>
- <version>${hutool.version}</version>
- </dependency>
-
- <dependency>
- <groupId>com.alibaba</groupId>
- <artifactId>fastjson</artifactId>
- <version>${fastjson.version}</version>
- </dependency>
- <dependency>
- <groupId>com.google.code.gson</groupId>
- <artifactId>gson</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.apache.httpcomponents</groupId>
- <artifactId>httpclient</artifactId>
- </dependency>
- <dependency>
- <groupId>dom4j</groupId>
- <artifactId>dom4j</artifactId>
- <version>${dom4j.version}</version>
- </dependency>
-
-
- <dependency>
- <groupId>com.squareup.okhttp3</groupId>
- <artifactId>okhttp</artifactId>
- <version>${okhttp.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.java-websocket</groupId>
- <artifactId>Java-WebSocket</artifactId>
- <version>1.5.3</version>
- </dependency>
-
- <!-- submail邮件 start -->
- <dependency>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- <version>1.1.1</version>
- </dependency>
- <dependency>
- <groupId>commons-collections</groupId>
- <artifactId>commons-collections</artifactId>
- <version>3.2.1</version>
- </dependency>
- <dependency>
- <groupId>org.apache.commons</groupId>
- <artifactId>commons-lang3</artifactId>
- <version>3.3.2</version>
- </dependency>
- <dependency>
- <groupId>net.sf.ezmorph</groupId>
- <artifactId>ezmorph</artifactId>
- <version>1.0.3</version>
- </dependency>
- <dependency>
- <groupId>net.sf.json-lib</groupId>
- <artifactId>json-lib</artifactId>
- <version>2.2.3</version>
- <classifier>jdk15</classifier>
- </dependency>
- <dependency>
- <groupId>org.apache.httpcomponents</groupId>
- <artifactId>httpmime</artifactId>
- <version>4.3.5</version>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.commons</groupId>
- <artifactId>commons-pool2</artifactId>
- </dependency>
- <!-- submail邮件 end -->
</dependencies>
<build>
@@ -302,11 +118,6 @@
<source>${java.version}</source>
<target>${java.version}</target>
<annotationProcessorPaths>
- <path>
- <groupId>org.mapstruct</groupId>
- <artifactId>mapstruct-processor</artifactId>
- <version>${mapstruct.version}</version>
- </path>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
diff --git a/src/main/java/com/xcong/excoin/ExcoinApplication.java b/src/main/java/com/xcong/excoin/ExcoinApplication.java
index ef41726..397e7ee 100644
--- a/src/main/java/com/xcong/excoin/ExcoinApplication.java
+++ b/src/main/java/com/xcong/excoin/ExcoinApplication.java
@@ -1,18 +1,16 @@
package com.xcong.excoin;
-import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.scheduling.annotation.EnableScheduling;
-import springfox.documentation.swagger2.annotations.EnableSwagger2;
/**
+ * OKX 网格交易策略启动入口
+ *
* @author helius
*/
@EnableScheduling
-@EnableSwagger2
@SpringBootApplication
-@MapperScan("com.xcong.excoin.modules.*.dao")
public class ExcoinApplication {
public static void main(String[] args) {
diff --git a/src/main/java/com/xcong/excoin/common/annotations/SubmitRepeat.java b/src/main/java/com/xcong/excoin/common/annotations/SubmitRepeat.java
deleted file mode 100644
index eb41b12..0000000
--- a/src/main/java/com/xcong/excoin/common/annotations/SubmitRepeat.java
+++ /dev/null
@@ -1,13 +0,0 @@
-package com.xcong.excoin.common.annotations;
-
-import java.lang.annotation.*;
-
-/**
- *
- * @author helius
- */
-@Documented
-@Retention(RetentionPolicy.RUNTIME)
-@Target(ElementType.METHOD)
-public @interface SubmitRepeat {
-}
diff --git a/src/main/java/com/xcong/excoin/common/annotations/UserAuth.java b/src/main/java/com/xcong/excoin/common/annotations/UserAuth.java
deleted file mode 100644
index 597a6e9..0000000
--- a/src/main/java/com/xcong/excoin/common/annotations/UserAuth.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package com.xcong.excoin.common.annotations;
-
-import java.lang.annotation.*;
-
-
-/**
- * 自动注入当前登录用户
- *
- * @author wzy
- */
-@Target({ ElementType.PARAMETER, ElementType.TYPE })
-@Retention(RetentionPolicy.RUNTIME)
-@Documented
-public @interface UserAuth {
-}
diff --git a/src/main/java/com/xcong/excoin/common/aop/SubmitRepeatAspect.java b/src/main/java/com/xcong/excoin/common/aop/SubmitRepeatAspect.java
deleted file mode 100644
index 9d00c82..0000000
--- a/src/main/java/com/xcong/excoin/common/aop/SubmitRepeatAspect.java
+++ /dev/null
@@ -1,74 +0,0 @@
-package com.xcong.excoin.common.aop;
-
-import com.xcong.excoin.common.annotations.SubmitRepeat;
-import com.xcong.excoin.common.response.Result;
-import com.xcong.excoin.utils.MessageSourceUtils;
-import com.xcong.excoin.utils.RedisUtils;
-import lombok.extern.slf4j.Slf4j;
-import org.aspectj.lang.JoinPoint;
-import org.aspectj.lang.ProceedingJoinPoint;
-import org.aspectj.lang.annotation.*;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-import org.springframework.web.context.request.RequestContextHolder;
-import org.springframework.web.context.request.ServletRequestAttributes;
-
-import javax.annotation.Resource;
-import javax.servlet.http.HttpServletRequest;
-
-/**
- * @author wzy
- * @date 2020-04-16 22:01
- **/
-@Slf4j
-@Aspect
-@Component
-public class SubmitRepeatAspect {
-
- @Resource
- private RedisUtils redisUtil;
-
- private String key;
-
- @Pointcut("@annotation(submitRepeat)")
- public void submitRepeatPointCut(SubmitRepeat submitRepeat) {
-
- }
-
- @Before("submitRepeatPointCut(submitRepeat)")
- public void before(SubmitRepeat submitRepeat) {
- }
-
- @Around("submitRepeatPointCut(submitRepeat)")
- public Object around(ProceedingJoinPoint joinPoint, SubmitRepeat submitRepeat) throws Throwable {
- ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
- HttpServletRequest request = attributes.getRequest();
-
- String token = request.getHeader("token");
- String uri = request.getRequestURI();
- String mId = (String) redisUtil.get(token);
- log.info("#token : {}, uri : {}, mId : {}#", token, uri, mId);
- key = mId + "_" + uri;
- boolean flag = redisUtil.setNotExist(key, "1", 5);
- log.info("#mid : {}, flag : {}#", mId, flag);
- if (flag) {
- Object result = joinPoint.proceed();
- redisUtil.del(key);
- return result;
- } else {
- return Result.fail(MessageSourceUtils.getString("submit_repeat"));
- }
- }
-
- @After("submitRepeatPointCut(submitRepeat)")
- public void after(SubmitRepeat submitRepeat) {
-
- }
-
- @AfterThrowing(throwing = "ex", pointcut = "submitRepeatPointCut(submitRepeat)")
- public void afterThrows(JoinPoint jp, Exception ex, SubmitRepeat submitRepeat) throws Exception {
- log.error("#submit repeat error:#", ex);
- redisUtil.del(key);
- throw new Exception("系统繁忙");
- }
-}
diff --git a/src/main/java/com/xcong/excoin/common/contants/AppContants.java b/src/main/java/com/xcong/excoin/common/contants/AppContants.java
deleted file mode 100644
index 40a7065..0000000
--- a/src/main/java/com/xcong/excoin/common/contants/AppContants.java
+++ /dev/null
@@ -1,79 +0,0 @@
-package com.xcong.excoin.common.contants;
-
-import java.math.BigDecimal;
-
-/**
- * @author wzy
- * @date 2020-05-12
- **/
-public class AppContants {
-
- /**
- * 系统用户
- */
- public static final String SYSTEM_USER = "system";
-
-
- /**
- * app用户登陆redis前缀
- */
- public static final String APP_LOGIN_PREFIX = "app_";
-
- public static final String PC_LOGIN_PREFIX = "pc_";
-
- /**
- * token头部
- */
- public static final String TOKEN_HEADER = "Authorization";
-
- /**
- * token start with
- */
- public static final String TOKEN_START_WITH = "Bearer ";
-
- /**
- * 账号类型-手机号
- */
- public static final String ACCOUNT_TYPE_MOBILE = "1";
-
- /**
- * 账号类型-邮箱
- */
- public static final String ACCOUNT_TYPE_EMAIL = "2";
-
- /**
- * 系统推荐人id
- */
- public static final String SYSTEM_REFERER = "rxadr3";
-
- /**
- * 初始化金额
- */
- public static final BigDecimal INIT_MONEY = BigDecimal.ZERO;
-
-
- public static final Integer INIT_SIMULATE_MONEY = 5000;
-
- /**
- * homeSymbols 接口状态值 币币
- */
- public static final int HOME_SYMBOLS_COIN = 1;
-
- /**
- * homeSymbols 接口状态值 合约
- */
- public static final int HOME_SYMBOLS_CONTRACT = 2;
-
- /**
- * 验证码前缀 手机
- */
- public static final String VERIFY_CODE_PREFIX = "CODE_SMS_";
-
- /**
- * 图片后缀
- */
- public static final String UPLOAD_IMAGE_SUFFIX = ".jpg";
-
- public static final String TIME_OUT = "time_out";
-
-}
diff --git a/src/main/java/com/xcong/excoin/common/enumerates/CoinTypeEnum.java b/src/main/java/com/xcong/excoin/common/enumerates/CoinTypeEnum.java
deleted file mode 100644
index 720342a..0000000
--- a/src/main/java/com/xcong/excoin/common/enumerates/CoinTypeEnum.java
+++ /dev/null
@@ -1,10 +0,0 @@
-package com.xcong.excoin.common.enumerates;
-
-/**
- * 币种枚举数据
- *
- * @author wzy
- */
-public enum CoinTypeEnum {
- USDT, BTC, ETH, LTC, EOS, XRP, BCH, ETC
-}
diff --git a/src/main/java/com/xcong/excoin/common/enumerates/MemberWalletCoinEnum.java b/src/main/java/com/xcong/excoin/common/enumerates/MemberWalletCoinEnum.java
deleted file mode 100644
index e4d58dc..0000000
--- a/src/main/java/com/xcong/excoin/common/enumerates/MemberWalletCoinEnum.java
+++ /dev/null
@@ -1,75 +0,0 @@
-package com.xcong.excoin.common.enumerates;
-
-public enum MemberWalletCoinEnum {
-
- WALLETCOINUSDT("walletCoinUsdt", "usdt"),
- WALLETCOINCNY("walletCoinCny", "cny"),
-
- WALLETCOINLIST("walletCoinList", "walletList"),
- WALLETAGENT("walletCoin", "wallet"),
-
- WALLETCONTRACT("walletContract", "walletContract"),
-
- CONTENTTOCONTRACT("0001","转出至合约账户"),
- CONTENTFROMWALLETCOIN("0002","由币币账户转入"),
-
- CONTENTTOWALLETCOIN("0003","转出至币币账户"),
- CONTENTFROMCONTRACT("0004","由合约账户转入"),
-
- CONTENTFROMAGENT("0005","由代理账户转入"),
-
- WALLETCOINCODE("USDT", "USDT"),
-
- SUBMITSALESWALLETCOINORDER_SERVICERATE("ServiceRate","0.002"),
-
- //SUBMITSALESWALLETCOINORDER_TYPE_S("买入","1"),
- //SUBMITSALESWALLETCOINORDER_TYPE_B("卖出","2"),
- //SUBMITSALESWALLETCOINORDER_TRADETYPE_S("市价","1"),
- //SUBMITSALESWALLETCOINORDER_TRADETYPE_X("限价","2"),
-
- //SUBMITSALESWALLETCOINORDER_ORDERSTATUS_ONE("委托中","1"),
- //SUBMITSALESWALLETCOINORDER_ORDERSTATUS_TWO("撤单","2"),
- //SUBMITSALESWALLETCOINORDER_ORDERSTATUS_THREE("已成交","3"),
-
-
-
- ENTERTRANSACTIONPAGEOFWALLETCOIN_ISCOLLECT_NO("isCollect","0"),
- ENTERTRANSACTIONPAGEOFWALLETCOIN_ISCOLLECT_YES("isCollect","1"),
- ENTERTRANSACTIONPAGEOFWALLETCOIN_SPREAD("spread","spread"),
- ENTERTRANSACTIONPAGEOFWALLETCOIN_CLOSINGRATIO("closingRatio","closingRatio"),
- ENTERTRANSACTIONPAGEOFWALLETCOIN_MEMBERMONEY("memberMoney","memberMoney"),
- ENTERTRANSACTIONPAGEOFWALLETCOIN_CURRENTPRICE("currentPrice","currentPrice"),
- ENTERTRANSACTIONPAGEOFWALLETCOIN_CNYUSDT("cnyUsdt","cnyUsdt"),
- ENTERTRANSACTIONPAGEOFWALLETCOIN_CURRENTPRICECNY("currentPriceCny","currentPriceCny"),
- ENTERTRANSACTIONPAGEOFWALLETCOIN_BUY("buy","1")
-
- ;
-
-
-
-
-
- private String name;
- private String value;
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public String getValue() {
- return value;
- }
-
- public void setValue(String value) {
- this.value = value;
- }
-
- private MemberWalletCoinEnum(String name, String value) {
- this.name = name;
- this.value = value;
- }
-}
diff --git a/src/main/java/com/xcong/excoin/common/enumerates/OrderClosingTypeEnum.java b/src/main/java/com/xcong/excoin/common/enumerates/OrderClosingTypeEnum.java
deleted file mode 100644
index 3d22b26..0000000
--- a/src/main/java/com/xcong/excoin/common/enumerates/OrderClosingTypeEnum.java
+++ /dev/null
@@ -1,55 +0,0 @@
-package com.xcong.excoin.common.enumerates;
-
-import lombok.Getter;
-
-/**
- * 合约历史订单 -- 平仓类型
- *
- * @author wzy
- * @date 2020-06-01
- **/
-@Getter
-public enum OrderClosingTypeEnum {
-
- /**
- * 平多
- */
- CLOSE_MORE(2)
- /**
- * 平空
- */
- , CLOSE_LESS(3)
- /**
- * 爆仓平多
- */
- , BOMB_CLOSE_MORE(4)
- /**
- * 爆仓平空
- */
- , BOMB_CLOSE_LESS(5)
- /**
- * 止盈平多
- */
- , PROFIT_STOP_MORE(6)
- /**
- * 止盈平空
- */
- , PROFIT_STOP_LESS(7)
- /**
- * 止损平多
- */
- , LESS_STOP_MORE(8)
- /**
- * 止损平空
- */
- , LESS_STOP_LESS(9);
-
- /**
- * 平仓类型
- */
- private final int value;
-
- private OrderClosingTypeEnum(int value) {
- this.value = value;
- }
-}
diff --git a/src/main/java/com/xcong/excoin/common/enumerates/RabbitPriceTypeEnum.java b/src/main/java/com/xcong/excoin/common/enumerates/RabbitPriceTypeEnum.java
deleted file mode 100644
index b3d568f..0000000
--- a/src/main/java/com/xcong/excoin/common/enumerates/RabbitPriceTypeEnum.java
+++ /dev/null
@@ -1,31 +0,0 @@
-package com.xcong.excoin.common.enumerates;
-
-import lombok.Getter;
-
-/**
- * rabbit 价格操作类型枚举
- * 1:买入委托2:开多3:开空4:平多5:平空6:爆仓平多7:爆仓平空8:撤单9:止盈平多10:止盈平空11:止损平多12:止损平空
- *
- * @author helius
- */
-@Getter
-public enum RabbitPriceTypeEnum {
-
- /**
- * 委托开多
- */
- ENTRUST_OPEN_MORE(2)
- , ENTRUST_OPEN_LESS(3)
- , CLOSE_MORE_BOMB(6)
- , CLOSE_LESS_BOMB(7)
- , CLOSE_MORE_STOP_PROFIT(9)
- , CLOSE_LESS_STOP_PROFIT(10)
- , CLOSE_MORE_STOP_LESS(11)
- , CLOSE_LESS_STOP_LESS(12);
-
- private int value;
-
- private RabbitPriceTypeEnum(int value) {
- this.value = value;
- }
-}
diff --git a/src/main/java/com/xcong/excoin/common/enumerates/SymbolEnum.java b/src/main/java/com/xcong/excoin/common/enumerates/SymbolEnum.java
deleted file mode 100644
index ca590aa..0000000
--- a/src/main/java/com/xcong/excoin/common/enumerates/SymbolEnum.java
+++ /dev/null
@@ -1,39 +0,0 @@
-package com.xcong.excoin.common.enumerates;
-
-import lombok.Getter;
-
-/**
- * @author wzy
- */
-@Getter
-public enum SymbolEnum {
-
- BTC("BTC", "BTC/USDT")
- ,ETH("ETH", "ETH/USDT")
- ,LTC("LTC", "LTC/USDT")
- ,BCH("BCH", "BCH/USDT")
- ,EOS("EOS", "EOS/USDT")
- ,XRP("XRP", "XRP/USDT")
- ,ETC("ETC", "ETC/USDT");
-
- private String name;
-
- private String value;
-
- private SymbolEnum(String name, String value) {
- this.name = name;
- this.value = value;
- }
-
- public static String getNameByValue(String value) {
- String name = "";
- for (SymbolEnum symbolEnum : values()) {
- if (value.equals(symbolEnum.getValue())){
- name = symbolEnum.getName();
- break;
- }
- }
- return name;
- }
-
-}
diff --git a/src/main/java/com/xcong/excoin/common/exception/GlobalException.java b/src/main/java/com/xcong/excoin/common/exception/GlobalException.java
deleted file mode 100644
index 938cd36..0000000
--- a/src/main/java/com/xcong/excoin/common/exception/GlobalException.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package com.xcong.excoin.common.exception;
-
-import lombok.Getter;
-
-/**
- * 统一异常处理
- *
- * @author wzy
- * @date 2020-05-18
- **/
-@Getter
-public class GlobalException extends RuntimeException {
-
- public GlobalException(String msg) {
- super(msg);
- }
-}
diff --git a/src/main/java/com/xcong/excoin/common/response/Result.java b/src/main/java/com/xcong/excoin/common/response/Result.java
deleted file mode 100644
index 00064a5..0000000
--- a/src/main/java/com/xcong/excoin/common/response/Result.java
+++ /dev/null
@@ -1,80 +0,0 @@
-package com.xcong.excoin.common.response;
-
-import com.xcong.excoin.utils.MessageSourceUtils;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import java.io.Serializable;
-
-/**
- * @author wzy
- * @date 2020-04-29 11:27
- **/
-@Data
-@ApiModel(value = "返回基类", description = "基础返回类")
-public class Result implements Serializable {
-
- private static final long serialVersionUID = 1L;
-
- private static final int SUCCESS = 0;
-
- private static final String SUCCESS_MSG = MessageSourceUtils.getString("result_success_msg");
-
- private static final int FAIL = -1;
-
- private static final int LOGIN_FAIL = -2;
-
- @ApiModelProperty(value = "状态码", example = "0")
- private int code;
-
- @ApiModelProperty(value = "提示消息")
- private String msg;
-
- @ApiModelProperty(value = "数据对象")
- private Object data;
-
- public static Result ok(String msg) {
- Result result = new Result();
- result.code = SUCCESS;
- result.msg = msg;
- return result;
- }
-
- public static Result ok(String msg, Object data) {
- Result result = new Result();
- result.code = SUCCESS;
- result.msg = msg;
- result.data = data;
- return result;
- }
-
- public static Result ok(Object data) {
- Result result = new Result();
- result.code = SUCCESS;
- result.msg = SUCCESS_MSG;
- result.data = data;
- return result;
- }
-
- public static Result fail(String msg) {
- Result result = new Result();
- result.code = FAIL;
- result.msg = msg;
- return result;
- }
-
- public static Result loginFail(String msg) {
- Result result = new Result();
- result.code = LOGIN_FAIL;
- result.msg = msg;
- return result;
- }
-
- public static Result timeOut(String msg) {
- Result result = new Result();
- result.code = -3;
- result.msg = msg;
- return result;
- }
-}
diff --git a/src/main/java/com/xcong/excoin/common/response/ResultCode.java b/src/main/java/com/xcong/excoin/common/response/ResultCode.java
deleted file mode 100644
index 9a93765..0000000
--- a/src/main/java/com/xcong/excoin/common/response/ResultCode.java
+++ /dev/null
@@ -1,34 +0,0 @@
-package com.xcong.excoin.common.response;
-
-/**
- * 状态码
- * @author wzy
- */
-public enum ResultCode {
- /**
- * 成功
- */
- SUCCESS("1", "成功"),
-
- /**
- * 失败
- */
- FAIL("0", "失败");
-
-
- private String code;
- private String message;
-
- ResultCode(String code, String message) {
- this.code = code;
- this.message = message;
- }
-
- public String code() {
- return this.code;
- }
-
- public String message() {
- return this.message;
- }
-}
diff --git a/src/main/java/com/xcong/excoin/configurations/GlobalExceptionHandler.java b/src/main/java/com/xcong/excoin/configurations/GlobalExceptionHandler.java
deleted file mode 100644
index 99efc56..0000000
--- a/src/main/java/com/xcong/excoin/configurations/GlobalExceptionHandler.java
+++ /dev/null
@@ -1,77 +0,0 @@
-package com.xcong.excoin.configurations;
-
-import com.xcong.excoin.common.exception.GlobalException;
-import com.xcong.excoin.common.response.Result;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.dao.DuplicateKeyException;
-import org.springframework.security.authentication.BadCredentialsException;
-import org.springframework.validation.FieldError;
-import org.springframework.web.bind.MethodArgumentNotValidException;
-import org.springframework.web.bind.annotation.ExceptionHandler;
-import org.springframework.web.bind.annotation.RestControllerAdvice;
-
-import javax.validation.ValidationException;
-
-/**
- * @author wzy
- * @date 2020-05-08 15:40
- **/
-@RestControllerAdvice
-@Slf4j
-public class GlobalExceptionHandler {
-
- /**
- * 方法参数校验
- *
- * @param e
- * @return
- */
- @ExceptionHandler(value = {MethodArgumentNotValidException.class})
- public Result handleException(MethodArgumentNotValidException e) {
- log.error(e.getMessage());
- FieldError fieldError = e.getBindingResult().getFieldError();
- if (fieldError != null) {
- return Result.fail(fieldError.getDefaultMessage());
- } else {
- return Result.fail("参数校验失败");
- }
- }
-
-
- @ExceptionHandler(value = {ValidationException.class})
- public Result handleException(ValidationException e) {
- log.error(e.getMessage(), e);
- return null;
- }
-
- @ExceptionHandler(value = {DuplicateKeyException.class})
- public Result handleException(DuplicateKeyException e) {
- log.error(e.getMessage(), e);
- return null;
- }
-
-
- /**
- * spring security 账户密码验证异常
- *
- * @param e
- * @return
- */
- @ExceptionHandler(value = { BadCredentialsException.class })
- public Result handleException(BadCredentialsException e) {
- log.error(e.getMessage(), e);
- return Result.fail("用户名或密码错误");
- }
-
- @ExceptionHandler(value = {GlobalException.class})
- public Result handleException(GlobalException e) {
- return Result.fail(e.getMessage());
- }
-
- @ExceptionHandler(value = {Exception.class})
- public Result handleException(Exception e) {
- log.error(e.getMessage(), e);
- return Result.fail("系统异常");
- }
-
-}
diff --git a/src/main/java/com/xcong/excoin/configurations/WebMvcConfig.java b/src/main/java/com/xcong/excoin/configurations/WebMvcConfig.java
deleted file mode 100644
index 180cdee..0000000
--- a/src/main/java/com/xcong/excoin/configurations/WebMvcConfig.java
+++ /dev/null
@@ -1,36 +0,0 @@
-package com.xcong.excoin.configurations;
-
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.boot.SpringBootConfiguration;
-import org.springframework.web.method.support.HandlerMethodArgumentResolver;
-import org.springframework.web.servlet.config.annotation.CorsRegistry;
-import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
-
-import java.util.List;
-
-/**
- * @author wzy
- * @date 2020-04-27 11:54
- **/
-@SpringBootConfiguration
-@Slf4j
-public class WebMvcConfig implements WebMvcConfigurer {
-
- @Override
- public void addArgumentResolvers(List<HandlerMethodArgumentResolver> resolvers) {
- }
-
- /**
- * 设置cors跨域支持
- *
- * @param registry
- */
- @Override
- public void addCorsMappings(CorsRegistry registry) {
- registry.addMapping("/**")
- .allowedOrigins("*")
- .allowedMethods("GET", "HEAD", "POST", "PUT", "DELETE", "OPTIONS")
- .allowCredentials(true).maxAge(3600);
- }
-
-}
diff --git a/src/main/java/com/xcong/excoin/configurations/i18n/CustomLocaleResolver.java b/src/main/java/com/xcong/excoin/configurations/i18n/CustomLocaleResolver.java
deleted file mode 100644
index 30324c9..0000000
--- a/src/main/java/com/xcong/excoin/configurations/i18n/CustomLocaleResolver.java
+++ /dev/null
@@ -1,33 +0,0 @@
-package com.xcong.excoin.configurations.i18n;
-
-import cn.hutool.core.util.StrUtil;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.web.servlet.LocaleResolver;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.util.Locale;
-
-/**
- * @author wzy
- * @date 2020-04-30 14:56
- **/
-@Configuration
-public class CustomLocaleResolver implements LocaleResolver {
-
- @Override
- public Locale resolveLocale(HttpServletRequest httpServletRequest) {
- String lang = httpServletRequest.getHeader("lang");
- if(StrUtil.isBlank(lang)) {
- return new Locale("zh", "CN");
- } else {
- String[] splite = lang.split("_");
- return new Locale(splite[0], splite[1]);
- }
- }
-
- @Override
- public void setLocale(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Locale locale) {
-
- }
-}
diff --git a/src/main/java/com/xcong/excoin/configurations/i18n/LocaleResolverConfig.java b/src/main/java/com/xcong/excoin/configurations/i18n/LocaleResolverConfig.java
deleted file mode 100644
index df80884..0000000
--- a/src/main/java/com/xcong/excoin/configurations/i18n/LocaleResolverConfig.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package com.xcong.excoin.configurations.i18n;
-
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.web.servlet.LocaleResolver;
-
-
-/**
- * @author wzy
- * @date 2020-04-27 11:55
- **/
-@Configuration
-public class LocaleResolverConfig {
-
- @Bean
- public LocaleResolver localeResolver() {
- return new CustomLocaleResolver();
- }
-}
diff --git a/src/main/java/com/xcong/excoin/configurations/properties/SecurityProperties.java b/src/main/java/com/xcong/excoin/configurations/properties/SecurityProperties.java
deleted file mode 100644
index abf0d06..0000000
--- a/src/main/java/com/xcong/excoin/configurations/properties/SecurityProperties.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package com.xcong.excoin.configurations.properties;
-
-import lombok.Data;
-import org.springframework.boot.context.properties.ConfigurationProperties;
-import org.springframework.context.annotation.Configuration;
-
-/**
- * @author wzy
- * @date 2020-05-13
- **/
-@Data
-@Configuration
-@ConfigurationProperties(prefix = "rsa")
-public class SecurityProperties {
-
- private String privateKey;
-
- private String publicKey;
-}
diff --git a/src/main/java/com/xcong/excoin/configurations/security/CustomAccessDeniedHandler.java b/src/main/java/com/xcong/excoin/configurations/security/CustomAccessDeniedHandler.java
deleted file mode 100644
index 34f840f..0000000
--- a/src/main/java/com/xcong/excoin/configurations/security/CustomAccessDeniedHandler.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package com.xcong.excoin.configurations.security;
-
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.xcong.excoin.common.response.Result;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.security.access.AccessDeniedException;
-import org.springframework.security.web.access.AccessDeniedHandler;
-
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.io.IOException;
-
-/**
- * @author wzy
- * @date 2020-05-12
- **/
-@Slf4j
-public class CustomAccessDeniedHandler implements AccessDeniedHandler {
- @Override
- public void handle(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, AccessDeniedException e) throws IOException, ServletException {
- Result result = Result.loginFail("Forbidden");
- httpServletResponse.getWriter().write(new ObjectMapper().writeValueAsString(result));
- httpServletResponse.setStatus(HttpServletResponse.SC_FORBIDDEN);
- }
-}
diff --git a/src/main/java/com/xcong/excoin/configurations/security/CustomAuthenticationEntryPoint.java b/src/main/java/com/xcong/excoin/configurations/security/CustomAuthenticationEntryPoint.java
deleted file mode 100644
index 98b1cdd..0000000
--- a/src/main/java/com/xcong/excoin/configurations/security/CustomAuthenticationEntryPoint.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package com.xcong.excoin.configurations.security;
-
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.xcong.excoin.common.contants.AppContants;
-import com.xcong.excoin.common.response.Result;
-import org.springframework.security.core.AuthenticationException;
-import org.springframework.security.web.AuthenticationEntryPoint;
-
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.io.IOException;
-
-/**
- * @author wzy
- * @date 2020-05-12
- **/
-public class CustomAuthenticationEntryPoint implements AuthenticationEntryPoint {
-
- @Override
- public void commence(HttpServletRequest httpServletRequest, HttpServletResponse response, AuthenticationException e) throws IOException, ServletException {
- String timeOut = response.getHeader("TimeOut");
- if (AppContants.TIME_OUT.equals(timeOut)) {
- Result result = Result.timeOut("Time Out");
- response.setCharacterEncoding("UTF-8");
- response.setContentType("application/json; charset=utf-8");
- response.getWriter().write(new ObjectMapper().writeValueAsString(result));
- response.setStatus(HttpServletResponse.SC_REQUEST_TIMEOUT);
- } else {
- Result result = Result.loginFail("Unauthorized");
- response.setCharacterEncoding("UTF-8");
- response.setContentType("application/json; charset=utf-8");
- response.getWriter().write(new ObjectMapper().writeValueAsString(result));
- response.setStatus(HttpServletResponse.SC_UNAUTHORIZED);
- }
- }
-}
diff --git a/src/main/java/com/xcong/excoin/configurations/security/WebSecurityConfig.java b/src/main/java/com/xcong/excoin/configurations/security/WebSecurityConfig.java
deleted file mode 100644
index 8aa5e43..0000000
--- a/src/main/java/com/xcong/excoin/configurations/security/WebSecurityConfig.java
+++ /dev/null
@@ -1,79 +0,0 @@
-package com.xcong.excoin.configurations.security;
-
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.http.HttpMethod;
-import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
-import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
-import org.springframework.security.config.annotation.web.builders.HttpSecurity;
-import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
-import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
-import org.springframework.security.core.userdetails.UserDetailsService;
-import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
-import org.springframework.security.crypto.password.PasswordEncoder;
-import org.springframework.security.web.AuthenticationEntryPoint;
-import org.springframework.security.web.access.AccessDeniedHandler;
-
-import javax.annotation.Resource;
-
-/**
- * @author wzy
- * @date 2020-05-11
- **/
-@Slf4j
-@Configuration
-@EnableWebSecurity
-@EnableGlobalMethodSecurity(prePostEnabled = true)
-public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
-
- @Resource
- private UserDetailsService userDetailsService;
-
- @Override
- protected void configure(HttpSecurity http) throws Exception {
- http.httpBasic().and().
- cors().and().csrf().disable()
- .exceptionHandling().authenticationEntryPoint(authenticationEntryPoint())
- .and()
- .authorizeRequests()
- .antMatchers(HttpMethod.OPTIONS, "/**").permitAll()
- .antMatchers("/login").permitAll()
- .antMatchers("/register").permitAll()
- .antMatchers("/swagger**/**").permitAll()
- .antMatchers("/webjars/**").permitAll()
- .antMatchers("/v2/**").permitAll()
- .antMatchers("/api/symbols/**").permitAll()
- .antMatchers("/common/**").permitAll()
- .antMatchers("/api/exchange/**").permitAll()
- .antMatchers("/api/member/getMemberAccountInfo").permitAll()
- .antMatchers("/api/member/memberForgetPwd").permitAll()
- .antMatchers("/api/member/memberCoinInfoList").permitAll()
- .antMatchers("/api/member/getPcVersionInfo").permitAll()
- .antMatchers("/api/member/getAppVersionInfo").permitAll()
- .antMatchers("/api/orderCoin/searchSymbolResultList").permitAll()
- .antMatchers("/api/orderCoin/findCollect").permitAll()
- .anyRequest().authenticated();
- }
-
- @Override
- protected void configure(AuthenticationManagerBuilder auth) throws Exception {
- auth.userDetailsService(userDetailsService).passwordEncoder(passwordEncoder());
- }
-
- @Bean
- public PasswordEncoder passwordEncoder() {
- return new BCryptPasswordEncoder();
- }
-
- @Bean
- public AccessDeniedHandler accessDeniedHandler() {
- return new CustomAccessDeniedHandler();
- }
-
- @Bean
- public AuthenticationEntryPoint authenticationEntryPoint() {
- return new CustomAuthenticationEntryPoint();
- }
-
-}
diff --git a/src/main/java/com/xcong/excoin/utils/MessageSourceUtils.java b/src/main/java/com/xcong/excoin/utils/MessageSourceUtils.java
deleted file mode 100644
index 4663dd4..0000000
--- a/src/main/java/com/xcong/excoin/utils/MessageSourceUtils.java
+++ /dev/null
@@ -1,31 +0,0 @@
-package com.xcong.excoin.utils;
-
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.context.MessageSource;
-import org.springframework.context.NoSuchMessageException;
-import org.springframework.context.i18n.LocaleContextHolder;
-import org.springframework.stereotype.Component;
-
-/**
- * @author wzy
- * @date 2020-05-05 16:57
- **/
-@Component
-@Slf4j
-public class MessageSourceUtils {
-
- private static MessageSource messageSource;
-
- public MessageSourceUtils(MessageSource messageSource) {
- MessageSourceUtils.messageSource = messageSource;
- }
-
- public static String getString(String key) {
- try {
- return messageSource.getMessage(key, null, LocaleContextHolder.getLocale());
- } catch (NoSuchMessageException e) {
- log.error("#获取国际化异常#", e);
- return key;
- }
- }
-}
diff --git a/src/main/java/com/xcong/excoin/utils/RedisUtils.java b/src/main/java/com/xcong/excoin/utils/RedisUtils.java
deleted file mode 100644
index 6110ef3..0000000
--- a/src/main/java/com/xcong/excoin/utils/RedisUtils.java
+++ /dev/null
@@ -1,583 +0,0 @@
-package com.xcong.excoin.utils;
-
-import org.springframework.data.redis.core.RedisTemplate;
-import org.springframework.stereotype.Component;
-import org.springframework.util.CollectionUtils;
-
-import javax.annotation.Resource;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.TimeUnit;
-
-/**
- * @Author wzy
- * @Date 2020/5/10
- * @email wangdoubleone@gmail.com
- * @Version V1.0
- **/
-@Component
-public class RedisUtils {
-
-
- @Resource
- private RedisTemplate<String, Object> redisTemplate;
-
-
- // =============================common============================
- /**
- * 指定缓存失效时间
- * @param key 键
- * @param time 时间(秒)
- * @return
- */
- public boolean expire(String key, long time) {
- try {
- if (time > 0) {
- redisTemplate.expire(key, time, TimeUnit.SECONDS);
- }
- return true;
- } catch (Exception e) {
- e.printStackTrace();
- return false;
- }
- }
-
- /**
- * 根据key 获取过期时间
- * @param key 键 不能为null
- * @return 时间(秒) 返回0代表为永久有效
- */
- public long getExpire(String key) {
- return redisTemplate.getExpire(key, TimeUnit.SECONDS);
- }
-
- /**
- * 判断key是否存在
- * @param key 键
- * @return true 存在 false不存在
- */
- public boolean hasKey(String key) {
- try {
- return redisTemplate.hasKey(key);
- } catch (Exception e) {
- e.printStackTrace();
- return false;
- }
- }
-
- /**
- * 删除缓存
- * @param key 可以传一个值 或多个
- */
- @SuppressWarnings("unchecked")
- public void del(String... key) {
- if (key != null && key.length > 0) {
- if (key.length == 1) {
- redisTemplate.delete(key[0]);
- } else {
- redisTemplate.delete(CollectionUtils.arrayToList(key));
- }
- }
- }
-
- // ============================String=============================
- /**
- * 普通缓存获取
- * @param key 键
- * @return 值
- */
- public Object get(String key) {
- return key == null ? null : redisTemplate.opsForValue().get(key);
- }
- public Object getWithDelay(String key) {
- // 在读取前添加短暂延迟
- try {
- Thread.sleep(50); // 等待50ms让Redis同步完成
- } catch (InterruptedException e) {
- Thread.currentThread().interrupt();
- }
- return key == null ? null : redisTemplate.opsForValue().get(key);
- }
-
-
- /**
- * 普通缓存获取
- * @param key 键
- * @return 值
- */
- public String getStringWithDelay(String key) {
- // 在读取前添加短暂延迟
- try {
- Thread.sleep(50); // 等待50ms让Redis同步完成
- } catch (InterruptedException e) {
- Thread.currentThread().interrupt();
- }
- Object obj = key == null ? null : redisTemplate.opsForValue().get(key);
- if(obj!=null){
- return obj.toString();
- }
- return null;
- }
-
-
- /**
- * 普通缓存获取
- * @param key 键
- * @return 值
- */
- public String getString(String key) {
- Object obj = key == null ? null : redisTemplate.opsForValue().get(key);
- if(obj!=null){
- return obj.toString();
- }
- return null;
- }
-
- /**
- * 普通缓存放入
- * @param key 键
- * @param value 值
- * @return true成功 false失败
- */
- public boolean set(String key, Object value) {
- try {
- redisTemplate.opsForValue().set(key, value);
- return true;
- } catch (Exception e) {
- e.printStackTrace();
- return false;
- }
- }
-
- /**
- * 普通缓存放入并设置时间
- * @param key 键
- * @param value 值
- * @param time 时间(秒) time要大于0 如果time小于等于0 将设置无限期
- * @return true成功 false 失败
- */
- public boolean set(String key, Object value, long time) {
- try {
- if (time > 0) {
- redisTemplate.opsForValue().set(key, value, time, TimeUnit.SECONDS);
- } else {
- set(key, value);
- }
- return true;
- } catch (Exception e) {
- e.printStackTrace();
- return false;
- }
- }
-
- public boolean setNotExist(String key, Object value, long time) {
- return redisTemplate.opsForValue().setIfAbsent(key, value, time, TimeUnit.SECONDS);
- }
-
- /**
- * 递增
- * @param key 键
- * @param delta 要增加几(大于0)
- * @return
- */
- public long incr(String key, long delta) {
- if (delta < 0) {
- throw new RuntimeException("递增因子必须大于0");
- }
- return redisTemplate.opsForValue().increment(key, delta);
- }
-
- /**
- * 递减
- * @param key 键
- * @param delta 要减少几(小于0)
- * @return
- */
- public long decr(String key, long delta) {
- if (delta < 0) {
- throw new RuntimeException("递减因子必须大于0");
- }
- return redisTemplate.opsForValue().increment(key, -delta);
- }
-
-
- // ================================Map=================================
-
- /**
- * HashGet
- * @param key 键 不能为null
- * @param item 项 不能为null
- * @return 值
- */
- public Object hget(String key, String item) {
- return redisTemplate.opsForHash().get(key, item);
- }
-
- /**
- * 获取hashKey对应的所有键值
- * @param key 键
- * @return 对应的多个键值
- */
- public Map<Object, Object> hmget(String key) {
- return redisTemplate.opsForHash().entries(key);
- }
- /**
- * HashSet
-
- * @param key 键
- * @param map 对应多个键值
- * @return true 成功 false 失败
- */
- public boolean hmset(String key, Map<String, Object> map) {
- try {
- redisTemplate.opsForHash().putAll(key, map);
- return true;
- } catch (Exception e) {
- e.printStackTrace();
- return false;
- }
- }
- /**
- * HashSet 并设置时间
- * @param key 键
- * @param map 应多个键值
- * @param time 时间(秒)
- * @return true成功 false失败
- */
- public boolean hmset(String key, Map<String, Object> map, long time) {
- try {
- redisTemplate.opsForHash().putAll(key, map);
- if (time > 0) {
- expire(key, time);
- }
- return true;
- } catch (Exception e) {
- e.printStackTrace();
- return false;
- }
- }
-
-
- /**
- * 向一张hash表中放入数据,如果不存在将创建
- * @param key 键
- * @param item 项
- * @param value 值
- * @return true 成功 false失败
- */
- public boolean hset(String key, String item, Object value) {
- try {
- redisTemplate.opsForHash().put(key, item, value);
- return true;
- } catch (Exception e) {
- e.printStackTrace();
- return false;
- }
- }
- /**
- * 向一张hash表中放入数据,如果不存在将创建
- * @param key 键
- * @param item 项
- * @param value 值
- * @param time 时间(秒) 注意:如果已存在的hash表有时间,这里将会替换原有的时间
- * @return true 成功 false失败
- */
- public boolean hset(String key, String item, Object value, long time) {
- try {
- redisTemplate.opsForHash().put(key, item, value);
- if (time > 0) {
- expire(key, time);
- }
- return true;
- } catch (Exception e) {
- e.printStackTrace();
- return false;
- }
- }
- /**
- * 删除hash表中的值
- * @param key 键 不能为null
- * @param item 项 可以使多个 不能为null
- */
- public void hdel(String key, Object... item) {
- redisTemplate.opsForHash().delete(key, item);
- }
- /**
- * 判断hash表中是否有该项的值
- * @param key 键 不能为null
- * @param item 项 不能为null
- * @return true 存在 false不存在
- */
- public boolean hHasKey(String key, String item) {
- return redisTemplate.opsForHash().hasKey(key, item);
- }
-
- /**
- * hash递增 如果不存在,就会创建一个 并把新增后的值返回
- * @param key 键
- * @param item 项
- * @param by 要增加几(大于0)
- * @return
- */
- public double hincr(String key, String item, double by) {
- return redisTemplate.opsForHash().increment(key, item, by);
- }
-
- /**
- * hash递减
- * @param key 键
- * @param item 项
- * @param by 要减少记(小于0)
- * @return
- */
- public double hdecr(String key, String item, double by) {
- return redisTemplate.opsForHash().increment(key, item, -by);
- }
- // ============================set=============================
- /**
- * 根据key获取Set中的所有值
- * @param key 键
- * @return
- */
- public Set<Object> sGet(String key) {
- try {
- return redisTemplate.opsForSet().members(key);
- } catch (Exception e) {
- e.printStackTrace();
- return null;
- }
- }
- /**
- * 根据value从一个set中查询,是否存在
- * @param key 键
- * @param value 值
- * @return true 存在 false不存在
- */
- public boolean sHasKey(String key, Object value) {
- try {
- return redisTemplate.opsForSet().isMember(key, value);
- } catch (Exception e) {
- e.printStackTrace();
- return false;
- }
- }
- /**
- * 将数据放入set缓存
- * @param key 键
- * @param values 值 可以是多个
- * @return 成功个数
- */
- public long sSet(String key, Object... values) {
- try {
- return redisTemplate.opsForSet().add(key, values);
- } catch (Exception e) {
- e.printStackTrace();
-
- return 0;
- }
- }
- /**
- 336
- * 将set数据放入缓存
- 337
- * @param key 键
- * @param time 时间(秒)
- * @param values 值 可以是多个
- * @return 成功个数
- */
- public long sSetAndTime(String key, long time, Object... values) {
- try {
- Long count = redisTemplate.opsForSet().add(key, values);
- if (time > 0)
- expire(key, time);
- return count;
-
- }catch(Exception e) {
- e.printStackTrace();
- return 0;
- }
- }
- /**
- * 获取set缓存的长度
- * @param key 键
- * @return
- */
-
- public long sGetSetSize(String key) {
- try {
- return redisTemplate.opsForSet().size(key);
-
- } catch (Exception e) {
- e.printStackTrace();
- return 0;
- }
-
- }
-
- /**
- * 移除值为value的
- * @param key 键
- * @param values 值 可以是多个
- * @return 移除的个数
-
- */
- public long setRemove(String key, Object... values) {
- try {
- Long count = redisTemplate.opsForSet().remove(key, values);
- return count;
-
- } catch (Exception e) {
- e.printStackTrace();
- return 0;
- }
- }
- // ===============================list=================================
- /**
- * 获取list缓存的内容 * @param key 键
- * @param start 开始
- * @param end 结束 0 到 -1代表所有值
- * @return
- */
- public List<Object> lGet(String key, long start, long end) {
- try {
- return redisTemplate.opsForList().range(key, start, end);
- } catch (Exception e) {
- e.printStackTrace();
- return null;
- }
-
- }
-
- /**
- * 获取list缓存的长度
- * @param key 键
-
- * @return
- */
- public long lGetListSize(String key) { try {
- return redisTemplate.opsForList().size(key);
- } catch (Exception e) {
-
- e.printStackTrace();
- return 0;
- }
- } /**
- * 通过索引 获取list中的值
- * @param key 键
- * @param index 索引 index>=0时, 0 表头,1 第二个元素,依次类推;index<0时,-1,表尾,-2倒数第二个元素,依次类推
- * @return
- */
- public Object lGetIndex(String key, long index) {
-
- try {
- return redisTemplate.opsForList().index(key, index);
- } catch (Exception e) {
- e.printStackTrace();
- return null;
- }
- }
-
- /**
- * 将list放入缓存
- * @param key 键
- * @param value 值
- * @return
- */
- public boolean lSet(String key, Object value) {
- try {
- redisTemplate.opsForList().rightPush(key, value);
- return true;
- } catch (Exception e) {
- e.printStackTrace();
- return false;
- }
- }
-
- /**
- * 将list放入缓存
- * @param key 键
- * @param value 值
- * @param time 时间(秒)
- * @return
- */
- public boolean lSet(String key, Object value, long time) {
- try {
- redisTemplate.opsForList().rightPush(key, value);
- if (time > 0)
- expire(key, time);
- return true;
- } catch (Exception e) {
- e.printStackTrace();
- return false;
- }
- }
- /**
- * 将list放入缓存
- * @param key 键
- * @param value 值
- * @return
- */
- public boolean lSet(String key, List<Object> value) {
- try {
- redisTemplate.opsForList().rightPushAll(key, value);
- return true;
- } catch (Exception e) {
- e.printStackTrace();
- return false;
- }
- }
- /**
- * 将list放入缓存
- *
- * @param key 键
- * @param value 值
- * @param time 时间(秒)
- * @return
- */
- public boolean lSet(String key, List<Object> value, long time) {
- try {
- redisTemplate.opsForList().rightPushAll(key, value);
- if (time > 0)
- expire(key, time);
- return true;
-
- } catch (Exception e) {
- e.printStackTrace();
- return false;
- }
- }
- /**
- * 根据索引修改list中的某条数据
- * @param key 键
- * @param index 索引
- * @param value 值
- * @return
- */
- public boolean lUpdateIndex(String key, long index, Object value) {
- try {
- redisTemplate.opsForList().set(key, index, value);
- return true;
- } catch (Exception e) {
- e.printStackTrace();
- return false;
- }
- }
-
-
- /**
- * 移除N个值为value
- * @param key 键
- * @param count 移除多少个
- * @param value 值
- * @return 移除的个数
- */
- public long lRemove(String key, long count, Object value) {
- try {
- return redisTemplate.opsForList().remove(key, count, value);
- } catch (Exception e) {
- e.printStackTrace();
- return 0;
- }
- }
-}
diff --git a/src/main/java/com/xcong/excoin/utils/SSLClient.java b/src/main/java/com/xcong/excoin/utils/SSLClient.java
deleted file mode 100644
index 0b26d23..0000000
--- a/src/main/java/com/xcong/excoin/utils/SSLClient.java
+++ /dev/null
@@ -1,49 +0,0 @@
-package com.xcong.excoin.utils;
-
-import org.apache.http.conn.ClientConnectionManager;
-import org.apache.http.conn.scheme.Scheme;
-import org.apache.http.conn.scheme.SchemeRegistry;
-import org.apache.http.conn.ssl.SSLSocketFactory;
-import org.apache.http.impl.client.DefaultHttpClient;
-
-import javax.net.ssl.SSLContext;
-import javax.net.ssl.TrustManager;
-import javax.net.ssl.X509TrustManager;
-import java.security.cert.CertificateException;
-import java.security.cert.X509Certificate;
-
-
-@SuppressWarnings("deprecation")
-class SSLClient extends DefaultHttpClient {
- public SSLClient() throws Exception {
- super();
- SSLContext ctx = SSLContext.getInstance("TLS");
- X509TrustManager tm = new X509TrustManager() {
-
- @Override
- public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException {
- // TODO Auto-generated method stub
-
- }
-
- @Override
- public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException {
- // TODO Auto-generated method stub
-
- }
-
- @Override
- public X509Certificate[] getAcceptedIssuers() {
- // TODO Auto-generated method stub
- return null;
- }
-
- };
- ctx.init(null, new TrustManager[] { tm }, null);
-
- SSLSocketFactory ssf = new SSLSocketFactory(ctx, SSLSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER);
- ClientConnectionManager ccm = this.getConnectionManager();
- SchemeRegistry sr = ccm.getSchemeRegistry();
- sr.register(new Scheme("https", 443, ssf));
- }
-}
\ No newline at end of file
diff --git a/src/main/java/com/xcong/excoin/utils/ShareCodeUtil.java b/src/main/java/com/xcong/excoin/utils/ShareCodeUtil.java
deleted file mode 100644
index 881f5e1..0000000
--- a/src/main/java/com/xcong/excoin/utils/ShareCodeUtil.java
+++ /dev/null
@@ -1,118 +0,0 @@
-package com.xcong.excoin.utils;
-
-import java.util.Random;
-
-/**
- * 邀请码生成器,算法原理:<br/>
- * 1) 获取id: 1127738 <br/>
- * 2) 使用自定义进制转为:gpm6 <br/>
- * 3) 转为字符串,并在后面加'o'字符:gpm6o <br/>
- * 4)在后面随机产生若干个随机数字字符:gpm6o7 <br/>
- * 转为自定义进制后就不会出现o这个字符,然后在后面加个'o',这样就能确定唯一性。最后在后面产生一些随机字符进行补全。<br/>
- */
-public class ShareCodeUtil {
-
- /**
- * 自定义进制(0,1没有加入,容易与o,l混淆)
- */
-// private static final char[] r=new char[]{'q', 'w', 'e', '8', 'a', 's', '2', 'd', 'z', 'x', '9', 'c', '7', 'p', '5', 'i', 'k', '3', 'm', 'j', 'u', 'f', 'r', '4', 'v', 'y', 'l', 't', 'n', '6', 'b', 'g', 'h'};
- private static final char[] r = new char[]{'1', '2', '3', '4', '5', '6', '7', '8', '9'};
-
- /**
- * (不能与自定义进制有重复)
- */
- private static final char b = '0';
-
- /**
- * 进制长度
- */
- private static final int binLen = r.length;
-
- /**
- * 序列最小长度
- */
- private static final int s = 8;
-
- /**
- * 根据ID生成六位随机码
- *
- * @param id ID
- * @return 随机码
- */
- public static String toSerialCode(long id) {
- char[] buf = new char[32];
- int charPos = 32;
-
- while ((id / binLen) > 0) {
- int ind = (int) (id % binLen);
- buf[--charPos] = r[ind];
- id /= binLen;
- }
- buf[--charPos] = r[(int) (id % binLen)];
- String str = new String(buf, charPos, (32 - charPos));
- // 不够长度的自动随机补全
- if (str.length() < s) {
- StringBuilder sb = new StringBuilder();
- sb.append(b);
- Random rnd = new Random();
- for (int i = 1; i < s - str.length(); i++) {
- sb.append(r[rnd.nextInt(binLen)]);
- }
- str += sb.toString();
- }
- return str;
- }
-
- /**
- * 根据ID生成六位随机码
- *
- * @param id ID
- * @return 随机码
- */
- public static String toSerialNumberCode(long id) {
- char[] buf = new char[32];
- int charPos = 32;
-
- while ((id / binLen) > 0) {
- int ind = (int) (id % binLen);
- buf[--charPos] = r[ind];
- id /= binLen;
- }
- buf[--charPos] = r[(int) (id % binLen)];
- String str = new String(buf, charPos, (32 - charPos));
- // 不够长度的自动随机补全
- if (str.length() < s) {
- StringBuilder sb = new StringBuilder();
- sb.append(b);
- Random rnd = new Random();
- for (int i = 1; i < s - str.length(); i++) {
- sb.append(r[rnd.nextInt(binLen)]);
- }
- str += sb.toString();
- }
- return str;
- }
-
- public static long codeToId(String code) {
- char chs[] = code.toCharArray();
- long res = 0L;
- for (int i = 0; i < chs.length; i++) {
- int ind = 0;
- for (int j = 0; j < binLen; j++) {
- if (chs[i] == r[j]) {
- ind = j;
- break;
- }
- }
- if (chs[i] == b) {
- break;
- }
- if (i > 0) {
- res = res * binLen + ind;
- } else {
- res = ind;
- }
- }
- return res;
- }
-}
\ No newline at end of file
diff --git a/src/main/java/com/xcong/excoin/utils/SmsUtils.java b/src/main/java/com/xcong/excoin/utils/SmsUtils.java
deleted file mode 100644
index 4adc0ee..0000000
--- a/src/main/java/com/xcong/excoin/utils/SmsUtils.java
+++ /dev/null
@@ -1,96 +0,0 @@
-package com.xcong.excoin.utils;
-
-
-import org.apache.http.HttpEntity;
-import org.apache.http.HttpResponse;
-import org.apache.http.NameValuePair;
-import org.apache.http.client.HttpClient;
-import org.apache.http.client.entity.UrlEncodedFormEntity;
-import org.apache.http.client.methods.HttpPost;
-import org.apache.http.message.BasicNameValuePair;
-import org.apache.http.protocol.HTTP;
-import org.apache.http.util.EntityUtils;
-import org.dom4j.Document;
-import org.dom4j.DocumentHelper;
-import org.dom4j.Element;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- * 短信发送工具
- *
- * @author wzy
- * @date 2020-05-18
- **/
-public class SmsUtils {
-
-
- private static HttpClient httpclient;
-
- @SuppressWarnings("deprecation")
- public static Map<String, Object> hxSmsSend(String mobile, String sendContent) {
- Map<String, Object> map = new HashMap<String, Object>();
- try {
- httpclient = new SSLClient();
- //TFT001
- String url = "https://dx.ipyy.net/sms.aspx";
- //excoin DX001 //ctcoin:OT00028 //改为实际账号名
- String accountName = "DX001";
- //excoin 1qaz2wsx //ctcoin: atvckt //改为实际发送密码
- String password = "1qaz2wsx";
- String text = sendContent;
- HttpPost post = new HttpPost(url);
- post.setHeader("Content-type", "application/x-www-form-urlencoded;charset=utf-8");
- List<NameValuePair> nvps = new ArrayList<NameValuePair>();
- nvps.add(new BasicNameValuePair("action", "send"));
- nvps.add(new BasicNameValuePair("userid", ""));
- nvps.add(new BasicNameValuePair("account", accountName));
- nvps.add(new BasicNameValuePair("password", password));
- //多个手机号用逗号分隔
- nvps.add(new BasicNameValuePair("mobile", mobile));
- nvps.add(new BasicNameValuePair("content", text));
- nvps.add(new BasicNameValuePair("sendTime", ""));
- nvps.add(new BasicNameValuePair("extno", ""));
-
- post.setEntity(new UrlEncodedFormEntity(nvps, HTTP.UTF_8));
-
- HttpResponse response = httpclient.execute(post);
- HttpEntity entity = response.getEntity();
- // 将字符转化为XML
- String returnString = EntityUtils.toString(entity, "UTF-8");
- Document doc = DocumentHelper.parseText(returnString);
- // 获取根节点
- Element rootElt = doc.getRootElement();
- // 获取根节点下的子节点的值
- String returnstatus = rootElt.elementText("returnstatus").trim();
- String message = rootElt.elementText("message").trim();
- String remainpoint = rootElt.elementText("remainpoint").trim();
- String taskID = rootElt.elementText("taskID").trim();
- String successCounts = rootElt.elementText("successCounts").trim();
-
- map.put("returnstatus", returnstatus);
- map.put("message", message);
- map.put("remainpoint", remainpoint);
- map.put("taskID", taskID);
- map.put("successCounts", successCounts);
- } catch (Exception e) {
- e.printStackTrace();
- }
- return map;
- }
-
- /**
- * 短信验证码
- *
- * @param phone 手机号
- * @param code 验证码
- * @return
- */
- public static Map<String, Object> sendVerifyCode(String phone, int code) {
- String smsContent = "【Excoin】您的验证码为:"+code+",该验证码有效期为2分钟,请勿泄露于他人。";
- return hxSmsSend(phone, smsContent);
- }
-}
diff --git a/src/main/java/com/xcong/excoin/utils/SpringContextHolder.java b/src/main/java/com/xcong/excoin/utils/SpringContextHolder.java
deleted file mode 100644
index 857d02c..0000000
--- a/src/main/java/com/xcong/excoin/utils/SpringContextHolder.java
+++ /dev/null
@@ -1,66 +0,0 @@
-package com.xcong.excoin.utils;
-
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.BeansException;
-import org.springframework.beans.factory.DisposableBean;
-import org.springframework.context.ApplicationContext;
-import org.springframework.context.ApplicationContextAware;
-import org.springframework.stereotype.Component;
-
-/**
- * @Author wzy
- * @Date 2020/5/11
- * @email wangdoubleone@gmail.com
- * @Version V1.0
- **/
-@Component
-@Slf4j
-public class SpringContextHolder implements ApplicationContextAware, DisposableBean {
-
- private static ApplicationContext applicationContext = null;
-
- /**
- * 从静态变量applicationContext中取得Bean, 自动转型为所赋值对象的类型.
- */
- @SuppressWarnings("unchecked")
- public static <T> T getBean(String name) {
- assertContextInjected();
- return (T) applicationContext.getBean(name);
- }
-
- /**
- * 从静态变量applicationContext中取得Bean, 自动转型为所赋值对象的类型.
- */
- public static <T> T getBean(Class<T> requiredType) {
- assertContextInjected();
- return applicationContext.getBean(requiredType);
- }
-
- private static void assertContextInjected() {
- if (applicationContext == null) {
- throw new IllegalStateException("applicaitonContext属性未注入, 请在applicationContext" +
- ".xml中定义SpringContextHolder或在SpringBoot启动类中注册SpringContextHolder.");
- }
- }
-
- /**
- * 检查ApplicationContext不为空.
- */
- private static void clearHolder() {
- log.debug("清除SpringContextHolder中的ApplicationContext:" + applicationContext);
- applicationContext = null;
- }
-
- @Override
- public void destroy() throws Exception {
- SpringContextHolder.clearHolder();
- }
-
- @Override
- public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
- if (SpringContextHolder.applicationContext != null) {
- log.warn("SpringContextHolder中的ApplicationContext被覆盖, 原有ApplicationContext为:" + SpringContextHolder.applicationContext);
- }
- SpringContextHolder.applicationContext = applicationContext;
- }
-}
diff --git a/src/main/java/com/xcong/excoin/utils/TypeJudgeUtils.java b/src/main/java/com/xcong/excoin/utils/TypeJudgeUtils.java
deleted file mode 100644
index c7f511a..0000000
--- a/src/main/java/com/xcong/excoin/utils/TypeJudgeUtils.java
+++ /dev/null
@@ -1,50 +0,0 @@
-package com.xcong.excoin.utils;
-
-/**
- * 接受参数 类型判断
- *
- * @author wzy
- * @date 2020-05-27
- **/
-public class TypeJudgeUtils {
-
- /**
- * 委托类型 1开多 2开空 3平多 4平空
- *
- * @param type
- * @return
- */
- public static boolean entrustType(int type) {
- switch (type) {
- case 1:
- case 2:
- case 3:
- case 4:
- return true;
- default:
- return false;
- }
- }
-
- /**
- * 判断k线区间
- *
- * @param period
- * @return
- */
- public static boolean klinePeriod(String period) {
- switch (period) {
- case "1min":
- case "5min":
- case "30min":
- case "60min":
- case "4hour":
- case "1day":
- case "1week":
- return true;
- default:
- return false;
- }
-
- }
-}
diff --git a/src/main/java/com/xcong/excoin/utils/api/ApiClient.java b/src/main/java/com/xcong/excoin/utils/api/ApiClient.java
deleted file mode 100644
index 39f72d9..0000000
--- a/src/main/java/com/xcong/excoin/utils/api/ApiClient.java
+++ /dev/null
@@ -1,607 +0,0 @@
-package com.xcong.excoin.utils.api;
-
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.core.type.TypeReference;
-import com.fasterxml.jackson.databind.DeserializationFeature;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.fasterxml.jackson.databind.PropertyNamingStrategy;
-import com.fasterxml.jackson.databind.SerializationFeature;
-import com.xcong.excoin.utils.api.request.CreateOrderRequest;
-import com.xcong.excoin.utils.api.request.IntrustOrdersDetailRequest;
-import com.xcong.excoin.utils.api.response.*;
-import okhttp3.*;
-import okhttp3.OkHttpClient.Builder;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.crypto.Mac;
-import javax.crypto.spec.SecretKeySpec;
-import javax.xml.bind.DatatypeConverter;
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.net.URLEncoder;
-import java.nio.charset.StandardCharsets;
-import java.security.InvalidKeyException;
-import java.security.MessageDigest;
-import java.security.NoSuchAlgorithmException;
-import java.time.Instant;
-import java.time.ZoneId;
-import java.time.format.DateTimeFormatter;
-import java.util.*;
-import java.util.concurrent.TimeUnit;
-import java.util.stream.Collectors;
-
-/**
- * API client.
- *
- * @Date 2018/1/14
- * @Time 16:02
- */
-public class ApiClient {
-
- static final int CONN_TIMEOUT = 50;
- static final int READ_TIMEOUT = 50;
- static final int WRITE_TIMEOUT = 50;
-
-
- // static final String API_URL = "https://api.huobi.pro:443";
- // static final String API_URL = "https://api.huobi.pro";
- // static final String API_URL = "https://api.hbdm.com";
- // static final String API_URL = "https://api.huobi.br.com";
- // static final String API_URL = "https://api.btcgateway.pro";
- static final String API_URL = "https://api.hadax.com";
- static final String API_HOST = getHost();
-
- static final MediaType JSON = MediaType.parse("application/json");
- static final OkHttpClient client = createOkHttpClient();
-
- final String accessKeyId;
- final String accessKeySecret;
- final String assetPassword;
-
- /**
- * 创建一个ApiClient实例
- *
- * @param accessKeyId AccessKeyId
- * @param accessKeySecret AccessKeySecret
- */
- public ApiClient(String accessKeyId, String accessKeySecret) {
- this.accessKeyId = accessKeyId;
- this.accessKeySecret = accessKeySecret;
- this.assetPassword = null;
- }
-
- /**
- * 创建一个ApiClient实例
- *
- * @param accessKeyId AccessKeyId
- * @param accessKeySecret AccessKeySecret
- * @param assetPassword AssetPassword
- */
- public ApiClient(String accessKeyId, String accessKeySecret, String assetPassword) {
- this.accessKeyId = accessKeyId;
- this.accessKeySecret = accessKeySecret;
- this.assetPassword = assetPassword;
- }
-
- /**
- * 查询交易对
- *
- * @return List of symbols.
- */
- public List<Symbol> getSymbols() {
- ApiResponse<List<Symbol>> resp =
- get("/v1/common/symbols", null, new TypeReference<ApiResponse<List<Symbol>>>() {
- });
- return resp.checkAndReturn();
- }
-
- /**
- * 查询所有账户信息
- *
- * @return List of accounts.
- */
- public List<Account> getAccounts() {
- ApiResponse<List<Account>> resp =
- get("/v1/account/accounts", null, new TypeReference<ApiResponse<List<Account>>>() {
- });
- return resp.checkAndReturn();
- }
-
- /**
- * 创建订单
- *
- * @param request CreateOrderRequest object.
- * @return Order id.
- */
- public Long createOrder(CreateOrderRequest request) {
- ApiResponse<Long> resp =
- post("/v1/order/orders/place", request, new TypeReference<ApiResponse<Long>>() {
- });
- return resp.checkAndReturn();
- }
-
- /**
- * 执行订单
- *
- * @param orderId The id of created order.
- * @return Order id.
- */
- public String placeOrder(long orderId) {
- ApiResponse<String> resp = post("/v1/order/orders/" + orderId + "/place", null,
- new TypeReference<ApiResponse<String>>() {
- });
- return resp.checkAndReturn();
- }
-
-
- // ----------------------------------------行情API-------------------------------------------
-
- /**
- * GET /market/history/kline 获取K线数据
- *
- * @param symbol
- * @param period
- * @param size
- * @return
- */
- @SuppressWarnings({"unchecked", "rawtypes"})
- public KlineResponse kline(String symbol, String period, String size) {
- HashMap map = new HashMap();
- map.put("symbol", symbol);
- map.put("period", period);
- map.put("size", size);
- KlineResponse resp = get("/market/history/kline", map, new TypeReference<KlineResponse<List<Kline>>>() {
- });
- return resp;
- }
-
- /**
- * GET /market/detail/merged 获取聚合行情(Ticker)
- *
- * @param symbol
- * @return
- */
- @SuppressWarnings({"rawtypes", "unchecked"})
- public MergedResponse merged(String symbol) {
- HashMap map = new HashMap();
- map.put("symbol", symbol);
- MergedResponse resp = get("/market/detail/merged", map, new TypeReference<MergedResponse<List<Merged>>>() {
- });
- return resp;
- }
-
- /**
- * GET /market/depth 获取 Market Depth 数据
- *
- * @return
- */
- @SuppressWarnings({"rawtypes", "unchecked"})
- public DepthResponse depth(String symbol, String type, String depth) {
- HashMap map = new HashMap();
- map.put("symbol", symbol);
- map.put("type", type);
- map.put("depth", depth);
- DepthResponse resp = get("/market/depth", map, new TypeReference<DepthResponse<List<Depth>>>() {
- });
- return resp;
- }
-
- /**
- * GET /market/trade 获取 Trade Detail 数据
- *
- * @param symbol
- * @return
- */
- @SuppressWarnings({"rawtypes", "unchecked"})
- public TradeResponse trade(String symbol) {
- HashMap map = new HashMap();
- map.put("symbol", symbol);
- TradeResponse resp = get("/market/trade", map, new TypeReference<TradeResponse>() {
- });
- return resp;
- }
-
- /**
- * GET /market/history/trade 批量获取最近的交易记录
- *
- * @param symbol
- * @param size
- * @return
- */
- @SuppressWarnings({"rawtypes", "unchecked"})
- public HistoryTradeResponse historyTrade(String symbol, String size) {
-// System.out.println("symbol = "+symbol+" size = "+size);
- HashMap map = new HashMap();
- map.put("symbol", symbol);
- map.put("size", size);
- HistoryTradeResponse resp = get("/market/history/trade", map, new TypeReference<HistoryTradeResponse>() {
- });
- return resp;
- }
-
- /**
- * GET /market/detail 获取 Market Detail 24小时成交量数据
- *
- * @param symbol
- * @return
- */
- @SuppressWarnings({"unchecked", "rawtypes"})
- public DetailResponse detail(String symbol) {
- HashMap map = new HashMap();
- map.put("symbol", symbol);
- DetailResponse resp = get("/market/detail", map, new TypeReference<DetailResponse<Details>>() {
- });
- return resp;
- }
-
-
- /**
- * GET /v1/common/symbols 查询系统支持的所有交易对及精度
- *
- * @param symbol
- * @return
- */
- @SuppressWarnings({"rawtypes", "unchecked"})
- public SymbolsResponse symbols(String symbol) {
- HashMap map = new HashMap();
- map.put("symbol", symbol);
- SymbolsResponse resp = get("/v1/common/symbols", map, new TypeReference<SymbolsResponse<Symbols>>() {
- });
- return resp;
- }
-
- /**
- * GET /v1/common/currencys 查询系统支持的所有币种
- *
- * @param symbol
- * @return
- */
- @SuppressWarnings({"rawtypes", "unchecked"})
- public CurrencysResponse currencys(String symbol) {
- HashMap map = new HashMap();
- map.put("symbol", symbol);
- CurrencysResponse resp = get("/v1/common/currencys", map, new TypeReference<CurrencysResponse>() {
- });
- return resp;
- }
-
- /**
- * GET /v1/common/timestamp 查询系统当前时间
- *
- * @return
- */
- public TimestampResponse timestamp() {
- TimestampResponse resp = get("/v1/common/timestamp", null, new TypeReference<TimestampResponse>() {
- });
- return resp;
- }
-
- /**
- * GET /v1/account/accounts 查询当前用户的所有账户(即account-id)
- *
- * @return
- */
- @SuppressWarnings({"rawtypes"})
- public AccountsResponse accounts() {
- AccountsResponse resp = get("/v1/account/accounts", null, new TypeReference<AccountsResponse<List<Accounts>>>() {
- });
- return resp;
- }
-
- /**
- * GET /v1/account/accounts/{account-id}/balance 查询指定账户的余额
- *
- * @param accountId
- * @return
- */
- @SuppressWarnings({"rawtypes"})
- public BalanceResponse balance(String accountId) {
- BalanceResponse resp = get("/v1/account/accounts/" + accountId + "/balance", null, new TypeReference<BalanceResponse<Balance>>() {
- });
- return resp;
- }
-
- /**
- * POST /v1/order/orders/{order-id}/submitcancel 申请撤销一个订单请求
- *
- * @param orderId
- * @return
- */
- public SubmitcancelResponse submitcancel(String orderId) {
- SubmitcancelResponse resp = post("/v1/order/orders/" + orderId + "/submitcancel", null, new TypeReference<SubmitcancelResponse>() {
- });
- return resp;
- }
-
- /**
- * POST /v1/order/orders/batchcancel 批量撤销订单
- *
- * @param orderList
- * @return
- */
- @SuppressWarnings({"rawtypes", "unchecked"})
- public BatchcancelResponse submitcancels(List orderList) {
- Map<String, List> parameterMap = new HashMap();
- parameterMap.put("order-ids", orderList);
- BatchcancelResponse resp = post("/v1/order/orders/batchcancel", parameterMap, new TypeReference<BatchcancelResponse<Batchcancel<List, List<BatchcancelBean>>>>() {
- });
- return resp;
- }
-
- /**
- * GET /v1/order/orders/{order-id} 查询某个订单详情
- *
- * @param orderId
- * @return
- */
- @SuppressWarnings({"rawtypes"})
- public OrdersDetailResponse ordersDetail(String orderId) {
- OrdersDetailResponse resp = get("/v1/order/orders/" + orderId, null, new TypeReference<OrdersDetailResponse>() {
- });
- return resp;
- }
-
-
- /**
- * GET /v1/order/orders/{order-id}/matchresults 查询某个订单的成交明细
- *
- * @param orderId
- * @return
- */
- @SuppressWarnings({"rawtypes"})
- public MatchresultsOrdersDetailResponse matchresults(String orderId) {
- MatchresultsOrdersDetailResponse resp = get("/v1/order/orders/" + orderId + "/matchresults", null, new TypeReference<MatchresultsOrdersDetailResponse>() {
- });
- return resp;
- }
-
- @SuppressWarnings({"rawtypes", "unchecked"})
- public IntrustDetailResponse intrustOrdersDetail(IntrustOrdersDetailRequest req) {
- HashMap map = new HashMap();
- map.put("symbol", req.symbol);
- map.put("states", req.states);
- if (req.startDate != null) {
- map.put("startDate", req.startDate);
- }
- if (req.startDate != null) {
- map.put("start-date", req.startDate);
- }
- if (req.endDate != null) {
- map.put("end-date", req.endDate);
- }
- if (req.types != null) {
- map.put("types", req.types);
- }
- if (req.from != null) {
- map.put("from", req.from);
- }
- if (req.direct != null) {
- map.put("direct", req.direct);
- }
- if (req.size != null) {
- map.put("size", req.size);
- }
- IntrustDetailResponse resp = get("/v1/order/orders/", map, new TypeReference<IntrustDetailResponse<List<IntrustDetail>>>() {
- });
- return resp;
- }
-
-// public IntrustDetailResponse getALlOrdersDetail(String orderId) {
-// IntrustDetailResponse resp = get("/v1/order/orders/"+orderId, null,new TypeReference<IntrustDetailResponse>() {});
-// return resp;
-// }
-
-
- // send a GET request.
- <T> T get(String uri, Map<String, String> params, TypeReference<T> ref) {
- if (params == null) {
- params = new HashMap<>();
- }
- return call("GET", uri, null, params, ref);
- }
-
- // send a POST request.
- <T> T post(String uri, Object object, TypeReference<T> ref) {
- return call("POST", uri, object, new HashMap<String, String>(), ref);
- }
-
- // call api by endpoint.
- <T> T call(String method, String uri, Object object, Map<String, String> params,
- TypeReference<T> ref) {
- ApiSignature sign = new ApiSignature();
- sign.createSignature(this.accessKeyId, this.accessKeySecret, method, API_HOST, uri, params);
- try {
- Request.Builder builder = null;
- if ("POST".equals(method)) {
- RequestBody body = RequestBody.create(JSON, JsonUtil.writeValue(object));
- builder = new Request.Builder().url(API_URL + uri + "?" + toQueryString(params)).post(body);
- } else {
- builder = new Request.Builder().url(API_URL + uri + "?" + toQueryString(params)).get();
- }
- if (this.assetPassword != null) {
- builder.addHeader("AuthData", authData());
- }
- Request request = builder.build();
- Response response = client.newCall(request).execute();
- String s = response.body().string();
- //System.out.println("-----s:"+JsonUtil.writeValue(s));
- return JsonUtil.readValue(s, ref);
- } catch (IOException e) {
- // throw new ApiException(e);
- e.printStackTrace();
- return null;
- }
- }
-
- String authData() {
- MessageDigest md = null;
- try {
- md = MessageDigest.getInstance("MD5");
- } catch (NoSuchAlgorithmException e) {
- throw new RuntimeException(e);
- }
- md.update(this.assetPassword.getBytes(StandardCharsets.UTF_8));
- md.update("hello, moto".getBytes(StandardCharsets.UTF_8));
- Map<String, String> map = new HashMap<>();
- map.put("assetPwd", DatatypeConverter.printHexBinary(md.digest()).toLowerCase());
- try {
- return ApiSignature.urlEncode(JsonUtil.writeValue(map));
- } catch (IOException e) {
- throw new RuntimeException("Get json failed: " + e.getMessage());
- }
- }
-
- // Encode as "a=1&b=%20&c=&d=AAA"
- String toQueryString(Map<String, String> params) {
- return String.join("&", params.entrySet().stream().map((entry) -> {
- return entry.getKey() + "=" + ApiSignature.urlEncode(entry.getValue());
- }).collect(Collectors.toList()));
- }
-
- // create OkHttpClient:
- static OkHttpClient createOkHttpClient() {
- return new Builder().connectTimeout(CONN_TIMEOUT, TimeUnit.SECONDS)
- .readTimeout(READ_TIMEOUT, TimeUnit.SECONDS).writeTimeout(WRITE_TIMEOUT, TimeUnit.SECONDS)
- .build();
- }
-
- static String getHost() {
- String host = null;
- try {
- host = new URL(API_URL).getHost();
- } catch (MalformedURLException e) {
- System.err.println("parse API_URL error,system exit!,please check API_URL:" + API_URL);
- System.exit(0);
- }
- return host;
- }
-
-}
-
-
-/**
- * API签名,签名规范:
- * <p>
- * http://docs.aws.amazon.com/zh_cn/general/latest/gr/signature-version-2.html
- *
- * @Date 2018/1/14
- * @Time 16:02
- */
-class ApiSignature {
-
- final Logger log = LoggerFactory.getLogger(getClass());
-
- static final DateTimeFormatter DT_FORMAT = DateTimeFormatter.ofPattern("uuuu-MM-dd'T'HH:mm:ss");
- static final ZoneId ZONE_GMT = ZoneId.of("Z");
-
- /**
- * 创建一个有效的签名。该方法为客户端调用,将在传入的params中添加AccessKeyId、Timestamp、SignatureVersion、SignatureMethod、Signature参数。
- *
- * @param appKey AppKeyId.
- * @param appSecretKey AppKeySecret.
- * @param method 请求方法,"GET"或"POST"
- * @param host 请求域名,例如"be.huobi.com"
- * @param uri 请求路径,注意不含?以及后的参数,例如"/v1/api/info"
- * @param params 原始请求参数,以Key-Value存储,注意Value不要编码
- */
- public void createSignature(String appKey, String appSecretKey, String method, String host,
- String uri, Map<String, String> params) {
- StringBuilder sb = new StringBuilder(1024);
- sb.append(method.toUpperCase()).append('\n') // GET
- .append(host.toLowerCase()).append('\n') // Host
- .append(uri).append('\n'); // /path
- params.remove("Signature");
- params.put("AccessKeyId", appKey);
- params.put("SignatureVersion", "2");
- params.put("SignatureMethod", "HmacSHA256");
- params.put("Timestamp", gmtNow());
- // build signature:
- SortedMap<String, String> map = new TreeMap<>(params);
- for (Map.Entry<String, String> entry : map.entrySet()) {
- String key = entry.getKey();
- String value = entry.getValue();
- sb.append(key).append('=').append(urlEncode(value)).append('&');
- }
- // remove last '&':
- sb.deleteCharAt(sb.length() - 1);
- // sign:
- Mac hmacSha256 = null;
- try {
- hmacSha256 = Mac.getInstance("HmacSHA256");
- SecretKeySpec secKey =
- new SecretKeySpec(appSecretKey.getBytes(StandardCharsets.UTF_8), "HmacSHA256");
- hmacSha256.init(secKey);
- } catch (NoSuchAlgorithmException e) {
- throw new RuntimeException("No such algorithm: " + e.getMessage());
- } catch (InvalidKeyException e) {
- throw new RuntimeException("Invalid key: " + e.getMessage());
- }
- String payload = sb.toString();
- byte[] hash = hmacSha256.doFinal(payload.getBytes(StandardCharsets.UTF_8));
- String actualSign = Base64.getEncoder().encodeToString(hash);
- params.put("Signature", actualSign);
-
-
- if (log.isDebugEnabled()) {
- log.debug("Dump parameters:");
- for (Map.Entry<String, String> entry : params.entrySet()) {
- log.debug(" key: " + entry.getKey() + ", value: " + entry.getValue());
- }
- }
- }
-
-
- /**
- * 使用标准URL Encode编码。注意和JDK默认的不同,空格被编码为%20而不是+。
- *
- * @param s String字符串
- * @return URL编码后的字符串
- */
- public static String urlEncode(String s) {
- try {
- return URLEncoder.encode(s, "UTF-8").replaceAll("\\+", "%20");
- } catch (UnsupportedEncodingException e) {
- throw new IllegalArgumentException("UTF-8 encoding not supported!");
- }
- }
-
- /**
- * Return epoch seconds
- */
- long epochNow() {
- return Instant.now().getEpochSecond();
- }
-
- String gmtNow() {
- return Instant.ofEpochSecond(epochNow()).atZone(ZONE_GMT).format(DT_FORMAT);
- }
-}
-
-
-class JsonUtil {
-
- public static String writeValue(Object obj) throws IOException {
- return objectMapper.writeValueAsString(obj);
- }
-
- public static <T> T readValue(String s, TypeReference<T> ref) throws IOException {
- return objectMapper.readValue(s, ref);
- }
-
- static final ObjectMapper objectMapper = createObjectMapper();
-
- static ObjectMapper createObjectMapper() {
- final ObjectMapper mapper = new ObjectMapper();
- mapper.setPropertyNamingStrategy(PropertyNamingStrategy.KEBAB_CASE);
- mapper.setSerializationInclusion(JsonInclude.Include.ALWAYS);
- // disabled features:
- mapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES);
- mapper.disable(SerializationFeature.FAIL_ON_EMPTY_BEANS);
- mapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);
- return mapper;
- }
-
-}
diff --git a/src/main/java/com/xcong/excoin/utils/api/ApiException.java b/src/main/java/com/xcong/excoin/utils/api/ApiException.java
deleted file mode 100644
index f3c436b..0000000
--- a/src/main/java/com/xcong/excoin/utils/api/ApiException.java
+++ /dev/null
@@ -1,33 +0,0 @@
-package com.xcong.excoin.utils.api;
-
-/**
- * ApiException if api returns error.
- *
- * @Date 2018/1/14
- * @Time 16:02
- */
-
-public class ApiException extends RuntimeException {
-
- /**
- *
- */
- private static final long serialVersionUID = 8196662756375909063L;
-
- final String errCode;
-
- public ApiException(String errCode, String errMsg) {
- super(errMsg);
- this.errCode = errCode;
- }
-
- public ApiException(Exception e) {
- super(e);
- this.errCode = e.getClass().getName();
- }
-
- public String getErrCode() {
- return this.errCode;
- }
-
-}
diff --git a/src/main/java/com/xcong/excoin/utils/api/request/CreateOrderRequest.java b/src/main/java/com/xcong/excoin/utils/api/request/CreateOrderRequest.java
deleted file mode 100644
index 9426571..0000000
--- a/src/main/java/com/xcong/excoin/utils/api/request/CreateOrderRequest.java
+++ /dev/null
@@ -1,52 +0,0 @@
-package com.xcong.excoin.utils.api.request;
-
-public class CreateOrderRequest {
- public static interface OrderType {
- /**
- * 限价买入
- */
- static final String BUY_LIMIT = "buy-limit";
- /**
- * 限价卖出
- */
- static final String SELL_LIMIT = "sell-limit";
- /**
- * 市价买入
- */
- static final String BUY_MARKET = "buy-market";
- /**
- * 市价卖出
- */
- static final String SELL_MARKET = "sell-market";
- }
-
- /**
- * 交易对,必填,例如:"ethcny",
- */
- public String symbol;
-
- /**
- * 账户ID,必填,例如:"12345"
- */
- public String accountId;
-
- /**
- * 当订单类型为buy-limit,sell-limit时,表示订单数量, 当订单类型为buy-market时,表示订单总金额, 当订单类型为sell-market时,表示订单总数量
- */
- public String amount;
-
- /**
- * 订单价格,仅针对限价单有效,例如:"1234.56"
- */
- public String price = "0.0";
-
- /**
- * 订单类型,取值范围"buy-market,sell-market,buy-limit,sell-limit"
- */
- public String type;
-
- /**
- * 订单来源,例如:"api"
- */
- public String source = "com/huobi/client/api";
-}
diff --git a/src/main/java/com/xcong/excoin/utils/api/request/DepthRequest.java b/src/main/java/com/xcong/excoin/utils/api/request/DepthRequest.java
deleted file mode 100644
index 2f75636..0000000
--- a/src/main/java/com/xcong/excoin/utils/api/request/DepthRequest.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package com.xcong.excoin.utils.api.request;
-
-public class DepthRequest {
-
- //交易对
- public String symbol;
-
- //Depth 类型 step0, step1, step2, step3, step4, step5(合并深度0-5);step0时,不合并深度
- public String type;
-
- public String getSymbol() {
- return symbol;
- }
-
- public void setSymbol(String symbol) {
- this.symbol = symbol;
- }
-
- public String getType() {
- return type;
- }
-
- public void setType(String type) {
- this.type = type;
- }
-}
diff --git a/src/main/java/com/xcong/excoin/utils/api/request/IntrustOrdersDetailRequest.java b/src/main/java/com/xcong/excoin/utils/api/request/IntrustOrdersDetailRequest.java
deleted file mode 100644
index b364539..0000000
--- a/src/main/java/com/xcong/excoin/utils/api/request/IntrustOrdersDetailRequest.java
+++ /dev/null
@@ -1,62 +0,0 @@
-package com.xcong.excoin.utils.api.request;
-
-
-public class IntrustOrdersDetailRequest {
-
- public static interface OrderType {
- /**
- * 限价买入
- */
- static final String BUY_LIMIT = "buy-limit";
- /**
- * 限价卖出
- */
- static final String SELL_LIMIT = "sell-limit";
- /**
- * 市价买入
- */
- static final String BUY_MARKET = "buy-market";
- /**
- * 市价卖出
- */
- static final String SELL_MARKET = "sell-market";
- }
-
- public static interface OrderStates {
- /**
- * pre-submitted 准备提交
- */
- static final String PRE_SUBMITTED = "pre-submitted";
- /**
- * submitted 已提交
- */
- static final String SUBMITTED = "submitted";
- /**
- * partial-filled 部分成交
- */
- static final String PARTIAL_FILLED = "partial-filled";
- /**
- * partial-canceled 部分成交撤销
- */
- static final String PARTIAL_CANCELED = "partial-canceled";
-
- /**
- * filled 完全成交
- */
- static final String FILLED = "filled";
- /**
- * canceled 已撤销
- */
- static final String CANCELED = "canceled";
- }
-
- public String symbol; //true string 交易对 btcusdt, bccbtc, rcneth ...
- public String types; //false string 查询的订单类型组合,使用','分割 buy-market:市价买, sell-market:市价卖, buy-limit:限价买, sell-limit:限价卖
- public String startDate; //false string 查询开始日期, 日期格式yyyy-mm-dd
- public String endDate; //false string 查询结束日期, 日期格式yyyy-mm-dd
- public String states; //true string 查询的订单状态组合,使用','分割 pre-submitted 准备提交, submitted 已提交, partial-filled 部分成交,
- // partial-canceled 部分成交撤销, filled 完全成交, canceled 已撤销
- public String from; //false string 查询起始 ID
- public String direct; //false string 查询方向 prev 向前,next 向后
- public String size; //false string 查询记录大小
-}
diff --git a/src/main/java/com/xcong/excoin/utils/api/response/Account.java b/src/main/java/com/xcong/excoin/utils/api/response/Account.java
deleted file mode 100644
index a5d8c39..0000000
--- a/src/main/java/com/xcong/excoin/utils/api/response/Account.java
+++ /dev/null
@@ -1,8 +0,0 @@
-package com.xcong.excoin.utils.api.response;
-
-
-public class Account {
- public long id;
- public String type;
- public String state;
-}
diff --git a/src/main/java/com/xcong/excoin/utils/api/response/Accounts.java b/src/main/java/com/xcong/excoin/utils/api/response/Accounts.java
deleted file mode 100644
index b5ac8ee..0000000
--- a/src/main/java/com/xcong/excoin/utils/api/response/Accounts.java
+++ /dev/null
@@ -1,48 +0,0 @@
-package com.xcong.excoin.utils.api.response;
-
-
-public class Accounts {
- /**
- * id : 100009
- * type : spot
- * state : working
- * user-id : 1000
- */
-
- private int id;
- private String type;
- private String state;
- private int userid;
-
- public int getId() {
- return id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
-
- public String getType() {
- return type;
- }
-
- public void setType(String type) {
- this.type = type;
- }
-
- public String getState() {
- return state;
- }
-
- public void setState(String state) {
- this.state = state;
- }
-
- public int getUserid() {
- return userid;
- }
-
- public void setUserid(int userid) {
- this.userid = userid;
- }
-}
diff --git a/src/main/java/com/xcong/excoin/utils/api/response/AccountsResponse.java b/src/main/java/com/xcong/excoin/utils/api/response/AccountsResponse.java
deleted file mode 100644
index 6d1aed2..0000000
--- a/src/main/java/com/xcong/excoin/utils/api/response/AccountsResponse.java
+++ /dev/null
@@ -1,56 +0,0 @@
-package com.xcong.excoin.utils.api.response;
-
-
-import com.xcong.excoin.utils.api.ApiException;
-
-public class AccountsResponse<T> {
-
- /**
- * status : ok
- * data : [{"id":100009,"type":"spot","state":"working","user-id":1000}]
- */
-
- private String status;
- public String errCode;
- public String errMsg;
- private T data;
-
- public T checkAndReturn() {
- if ("ok".equals(status)) {
- return data;
- }
- throw new ApiException(errCode, errMsg);
- }
-
- public String getStatus() {
- return status;
- }
-
- public void setStatus(String status) {
- this.status = status;
- }
-
- public T getData() {
- return data;
- }
-
- public void setData(T data) {
- this.data = data;
- }
-
- public String getErrCode() {
- return errCode;
- }
-
- public void setErrCode(String errCode) {
- this.errCode = errCode;
- }
-
- public String getErrMsg() {
- return errMsg;
- }
-
- public void setErrMsg(String errMsg) {
- this.errMsg = errMsg;
- }
-}
diff --git a/src/main/java/com/xcong/excoin/utils/api/response/ApiResponse.java b/src/main/java/com/xcong/excoin/utils/api/response/ApiResponse.java
deleted file mode 100644
index 5731897..0000000
--- a/src/main/java/com/xcong/excoin/utils/api/response/ApiResponse.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package com.xcong.excoin.utils.api.response;
-
-
-import com.xcong.excoin.utils.api.ApiException;
-
-public class ApiResponse<T> {
-
- public String status;
- public String errCode;
- public String errMsg;
- public T data;
-
- public T checkAndReturn() {
- if ("ok".equals(status)) {
- return data;
- }
- throw new ApiException(errCode, errMsg);
- }
-}
diff --git a/src/main/java/com/xcong/excoin/utils/api/response/Balance.java b/src/main/java/com/xcong/excoin/utils/api/response/Balance.java
deleted file mode 100644
index 9f2f7c1..0000000
--- a/src/main/java/com/xcong/excoin/utils/api/response/Balance.java
+++ /dev/null
@@ -1,57 +0,0 @@
-package com.xcong.excoin.utils.api.response;
-
-public class Balance<T> {
- /**
- * id : 100009
- * type : spot
- * state : working
- * list : [{"currency":"usdt","type":"trade","balance":"500009195917.4362872650"}]
- * user-id : 1000
- */
-
- private String id;
- private String type;
- private String state;
- private String userid;
- private T list;
-
- public String getId() {
- return id;
- }
-
- public void setId(String id) {
- this.id = id;
- }
-
- public String getType() {
- return type;
- }
-
- public void setType(String type) {
- this.type = type;
- }
-
- public String getState() {
- return state;
- }
-
- public void setState(String state) {
- this.state = state;
- }
-
- public String getUserid() {
- return userid;
- }
-
- public void setUserid(String userid) {
- this.userid = userid;
- }
-
- public T getList() {
- return list;
- }
-
- public void setList(T list) {
- this.list = list;
- }
-}
diff --git a/src/main/java/com/xcong/excoin/utils/api/response/BalanceBean.java b/src/main/java/com/xcong/excoin/utils/api/response/BalanceBean.java
deleted file mode 100644
index 16a430d..0000000
--- a/src/main/java/com/xcong/excoin/utils/api/response/BalanceBean.java
+++ /dev/null
@@ -1,37 +0,0 @@
-package com.xcong.excoin.utils.api.response;
-
-public class BalanceBean {
- /**
- * currency : usdt
- * type : trade
- * balance : 500009195917.4362872650
- */
-
- private String currency;
- private String type;
- private String balance;
-
- public String getCurrency() {
- return currency;
- }
-
- public void setCurrency(String currency) {
- this.currency = currency;
- }
-
- public String getType() {
- return type;
- }
-
- public void setType(String type) {
- this.type = type;
- }
-
- public String getBalance() {
- return balance;
- }
-
- public void setBalance(String balance) {
- this.balance = balance;
- }
-}
diff --git a/src/main/java/com/xcong/excoin/utils/api/response/BalanceResponse.java b/src/main/java/com/xcong/excoin/utils/api/response/BalanceResponse.java
deleted file mode 100644
index 7f9e8cb..0000000
--- a/src/main/java/com/xcong/excoin/utils/api/response/BalanceResponse.java
+++ /dev/null
@@ -1,47 +0,0 @@
-package com.xcong.excoin.utils.api.response;
-
-public class BalanceResponse<T> {
-
-
- /**
- * status : ok
- * data : {"id":"100009","type":"spot","state":"working","list":[{"currency":"usdt","type":"trade","balance":"500009195917.4362872650"}],"user-id":"1000"}
- */
-
- private String status;
- public String errCode;
- public String errMsg;
- private T data;
-
- public String getStatus() {
- return status;
- }
-
- public void setStatus(String status) {
- this.status = status;
- }
-
- public T getData() {
- return data;
- }
-
- public void setData(T data) {
- this.data = data;
- }
-
- public String getErrCode() {
- return errCode;
- }
-
- public void setErrCode(String errCode) {
- this.errCode = errCode;
- }
-
- public String getErrMsg() {
- return errMsg;
- }
-
- public void setErrMsg(String errMsg) {
- this.errMsg = errMsg;
- }
-}
diff --git a/src/main/java/com/xcong/excoin/utils/api/response/Batchcancel.java b/src/main/java/com/xcong/excoin/utils/api/response/Batchcancel.java
deleted file mode 100644
index 5ac256a..0000000
--- a/src/main/java/com/xcong/excoin/utils/api/response/Batchcancel.java
+++ /dev/null
@@ -1,22 +0,0 @@
-package com.xcong.excoin.utils.api.response;
-
-public class Batchcancel<T1, T2> {
- private T1 success;
- private T2 failed;
-
- public T1 getSuccess() {
- return success;
- }
-
- public void setSuccess(T1 success) {
- this.success = success;
- }
-
- public T2 getFailed() {
- return failed;
- }
-
- public void setFailed(T2 failed) {
- this.failed = failed;
- }
-}
diff --git a/src/main/java/com/xcong/excoin/utils/api/response/BatchcancelBean.java b/src/main/java/com/xcong/excoin/utils/api/response/BatchcancelBean.java
deleted file mode 100644
index f536f0d..0000000
--- a/src/main/java/com/xcong/excoin/utils/api/response/BatchcancelBean.java
+++ /dev/null
@@ -1,34 +0,0 @@
-package com.xcong.excoin.utils.api.response;
-
-/** @Author ISME @Date 2018/1/14 @Time 17:53 */
-public class BatchcancelBean {
- /** err-msg : 记录无效 order-id : 2 err-code : base-record-invalid */
- private String errMsg;
-
- private String orderId;
- private String errCode;
-
- public String getErrMsg() {
- return errMsg;
- }
-
- public void setErrMsg(String errMsg) {
- this.errMsg = errMsg;
- }
-
- public String getOrderId() {
- return orderId;
- }
-
- public void setOrderId(String orderId) {
- this.orderId = orderId;
- }
-
- public String getErrCode() {
- return errCode;
- }
-
- public void setErrCode(String errCode) {
- this.errCode = errCode;
- }
-}
\ No newline at end of file
diff --git a/src/main/java/com/xcong/excoin/utils/api/response/BatchcancelResponse.java b/src/main/java/com/xcong/excoin/utils/api/response/BatchcancelResponse.java
deleted file mode 100644
index d32d0a0..0000000
--- a/src/main/java/com/xcong/excoin/utils/api/response/BatchcancelResponse.java
+++ /dev/null
@@ -1,47 +0,0 @@
-package com.xcong.excoin.utils.api.response;
-
-public class BatchcancelResponse<T> {
-
-
- /**
- * status : ok
- * data : {"success":["1","3"],"failed":[{"err-msg":"记录无效","order-id":"2","err-code":"base-record-invalid"}]}
- */
-
- private String status;
- public String errCode;
- public String errMsg;
- private T data;
-
- public String getStatus() {
- return status;
- }
-
- public void setStatus(String status) {
- this.status = status;
- }
-
- public String getErrCode() {
- return errCode;
- }
-
- public void setErrCode(String errCode) {
- this.errCode = errCode;
- }
-
- public String getErrMsg() {
- return errMsg;
- }
-
- public void setErrMsg(String errMsg) {
- this.errMsg = errMsg;
- }
-
- public T getData() {
- return data;
- }
-
- public void setData(T data) {
- this.data = data;
- }
-}
diff --git a/src/main/java/com/xcong/excoin/utils/api/response/Currencys.java b/src/main/java/com/xcong/excoin/utils/api/response/Currencys.java
deleted file mode 100644
index 3c5f82d..0000000
--- a/src/main/java/com/xcong/excoin/utils/api/response/Currencys.java
+++ /dev/null
@@ -1,4 +0,0 @@
-package com.xcong.excoin.utils.api.response;
-
-public class Currencys {
-}
diff --git a/src/main/java/com/xcong/excoin/utils/api/response/CurrencysResponse.java b/src/main/java/com/xcong/excoin/utils/api/response/CurrencysResponse.java
deleted file mode 100644
index 9497ab8..0000000
--- a/src/main/java/com/xcong/excoin/utils/api/response/CurrencysResponse.java
+++ /dev/null
@@ -1,55 +0,0 @@
-package com.xcong.excoin.utils.api.response;
-
-import java.util.List;
-
-/**
- * @Author ISME
- * @Date 2018/1/14
- * @Time 15:46
- */
-
-public class CurrencysResponse {
-
-
- /**
- * status : ok
- * data : ["usdt","eth","etc"]
- */
-
- private String status;
- public String errCode;
- public String errMsg;
- private List<String> data;
-
- public String getStatus() {
- return status;
- }
-
- public void setStatus(String status) {
- this.status = status;
- }
-
- public List<String> getData() {
- return data;
- }
-
- public void setData(List<String> data) {
- this.data = data;
- }
-
- public String getErrCode() {
- return errCode;
- }
-
- public void setErrCode(String errCode) {
- this.errCode = errCode;
- }
-
- public String getErrMsg() {
- return errMsg;
- }
-
- public void setErrMsg(String errMsg) {
- this.errMsg = errMsg;
- }
-}
diff --git a/src/main/java/com/xcong/excoin/utils/api/response/Depth.java b/src/main/java/com/xcong/excoin/utils/api/response/Depth.java
deleted file mode 100644
index 14fed2b..0000000
--- a/src/main/java/com/xcong/excoin/utils/api/response/Depth.java
+++ /dev/null
@@ -1,57 +0,0 @@
-package com.xcong.excoin.utils.api.response;
-
-import java.math.BigDecimal;
-import java.util.List;
-
-/**
- * @Author ISME
- * @Date 2018/1/14
- * @Time 14:39
- */
-
-public class Depth {
-
- /**
- * id : 1489464585407
- * ts : 1489464585407
- * bids : [[7964,0.0678],[7963,0.9162]]
- * asks : [[7979,0.0736],[8020,13.6584]]
- */
-
- private String id;
- private String ts;
- private List<List<BigDecimal>> bids;
- private List<List<BigDecimal>> asks;
-
- public String getId() {
- return id;
- }
-
- public void setId(String id) {
- this.id = id;
- }
-
- public String getTs() {
- return ts;
- }
-
- public void setTs(String ts) {
- this.ts = ts;
- }
-
- public List<List<BigDecimal>> getBids() {
- return bids;
- }
-
- public void setBids(List<List<BigDecimal>> bids) {
- this.bids = bids;
- }
-
- public List<List<BigDecimal>> getAsks() {
- return asks;
- }
-
- public void setAsks(List<List<BigDecimal>> asks) {
- this.asks = asks;
- }
-}
diff --git a/src/main/java/com/xcong/excoin/utils/api/response/DepthResponse.java b/src/main/java/com/xcong/excoin/utils/api/response/DepthResponse.java
deleted file mode 100644
index 2cc35a8..0000000
--- a/src/main/java/com/xcong/excoin/utils/api/response/DepthResponse.java
+++ /dev/null
@@ -1,78 +0,0 @@
-package com.xcong.excoin.utils.api.response;
-
-public class DepthResponse<T> {
-
-
- /**
- * status : ok
- * ch : market.btcusdt.depth.step1
- * ts : 1489472598812
- * tick : {"id":"1489464585407","ts":"1489464585407","bids":[[7964,0.0678],[7963,0.9162]],"asks":[[7979,0.0736],[8020,13.6584]]}
- */
-
- private String status;
- private String ch;
- private String ts;
- public String errCode;
- public String errMsg;
-
- /**
- * tick 说明:
- * "tick": {
- * "id": 消息id,
- * "ts": 消息生成时间,单位:毫秒,
- * "bids": 买盘,[price(成交价), amount(成交量)], 按price降序,
- * "asks": 卖盘,[price(成交价), amount(成交量)], 按price升序
- * }
- */
- private Depth tick;
-
-
- public String getStatus() {
- return status;
- }
-
- public void setStatus(String status) {
- this.status = status;
- }
-
- public String getCh() {
- return ch;
- }
-
- public void setCh(String ch) {
- this.ch = ch;
- }
-
- public String getTs() {
- return ts;
- }
-
- public void setTs(String ts) {
- this.ts = ts;
- }
-
- public Depth getTick() {
- return tick;
- }
-
- public void setTick(Depth tick) {
- this.tick = tick;
- }
-
- public String getErrCode() {
- return errCode;
- }
-
- public void setErrCode(String errCode) {
- this.errCode = errCode;
- }
-
- public String getErrMsg() {
- return errMsg;
- }
-
- public void setErrMsg(String errMsg) {
- this.errMsg = errMsg;
- }
-}
diff --git a/src/main/java/com/xcong/excoin/utils/api/response/DetailResponse.java b/src/main/java/com/xcong/excoin/utils/api/response/DetailResponse.java
deleted file mode 100644
index db6c564..0000000
--- a/src/main/java/com/xcong/excoin/utils/api/response/DetailResponse.java
+++ /dev/null
@@ -1,67 +0,0 @@
-package com.xcong.excoin.utils.api.response;
-
-public class DetailResponse<T> {
-
-
- /**
- * status : ok
- * ch : market.btcusdt.detail
- * ts : 1489473538996
- * tick : {"amount":4316.4346,"open":8090.54,"close":7962.62,"high":8119,"ts":1489464451000,"id":1489464451,"count":9595,"low":7875,"vol":3.449727690576E7}
- */
-
- private String status;
- private String ch;
- private long ts;
- public String errCode;
- public String errMsg;
- private T tick;
-
- public String getStatus() {
- return status;
- }
-
- public void setStatus(String status) {
- this.status = status;
- }
-
- public String getCh() {
- return ch;
- }
-
- public void setCh(String ch) {
- this.ch = ch;
- }
-
- public long getTs() {
- return ts;
- }
-
- public void setTs(long ts) {
- this.ts = ts;
- }
-
- public String getErrCode() {
- return errCode;
- }
-
- public void setErrCode(String errCode) {
- this.errCode = errCode;
- }
-
- public String getErrMsg() {
- return errMsg;
- }
-
- public void setErrMsg(String errMsg) {
- this.errMsg = errMsg;
- }
-
- public T getTick() {
- return tick;
- }
-
- public void setTick(T tick) {
- this.tick = tick;
- }
-}
diff --git a/src/main/java/com/xcong/excoin/utils/api/response/Details.java b/src/main/java/com/xcong/excoin/utils/api/response/Details.java
deleted file mode 100644
index 2fa3fed..0000000
--- a/src/main/java/com/xcong/excoin/utils/api/response/Details.java
+++ /dev/null
@@ -1,98 +0,0 @@
-package com.xcong.excoin.utils.api.response;
-
-public class Details {
-
- /**
- * amount : 4316.4346
- * open : 8090.54
- * close : 7962.62
- * high : 8119
- * ts : 1489464451000
- * id : 1489464451
- * count : 9595
- * low : 7875
- * vol : 3.449727690576E7
- */
-
- private double amount;
- private double open;
- private double close;
- private int high;
- private long ts;
- private long id;
- private int count;
- private int low;
- private double vol;
-
- public double getAmount() {
- return amount;
- }
-
- public void setAmount(double amount) {
- this.amount = amount;
- }
-
- public double getOpen() {
- return open;
- }
-
- public void setOpen(double open) {
- this.open = open;
- }
-
- public double getClose() {
- return close;
- }
-
- public void setClose(double close) {
- this.close = close;
- }
-
- public int getHigh() {
- return high;
- }
-
- public void setHigh(int high) {
- this.high = high;
- }
-
- public long getTs() {
- return ts;
- }
-
- public void setTs(long ts) {
- this.ts = ts;
- }
-
- public long getId() {
- return id;
- }
-
- public void setId(long id) {
- this.id = id;
- }
-
- public int getCount() {
- return count;
- }
-
- public void setCount(int count) {
- this.count = count;
- }
-
- public int getLow() {
- return low;
- }
-
- public void setLow(int low) {
- this.low = low;
- }
-
- public double getVol() {
- return vol;
- }
-
- public void setVol(double vol) {
- this.vol = vol;
- }
-}
diff --git a/src/main/java/com/xcong/excoin/utils/api/response/HistoryTrade.java b/src/main/java/com/xcong/excoin/utils/api/response/HistoryTrade.java
deleted file mode 100644
index ebe5b55..0000000
--- a/src/main/java/com/xcong/excoin/utils/api/response/HistoryTrade.java
+++ /dev/null
@@ -1,57 +0,0 @@
-package com.xcong.excoin.utils.api.response;
-
-public class HistoryTrade {
- /**
- * id : 17592256642623
- * amount : 0.04
- * price : 1997
- * direction : buy
- * ts : 1502448920106
- */
-
- private long id;
- private double amount;
- private int price;
- private String direction;
- private long ts;
-
- public long getId() {
- return id;
- }
-
- public void setId(long id) {
- this.id = id;
- }
-
- public double getAmount() {
- return amount;
- }
-
- public void setAmount(double amount) {
- this.amount = amount;
- }
-
- public int getPrice() {
- return price;
- }
-
- public void setPrice(int price) {
- this.price = price;
- }
-
- public String getDirection() {
- return direction;
- }
-
- public void setDirection(String direction) {
- this.direction = direction;
- }
-
- public long getTs() {
- return ts;
- }
-
- public void setTs(long ts) {
- this.ts = ts;
- }
-}
diff --git a/src/main/java/com/xcong/excoin/utils/api/response/HistoryTradeResponse.java b/src/main/java/com/xcong/excoin/utils/api/response/HistoryTradeResponse.java
deleted file mode 100644
index 7007b27..0000000
--- a/src/main/java/com/xcong/excoin/utils/api/response/HistoryTradeResponse.java
+++ /dev/null
@@ -1,67 +0,0 @@
-package com.xcong.excoin.utils.api.response;
-
-public class HistoryTradeResponse<T> {
-
-
- /**
- * status : ok
- * ch : market.ethusdt.trade.detail
- * ts : 1502448925216
- * data : [{"id":31459998,"ts":1502448920106,"data":[{"id":17592256642623,"amount":0.04,"price":1997,"direction":"buy","ts":1502448920106}]}]
- */
-
- private String status;
- private String ch;
- private long ts;
- public String errCode;
- public String errMsg;
- private T data;
-
- public String getStatus() {
- return status;
- }
-
- public void setStatus(String status) {
- this.status = status;
- }
-
- public String getCh() {
- return ch;
- }
-
- public void setCh(String ch) {
- this.ch = ch;
- }
-
- public long getTs() {
- return ts;
- }
-
- public void setTs(long ts) {
- this.ts = ts;
- }
-
- public T getData() {
- return data;
- }
-
- public void setData(T data) {
- this.data = data;
- }
-
- public String getErrCode() {
- return errCode;
- }
-
- public void setErrCode(String errCode) {
- this.errCode = errCode;
- }
-
- public String getErrMsg() {
- return errMsg;
- }
-
- public void setErrMsg(String errMsg) {
- this.errMsg = errMsg;
- }
-}
diff --git a/src/main/java/com/xcong/excoin/utils/api/response/HistoryTradess.java b/src/main/java/com/xcong/excoin/utils/api/response/HistoryTradess.java
deleted file mode 100644
index 56eb132..0000000
--- a/src/main/java/com/xcong/excoin/utils/api/response/HistoryTradess.java
+++ /dev/null
@@ -1,37 +0,0 @@
-package com.xcong.excoin.utils.api.response;
-
-public class HistoryTradess {
- /**
- * id : 31459998
- * ts : 1502448920106
- * data : [{"id":17592256642623,"amount":0.04,"price":1997,"direction":"buy","ts":1502448920106}]
- */
-
- private long id;
- private long ts;
- private HistoryTrade data;
-
- public long getId() {
- return id;
- }
-
- public void setId(long id) {
- this.id = id;
- }
-
- public long getTs() {
- return ts;
- }
-
- public void setTs(long ts) {
- this.ts = ts;
- }
-
- public HistoryTrade getData() {
- return data;
- }
-
- public void setData(HistoryTrade data) {
- this.data = data;
- }
-}
diff --git a/src/main/java/com/xcong/excoin/utils/api/response/IntrustDetail.java b/src/main/java/com/xcong/excoin/utils/api/response/IntrustDetail.java
deleted file mode 100644
index 7eeb618..0000000
--- a/src/main/java/com/xcong/excoin/utils/api/response/IntrustDetail.java
+++ /dev/null
@@ -1,194 +0,0 @@
-package com.xcong.excoin.utils.api.response;
-
-import com.google.gson.annotations.SerializedName;
-
-/**
- * @Author ISME
- * @Date 2018/1/14
- * @Time 19:20
- */
-
-public class IntrustDetail {
-
- /**
- * id : 59378
- * symbol : ethusdt
- * account-id : 100009
- * amount : 10.1000000000
- * price : 100.1000000000
- * created-at : 1494901162595
- * type : buy-limit
- * field-amount : 10.1000000000
- * field-cash-amount : 1011.0100000000
- * field-fees : 0.0202000000
- * finished-at : 1494901400468
- * user-id : 1000
- * source : api
- * state : filled
- * canceled-at : 0
- * exchange : huobi
- * batch :
- */
-
- private long id;
- private String symbol;
- @SerializedName("account-id")
- private int accountid;
- private String amount;
- private String price;
- @SerializedName("created-at")
- private long createdat;
- private String type;
- @SerializedName("field-amount")
- private String fieldamount;
- @SerializedName("field-cash-amount")
- private String fieldcashamount;
- @SerializedName("field-fees")
- private String fieldfees;
- @SerializedName("finished-at")
- private long finishedat;
- @SerializedName("user-id")
- private int userid;
- private String source;
- private String state;
- @SerializedName("canceled-at")
- private int canceledat;
- private String exchange;
- private String batch;
-
- public long getId() {
- return id;
- }
-
- public void setId(long id) {
- this.id = id;
- }
-
- public String getSymbol() {
- return symbol;
- }
-
- public void setSymbol(String symbol) {
- this.symbol = symbol;
- }
-
- public int getAccountid() {
- return accountid;
- }
-
- public void setAccountid(int accountid) {
- this.accountid = accountid;
- }
-
- public String getAmount() {
- return amount;
- }
-
- public void setAmount(String amount) {
- this.amount = amount;
- }
-
- public String getPrice() {
- return price;
- }
-
- public void setPrice(String price) {
- this.price = price;
- }
-
- public long getCreatedat() {
- return createdat;
- }
-
- public void setCreatedat(long createdat) {
- this.createdat = createdat;
- }
-
- public String getType() {
- return type;
- }
-
- public void setType(String type) {
- this.type = type;
- }
-
- public String getFieldamount() {
- return fieldamount;
- }
-
- public void setFieldamount(String fieldamount) {
- this.fieldamount = fieldamount;
- }
-
- public String getFieldcashamount() {
- return fieldcashamount;
- }
-
- public void setFieldcashamount(String fieldcashamount) {
- this.fieldcashamount = fieldcashamount;
- }
-
- public String getFieldfees() {
- return fieldfees;
- }
-
- public void setFieldfees(String fieldfees) {
- this.fieldfees = fieldfees;
- }
-
- public long getFinishedat() {
- return finishedat;
- }
-
- public void setFinishedat(long finishedat) {
- this.finishedat = finishedat;
- }
-
- public int getUserid() {
- return userid;
- }
-
- public void setUserid(int userid) {
- this.userid = userid;
- }
-
- public String getSource() {
- return source;
- }
-
- public void setSource(String source) {
- this.source = source;
- }
-
- public String getState() {
- return state;
- }
-
- public void setState(String state) {
- this.state = state;
- }
-
- public int getCanceledat() {
- return canceledat;
- }
-
- public void setCanceledat(int canceledat) {
- this.canceledat = canceledat;
- }
-
- public String getExchange() {
- return exchange;
- }
-
- public void setExchange(String exchange) {
- this.exchange = exchange;
- }
-
- public String getBatch() {
- return batch;
- }
-
- public void setBatch(String batch) {
- this.batch = batch;
- }
-}
diff --git a/src/main/java/com/xcong/excoin/utils/api/response/IntrustDetailResponse.java b/src/main/java/com/xcong/excoin/utils/api/response/IntrustDetailResponse.java
deleted file mode 100644
index 90aabe5..0000000
--- a/src/main/java/com/xcong/excoin/utils/api/response/IntrustDetailResponse.java
+++ /dev/null
@@ -1,47 +0,0 @@
-package com.xcong.excoin.utils.api.response;
-
-public class IntrustDetailResponse<T> {
-
-
- /**
- * status : ok
- * data : [{"id":59378,"symbol":"ethusdt","account-id":100009,"amount":"10.1000000000","price":"100.1000000000","created-at":1494901162595,"type":"buy-limit","field-amount":"10.1000000000","field-cash-amount":"1011.0100000000","field-fees":"0.0202000000","finished-at":1494901400468,"user-id":1000,"source":"api","state":"filled","canceled-at":0,"exchange":"huobi","batch":""}]
- */
-
- private String status;
- public String errCode;
- public String errMsg;
- private T data;
-
- public String getStatus() {
- return status;
- }
-
- public void setStatus(String status) {
- this.status = status;
- }
-
- public T getData() {
- return data;
- }
-
- public void setData(T data) {
- this.data = data;
- }
-
- public String getErrCode() {
- return errCode;
- }
-
- public void setErrCode(String errCode) {
- this.errCode = errCode;
- }
-
- public String getErrMsg() {
- return errMsg;
- }
-
- public void setErrMsg(String errMsg) {
- this.errMsg = errMsg;
- }
-}
diff --git a/src/main/java/com/xcong/excoin/utils/api/response/Kline.java b/src/main/java/com/xcong/excoin/utils/api/response/Kline.java
deleted file mode 100644
index 5df66f8..0000000
--- a/src/main/java/com/xcong/excoin/utils/api/response/Kline.java
+++ /dev/null
@@ -1,68 +0,0 @@
-package com.xcong.excoin.utils.api.response;
-public class Kline {
-
-
- private long id;
- private float amount;
- private int count;
- private float open;
- private float close;
- private float low;
- private float high;
- private float vol;
- public long getId() {
- return id;
- }
- public void setId(long id) {
- this.id = id;
- }
- public float getAmount() {
- return amount;
- }
- public void setAmount(float amount) {
- this.amount = amount;
- }
- public int getCount() {
- return count;
- }
- public void setCount(int count) {
- this.count = count;
- }
- public float getOpen() {
- return open;
- }
- public void setOpen(float open) {
- this.open = open;
- }
- public float getClose() {
- return close;
- }
- public void setClose(float close) {
- this.close = close;
- }
- public float getLow() {
- return low;
- }
- public void setLow(float low) {
- this.low = low;
- }
- public float getHigh() {
- return high;
- }
- public void setHigh(float high) {
- this.high = high;
- }
- public float getVol() {
- return vol;
- }
- public void setVol(float vol) {
- this.vol = vol;
- }
- @Override
- public String toString() {
- return "Kline [id=" + id + ", amount=" + amount + ", count=" + count + ", open=" + open + ", close=" + close
- + ", low=" + low + ", high=" + high + ", vol=" + vol + "]";
- }
-
-
-}
diff --git a/src/main/java/com/xcong/excoin/utils/api/response/KlineResponse.java b/src/main/java/com/xcong/excoin/utils/api/response/KlineResponse.java
deleted file mode 100644
index 91b2a4e..0000000
--- a/src/main/java/com/xcong/excoin/utils/api/response/KlineResponse.java
+++ /dev/null
@@ -1,55 +0,0 @@
-package com.xcong.excoin.utils.api.response;
-
-
-import com.xcong.excoin.utils.api.ApiException;
-
-public class KlineResponse<T> {
-
- private String status;
- /**
- * 接口名
- */
- private String ch;
- /**
- * 时间格式
- */
- private String ts;
- public String errCode;
- public String errMsg;
- /**
- * 数据
- */
- public T data;
-
- public T checkAndReturn() {
- if ("ok".equals(status)) {
- return data;
- }
- throw new ApiException(errCode, errMsg);
- }
-
-
- public String getStatus() {
- return status;
- }
-
- public void setStatus(String status) {
- this.status = status;
- }
-
- public String getCh() {
- return ch;
- }
-
- public void setCh(String ch) {
- this.ch = ch;
- }
-
- public String getTs() {
- return ts;
- }
-
- public void setTs(String ts) {
- this.ts = ts;
- }
-}
diff --git a/src/main/java/com/xcong/excoin/utils/api/response/KlineReturn.java b/src/main/java/com/xcong/excoin/utils/api/response/KlineReturn.java
deleted file mode 100644
index efea294..0000000
--- a/src/main/java/com/xcong/excoin/utils/api/response/KlineReturn.java
+++ /dev/null
@@ -1,66 +0,0 @@
-package com.xcong.excoin.utils.api.response;
-public class KlineReturn {
-
-
- private long time;
- private float open;
- private float high;
- private float low;
- private float close;
- private float volume;
-
- private float amount;
-// private int count;
-
-
- public float getOpen() {
- return open;
- }
- public void setOpen(float open) {
- this.open = open;
- }
- public float getClose() {
- return close;
- }
- public void setClose(float close) {
- this.close = close;
- }
- public float getLow() {
- return low;
- }
- public void setLow(float low) {
- this.low = low;
- }
- public float getHigh() {
- return high;
- }
- public void setHigh(float high) {
- this.high = high;
- }
- public long getTime() {
- return time;
- }
- public void setTime(long time) {
- this.time = time;
- }
- public float getVolume() {
- return volume;
- }
- public void setVolume(float volume) {
- this.volume = volume;
- }
- public float getAmount() {
- return amount;
- }
- public void setAmount(float amount) {
- this.amount = amount;
- }
- @Override
- public String toString() {
- return "KlineReturn [time=" + time + ", open=" + open + ", high=" + high + ", low=" + low + ", close=" + close
- + ", volume=" + volume + "]";
- }
-
-
-
-}
diff --git a/src/main/java/com/xcong/excoin/utils/api/response/MatchresultsOrdersDetail.java b/src/main/java/com/xcong/excoin/utils/api/response/MatchresultsOrdersDetail.java
deleted file mode 100644
index 6985876..0000000
--- a/src/main/java/com/xcong/excoin/utils/api/response/MatchresultsOrdersDetail.java
+++ /dev/null
@@ -1,112 +0,0 @@
-package com.xcong.excoin.utils.api.response;
-
-public class MatchresultsOrdersDetail {
- /**
- * id : 29553
- * order-id : 59378
- * match-id : 59335
- * symbol : ethusdt
- * type : buy-limit
- * source : api
- * price : 100.1000000000
- * filled-amount : 9.1155000000
- * filled-fees : 0.0182310000
- * created-at : 1494901400435
- */
-
- private long id;
- @com.google.gson.annotations.SerializedName("order-id")
- private long orderid;
- @com.google.gson.annotations.SerializedName("match-id")
- private long matchid;
- private String symbol;
- private String type;
- private String source;
- private String price;
- @com.google.gson.annotations.SerializedName("filled-amount")
- private String filledamount;
- @com.google.gson.annotations.SerializedName("filled-fees")
- private String filledfees;
- @com.google.gson.annotations.SerializedName("created-at")
- private long createdat;
-
- public long getId() {
- return id;
- }
-
- public void setId(long id) {
- this.id = id;
- }
-
- public long getOrderid() {
- return orderid;
- }
-
- public void setOrderid(long orderid) {
- this.orderid = orderid;
- }
-
- public long getMatchid() {
- return matchid;
- }
-
- public void setMatchid(long matchid) {
- this.matchid = matchid;
- }
-
- public String getSymbol() {
- return symbol;
- }
-
- public void setSymbol(String symbol) {
- this.symbol = symbol;
- }
-
- public String getType() {
- return type;
- }
-
- public void setType(String type) {
- this.type = type;
- }
-
- public String getSource() {
- return source;
- }
-
- public void setSource(String source) {
- this.source = source;
- }
-
- public String getPrice() {
- return price;
- }
-
- public void setPrice(String price) {
- this.price = price;
- }
-
- public String getFilledamount() {
- return filledamount;
- }
-
- public void setFilledamount(String filledamount) {
- this.filledamount = filledamount;
- }
-
- public String getFilledfees() {
- return filledfees;
- }
-
- public void setFilledfees(String filledfees) {
- this.filledfees = filledfees;
- }
-
- public long getCreatedat() {
- return createdat;
- }
-
- public void setCreatedat(long createdat) {
- this.createdat = createdat;
- }
-}
diff --git a/src/main/java/com/xcong/excoin/utils/api/response/MatchresultsOrdersDetailResponse.java b/src/main/java/com/xcong/excoin/utils/api/response/MatchresultsOrdersDetailResponse.java
deleted file mode 100644
index f968c0c..0000000
--- a/src/main/java/com/xcong/excoin/utils/api/response/MatchresultsOrdersDetailResponse.java
+++ /dev/null
@@ -1,47 +0,0 @@
-package com.xcong.excoin.utils.api.response;
-
-public class MatchresultsOrdersDetailResponse<T> {
-
-
- /**
- * status : ok
- * data : [{"id":29553,"order-id":59378,"match-id":59335,"symbol":"ethusdt","type":"buy-limit","source":"api","price":"100.1000000000","filled-amount":"9.1155000000","filled-fees":"0.0182310000","created-at":1494901400435}]
- */
-
- private String status;
- public String errCode;
- public String errMsg;
- private T data;
-
- public String getStatus() {
- return status;
- }
-
- public void setStatus(String status) {
- this.status = status;
- }
-
- public T getData() {
- return data;
- }
-
- public void setData(T data) {
- this.data = data;
- }
-
- public String getErrCode() {
- return errCode;
- }
-
- public void setErrCode(String errCode) {
- this.errCode = errCode;
- }
-
- public String getErrMsg() {
- return errMsg;
- }
-
- public void setErrMsg(String errMsg) {
- this.errMsg = errMsg;
- }
-}
diff --git a/src/main/java/com/xcong/excoin/utils/api/response/Merged.java b/src/main/java/com/xcong/excoin/utils/api/response/Merged.java
deleted file mode 100644
index 3682ed9..0000000
--- a/src/main/java/com/xcong/excoin/utils/api/response/Merged.java
+++ /dev/null
@@ -1,121 +0,0 @@
-package com.xcong.excoin.utils.api.response;
-
-import java.util.List;
-
-
-public class Merged {
-
- /**
- * id : 1499225271
- * ts : 1499225271000
- * close : 1885
- * open : 1960
- * high : 1985
- * low : 1856
- * amount : 81486.2926
- * count : 42122
- * vol : 1.57052744857082E8
- * ask : [1885,21.8804]
- * bid : [1884,1.6702]
- */
-
- private long id;
- private long ts;
- private int close;
- private int open;
- private int high;
- private int low;
- private double amount;
- private int count;
- private double vol;
- private List<Integer> ask;
- private List<Integer> bid;
-
- public long getId() {
- return id;
- }
-
- public void setId(long id) {
- this.id = id;
- }
-
- public long getTs() {
- return ts;
- }
-
- public void setTs(long ts) {
- this.ts = ts;
- }
-
- public int getClose() {
- return close;
- }
-
- public void setClose(int close) {
- this.close = close;
- }
-
- public int getOpen() {
- return open;
- }
-
- public void setOpen(int open) {
- this.open = open;
- }
-
- public int getHigh() {
- return high;
- }
-
- public void setHigh(int high) {
- this.high = high;
- }
-
- public int getLow() {
- return low;
- }
-
- public void setLow(int low) {
- this.low = low;
- }
-
- public double getAmount() {
- return amount;
- }
-
- public void setAmount(double amount) {
- this.amount = amount;
- }
-
- public int getCount() {
- return count;
- }
-
- public void setCount(int count) {
- this.count = count;
- }
-
- public double getVol() {
- return vol;
- }
-
- public void setVol(double vol) {
- this.vol = vol;
- }
-
- public List<Integer> getAsk() {
- return ask;
- }
-
- public void setAsk(List<Integer> ask) {
- this.ask = ask;
- }
-
- public List<Integer> getBid() {
- return bid;
- }
-
- public void setBid(List<Integer> bid) {
- this.bid = bid;
- }
-}
diff --git a/src/main/java/com/xcong/excoin/utils/api/response/MergedResponse.java b/src/main/java/com/xcong/excoin/utils/api/response/MergedResponse.java
deleted file mode 100644
index c30306a..0000000
--- a/src/main/java/com/xcong/excoin/utils/api/response/MergedResponse.java
+++ /dev/null
@@ -1,77 +0,0 @@
-package com.xcong.excoin.utils.api.response;
-
-
-import com.xcong.excoin.utils.api.ApiException;
-
-public class MergedResponse<T> {
-
- /**
- * status : ok
- * ch : market.ethusdt.detail.merged
- * ts : 1499225276950
- * tick : {"id":1499225271,"ts":1499225271000,"close":1885,"open":1960,"high":1985,"low":1856,"amount":81486.2926,"count":42122,"vol":1.57052744857082E8,"ask":[1885,21.8804],"bid":[1884,1.6702]}
- */
-
- private String status;
- private String ch;
- private long ts;
- public String errCode;
- public String errMsg;
- public Object tick;
-
- public Object checkAndReturn() {
- if ("ok".equals(status)) {
- return tick;
- }
- throw new ApiException(errCode, errMsg);
- }
-
- public String getStatus() {
- return status;
- }
-
- public void setStatus(String status) {
- this.status = status;
- }
-
- public String getCh() {
- return ch;
- }
-
- public void setCh(String ch) {
- this.ch = ch;
- }
-
- public long getTs() {
- return ts;
- }
-
- public void setTs(long ts) {
- this.ts = ts;
- }
-
- public String getErrCode() {
- return errCode;
- }
-
- public void setErrCode(String errCode) {
- this.errCode = errCode;
- }
-
- public String getErrMsg() {
- return errMsg;
- }
-
- public void setErrMsg(String errMsg) {
- this.errMsg = errMsg;
- }
-
- public Object getTick() {
- return tick;
- }
-
- public void setTick(Object tick) {
- this.tick = tick;
- }
-
-}
diff --git a/src/main/java/com/xcong/excoin/utils/api/response/OrdersDetail.java b/src/main/java/com/xcong/excoin/utils/api/response/OrdersDetail.java
deleted file mode 100644
index 226da84..0000000
--- a/src/main/java/com/xcong/excoin/utils/api/response/OrdersDetail.java
+++ /dev/null
@@ -1,178 +0,0 @@
-package com.xcong.excoin.utils.api.response;
-
-public class OrdersDetail {
-
- /**
- * id : 59378
- * symbol : ethusdt
- * account-id : 100009
- * amount : 10.1000000000
- * price : 100.1000000000
- * created-at : 1494901162595
- * type : buy-limit
- * field-amount : 10.1000000000
- * field-cash-amount : 1011.0100000000
- * field-fees : 0.0202000000
- * finished-at : 1494901400468
- * user-id : 1000
- * source : api
- * state : filled
- * canceled-at : 0
- * exchange : huobi
- * batch :
- */
-
- private long id;
- private String symbol;
- private int accountid;
- private String amount;
- private String price;
- private long createdat;
- private String type;
- private String fieldamount;
- private String fieldcashamount;
- private String fieldfees;
- private long finishedat;
- private int userid;
- private String source;
- private String state;
- private long canceledat;
- private String exchange;
- private String batch;
-
- public long getId() {
- return id;
- }
-
- public void setId(long id) {
- this.id = id;
- }
-
- public String getSymbol() {
- return symbol;
- }
-
- public void setSymbol(String symbol) {
- this.symbol = symbol;
- }
-
- public int getAccountid() {
- return accountid;
- }
-
- public void setAccountid(int accountid) {
- this.accountid = accountid;
- }
-
- public String getAmount() {
- return amount;
- }
-
- public void setAmount(String amount) {
- this.amount = amount;
- }
-
- public String getPrice() {
- return price;
- }
-
- public void setPrice(String price) {
- this.price = price;
- }
-
- public long getCreatedat() {
- return createdat;
- }
-
- public void setCreatedat(long createdat) {
- this.createdat = createdat;
- }
-
- public String getType() {
- return type;
- }
-
- public void setType(String type) {
- this.type = type;
- }
-
- public String getFieldamount() {
- return fieldamount;
- }
-
- public void setFieldamount(String fieldamount) {
- this.fieldamount = fieldamount;
- }
-
- public String getFieldcashamount() {
- return fieldcashamount;
- }
-
- public void setFieldcashamount(String fieldcashamount) {
- this.fieldcashamount = fieldcashamount;
- }
-
- public String getFieldfees() {
- return fieldfees;
- }
-
- public void setFieldfees(String fieldfees) {
- this.fieldfees = fieldfees;
- }
-
- public long getFinishedat() {
- return finishedat;
- }
-
- public void setFinishedat(long finishedat) {
- this.finishedat = finishedat;
- }
-
- public int getUserid() {
- return userid;
- }
-
- public void setUserid(int userid) {
- this.userid = userid;
- }
-
- public String getSource() {
- return source;
- }
-
- public void setSource(String source) {
- this.source = source;
- }
-
- public String getState() {
- return state;
- }
-
- public void setState(String state) {
- this.state = state;
- }
-
- public long getCanceledat() {
- return canceledat;
- }
-
- public void setCanceledat(long canceledat) {
- this.canceledat = canceledat;
- }
-
- public String getExchange() {
- return exchange;
- }
-
- public void setExchange(String exchange) {
- this.exchange = exchange;
- }
-
- public String getBatch() {
- return batch;
- }
-
- public void setBatch(String batch) {
- this.batch = batch;
- }
-}
diff --git a/src/main/java/com/xcong/excoin/utils/api/response/OrdersDetailResponse.java b/src/main/java/com/xcong/excoin/utils/api/response/OrdersDetailResponse.java
deleted file mode 100644
index 585601e..0000000
--- a/src/main/java/com/xcong/excoin/utils/api/response/OrdersDetailResponse.java
+++ /dev/null
@@ -1,50 +0,0 @@
-package com.xcong.excoin.utils.api.response;
-
-public class OrdersDetailResponse<T> {
-
- /**
- * status : ok
- * data : {"id":59378,"symbol":"ethusdt","account-id":100009,"amount":"10.1000000000","price":"100.1000000000","created-at":1494901162595,"type":"buy-limit","field-amount":"10.1000000000","field-cash-amount":"1011.0100000000","field-fees":"0.0202000000","finished-at":1494901400468,"user-id":1000,"source":"api","state":"filled","canceled-at":0,"exchange":"huobi","batch":""}
- */
-
- private String status;
- public String errCode;
- public String errMsg;
- private T data;
-
- public String getStatus() {
- return status;
- }
-
- public void setStatus(String status) {
- this.status = status;
- }
-
- public T getData() {
- return data;
- }
-
- public void setData(T data) {
- this.data = data;
- }
-
- public static class DataBean {
-
- }
-
- public String getErrCode() {
- return errCode;
- }
-
- public void setErrCode(String errCode) {
- this.errCode = errCode;
- }
-
- public String getErrMsg() {
- return errMsg;
- }
-
- public void setErrMsg(String errMsg) {
- this.errMsg = errMsg;
- }
-}
diff --git a/src/main/java/com/xcong/excoin/utils/api/response/Place.java b/src/main/java/com/xcong/excoin/utils/api/response/Place.java
deleted file mode 100644
index be261e7..0000000
--- a/src/main/java/com/xcong/excoin/utils/api/response/Place.java
+++ /dev/null
@@ -1,4 +0,0 @@
-package com.xcong.excoin.utils.api.response;
-
-public class Place {
-}
diff --git a/src/main/java/com/xcong/excoin/utils/api/response/SubmitcancelResponse.java b/src/main/java/com/xcong/excoin/utils/api/response/SubmitcancelResponse.java
deleted file mode 100644
index 9036e4c..0000000
--- a/src/main/java/com/xcong/excoin/utils/api/response/SubmitcancelResponse.java
+++ /dev/null
@@ -1,47 +0,0 @@
-package com.xcong.excoin.utils.api.response;
-
-public class SubmitcancelResponse {
-
-
- /**
- * status : ok
- * data : 59378
- */
-
- private String status;
- public String errCode;
- public String errMsg;
- private String data;
-
- public String getStatus() {
- return status;
- }
-
- public void setStatus(String status) {
- this.status = status;
- }
-
- public String getData() {
- return data;
- }
-
- public void setData(String data) {
- this.data = data;
- }
-
- public String getErrCode() {
- return errCode;
- }
-
- public void setErrCode(String errCode) {
- this.errCode = errCode;
- }
-
- public String getErrMsg() {
- return errMsg;
- }
-
- public void setErrMsg(String errMsg) {
- this.errMsg = errMsg;
- }
-}
diff --git a/src/main/java/com/xcong/excoin/utils/api/response/Symbol.java b/src/main/java/com/xcong/excoin/utils/api/response/Symbol.java
deleted file mode 100644
index 7f98dba..0000000
--- a/src/main/java/com/xcong/excoin/utils/api/response/Symbol.java
+++ /dev/null
@@ -1,9 +0,0 @@
-package com.xcong.excoin.utils.api.response;
-
-public class Symbol {
-
- public String baseCurrency;
- public String quoteCurrency;
- public String symbol;
-
-}
diff --git a/src/main/java/com/xcong/excoin/utils/api/response/Symbols.java b/src/main/java/com/xcong/excoin/utils/api/response/Symbols.java
deleted file mode 100644
index fc6004d..0000000
--- a/src/main/java/com/xcong/excoin/utils/api/response/Symbols.java
+++ /dev/null
@@ -1,98 +0,0 @@
-package com.xcong.excoin.utils.api.response;
-
-public class Symbols {
-
- /**
- * amount : 4316.4346
- * open : 8090.54
- * close : 7962.62
- * high : 8119
- * ts : 1489464451000
- * id : 1489464451
- * count : 9595
- * low : 7875
- * vol : 3.449727690576E7
- */
-
- private double amount;
- private double open;
- private double close;
- private int high;
- private long ts;
- private long id;
- private int count;
- private int low;
- private double vol;
-
- public double getAmount() {
- return amount;
- }
-
- public void setAmount(double amount) {
- this.amount = amount;
- }
-
- public double getOpen() {
- return open;
- }
-
- public void setOpen(double open) {
- this.open = open;
- }
-
- public double getClose() {
- return close;
- }
-
- public void setClose(double close) {
- this.close = close;
- }
-
- public int getHigh() {
- return high;
- }
-
- public void setHigh(int high) {
- this.high = high;
- }
-
- public long getTs() {
- return ts;
- }
-
- public void setTs(long ts) {
- this.ts = ts;
- }
-
- public long getId() {
- return id;
- }
-
- public void setId(long id) {
- this.id = id;
- }
-
- public int getCount() {
- return count;
- }
-
- public void setCount(int count) {
- this.count = count;
- }
-
- public int getLow() {
- return low;
- }
-
- public void setLow(int low) {
- this.low = low;
- }
-
- public double getVol() {
- return vol;
- }
-
- public void setVol(double vol) {
- this.vol = vol;
- }
-}
diff --git a/src/main/java/com/xcong/excoin/utils/api/response/SymbolsResponse.java b/src/main/java/com/xcong/excoin/utils/api/response/SymbolsResponse.java
deleted file mode 100644
index 3488aa3..0000000
--- a/src/main/java/com/xcong/excoin/utils/api/response/SymbolsResponse.java
+++ /dev/null
@@ -1,67 +0,0 @@
-package com.xcong.excoin.utils.api.response;
-
-public class SymbolsResponse<T> {
-
-
- /**
- * status : ok
- * ch : market.btcusdt.detail
- * ts : 1489473538996
- * tick : {"amount":4316.4346,"open":8090.54,"close":7962.62,"high":8119,"ts":1489464451000,"id":1489464451,"count":9595,"low":7875,"vol":3.449727690576E7}
- */
-
- private String status;
- private String ch;
- private long ts;
- public String errCode;
- public String errMsg;
- private T tick;
-
- public String getStatus() {
- return status;
- }
-
- public void setStatus(String status) {
- this.status = status;
- }
-
- public String getCh() {
- return ch;
- }
-
- public void setCh(String ch) {
- this.ch = ch;
- }
-
- public long getTs() {
- return ts;
- }
-
- public void setTs(long ts) {
- this.ts = ts;
- }
-
- public String getErrCode() {
- return errCode;
- }
-
- public void setErrCode(String errCode) {
- this.errCode = errCode;
- }
-
- public String getErrMsg() {
- return errMsg;
- }
-
- public void setErrMsg(String errMsg) {
- this.errMsg = errMsg;
- }
-
- public T getTick() {
- return tick;
- }
-
- public void setTick(T tick) {
- this.tick = tick;
- }
-}
diff --git a/src/main/java/com/xcong/excoin/utils/api/response/TimestampResponse.java b/src/main/java/com/xcong/excoin/utils/api/response/TimestampResponse.java
deleted file mode 100644
index bb1d71c..0000000
--- a/src/main/java/com/xcong/excoin/utils/api/response/TimestampResponse.java
+++ /dev/null
@@ -1,45 +0,0 @@
-package com.xcong.excoin.utils.api.response;
-
-import java.text.SimpleDateFormat;
-import java.util.Date;
-
-/**
- * @Author ISME
- * @Date 2018/1/14
- * @Time 15:53
- */
-
-public class TimestampResponse {
-
- /**
- * status : ok
- * data : 1494900087029
- */
-
- private String status;
- private long data;
- @SuppressWarnings("unused")
- private String dateTime;
-
- public String getStatus() {
- return status;
- }
-
- public void setStatus(String status) {
- this.status = status;
- }
-
- public long getData() {
- return data;
- }
-
- public void setData(long data) {
- this.data = data;
- }
-
- public String getDateTime() {
- SimpleDateFormat sdf = new SimpleDateFormat("YYYY-MM-dd hh:mm:ss");
- Date date = new Date(data);
- return sdf.format(date);
- }
-}
diff --git a/src/main/java/com/xcong/excoin/utils/api/response/Trade.java b/src/main/java/com/xcong/excoin/utils/api/response/Trade.java
deleted file mode 100644
index ecb844e..0000000
--- a/src/main/java/com/xcong/excoin/utils/api/response/Trade.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package com.xcong.excoin.utils.api.response;
-
-public class Trade<T> {
-
- /**
- * id : 600848670
- * ts : 1489464451000
- * data : [{"id":600848670,"price":7962.62,"amount":0.0122,"direction":"buy","ts":1489464451000}]
- */
-
- private long id;
- private long ts;
- private T data;
-
- public long getId() {
- return id;
- }
-
- public void setId(long id) {
- this.id = id;
- }
-
- public long getTs() {
- return ts;
- }
-
- public void setTs(long ts) {
- this.ts = ts;
- }
-
- public T getData() {
- return data;
- }
-
- public void setData(T data) {
- this.data = data;
- }
-}
diff --git a/src/main/java/com/xcong/excoin/utils/api/response/TradeBean.java b/src/main/java/com/xcong/excoin/utils/api/response/TradeBean.java
deleted file mode 100644
index 1dc6bfb..0000000
--- a/src/main/java/com/xcong/excoin/utils/api/response/TradeBean.java
+++ /dev/null
@@ -1,60 +0,0 @@
-package com.xcong.excoin.utils.api.response;
-
-public class TradeBean {
-
- /**
- * id : 600848670
- * price : 7962.62
- * amount : 0.0122
- * direction : buy
- * ts : 1489464451000
- */
-
- private long id;
- private double price;
- private double amount;
- private String direction;
- private long ts;
-
- public long getId() {
- return id;
- }
-
- public void setId(long id) {
- this.id = id;
- }
-
- public double getPrice() {
- return price;
- }
-
- public void setPrice(double price) {
- this.price = price;
- }
-
- public double getAmount() {
- return amount;
- }
-
- public void setAmount(double amount) {
- this.amount = amount;
- }
-
- public String getDirection() {
- return direction;
- }
-
- public void setDirection(String direction) {
- this.direction = direction;
- }
-
- public long getTs() {
- return ts;
- }
-
- public void setTs(long ts) {
- this.ts = ts;
- }
-
-
-}
diff --git a/src/main/java/com/xcong/excoin/utils/api/response/TradeResponse.java b/src/main/java/com/xcong/excoin/utils/api/response/TradeResponse.java
deleted file mode 100644
index 21a09ce..0000000
--- a/src/main/java/com/xcong/excoin/utils/api/response/TradeResponse.java
+++ /dev/null
@@ -1,70 +0,0 @@
-package com.xcong.excoin.utils.api.response;
-
-public class TradeResponse {
-
-
- /**
- * status : ok
- * ch : market.btcusdt.trade.detail
- * ts : 1489473346905
- * tick : {"id":600848670,"ts":1489464451000,"data":[{"id":600848670,"price":7962.62,"amount":0.0122,"direction":"buy","ts":1489464451000}]}
- */
-
- private String status;
- private String ch;
- private long ts;
- public String errCode;
- public String errMsg;
- @SuppressWarnings("rawtypes")
- private Trade tick;
-
- public String getStatus() {
- return status;
- }
-
- public void setStatus(String status) {
- this.status = status;
- }
-
- public String getCh() {
- return ch;
- }
-
- public void setCh(String ch) {
- this.ch = ch;
- }
-
- public long getTs() {
- return ts;
- }
-
- public void setTs(long ts) {
- this.ts = ts;
- }
-
- public String getErrCode() {
- return errCode;
- }
-
- public void setErrCode(String errCode) {
- this.errCode = errCode;
- }
-
- public String getErrMsg() {
- return errMsg;
- }
-
- public void setErrMsg(String errMsg) {
- this.errMsg = errMsg;
- }
-
- @SuppressWarnings("rawtypes")
- public Trade getTick() {
- return tick;
- }
-
- @SuppressWarnings("rawtypes")
- public void setTick(Trade tick) {
- this.tick = tick;
- }
-}
diff --git a/src/main/java/com/xcong/excoin/utils/mail/RequestEncoder.java b/src/main/java/com/xcong/excoin/utils/mail/RequestEncoder.java
deleted file mode 100644
index 16318f4..0000000
--- a/src/main/java/com/xcong/excoin/utils/mail/RequestEncoder.java
+++ /dev/null
@@ -1,71 +0,0 @@
-package com.xcong.excoin.utils.mail;
-
-import java.security.MessageDigest;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Set;
-
-/**
- * 处理请求数据
- * @author submail
- *
- */
-public class RequestEncoder {
-
- private static final char[] HEX_DIGITS = { '0', '1', '2', '3', '4', '5',
- '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' };
- public static final String MD5 = "MD5";
- public static final String SHA1 = "SHA1";
- /**
- * 编码的字符串
- *
- * @param algorithm
- * @param str
- * @return String
- */
- public static String encode(String algorithm, String str) {
- if (str == null) {
- return null;
- }
- try {
- MessageDigest messageDigest = MessageDigest.getInstance(algorithm);
- messageDigest.update(str.getBytes("UTF-8"));
- return getFormattedText(messageDigest.digest());
- } catch (Exception e) {
- throw new RuntimeException(e);
- }
-
- }
-
- /**
- *获取原始字节并将其格式化。
- * @param bytes
- * the raw bytes from the digest.
- * @return the formatted bytes.
- */
- private static String getFormattedText(byte[] bytes) {
- int len = bytes.length;
- StringBuilder buf = new StringBuilder(len * 2);
- for (int j = 0; j < len; j++) { buf.append(HEX_DIGITS[(bytes[j] >> 4) & 0x0f]);
- buf.append(HEX_DIGITS[bytes[j] & 0x0f]);
- }
- return buf.toString();
- }
-
- public static String formatRequest(Map<String, Object> data){
- Set<String> keySet = data.keySet();
- Iterator<String> it = keySet.iterator();
- StringBuffer sb = new StringBuffer();
- while(it.hasNext()){
- String key = it.next();
- Object value = data.get(key);
- if(value instanceof String){
- sb.append(key + "=" + value + "&");
- }
- }
- if(sb.length() != 0){
- return sb.substring(0, sb.length() - 1);
- }
- return null;
- }
-}
diff --git a/src/main/java/com/xcong/excoin/utils/mail/Sms106Send.java b/src/main/java/com/xcong/excoin/utils/mail/Sms106Send.java
deleted file mode 100644
index 8685a35..0000000
--- a/src/main/java/com/xcong/excoin/utils/mail/Sms106Send.java
+++ /dev/null
@@ -1,78 +0,0 @@
-package com.xcong.excoin.utils.mail;
-
-import cn.hutool.core.date.DatePattern;
-import cn.hutool.core.date.DateUtil;
-import cn.hutool.core.util.StrUtil;
-import cn.hutool.core.util.XmlUtil;
-import cn.hutool.http.HttpUtil;
-import com.xcong.excoin.common.exception.GlobalException;
-import lombok.extern.slf4j.Slf4j;
-
-import java.util.Date;
-import java.util.HashMap;
-
-/**
- * @author wzy
- * @date 2020-07-14
- **/
-@Slf4j
-public class Sms106Send {
-
- private static final String URL = "http://www.qf106.com/sms.aspx";
- private static final String ID = "16580";
- private static final String ACCOUNT = "Biue";
- private static final String PASSWORD = "123456";
-
-
- /**
- * @param phone 手机号
- * @param code 验证码
- * @param time 失效时间
- * @return
- */
- public static boolean sendVerifyCode(String phone, String code, int time) {
- String msg = "您的验证码是{},请在{}分钟内输入,请勿泄露给他人,如非本人操作,请及时修改密码。";
- String content = StrUtil.format(msg, code, time);
- return request(phone, content, "验证码");
- }
-
- public static boolean sendRechargeMsg(String phone, String time, String orderNo) {
- String msg = "尊敬的用户,您的帐号于{}有一笔成功充值订单,如有疑问请联系客服,订单编号为{}";
- String content = StrUtil.format(msg, time, orderNo);
- return request(phone, content, "充值");
- }
-
- public static boolean sendWithdrawalMsg(String phone, String time, String orderNo) {
- String msg = "尊敬的用户,您的帐号于{}有一笔成功提现订单,如有疑问请联系客服,订单编号为{}";
- String content = StrUtil.format(msg, time, orderNo);
- return request(phone, content, "提现");
- }
-
- private static boolean request(String phone, String content, String tagName) {
- HashMap<String, Object> param = new HashMap<>();
- param.put("userid", ID);
- param.put("account", ACCOUNT);
- param.put("password", PASSWORD);
- param.put("mobile", phone);
- param.put("content", content);
- param.put("sendTime", DateUtil.format(new Date(), DatePattern.NORM_DATETIME_PATTERN));
- param.put("action", "send");
- param.put("checkcontent", 0);
- param.put("taskName", tagName);
- param.put("countnumber", 1);
- param.put("mobilenumber", 1);
- param.put("telephonenumber", 0);
-
- String response = HttpUtil.post(URL, param);
- log.info("短信发送:{}, {}", tagName, response);
- if ("Success".equals(XmlUtil.xmlToMap(response).get("returnstatus"))) {
- return true;
- } else {
- throw new GlobalException((String) XmlUtil.xmlToMap(response).get("message"));
- }
- }
-
- public static void main(String[] args) {
- System.out.println(sendVerifyCode("15773002834", "123456", 2));
- }
-}
diff --git a/src/main/java/com/xcong/excoin/utils/mail/SmsSend.java b/src/main/java/com/xcong/excoin/utils/mail/SmsSend.java
deleted file mode 100644
index e2e8ed2..0000000
--- a/src/main/java/com/xcong/excoin/utils/mail/SmsSend.java
+++ /dev/null
@@ -1,164 +0,0 @@
-package com.xcong.excoin.utils.mail;
-
-import cn.hutool.core.date.DateUtil;
-import net.sf.json.JSONObject;
-import org.apache.http.HttpEntity;
-import org.apache.http.HttpResponse;
-import org.apache.http.client.methods.HttpGet;
-import org.apache.http.client.methods.HttpPost;
-import org.apache.http.entity.ContentType;
-import org.apache.http.entity.mime.MultipartEntityBuilder;
-import org.apache.http.impl.client.CloseableHttpClient;
-import org.apache.http.impl.client.HttpClientBuilder;
-import org.apache.http.protocol.HTTP;
-import org.apache.http.util.EntityUtils;
-
-import java.io.IOException;
-import java.math.BigDecimal;
-import java.util.Date;
-import java.util.Map;
-import java.util.TreeMap;
-
-/**
- * @author wzy
- * @date 2020-06-17
- **/
-public class SmsSend {
- /**
- * 时间戳接口配置
- */
- public static final String TIMESTAMP = "https://api.mysubmail.com/service/timestamp";
-
- public static final String TYPE_MD5 = "md5";
- public static final String TYPE_SHA1 = "sha1";
-
- private static final String APP_ID = "51258";
- private static final String APP_KEY = "a9b6e0758dc40d3c346887fc0e154642";
- private static final String SIGN_TYPE = "";
- /**
- * API 请求接口配置
- */
- private static final String URL = "https://api.mysubmail.com/message/xsend";
-
-
- /**
- * 发送验证码
- *
- * @param telphone 手机号
- * @param code 验证码
- * @param time 超时时间
- * @return
- */
- public static boolean sendVerifyCode(String telphone, String code, int time) {
- TreeMap<String, Object> requestData = new TreeMap<String, Object>();
- JSONObject vars = new JSONObject();
-
- String project = "2CHnV3";
- vars.put("code", code);
- vars.put("time", time);
-
- requestData.put("appid", APP_ID);
- requestData.put("project", project);
- requestData.put("to", telphone);
- if (!vars.isEmpty()) {
- requestData.put("vars", vars.toString());
- }
- return requestSend(requestData);
- }
-
- /**
- * 发送充值成功消息
- *
- * @param phone 手机号
- * @param time 充值时间
- * @param amount 金额
- * @param orderNo 订单号
- */
- public static void sendRechargeMsg(String phone, String time, String amount, String orderNo) {
- TreeMap<String, Object> requestData = new TreeMap<String, Object>();
- JSONObject vars = new JSONObject();
- vars.put("time", time);
- vars.put("price", amount);
- vars.put("orderNo", orderNo);
- String project = "Cqky91";
- requestData.put("appid", APP_ID);
- requestData.put("project", project);
- requestData.put("to", phone);
- if (!vars.isEmpty()) {
- requestData.put("vars", vars.toString());
- }
-
- requestSend(requestData);
- }
-
-
- private static boolean requestSend(TreeMap<String, Object> requestData) {
- MultipartEntityBuilder builder = MultipartEntityBuilder.create();
- @SuppressWarnings("deprecation")
- ContentType contentType = ContentType.create(HTTP.PLAIN_TEXT_TYPE, HTTP.UTF_8);
- for (Map.Entry<String, Object> entry : requestData.entrySet()) {
- String key = entry.getKey();
- Object value = entry.getValue();
- if (value instanceof String) {
- builder.addTextBody(key, String.valueOf(value), contentType);
- }
- }
- if (SIGN_TYPE.equals(TYPE_MD5) || SIGN_TYPE.equals(TYPE_SHA1)) {
- String timestamp = getTimestamp();
- requestData.put("timestamp", timestamp);
- requestData.put("sign_type", SIGN_TYPE);
- String signStr = APP_ID + APP_KEY + RequestEncoder.formatRequest(requestData) + APP_ID + APP_KEY;
-
- builder.addTextBody("timestamp", timestamp);
- builder.addTextBody("sign_type", SIGN_TYPE);
- builder.addTextBody("signature", RequestEncoder.encode(SIGN_TYPE, signStr), contentType);
- } else {
- builder.addTextBody("signature", APP_KEY, contentType);
- }
-
- HttpPost httpPost = new HttpPost(URL);
- httpPost.addHeader("charset", "UTF-8");
- httpPost.setEntity(builder.build());
- try {
- CloseableHttpClient closeableHttpClient = HttpClientBuilder.create().build();
- HttpResponse response = closeableHttpClient.execute(httpPost);
- HttpEntity httpEntity = response.getEntity();
- if (httpEntity != null) {
- String jsonStr = EntityUtils.toString(httpEntity, "UTF-8");
- System.out.println(jsonStr);
- if ("success".equals(JSONObject.fromObject(jsonStr).getString("status"))) {
- return true;
- }
- }
- } catch (IOException e) {
- e.printStackTrace();
- }
- return false;
- }
-
- /**
- * 获取时间戳
- */
- private static String getTimestamp() {
- CloseableHttpClient closeableHttpClient = HttpClientBuilder.create().build();
- HttpGet httpget = new HttpGet(TIMESTAMP);
- try {
- HttpResponse response = closeableHttpClient.execute(httpget);
- HttpEntity httpEntity = response.getEntity();
- String jsonStr = EntityUtils.toString(httpEntity, "UTF-8");
- if (jsonStr != null) {
- JSONObject json = JSONObject.fromObject(jsonStr);
- return json.getString("timestamp");
- }
- closeableHttpClient.close();
- } catch (IOException e) {
- e.printStackTrace();
- }
-
- return null;
- }
-
- public static void main(String[] args) {
-// sendVerifyCode("15773002834", "123456", 2);
- }
-}
diff --git a/src/main/java/com/xcong/excoin/utils/mail/SubMailSend.java b/src/main/java/com/xcong/excoin/utils/mail/SubMailSend.java
deleted file mode 100644
index 4663a48..0000000
--- a/src/main/java/com/xcong/excoin/utils/mail/SubMailSend.java
+++ /dev/null
@@ -1,170 +0,0 @@
-package com.xcong.excoin.utils.mail;
-
-
-import cn.hutool.core.date.DatePattern;
-import cn.hutool.core.date.DateUtil;
-import net.sf.json.JSONObject;
-import org.apache.http.HttpEntity;
-import org.apache.http.HttpResponse;
-import org.apache.http.client.ClientProtocolException;
-import org.apache.http.client.methods.HttpGet;
-import org.apache.http.client.methods.HttpPost;
-import org.apache.http.entity.ContentType;
-import org.apache.http.entity.mime.MultipartEntityBuilder;
-import org.apache.http.impl.client.CloseableHttpClient;
-import org.apache.http.impl.client.HttpClientBuilder;
-import org.apache.http.protocol.HTTP;
-import org.apache.http.util.EntityUtils;
-
-import java.io.IOException;
-import java.util.Date;
-import java.util.Map;
-import java.util.TreeMap;
-
-/**
- * 邮件发送
- *
- * @author wzy
- * @date 2020-05-27
- **/
-public class SubMailSend {
-
- /**
- * 时间戳接口配置
- */
- public static final String TIMESTAMP = "https://api.mysubmail.com/service/timestamp";
- /**
- * API 请求接口配置
- */
- private static final String URL = "https://api.mysubmail.com/mail/xsend";
-
- public static final String TYPE_MD5 = "md5";
- public static final String TYPE_SHA1 = "sha1";
-
- private static final String APP_ID = "16082";
- private static final String APP_KEY = "f34c792a1112c16c190ed7190d386c4f";
- private static final String FROM = "biue@submail.biue.me";
- private static final String SIGN_TYPE = "";
-
- /**
- * 发送验证码邮件
- *
- * @param to 对象
- * @param code 验证码
- * @return true or false
- */
- public static boolean sendMail(String to, String code) {
- JSONObject vars = new JSONObject();
- vars.put("code", code);
-
- String project = "zoKVB";
- return request(vars, project, to);
- }
-
- /**
- * 发送充值成功邮件
- *
- * @param to 对象
- * @param time 成功时间
- * @param orderNo 订单编号
- * @return true or false
- */
- public static boolean sendRechargeMail(String to, String time, String orderNo) {
- JSONObject vars = new JSONObject();
- vars.put("time", time);
- vars.put("orderNo", orderNo);
- String project = "x820C2";
- return request(vars, project, to);
- }
-
- public static boolean sendWithdrawalMail(String to, String time) {
- JSONObject vars = new JSONObject();
- vars.put("time", time);
- String project = "e3BO91";
- return request(vars, project, to);
- }
-
-
- private static boolean request(JSONObject vars, String project, String to) {
- TreeMap<String, Object> requestData = new TreeMap<String, Object>();
- requestData.put("appid", APP_ID);
- requestData.put("project", project);
- requestData.put("to", to);
- requestData.put("from", FROM);
- if (!vars.isEmpty()) {
- requestData.put("vars", vars.toString());
- }
-
- MultipartEntityBuilder builder = MultipartEntityBuilder.create();
- @SuppressWarnings("deprecation")
- ContentType contentType = ContentType.create(HTTP.PLAIN_TEXT_TYPE, HTTP.UTF_8);
- for (Map.Entry<String, Object> entry : requestData.entrySet()) {
- String key = entry.getKey();
- Object value = entry.getValue();
- if (value instanceof String) {
- builder.addTextBody(key, String.valueOf(value), contentType);
- }
- }
- if (SIGN_TYPE.equals(TYPE_MD5) || SIGN_TYPE.equals(TYPE_SHA1)) {
- String timestamp = getTimestamp();
- requestData.put("timestamp", timestamp);
- requestData.put("sign_type", SIGN_TYPE);
- String signStr = APP_ID + APP_KEY + RequestEncoder.formatRequest(requestData) + APP_ID + APP_KEY;
-
- builder.addTextBody("timestamp", timestamp);
- builder.addTextBody("sign_type", SIGN_TYPE);
- builder.addTextBody("signature", RequestEncoder.encode(SIGN_TYPE, signStr), contentType);
- } else {
- builder.addTextBody("signature", APP_KEY, contentType);
- }
-
- HttpPost httpPost = new HttpPost(URL);
- httpPost.addHeader("charset", "UTF-8");
- httpPost.setEntity(builder.build());
- try {
- CloseableHttpClient closeableHttpClient = HttpClientBuilder.create().build();
- HttpResponse response = closeableHttpClient.execute(httpPost);
- HttpEntity httpEntity = response.getEntity();
- if (httpEntity != null) {
- String jsonStr = EntityUtils.toString(httpEntity, "UTF-8");
- if ("success".equals(JSONObject.fromObject(jsonStr).getString("status"))) {
- return true;
- }
- }
- } catch (IOException e) {
- e.printStackTrace();
- }
- return false;
- }
-
-
- /**
- * 获取时间戳
- *
- * @return
- */
- private static String getTimestamp() {
- CloseableHttpClient closeableHttpClient = HttpClientBuilder.create().build();
- HttpGet httpget = new HttpGet(TIMESTAMP);
- try {
- HttpResponse response = closeableHttpClient.execute(httpget);
- HttpEntity httpEntity = response.getEntity();
- String jsonStr = EntityUtils.toString(httpEntity, "UTF-8");
- if (jsonStr != null) {
- JSONObject json = JSONObject.fromObject(jsonStr);
- return json.getString("timestamp");
- }
- closeableHttpClient.close();
- } catch (IOException e) {
- e.printStackTrace();
- }
-
- return null;
- }
-
- public static void main(String[] args) {
-// System.out.println(sendMail("546766039@qq.com", "123456"));
-
- System.out.println(sendRechargeMail("546766039@qq.com", DateUtil.format(new Date(), DatePattern.NORM_DATETIME_PATTERN), "123456"));
- }
-}
diff --git a/src/main/resources/application-app.yml b/src/main/resources/application-app.yml
deleted file mode 100644
index 54399b2..0000000
--- a/src/main/resources/application-app.yml
+++ /dev/null
@@ -1,116 +0,0 @@
-server:
- port: 8888
- servlet:
- context-path: /
-
-spring:
- profiles:
- active: app
- datasource:
- url: jdbc:mysql://127.0.0.1:3306/db_base?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=GMT%2b8
- username: db_base
- password: P@ssw0rd!123
- driver-class-name: com.mysql.jdbc.Driver
- type: com.alibaba.druid.pool.DruidDataSource
- druid:
- initial-size: ${spring_datasource_druid_initial_size:10}
- max-active: ${spring_datasource_druid_max_active:20}
- min-idle: ${spring_datasource_druid_min_idle:3}
- #配置获取连接等待超时的时间
- max-wait: 60000
- pool-prepared-statements: true
- max-pool-prepared-statement-per-connection-size: 20
- validation-query: SELECT 'x'
- test-on-borrow: true
- test-on-return: true
- test-while-idle: true
- #配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
- time-between-eviction-runs-millis: 60000
- #配置一个连接在池中最小生存的时间,单位是毫秒
- min-evictable-idle-time-millis: 300000
- #spring.datasource.druid.max-evguide.ftlictable-idle-time-millis=
- filters: stat,wall
- stat-view-servlet:
- # 默认true 内置监控页面首页/druid/index.html
- enabled: true
- url-pattern: /druid/*
- # 允许清空统计数据
- reset-enable: true
- login-username: root
- login-password: 123456
- # IP白名单 多个逗号分隔
- allow: ${spring_datasource_stat_view_servlet_allow:}
- # IP黑名单
- deny: ${spring_datasource_stat_view_servlet_deny:}
- ## 国际化配置
- messages:
- basename: i18n/messages
- ## redis配置
- redis:
- # Redis数据库索引(默认为 0)
- database: 13
- # Redis服务器地址
- host: 127.0.0.1
- # Redis服务器连接端口
- port: 6379
- # Redis 密码
- password: lianghua1!qaz2@WSX
- lettuce:
- pool:
- # 连接池中的最小空闲连接
- min-idle: 8
- # 连接池中的最大空闲连接
- max-idle: 500
- # 连接池最大连接数(使用负值表示没有限制)
- max-active: 2000
- # 连接池最大阻塞等待时间(使用负值表示没有限制)
- max-wait: 10000
- # 连接超时时间(毫秒)
- timeout: 500000
-
- rabbitmq:
- host: 127.0.0.1
- port: 5672
- username: lianghua20210816
- password: lianghua20210816
- publisher-confirm-type: correlated
-
-
-#custom:
-# rabbitmq:
-# host: 120.27.238.55
-# port: 5672
-# username: ct_rabbit
-# password: 123456
-
-mybatis-plus:
- mapper-locations: classpath:mapper/**/*.xml
-
-
-app:
- debug: false
- redis_expire: 3000
- # k线更新任务控制
- kline-update-job: false
- #最新价任务控制
- newest-price-update-job: false
- #日线 该任务不能与最新价处于同一个服务器
- day-line: false
- #其他任务控制
- other-job: false
- loop-job: false
- rabbit-consumer: false
- block-job: false
- websocket: false
- quant: true
-
-aliyun:
- oss:
- end-point: https://oss-cn-hangzhou.aliyuncs.com
- bucket-name: https://excoin.oss-cn-hangzhou.aliyuncs.com
- access-key-id: LTAI4GBuydqbJ5bTsDP97Lpd
- access-key-secret: vbCjQtPxABWjqtUlQfzjlA0qAY96fh
-
-rsa:
- public_key: MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCCf8UFZK54AiK4PRu7tNd+Z8qZ77o/QXCnk25DRmygVpOEu5mGNSAvfnWmKp2pEV2RljeXq3Rid/+LQkonaebMJeXKSF0yxL/VgyeT8JaQ5gNbOrdfdlc+mFkXJyzyJt8YkvApEdPRNSU2ENBn7mgRfD0BYPM4vZ6/rv+de38FJwIDAQAB
- private_key: MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAIJ/xQVkrngCIrg9G7u0135nypnvuj9BcKeTbkNGbKBWk4S7mYY1IC9+daYqnakRXZGWN5erdGJ3/4tCSidp5swl5cpIXTLEv9WDJ5PwlpDmA1s6t192Vz6YWRcnLPIm3xiS8CkR09E1JTYQ0GfuaBF8PQFg8zi9nr+u/517fwUnAgMBAAECgYBhPt9NvpI4wbanvnndLczr2GJkxfzvSE+vwLCJF4C5FusFHVsxZINggQcg1V75bwRgCiXRMyYefreCSdrCditS43PzTOmE4RRrpxLlm8oubJc0C98LQ2qlN9AsUqL5IHpVGgbHDyWAwjc1GBID6nwXKpxq1/VodFqhahG9D5EZsQJBALnkb+5VTxQbiyQI4Uc9NIvAyVcNY1OisbvY6tvNgdBbJkADgAb78M1HWxxYjUqsvzggNHc7cWqWBHMgpnJaqm8CQQCztze4D7uAk7OC9MJHY5eE980J8Kk+GEZKxz4LahzU6V6dcb9GFac3wEtgilj/tOAn9y0/Q8sm9vvCIbMDzgzJAkEAqRYcqhF26LdVDOX25DHMBgLKISDQZFbsjA13M4/usHL4i+mjHrc0BcUOHu59NpuDI65HitzLAUSLr5zXSdUmiQJAW77wOg4GCejdXsB3IhzMsHwU97sdm26nC+vVV9xvJZ6Rx8zW+f9543NOx9U5BCmhuaVtOvvwDU9PTVcI3atmSQJAXAIJ5gGdtXx0DXiX4VvzNFHqgaqHMGvXyjNVkU2FYQbSAd2A6app4uRO+BkZu9dSjh14m+oXMnV2HzAN2rRnjA==
diff --git a/src/main/resources/application-dayline.yml b/src/main/resources/application-dayline.yml
deleted file mode 100644
index ebe047a..0000000
--- a/src/main/resources/application-dayline.yml
+++ /dev/null
@@ -1,114 +0,0 @@
-server:
- port: 8888
- servlet:
- context-path: /
-
-spring:
- profiles:
- active: dayline
- datasource:
- url: jdbc:mysql://rm-bp151tw8er79ig9kb5o.mysql.rds.aliyuncs.com:3306/db_biue?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=GMT%2b8
- username: ctcoin_data
- password: ctcoin_123
- driver-class-name: com.mysql.jdbc.Driver
- type: com.alibaba.druid.pool.DruidDataSource
- druid:
- initial-size: ${spring_datasource_druid_initial_size:10}
- max-active: ${spring_datasource_druid_max_active:20}
- min-idle: ${spring_datasource_druid_min_idle:3}
- #配置获取连接等待超时的时间
- max-wait: 60000
- pool-prepared-statements: true
- max-pool-prepared-statement-per-connection-size: 20
- validation-query: SELECT 'x'
- test-on-borrow: true
- test-on-return: true
- test-while-idle: true
- #配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
- time-between-eviction-runs-millis: 60000
- #配置一个连接在池中最小生存的时间,单位是毫秒
- min-evictable-idle-time-millis: 300000
- #spring.datasource.druid.max-evguide.ftlictable-idle-time-millis=
- filters: stat,wall
- stat-view-servlet:
- # 默认true 内置监控页面首页/druid/index.html
- enabled: true
- url-pattern: /druid/*
- # 允许清空统计数据
- reset-enable: true
- login-username: root
- login-password: 123456
- # IP白名单 多个逗号分隔
- allow: ${spring_datasource_stat_view_servlet_allow:}
- # IP黑名单
- deny: ${spring_datasource_stat_view_servlet_deny:}
- ## 国际化配置
- messages:
- basename: i18n/messages
- ## redis配置
- redis:
- ## Redis数据库索引(默认为0)
- database: 2
- ## Redis服务器地址
- host: 47.114.114.219
- ## Redis服务器连接端口
- port: 6379
- ## Redis服务器连接密码(默认为空)
- password: biyi123
- jedis:
- pool:
- ## 连接池最大连接数(使用负值表示没有限制)
- #spring.redis.pool.max-active=8
- max-active: 300
- ## 连接池最大阻塞等待时间(使用负值表示没有限制)
- #spring.redis.pool.max-wait=-1
- max-wait: -1
- ## 连接池中的最大空闲连接
- #spring.redis.pool.max-idle=8
- max-idle: 100
- ## 连接池中的最小空闲连接
- #spring.redis.pool.min-idle=0
- min-idle: 8
- ## 连接超时时间(毫秒)
- timeout: 30000
- rabbitmq:
- host: 120.55.86.146
- port: 5672
- username: biyict
- password: biyict123
- publisher-confirm-type: correlated
-
-
-#custom:
-# rabbitmq:
-# host: 120.27.238.55
-# port: 5672
-# username: ct_rabbit
-# password: 123456
-
-mybatis-plus:
- mapper-locations: classpath:mapper/**/*.xml
-
-
-app:
- debug: false
- redis_expire: 3000
- kline-update-job: false
- newest-price-update-job: false
- #日线 该任务不能与最新价处于同一个服务器
- day-line: true
- other-job: false
- loop-job: false
- rabbit-consumer: true
- block-job: false
-
-aliyun:
- oss:
- end-point: https://oss-cn-hangzhou.aliyuncs.com
- bucket-name: https://excoin.oss-cn-hangzhou.aliyuncs.com
- access-key-id: LTAI4GBuydqbJ5bTsDP97Lpd
- access-key-secret: vbCjQtPxABWjqtUlQfzjlA0qAY96fh
-
-rsa:
- public_key: MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCCf8UFZK54AiK4PRu7tNd+Z8qZ77o/QXCnk25DRmygVpOEu5mGNSAvfnWmKp2pEV2RljeXq3Rid/+LQkonaebMJeXKSF0yxL/VgyeT8JaQ5gNbOrdfdlc+mFkXJyzyJt8YkvApEdPRNSU2ENBn7mgRfD0BYPM4vZ6/rv+de38FJwIDAQAB
- private_key: MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAIJ/xQVkrngCIrg9G7u0135nypnvuj9BcKeTbkNGbKBWk4S7mYY1IC9+daYqnakRXZGWN5erdGJ3/4tCSidp5swl5cpIXTLEv9WDJ5PwlpDmA1s6t192Vz6YWRcnLPIm3xiS8CkR09E1JTYQ0GfuaBF8PQFg8zi9nr+u/517fwUnAgMBAAECgYBhPt9NvpI4wbanvnndLczr2GJkxfzvSE+vwLCJF4C5FusFHVsxZINggQcg1V75bwRgCiXRMyYefreCSdrCditS43PzTOmE4RRrpxLlm8oubJc0C98LQ2qlN9AsUqL5IHpVGgbHDyWAwjc1GBID6nwXKpxq1/VodFqhahG9D5EZsQJBALnkb+5VTxQbiyQI4Uc9NIvAyVcNY1OisbvY6tvNgdBbJkADgAb78M1HWxxYjUqsvzggNHc7cWqWBHMgpnJaqm8CQQCztze4D7uAk7OC9MJHY5eE980J8Kk+GEZKxz4LahzU6V6dcb9GFac3wEtgilj/tOAn9y0/Q8sm9vvCIbMDzgzJAkEAqRYcqhF26LdVDOX25DHMBgLKISDQZFbsjA13M4/usHL4i+mjHrc0BcUOHu59NpuDI65HitzLAUSLr5zXSdUmiQJAW77wOg4GCejdXsB3IhzMsHwU97sdm26nC+vVV9xvJZ6Rx8zW+f9543NOx9U5BCmhuaVtOvvwDU9PTVcI3atmSQJAXAIJ5gGdtXx0DXiX4VvzNFHqgaqHMGvXyjNVkU2FYQbSAd2A6app4uRO+BkZu9dSjh14m+oXMnV2HzAN2rRnjA==
diff --git a/src/main/resources/application-loop.yml b/src/main/resources/application-loop.yml
deleted file mode 100644
index a77d03e..0000000
--- a/src/main/resources/application-loop.yml
+++ /dev/null
@@ -1,114 +0,0 @@
-server:
- port: 8888
- servlet:
- context-path: /
-
-spring:
- profiles:
- active: loop
- datasource:
- url: jdbc:mysql://rm-bp151tw8er79ig9kb5o.mysql.rds.aliyuncs.com:3306/db_biue?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=GMT%2b8
- username: ctcoin_data
- password: ctcoin_123
- driver-class-name: com.mysql.jdbc.Driver
- type: com.alibaba.druid.pool.DruidDataSource
- druid:
- initial-size: ${spring_datasource_druid_initial_size:10}
- max-active: ${spring_datasource_druid_max_active:20}
- min-idle: ${spring_datasource_druid_min_idle:3}
- #配置获取连接等待超时的时间
- max-wait: 60000
- pool-prepared-statements: true
- max-pool-prepared-statement-per-connection-size: 20
- validation-query: SELECT 'x'
- test-on-borrow: true
- test-on-return: true
- test-while-idle: true
- #配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
- time-between-eviction-runs-millis: 60000
- #配置一个连接在池中最小生存的时间,单位是毫秒
- min-evictable-idle-time-millis: 300000
- #spring.datasource.druid.max-evguide.ftlictable-idle-time-millis=
- filters: stat,wall
- stat-view-servlet:
- # 默认true 内置监控页面首页/druid/index.html
- enabled: true
- url-pattern: /druid/*
- # 允许清空统计数据
- reset-enable: true
- login-username: root
- login-password: 123456
- # IP白名单 多个逗号分隔
- allow: ${spring_datasource_stat_view_servlet_allow:}
- # IP黑名单
- deny: ${spring_datasource_stat_view_servlet_deny:}
- ## 国际化配置
- messages:
- basename: i18n/messages
- ## redis配置
- redis:
- ## Redis数据库索引(默认为0)
- database: 2
- ## Redis服务器地址
- host: 47.114.114.219
- ## Redis服务器连接端口
- port: 6379
- ## Redis服务器连接密码(默认为空)
- password: biyi123
- jedis:
- pool:
- ## 连接池最大连接数(使用负值表示没有限制)
- #spring.redis.pool.max-active=8
- max-active: 300
- ## 连接池最大阻塞等待时间(使用负值表示没有限制)
- #spring.redis.pool.max-wait=-1
- max-wait: -1
- ## 连接池中的最大空闲连接
- #spring.redis.pool.max-idle=8
- max-idle: 100
- ## 连接池中的最小空闲连接
- #spring.redis.pool.min-idle=0
- min-idle: 8
- ## 连接超时时间(毫秒)
- timeout: 30000
- rabbitmq:
- host: 120.55.86.146
- port: 5672
- username: biyict
- password: biyict123
- publisher-confirm-type: correlated
-
-
-#custom:
-# rabbitmq:
-# host: 120.27.238.55
-# port: 5672
-# username: ct_rabbit
-# password: 123456
-
-mybatis-plus:
- mapper-locations: classpath:mapper/**/*.xml
-
-
-app:
- debug: false
- redis_expire: 3000
- kline-update-job: false
- newest-price-update-job: false
- #日线 该任务不能与最新价处于同一个服务器
- day-line: false
- other-job: true
- loop-job: true
- rabbit-consumer: true
- block-job: true
-
-aliyun:
- oss:
- end-point: https://oss-cn-hangzhou.aliyuncs.com
- bucket-name: https://excoin.oss-cn-hangzhou.aliyuncs.com
- access-key-id: LTAI4GBuydqbJ5bTsDP97Lpd
- access-key-secret: vbCjQtPxABWjqtUlQfzjlA0qAY96fh
-
-rsa:
- public_key: MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCCf8UFZK54AiK4PRu7tNd+Z8qZ77o/QXCnk25DRmygVpOEu5mGNSAvfnWmKp2pEV2RljeXq3Rid/+LQkonaebMJeXKSF0yxL/VgyeT8JaQ5gNbOrdfdlc+mFkXJyzyJt8YkvApEdPRNSU2ENBn7mgRfD0BYPM4vZ6/rv+de38FJwIDAQAB
- private_key: MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAIJ/xQVkrngCIrg9G7u0135nypnvuj9BcKeTbkNGbKBWk4S7mYY1IC9+daYqnakRXZGWN5erdGJ3/4tCSidp5swl5cpIXTLEv9WDJ5PwlpDmA1s6t192Vz6YWRcnLPIm3xiS8CkR09E1JTYQ0GfuaBF8PQFg8zi9nr+u/517fwUnAgMBAAECgYBhPt9NvpI4wbanvnndLczr2GJkxfzvSE+vwLCJF4C5FusFHVsxZINggQcg1V75bwRgCiXRMyYefreCSdrCditS43PzTOmE4RRrpxLlm8oubJc0C98LQ2qlN9AsUqL5IHpVGgbHDyWAwjc1GBID6nwXKpxq1/VodFqhahG9D5EZsQJBALnkb+5VTxQbiyQI4Uc9NIvAyVcNY1OisbvY6tvNgdBbJkADgAb78M1HWxxYjUqsvzggNHc7cWqWBHMgpnJaqm8CQQCztze4D7uAk7OC9MJHY5eE980J8Kk+GEZKxz4LahzU6V6dcb9GFac3wEtgilj/tOAn9y0/Q8sm9vvCIbMDzgzJAkEAqRYcqhF26LdVDOX25DHMBgLKISDQZFbsjA13M4/usHL4i+mjHrc0BcUOHu59NpuDI65HitzLAUSLr5zXSdUmiQJAW77wOg4GCejdXsB3IhzMsHwU97sdm26nC+vVV9xvJZ6Rx8zW+f9543NOx9U5BCmhuaVtOvvwDU9PTVcI3atmSQJAXAIJ5gGdtXx0DXiX4VvzNFHqgaqHMGvXyjNVkU2FYQbSAd2A6app4uRO+BkZu9dSjh14m+oXMnV2HzAN2rRnjA==
diff --git a/src/main/resources/application-newprice.yml b/src/main/resources/application-newprice.yml
deleted file mode 100644
index 75aadb3..0000000
--- a/src/main/resources/application-newprice.yml
+++ /dev/null
@@ -1,114 +0,0 @@
-server:
- port: 8888
- servlet:
- context-path: /
-
-spring:
- profiles:
- active: newprice
- datasource:
- url: jdbc:mysql://rm-bp151tw8er79ig9kb5o.mysql.rds.aliyuncs.com:3306/db_biue?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=GMT%2b8
- username: ctcoin_data
- password: ctcoin_123
- driver-class-name: com.mysql.jdbc.Driver
- type: com.alibaba.druid.pool.DruidDataSource
- druid:
- initial-size: ${spring_datasource_druid_initial_size:10}
- max-active: ${spring_datasource_druid_max_active:20}
- min-idle: ${spring_datasource_druid_min_idle:3}
- #配置获取连接等待超时的时间
- max-wait: 60000
- pool-prepared-statements: true
- max-pool-prepared-statement-per-connection-size: 20
- validation-query: SELECT 'x'
- test-on-borrow: true
- test-on-return: true
- test-while-idle: true
- #配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
- time-between-eviction-runs-millis: 60000
- #配置一个连接在池中最小生存的时间,单位是毫秒
- min-evictable-idle-time-millis: 300000
- #spring.datasource.druid.max-evguide.ftlictable-idle-time-millis=
- filters: stat,wall
- stat-view-servlet:
- # 默认true 内置监控页面首页/druid/index.html
- enabled: true
- url-pattern: /druid/*
- # 允许清空统计数据
- reset-enable: true
- login-username: root
- login-password: 123456
- # IP白名单 多个逗号分隔
- allow: ${spring_datasource_stat_view_servlet_allow:}
- # IP黑名单
- deny: ${spring_datasource_stat_view_servlet_deny:}
- ## 国际化配置
- messages:
- basename: i18n/messages
- ## redis配置
- redis:
- ## Redis数据库索引(默认为0)
- database: 2
- ## Redis服务器地址
- host: 47.114.114.219
- ## Redis服务器连接端口
- port: 6379
- ## Redis服务器连接密码(默认为空)
- password: biyi123
- jedis:
- pool:
- ## 连接池最大连接数(使用负值表示没有限制)
- #spring.redis.pool.max-active=8
- max-active: 300
- ## 连接池最大阻塞等待时间(使用负值表示没有限制)
- #spring.redis.pool.max-wait=-1
- max-wait: -1
- ## 连接池中的最大空闲连接
- #spring.redis.pool.max-idle=8
- max-idle: 100
- ## 连接池中的最小空闲连接
- #spring.redis.pool.min-idle=0
- min-idle: 8
- ## 连接超时时间(毫秒)
- timeout: 30000
- rabbitmq:
- host: 120.55.86.146
- port: 5672
- username: biyict
- password: biyict123
- publisher-confirm-type: correlated
-
-
-#custom:
-# rabbitmq:
-# host: 120.27.238.55
-# port: 5672
-# username: ct_rabbit
-# password: 123456
-
-mybatis-plus:
- mapper-locations: classpath:mapper/**/*.xml
-
-
-app:
- debug: false
- redis_expire: 3000
- kline-update-job: false
- newest-price-update-job: true
- #日线 该任务不能与最新价处于同一个服务器
- day-line: false
- other-job: false
- loop-job: false
- rabbit-consumer: true
- block-job: false
-
-aliyun:
- oss:
- end-point: https://oss-cn-hangzhou.aliyuncs.com
- bucket-name: https://excoin.oss-cn-hangzhou.aliyuncs.com
- access-key-id: LTAI4GBuydqbJ5bTsDP97Lpd
- access-key-secret: vbCjQtPxABWjqtUlQfzjlA0qAY96fh
-
-rsa:
- public_key: MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCCf8UFZK54AiK4PRu7tNd+Z8qZ77o/QXCnk25DRmygVpOEu5mGNSAvfnWmKp2pEV2RljeXq3Rid/+LQkonaebMJeXKSF0yxL/VgyeT8JaQ5gNbOrdfdlc+mFkXJyzyJt8YkvApEdPRNSU2ENBn7mgRfD0BYPM4vZ6/rv+de38FJwIDAQAB
- private_key: MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAIJ/xQVkrngCIrg9G7u0135nypnvuj9BcKeTbkNGbKBWk4S7mYY1IC9+daYqnakRXZGWN5erdGJ3/4tCSidp5swl5cpIXTLEv9WDJ5PwlpDmA1s6t192Vz6YWRcnLPIm3xiS8CkR09E1JTYQ0GfuaBF8PQFg8zi9nr+u/517fwUnAgMBAAECgYBhPt9NvpI4wbanvnndLczr2GJkxfzvSE+vwLCJF4C5FusFHVsxZINggQcg1V75bwRgCiXRMyYefreCSdrCditS43PzTOmE4RRrpxLlm8oubJc0C98LQ2qlN9AsUqL5IHpVGgbHDyWAwjc1GBID6nwXKpxq1/VodFqhahG9D5EZsQJBALnkb+5VTxQbiyQI4Uc9NIvAyVcNY1OisbvY6tvNgdBbJkADgAb78M1HWxxYjUqsvzggNHc7cWqWBHMgpnJaqm8CQQCztze4D7uAk7OC9MJHY5eE980J8Kk+GEZKxz4LahzU6V6dcb9GFac3wEtgilj/tOAn9y0/Q8sm9vvCIbMDzgzJAkEAqRYcqhF26LdVDOX25DHMBgLKISDQZFbsjA13M4/usHL4i+mjHrc0BcUOHu59NpuDI65HitzLAUSLr5zXSdUmiQJAW77wOg4GCejdXsB3IhzMsHwU97sdm26nC+vVV9xvJZ6Rx8zW+f9543NOx9U5BCmhuaVtOvvwDU9PTVcI3atmSQJAXAIJ5gGdtXx0DXiX4VvzNFHqgaqHMGvXyjNVkU2FYQbSAd2A6app4uRO+BkZu9dSjh14m+oXMnV2HzAN2rRnjA==
diff --git a/src/main/resources/application-okx.yml b/src/main/resources/application-okx.yml
index 12437ac..9191516 100644
--- a/src/main/resources/application-okx.yml
+++ b/src/main/resources/application-okx.yml
@@ -1,2 +1,4 @@
-mybatis-plus:
- mapper-locations: classpath*:mapper/blackchain/*.xml, classpath*:mapper/ding/*.xml, classpath*:mapper/price/*.xml, classpath*:mapper/combom/*.xml, classpath*:mapper/record/*.xml, classpath*:mapper/uinfo/*.xml, classpath*:mapper/push/*.xml, classpath*:mapper/coin/*.xml, classpath*:mapper/user/*.xml, classpath*:mapper/demo/*.xml
+# OKX 网格策略专用配置
+logging:
+ level:
+ com.xcong.excoin.modules.okxNewPrice: INFO
diff --git a/src/main/resources/application-test.yml b/src/main/resources/application-test.yml
deleted file mode 100644
index 1cd0162..0000000
--- a/src/main/resources/application-test.yml
+++ /dev/null
@@ -1,75 +0,0 @@
-server:
- port: 8888
- servlet:
- context-path: /
-
-spring:
- profiles:
- active: app
- datasource:
- url: jdbc:mysql://120.27.238.55:3406/db_base?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=GMT%2b8
- username: ct_test
- password: 123456
- driver-class-name: com.mysql.jdbc.Driver
- type: com.alibaba.druid.pool.DruidDataSource
- druid:
- initial-size: ${spring_datasource_druid_initial_size:10}
- max-active: ${spring_datasource_druid_max_active:20}
- min-idle: ${spring_datasource_druid_min_idle:3}
- #配置获取连接等待超时的时间
- max-wait: 60000
- pool-prepared-statements: true
- max-pool-prepared-statement-per-connection-size: 20
- validation-query: SELECT 'x'
- test-on-borrow: true
- test-on-return: true
- test-while-idle: true
- #配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
- time-between-eviction-runs-millis: 60000
- #配置一个连接在池中最小生存的时间,单位是毫秒
- min-evictable-idle-time-millis: 300000
- #spring.datasource.druid.max-evguide.ftlictable-idle-time-millis=
- filters: stat,wall
- stat-view-servlet:
- # 默认true 内置监控页面首页/druid/index.html
- enabled: true
- url-pattern: /druid/*
- # 允许清空统计数据
- reset-enable: true
- login-username: root
- login-password: 123456
- # IP白名单 多个逗号分隔
- allow: ${spring_datasource_stat_view_servlet_allow:}
- # IP黑名单
- deny: ${spring_datasource_stat_view_servlet_deny:}
- ## 国际化配置
- messages:
- basename: i18n/messages
-
-app:
- debug: false
- redis_expire: 3000
- # k线更新任务控制
- kline-update-job: false
- #最新价任务控制
- newest-price-update-job: false
- #日线 该任务不能与最新价处于同一个服务器
- day-line: false
- #其他任务控制
- other-job: false
- loop-job: false
- rabbit-consumer: false
- block-job: false
- websocket: false
- quant: true
-
-aliyun:
- oss:
- end-point: https://oss-cn-hangzhou.aliyuncs.com
- bucket-name: https://excoin.oss-cn-hangzhou.aliyuncs.com
- access-key-id: LTAI4GBuydqbJ5bTsDP97Lpd
- access-key-secret: vbCjQtPxABWjqtUlQfzjlA0qAY96fh
-
-rsa:
- public_key: MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCCf8UFZK54AiK4PRu7tNd+Z8qZ77o/QXCnk25DRmygVpOEu5mGNSAvfnWmKp2pEV2RljeXq3Rid/+LQkonaebMJeXKSF0yxL/VgyeT8JaQ5gNbOrdfdlc+mFkXJyzyJt8YkvApEdPRNSU2ENBn7mgRfD0BYPM4vZ6/rv+de38FJwIDAQAB
- private_key: MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAIJ/xQVkrngCIrg9G7u0135nypnvuj9BcKeTbkNGbKBWk4S7mYY1IC9+daYqnakRXZGWN5erdGJ3/4tCSidp5swl5cpIXTLEv9WDJ5PwlpDmA1s6t192Vz6YWRcnLPIm3xiS8CkR09E1JTYQ0GfuaBF8PQFg8zi9nr+u/517fwUnAgMBAAECgYBhPt9NvpI4wbanvnndLczr2GJkxfzvSE+vwLCJF4C5FusFHVsxZINggQcg1V75bwRgCiXRMyYefreCSdrCditS43PzTOmE4RRrpxLlm8oubJc0C98LQ2qlN9AsUqL5IHpVGgbHDyWAwjc1GBID6nwXKpxq1/VodFqhahG9D5EZsQJBALnkb+5VTxQbiyQI4Uc9NIvAyVcNY1OisbvY6tvNgdBbJkADgAb78M1HWxxYjUqsvzggNHc7cWqWBHMgpnJaqm8CQQCztze4D7uAk7OC9MJHY5eE980J8Kk+GEZKxz4LahzU6V6dcb9GFac3wEtgilj/tOAn9y0/Q8sm9vvCIbMDzgzJAkEAqRYcqhF26LdVDOX25DHMBgLKISDQZFbsjA13M4/usHL4i+mjHrc0BcUOHu59NpuDI65HitzLAUSLr5zXSdUmiQJAW77wOg4GCejdXsB3IhzMsHwU97sdm26nC+vVV9xvJZ6Rx8zW+f9543NOx9U5BCmhuaVtOvvwDU9PTVcI3atmSQJAXAIJ5gGdtXx0DXiX4VvzNFHqgaqHMGvXyjNVkU2FYQbSAd2A6app4uRO+BkZu9dSjh14m+oXMnV2HzAN2rRnjA==
diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml
index d6cdaf2..3b1be2a 100644
--- a/src/main/resources/application.yml
+++ b/src/main/resources/application.yml
@@ -1,75 +1,17 @@
server:
port: 8888
- servlet:
- context-path: /
spring:
- OKEX:
- baseurl: https://www.okex.com
profiles:
- active: test
- datasource:
- url: jdbc:mysql://120.27.238.55:3406/db_base?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=GMT%2b8
- username: ct_test
- password: 123456
- driver-class-name: com.mysql.jdbc.Driver
- type: com.alibaba.druid.pool.DruidDataSource
- druid:
- initial-size: ${spring_datasource_druid_initial_size:10}
- max-active: ${spring_datasource_druid_max_active:20}
- min-idle: ${spring_datasource_druid_min_idle:3}
- #配置获取连接等待超时的时间
- max-wait: 60000
- pool-prepared-statements: true
- max-pool-prepared-statement-per-connection-size: 20
- validation-query: SELECT 'x'
- test-on-borrow: true
- test-on-return: true
- test-while-idle: true
- #配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
- time-between-eviction-runs-millis: 60000
- #配置一个连接在池中最小生存的时间,单位是毫秒
- min-evictable-idle-time-millis: 300000
- #spring.datasource.druid.max-evguide.ftlictable-idle-time-millis=
- filters: stat,wall
- stat-view-servlet:
- # 默认true 内置监控页面首页/druid/index.html
- enabled: true
- url-pattern: /druid/*
- # 允许清空统计数据
- reset-enable: true
- login-username: root
- login-password: 123456
- # IP白名单 多个逗号分隔
- allow: ${spring_datasource_stat_view_servlet_allow:}
- # IP黑名单
- deny: ${spring_datasource_stat_view_servlet_deny:}
- ## 国际化配置
- messages:
- basename: i18n/messages
+ active: okx
+ autoconfigure:
+ exclude:
+ # 移除不需要的自动配置
+ - org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration
+ - org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration
+ - org.springframework.boot.autoconfigure.amqp.RabbitAutoConfiguration
+ - org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration
app:
- debug: false
- redis_expire: 3000
- # k线更新任务控制
- kline-update-job: false
- #最新价任务控制
- newest-price-update-job: false
- #日线 该任务不能与最新价处于同一个服务器
- day-line: false
- #其他任务控制
- other-job: false
- loop-job: false
- rabbit-consumer: false
- block-job: false
-
-aliyun:
- oss:
- end-point: https://oss-cn-hangzhou.aliyuncs.com
- bucket-name: https://excoin.oss-cn-hangzhou.aliyuncs.com
- access-key-id: LTAI4GBuydqbJ5bTsDP97Lpd
- access-key-secret: vbCjQtPxABWjqtUlQfzjlA0qAY96fh
-
-rsa:
- public_key: MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCCf8UFZK54AiK4PRu7tNd+Z8qZ77o/QXCnk25DRmygVpOEu5mGNSAvfnWmKp2pEV2RljeXq3Rid/+LQkonaebMJeXKSF0yxL/VgyeT8JaQ5gNbOrdfdlc+mFkXJyzyJt8YkvApEdPRNSU2ENBn7mgRfD0BYPM4vZ6/rv+de38FJwIDAQAB
- private_key: MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAIJ/xQVkrngCIrg9G7u0135nypnvuj9BcKeTbkNGbKBWk4S7mYY1IC9+daYqnakRXZGWN5erdGJ3/4tCSidp5swl5cpIXTLEv9WDJ5PwlpDmA1s6t192Vz6YWRcnLPIm3xiS8CkR09E1JTYQ0GfuaBF8PQFg8zi9nr+u/517fwUnAgMBAAECgYBhPt9NvpI4wbanvnndLczr2GJkxfzvSE+vwLCJF4C5FusFHVsxZINggQcg1V75bwRgCiXRMyYefreCSdrCditS43PzTOmE4RRrpxLlm8oubJc0C98LQ2qlN9AsUqL5IHpVGgbHDyWAwjc1GBID6nwXKpxq1/VodFqhahG9D5EZsQJBALnkb+5VTxQbiyQI4Uc9NIvAyVcNY1OisbvY6tvNgdBbJkADgAb78M1HWxxYjUqsvzggNHc7cWqWBHMgpnJaqm8CQQCztze4D7uAk7OC9MJHY5eE980J8Kk+GEZKxz4LahzU6V6dcb9GFac3wEtgilj/tOAn9y0/Q8sm9vvCIbMDzgzJAkEAqRYcqhF26LdVDOX25DHMBgLKISDQZFbsjA13M4/usHL4i+mjHrc0BcUOHu59NpuDI65HitzLAUSLr5zXSdUmiQJAW77wOg4GCejdXsB3IhzMsHwU97sdm26nC+vVV9xvJZ6Rx8zW+f9543NOx9U5BCmhuaVtOvvwDU9PTVcI3atmSQJAXAIJ5gGdtXx0DXiX4VvzNFHqgaqHMGvXyjNVkU2FYQbSAd2A6app4uRO+BkZu9dSjh14m+oXMnV2HzAN2rRnjA==
+ # OKX 量化策略开关
+ quant: true
diff --git a/src/main/resources/i18n/messages.properties b/src/main/resources/i18n/messages.properties
deleted file mode 100644
index e69de29..0000000
--- a/src/main/resources/i18n/messages.properties
+++ /dev/null
diff --git a/src/main/resources/i18n/messages_en_US.properties b/src/main/resources/i18n/messages_en_US.properties
deleted file mode 100644
index fc356e7..0000000
--- a/src/main/resources/i18n/messages_en_US.properties
+++ /dev/null
@@ -1,243 +0,0 @@
-test=test
-
-blockchain_service_0001=Invalid login information
-blockchain_service_0002=User does not exist
-
-member_controller_0001=Please conduct real name authentication
-member_controller_0002=Please configure the transaction password first
-member_controller_0003=Please enter the transaction password
-member_controller_0004=Please enter the correct transaction password
-member_controller_0005=The system is busy. Please try again later
-member_controller_0006=Please pay in time if the purchase is successful
-member_controller_0007=Confirm success
-member_controller_0008=Login information has expired
-member_controller_0009=Please go to the Security Center for real name authentication
-member_controller_0010=Please go to the security center to configure the transaction password
-
-member_controller_0011=Please enter the transaction password
-member_controller_0012=Please enter the correct transaction password
-member_controller_0013=Your current available usdt quota is not enough
-member_controller_0014=Please enter the withdrawal amount
-member_controller_0015=Your current available usdt quota is not enough
-member_controller_0016=Please configure the collection method
-member_controller_0017=Insufficient available usdt balance
-member_controller_0018=checkout success
-member_controller_0019=Login user is invalid
-member_controller_0020=Undo successful
-
-member_controller_0021=Confirm success
-member_controller_0022=This type of collection is not supported
-member_controller_0023=Login user is invalid
-member_controller_0024=Undo successful
-
-member_service_0001=Wallet address does not exist
-member_service_0002=Invalid login information
-member_service_0003=User does not exist
-member_service_0004=Transfer amount cannot be less than 0
-member_service_0005=Insufficient available balance of currency account
-member_service_0006=Transfer succeeded
-member_service_0007=The available balance of contract account usdt is insufficient
-member_service_0008=Insufficient available balance of agent account usdt
-member_service_0009=Mobile number cannot be empty
-member_service_0010=Sent successfully
-
-member_service_0011=Fail in send
-member_service_0012=The verification code has expired, please request again
-member_service_0013=Wrong verification code
-member_service_0014=Binding succeeded
-member_service_1400=Binding fail
-member_service_0015=Submit failed
-member_service_0016=Mailbox cannot be empty
-member_service_0017=Verification code cannot be empty
-member_service_0018=Binding succeeded
-member_service_0019=Binding failed
-member_service_0020=Get failed
-
-member_service_0021=Please enter the address of withdrawal
-member_service_0022=Please enter notes
-member_service_0023=Please select currency
-member_service_0024=Submitted successfully
-member_service_0025=Get failed
-member_service_0026=Set successfully
-member_service_0027=Setting failed
-member_service_0028=Set successfully
-member_service_0029=Setting failed
-member_service_0030=Delete succeeded
-
-member_service_0031=Delete failed
-member_service_0032=User failure
-member_service_0033=Successfully added
-member_service_0034=Delete succeeded
-member_service_0035=Delete failed
-member_service_0036=Update successful
-member_service_0037=Update failed
-member_service_0038=Verification code is invalid
-member_service_0039=Verification code error
-member_service_0040=Modification succeeded
-member_service_4000=Information auditing
-
-member_service_0041=Modification failed
-member_service_0042=Please enter your mobile number
-member_service_0043=Please enter the verification code
-member_service_0044=Please input a password
-member_service_0045=Verification code is invalid, please resend
-member_service_0046=The verification code entered is wrong, please re-enter
-member_service_0047=please register and log in
-member_service_0048=Modification succeeded, please log in
-member_service_0049=Verification code is invalid
-member_service_0050=Verification code error
-
-member_service_0051=Reset successful
-member_service_0052=Modification failed
-member_service_0053=Sent successfully
-member_service_0054=fail in send
-member_service_0055=Submitted, pending review
-member_service_0056=Audit passed
-member_service_0057=Please enter country
-member_service_0058=Last name cannot be blank, please enter
-member_service_0059=The name cannot be empty. Please enter
-member_service_0060=Card has been used
-
-member_service_0061=Image missing, please upload
-member_service_0062=Submitted successfully
-member_service_0063=Failed to submit, please resubmit
-member_service_0064=The transaction password is wrong, please check and re-enter
-member_service_0065=Verification code is invalid
-member_service_0066=Wrong verification code
-member_service_0067=Submit failed
-member_service_0068=Transaction password set successfully
-member_service_0069=Transaction password modified successfully
-member_service_0070=User does not exist
-
-member_service_0071=Exit successful
-member_service_0072=Exit failed
-member_service_0073=Get failed
-member_service_0074=Failure of user login information
-member_service_0075=User does not exist
-member_service_0076=Get failed
-member_service_0077=No real name authentication
-member_service_0078=Submitted successfully
-member_service_0079=Submit failed
-member_service_0080=No real name authentication
-
-member_service_0081=Transaction password not set
-member_service_0082=Wrong transaction password entered
-member_service_0083=Cell phone number is empty
-member_service_0084=Verification code error
-member_service_0085=Insufficient available balance
-member_service_0086=Submitted successfully, waiting for approval
-member_service_0087=Wallet does not exist
-member_service_0088=User login is invalid
-member_service_0089=Network exception
-member_service_0090=Already logged in
-
-member_service_0091=Not logged in
-member_service_0092=The account has been restricted
-member_service_0093=The user does not exist. Please register and log in again
-member_service_0094=Insufficient available balance of contract usdt account
-member_service_0095=Insufficient available balance of agent usdt account
-member_service_0096=Transfer fail
-member_service_0097=Payment method already exists
-
-order_service_0001=Wrong parameter value
-order_service_0002=Not logged in
-order_service_0003=Submit failed
-order_service_0004=Parameter error
-order_service_0005=Invalid login information
-order_service_0006=User does not exist
-order_service_0007=No real name authentication, please go to the Security Center for real name authentication
-order_service_0008=Wrong parameter
-order_service_0009=Server exception
-order_service_0010=Insufficient amount available
-
-order_service_0011=Submitted successfully
-order_service_0012=Do not repeat cancellation
-order_service_0013=Cancellation successful
-order_service_0014=Please log in
-order_service_0015=Add self selection succeeded
-order_service_0016=Delete self selection succeeded
-order_service_0017=No wallet account
-order_service_0018=User does not exist
-order_service_0019=Wrong parameter
-order_service_0020=User wallet does not exist
-
-order_service_0021=Parameter error
-order_service_0022=The entrusted open price cannot be higher than the market price
-order_service_0023=The entrusted open price cannot be lower than the market price
-order_service_0024=The available amount is insufficient, please recharge before purchasing
-order_service_0025=Submitted successfully
-order_service_0026=User not logged in
-order_service_0027=Order does not exist
-order_service_0028=The order has been closed
-order_service_0029=Margin adjustment failed
-order_service_0030=Margin adjusted
-
-order_service_0031=User login failed
-order_service_0032=Do not repeat cancellation
-order_service_0033=Cancellation successful
-order_service_0034=Closed position
-order_service_0035=Get failed
-order_service_0036=Failure of user login information
-order_service_0037=Operation successful
-order_service_0038=Server exception
-order_service_0039=Frequent operation, please try again later
-order_service_0040=Insufficient available balance
-
-order_service_0041=Set successfully
-order_service_0042=Setting failed
-order_service_0043=Cancellation failed
-order_service_0044=Successful closing
-order_service_0045=This order cannot be closed temporarily
-order_service_0046=No open order
-
-symbols_controller_0001=Success
-
-symbols_service_0001=Details obtained successfully
-symbols_service_0002=Failed to get data
-symbols_service_0003=Load failed
-
-home_controller_0001=Number registered
-home_controller_0002=Number registration available
-home_controller_0003=Correct number
-home_controller_0004=Number not registered
-home_controller_0005=Sent successfully
-home_controller_0006=Failed to send, please resend
-home_controller_0007=The verification code is invalid, please resend!
-home_controller_0008=Verification code error
-home_controller_0009=Verification code succeeded
-
-home_service_0001=Please enter your mobile number
-home_service_0002=Please input a password
-home_service_0003=The user does not exist. Please register and log in again
-home_service_0004=The account has been restricted
-home_service_0005=Wrong password
-home_service_0006=Wrong format of mobile number entered
-home_service_0007=The mobile number has been registered. Please log in
-home_service_0008=login has failed
-home_service_0009=Registration succeeded, please log in
-home_service_0010=Verification code is invalid, please resend
-
-home_service_0011=The verification code entered is wrong, please re-enter
-home_service_0012=Please enter the verification code
-home_service_0013=Modification succeeded, please log in
-home_service_0014=The mobile number does not exist, please register and log in
-
-uploadFile_controller_0001=Upload failed
-
-result_success_msg=Operation success
-result_fail_msg=Operation failed
-
-common_verify_code=Code Error Or Invalided
-common_verify_code_exist=Code existed
-
-illegal_symbol=Illegal Symbol
-illegal_type=Illegal Type
-
-entrust_price_judge_more=The entrusted open price cannot be higher than the market price
-entrust_price_judge_less=The entrusted open price cannot be lower than the market price
-entrust_order_not_exist=Order does not exist
-cancellation_success=Cancellation Success
-cancellation_fail=Cancellation Fail
-
-submit_repeat=Do not repeat submission
-
diff --git a/src/main/resources/i18n/messages_zh_CN.properties b/src/main/resources/i18n/messages_zh_CN.properties
deleted file mode 100644
index 0fdc300..0000000
--- a/src/main/resources/i18n/messages_zh_CN.properties
+++ /dev/null
@@ -1,242 +0,0 @@
-test=测�
-
-blockchain_service_0001=登录信息失效
-blockchain_service_0002=用户不存在
-
-member_controller_0001=请先实名认证
-member_controller_0002=请先配置交易密码
-member_controller_0003=请输入交易密码
-member_controller_0004=请输入正确的交易密码
-member_controller_0005=系统繁忙,请稍后再试
-member_controller_0006=购买成功,请及时付款
-member_controller_0007=确认成功
-member_controller_0008=登录信息已失效
-member_controller_0009=请前往安全中心进行实名认证
-member_controller_0010=请前往安全中心配置交易密码
-
-member_controller_0011=请输入交易密码
-member_controller_0012=请输入正确的交易密码
-member_controller_0013=您当前可用USDT额度不够
-member_controller_0014=请输入提币量
-member_controller_0015=您当前可用USDT额度不够
-member_controller_0016=请配置收款方式
-member_controller_0017=可用USDT余额不足
-member_controller_0018=下单成功
-member_controller_0019=登录用户已失效
-member_controller_0020=撤销成功
-
-member_controller_0021=确认成功
-member_controller_0022=不支持此类收款
-member_controller_0023=登录用户已失效
-member_controller_0024=撤销成功
-
-member_service_0001=钱包地址不存在
-member_service_0002=用户登录信息失效
-member_service_0003=用户不存在
-member_service_0004=转账金额不能小于0
-member_service_0005=币币账户可用余额不足
-member_service_0006=划转成功
-member_service_0007=合约账户USDT可用余额不足
-member_service_0008=代理账户USDT可用余额不足
-member_service_0009=手机号不能为空
-member_service_0010=发送成功
-
-member_service_0011=发送失败
-member_service_0012=验证码已失效,请重新请求
-member_service_0013=验证码有误
-member_service_0014=绑定成功
-member_service_1400=绑定失败
-member_service_0015=提交失败
-member_service_0016=邮箱不能为空
-member_service_0017=验证码不能为空
-member_service_0018=绑定成功
-member_service_0019=绑定失败
-member_service_0020=获取失败
-
-member_service_0021=请输入提币地址
-member_service_0022=请输入备注信息
-member_service_0023=请选择币种
-member_service_0024=提交成功
-member_service_0025=获取失败
-member_service_0026=设置成功
-member_service_0027=设置失败
-member_service_0028=获取成功
-member_service_0029=获取失败
-member_service_0030=删除成功
-
-member_service_0031=删除失败
-member_service_0032=用户失效
-member_service_0033=添加成功
-member_service_0034=删除成功
-member_service_0035=删除失败
-member_service_0036=更新成功
-member_service_0037=更新失败
-member_service_0038=验证码已失效
-member_service_0039=验证码错误
-member_service_0040=修改成功
-member_service_4000=信息审核中
-
-member_service_0041=修改失败
-member_service_0042=请输入手机号码
-member_service_0043=请输入验证码
-member_service_0044=请输入密码
-member_service_0045=验证码已失效,请重新发送
-member_service_0046=输入的验证码有误,请重新输入
-member_service_0047=请进行注册登录
-member_service_0048=修改成功,请登录
-member_service_0049=验证码已失效
-member_service_0050=验证码错误
-
-member_service_0051=重置成功
-member_service_0052=修改失败
-member_service_0053=发送成功
-member_service_0054=发送失败
-member_service_0055=已提交,等待审核
-member_service_0056=审核已通过
-member_service_0057=请输入国家
-member_service_0058=姓不能为空,请输入
-member_service_0059=名不能为空,请输入
-member_service_0060=证件号码已被使用
-
-member_service_0061=缺少图片,请上传
-member_service_0062=提交成功
-member_service_0063=提交失败,请重新提交
-member_service_0064=输入交易密码有误,请检查重新输入
-member_service_0065=验证码已失效
-member_service_0066=验证码有误
-member_service_0067=提交失败
-member_service_0068=交易密码设置成功
-member_service_0069=交易密码修改成功
-member_service_0070=用户不存在
-
-member_service_0071=退出成功
-member_service_0072=退出失败
-member_service_0073=获取失败
-member_service_0074=用户登录信息失效
-member_service_0075=用户不存在
-member_service_0076=获取失败
-member_service_0077=未实名认证
-member_service_0078=提交成功
-member_service_0079=提交失败
-member_service_0080=未实名认证
-
-member_service_0081=未设置交易密码
-member_service_0082=输入的交易密码有误
-member_service_0083=手机号为空
-member_service_0084=验证码错误
-member_service_0085=可用余额不足
-member_service_0086=提交成功,等待审核
-member_service_0087=钱包不存在
-member_service_0088=用户登陆已失效
-member_service_0089=网络异常
-member_service_0090=已经登陆
-
-member_service_0091=未登录
-member_service_0092=该账户已限制登录
-member_service_0093=用户不存在,请注册后再登录
-member_service_0094=合约USDT账户可用余额不足
-member_service_0095=代理USDT账户可用余额不足
-member_service_0096=划转失败
-member_service_0097=支付方式已存在
-
-order_service_0001=参值有误
-order_service_0002=未登录
-order_service_0003=提交失败
-order_service_0004=参数错误
-order_service_0005=登录信息失效
-order_service_0006=用户不存在
-order_service_0007=未实名认证,请去安全中心里进行实名认证
-order_service_0008=参数有误
-order_service_0009=服务器异常
-order_service_0010=可用金额不足
-
-order_service_0011=提交成功
-order_service_0012=请勿重复撤单
-order_service_0013=撤单成功
-order_service_0014=请登录
-order_service_0015=添加自选成功
-order_service_0016=删除自选成功
-order_service_0017=无钱包账号
-order_service_0018=用户不存在
-order_service_0019=参数有误
-order_service_0020=用户钱包不存在
-
-order_service_0021=参数错误
-order_service_0022=委托开多价不能高于市场价
-order_service_0023=委托开多价不能低于市场价
-order_service_0024=可用金额不足,请充值后再购买
-order_service_0025=提交成功
-order_service_0026=用户未登录
-order_service_0027=订单不存在
-order_service_0028=该订单已平仓
-order_service_0029=保证金调整失败
-order_service_0030=保证金已调整
-
-order_service_0031=用户登录已失效
-order_service_0032=请勿重复撤单
-order_service_0033=撤单成功
-order_service_0034=已平仓
-order_service_0035=获取失败
-order_service_0036=用户登录信息失效
-order_service_0037=操作成功
-order_service_0038=服务器异常
-order_service_0039=操作频繁,请稍后再试
-order_service_0040=可用余额不足
-
-order_service_0041=设置成功
-order_service_0042=设置失败
-order_service_0043=撤单失败
-order_service_0044=平仓成功
-order_service_0045=该订单暂不能平仓
-order_service_0046=没有可平仓的订单
-
-symbols_controller_0001=成功
-
-symbols_service_0001=获取详情成功
-symbols_service_0002=获取数据失败
-symbols_service_0003=加载失败
-
-home_controller_0001=号码已注册
-home_controller_0002=号码可用注册
-home_controller_0003=号码正确
-home_controller_0004=号码没注册
-home_controller_0005=发送成功
-home_controller_0006=发送失败,请重新发送
-home_controller_0007=验证码已失效,请重新发送!
-home_controller_0008=验证码错误
-home_controller_0009=验证码成功
-
-home_service_0001=请输入手机号码
-home_service_0002=请输入密码
-home_service_0003=用户不存在,请注册后再登录
-home_service_0004=该账户已限制登录
-home_service_0005=密码有误
-home_service_0006=输入的手机号码格式有误
-home_service_0007=该手机号码已被注册,请去登录
-home_service_0008=注册失败
-home_service_0009=注册成功,请去登录
-home_service_0010=验证码已失效,请重新发送
-
-home_service_0011=输入的验证码有误,请重新输入
-home_service_0012=请输入验证码
-home_service_0013=修改成功,请登录
-home_service_0014=不存在该手机号码,请进行注册登录
-
-uploadFile_controller_0001=上传失败
-
-result_success_msg=操作成功
-result_fail_msg=操作失败
-
-common_verify_code=验证码错误或已失效
-common_verify_code_exist=验证码已发送,请勿重复发送
-
-illegal_symbol=非法币种
-illegal_type=非法类型
-
-entrust_price_judge_more=委托价不能大于当前价
-entrust_price_judge_less=委托价不能小于当前价
-entrust_order_not_exist=委托单不存在
-cancellation_success=撤销成功
-cancellation_fail=撤销失败
-
-submit_repeat=请勿重复提交
--
Gitblit v1.9.1