Administrator
4 days ago 04063bcb7b9e9d8e0242c1313f54ccc1b71f0b6e
fix(gateApi): 调整网格交易参数配置

- 将网格费率从 0.0025 调整为 0.0035
- 基础数量从 30 调整为 75
- 数量从 30 调整为 25
- 重启网格跨度从 10 调整为 8
393 files deleted
3 files added
9 files modified
30804 ■■■■■ changed files
src/main/java/com/xcong/excoin/ExcoinApplication.java 20 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/common/LoginUserUtils.java 77 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/common/annotations/SubmitRepeat.java 13 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/common/annotations/UserAuth.java 15 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/common/aop/SubmitRepeatAspect.java 74 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/common/contants/AppContants.java 79 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/common/enumerates/CoinTypeEnum.java 10 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/common/enumerates/MemberWalletCoinEnum.java 75 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/common/enumerates/OrderClosingTypeEnum.java 55 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/common/enumerates/RabbitPriceTypeEnum.java 31 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/common/enumerates/SymbolEnum.java 39 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/common/exception/GlobalException.java 17 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/common/response/Result.java 80 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/common/response/ResultCode.java 34 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/common/system/base/BaseEntity.java 33 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/common/system/base/IBaseService.java 10 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/common/system/bean/LoginUserBean.java 61 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/common/system/controller/CommonController.java 110 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/common/system/controller/LoginController.java 121 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/common/system/dto/Base64UploadDto.java 20 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/common/system/dto/LoginDto.java 25 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/common/system/dto/RegisterDto.java 39 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/common/system/mapper/CandlestickMapper.java 21 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/common/system/service/CommonService.java 12 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/common/system/service/UserDetailsServiceImpl.java 55 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/common/system/service/impl/CommonServiceImpl.java 63 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/configurations/GlobalExceptionHandler.java 77 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/configurations/MybatisPlusConfig.java 23 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/configurations/RabbitMqConfig.java 289 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/configurations/RedisConfig.java 47 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/configurations/SwaggerConfig.java 50 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/configurations/WebMvcConfig.java 58 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/configurations/i18n/CustomLocaleResolver.java 33 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/configurations/i18n/LocaleResolverConfig.java 19 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/configurations/interceptor/MybatisInterceptor.java 104 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/configurations/properties/AliOssProperties.java 22 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/configurations/properties/ApplicationProperties.java 20 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/configurations/properties/CustomRabbitProperties.java 19 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/configurations/properties/SecurityProperties.java 19 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/configurations/security/CustomAccessDeniedHandler.java 26 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/configurations/security/CustomAuthenticationEntryPoint.java 38 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/configurations/security/TokenConfigurer.java 21 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/configurations/security/TokenFilter.java 123 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/configurations/security/UserAuthenticationArgumentResolver.java 39 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/configurations/security/WebSecurityConfig.java 83 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/blackchain/controller/BlockController.java 47 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/blackchain/model/EosResult.java 28 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/blackchain/model/XrpTransResult.java 49 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/blackchain/model/XrpTransactions.java 36 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/blackchain/model/XrpTx.java 18 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/blackchain/service/BchService.java 138 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/blackchain/service/BigDecimalUtil.java 190 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/blackchain/service/BlockSerive.java 9 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/blackchain/service/BtcService.java 138 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/blackchain/service/DateUtil.java 1369 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/blackchain/service/EosService.java 84 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/blackchain/service/EthService.java 283 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/blackchain/service/HttpUtil.java 281 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/blackchain/service/Impl/BlockSeriveImpl.java 212 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/blackchain/service/LtcService.java 125 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/blackchain/service/UsdtEthService.java 160 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/blackchain/service/UsdtService.java 167 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/blackchain/service/XrpService.java 81 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/coin/controller/CoinController.java 202 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/coin/controller/OrderCoinController.java 171 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/coin/dao/MemberAccountFlowEntityDao.java 8 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/coin/dao/MemberAccountMoneyChangeDao.java 35 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/coin/dao/MemberSelectSymbolsDao.java 16 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/coin/dao/OrderCoinDealDao.java 25 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/coin/dao/OrderCoinsDao.java 19 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/coin/entity/MemberAccountFlowEntity.java 60 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/coin/entity/MemberAccountMoneyChange.java 58 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/coin/entity/OrderCoinsDealEntity.java 76 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/coin/entity/OrderCoinsEntity.java 84 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/coin/mapper/MemberAccountMoneyChangeMapper.java 25 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/coin/mapper/OrderCoinsDealMapper.java 21 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/coin/mapper/OrderWalletCoinDealMapper.java 24 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/coin/mapper/OrderWalletCoinMapper.java 16 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/coin/parameter/dto/CancelEntrustWalletCoinOrderDto.java 17 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/coin/parameter/dto/FindAllWalletCoinOrderDto.java 28 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/coin/parameter/dto/FindCollectDto.java 20 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/coin/parameter/dto/InOrderCoinDto.java 27 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/coin/parameter/dto/RecordsPageDto.java 23 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/coin/parameter/dto/SubmitSalesWalletCoinOrderDto.java 37 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/coin/parameter/dto/TransferOfBalanceDto.java 23 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/coin/parameter/dto/TransferOfBalanceFromAgentDto.java 26 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/coin/parameter/vo/AllWalletCoinVo.java 28 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/coin/parameter/vo/FindCollectListVo.java 16 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/coin/parameter/vo/MemberAccountMoneyChangeInfoVo.java 46 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/coin/parameter/vo/MemberAccountMoneyChangeVo.java 16 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/coin/parameter/vo/MemberAgentIntoInfoVo.java 16 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/coin/parameter/vo/MemberSelectSymbolsVo.java 23 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/coin/parameter/vo/MemberWalletAgentInfoVo.java 25 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/coin/parameter/vo/MemberWalletCoinInfoVo.java 41 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/coin/parameter/vo/MemberWalletCoinVo.java 28 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/coin/parameter/vo/MemberWalletContractInfoVo.java 43 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/coin/parameter/vo/OrderWalletCoinDealListVo.java 16 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/coin/parameter/vo/OrderWalletCoinDealVo.java 82 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/coin/parameter/vo/OrderWalletCoinListVo.java 16 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/coin/parameter/vo/OrderWalletCoinVo.java 76 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/coin/parameter/vo/TransactionPageOfWalletCoinVo.java 66 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/coin/service/BlockCoinService.java 17 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/coin/service/CoinService.java 42 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/coin/service/OrderCoinService.java 37 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/coin/service/impl/BlockCoinServiceImpl.java 431 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/coin/service/impl/CoinServiceImpl.java 577 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/coin/service/impl/OrderCoinServiceImpl.java 641 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/contract/controller/ContractEntrustOrderController.java 63 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/contract/controller/ContractHoldOrderController.java 17 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/contract/controller/ContractOrderController.java 109 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/contract/dao/ContractEntrustOrderDao.java 23 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/contract/dao/ContractHoldOrderDao.java 47 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/contract/dao/ContractOrderDao.java 19 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/contract/entity/ContractEntrustOrderEntity.java 91 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/contract/entity/ContractHoldOrderEntity.java 154 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/contract/entity/ContractOrderEntity.java 203 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/contract/mapper/ContractEntrustOrderEntityMapper.java 39 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/contract/mapper/ContractHoldOrderEntityMapper.java 27 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/contract/mapper/ContractOrderEntityMapper.java 28 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/contract/parameter/dto/ChangeBondDto.java 35 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/contract/parameter/dto/ChangeLeverRateDto.java 24 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/contract/parameter/dto/OrderListDto.java 31 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/contract/parameter/dto/ProfitOrLessDto.java 29 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/contract/parameter/dto/SubmitEntrustDto.java 42 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/contract/parameter/dto/SubmitOrderDto.java 35 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/contract/parameter/dto/SymbolDto.java 17 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/contract/parameter/vo/ContractEntrustVo.java 41 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/contract/parameter/vo/ContractMoneyInfoVo.java 59 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/contract/parameter/vo/HoldOrderDetailVo.java 89 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/contract/parameter/vo/HoldOrderListVo.java 92 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/contract/parameter/vo/OrderDetailVo.java 119 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/contract/parameter/vo/OrderListVo.java 82 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/contract/service/ContractEntrustOrderService.java 23 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/contract/service/ContractHoldOrderService.java 49 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/contract/service/ContractOrderService.java 13 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/contract/service/RabbitOrderService.java 12 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/contract/service/impl/ContractEntrustOrderServiceImpl.java 210 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/contract/service/impl/ContractHoldOrderServiceImpl.java 710 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/contract/service/impl/ContractOrderServiceImpl.java 25 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/contract/service/impl/OrderWebsocketServiceImpl.java 759 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/contract/service/impl/RabbitOrderServiceImpl.java 153 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/home/controller/MemberQuickBuySaleController.java 128 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/home/dao/MemberQuickBuySaleDao.java 14 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/home/dto/MemberQuickBuySaleCommitDto.java 28 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/home/dto/MemberQuickBuySaleDto.java 29 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/home/entity/MemberQuickBuySaleEntity.java 86 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/home/mapper/MemberQuickBuySaleEntityMapper.java 24 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/home/service/MemberQuickBuySaleService.java 25 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/home/service/impl/MemberQuickBuySaleServiceImpl.java 211 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/home/vo/MemberQuickBuySaleDetailVo.java 44 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/home/vo/MemberQuickBuySaleVo.java 20 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/member/controller/MemberController.java 365 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/member/dao/AgentReturnDao.java 17 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/member/dao/AppVersionDao.java 8 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/member/dao/MemberAuthenticationDao.java 10 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/member/dao/MemberCoinAddressDao.java 25 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/member/dao/MemberCoinChargeDao.java 15 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/member/dao/MemberCoinWithdrawDao.java 8 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/member/dao/MemberDao.java 24 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/member/dao/MemberLevelRateDao.java 10 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/member/dao/MemberPaymentMethodDao.java 11 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/member/dao/MemberSettingDao.java 19 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/member/dao/MemberWalletAgentDao.java 12 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/member/dao/MemberWalletCoinDao.java 25 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/member/dao/MemberWalletContractDao.java 22 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/member/dao/MemberWalletContractSimulateDao.java 10 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/member/entity/AgentReturnEntity.java 74 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/member/entity/AppVersionEntity.java 45 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/member/entity/MemberAuthenticationEntity.java 71 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/member/entity/MemberCoinAddressEntity.java 55 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/member/entity/MemberCoinChargeEntity.java 36 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/member/entity/MemberCoinWithdrawEntity.java 58 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/member/entity/MemberEntity.java 167 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/member/entity/MemberLevelRateEntity.java 36 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/member/entity/MemberPaymentMethodEntity.java 56 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/member/entity/MemberSelectSymbolsEntity.java 27 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/member/entity/MemberSettingEntity.java 34 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/member/entity/MemberWalletAgentEntity.java 59 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/member/entity/MemberWalletCoinEntity.java 63 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/member/entity/MemberWalletContractEntity.java 34 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/member/entity/MemberWalletContractSimulateEntity.java 34 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/member/parameter/dto/MemberAddCoinAddressDto.java 34 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/member/parameter/dto/MemberAuthenticationDto.java 49 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/member/parameter/dto/MemberBindEmailDto.java 21 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/member/parameter/dto/MemberBindPhoneDto.java 21 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/member/parameter/dto/MemberDelCoinAddressDto.java 17 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/member/parameter/dto/MemberDelPaymethodDto.java 17 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/member/parameter/dto/MemberForgetPwdDto.java 29 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/member/parameter/dto/MemberPaymethodDto.java 46 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/member/parameter/dto/MemberSubmitCoinApplyDto.java 48 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/member/parameter/dto/MemberTradersPwdDto.java 31 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/member/parameter/dto/MemberUpdatePwdDto.java 31 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/member/parameter/dto/MemberUpdateTradePwdDto.java 29 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/member/parameter/dto/MemberUpdateTradersPwdTimeDto.java 17 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/member/parameter/vo/AppVersionListVo.java 16 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/member/parameter/vo/AppVersionVo.java 20 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/member/parameter/vo/MemberAuthenticationInfoVo.java 29 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/member/parameter/vo/MemberAvivableCoinInfoVo.java 22 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/member/parameter/vo/MemberCoinAddressCountListVo.java 17 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/member/parameter/vo/MemberCoinAddressCountVo.java 24 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/member/parameter/vo/MemberCoinAddressListVo.java 16 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/member/parameter/vo/MemberCoinAddressVo.java 45 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/member/parameter/vo/MemberCoinInfoListVo.java 16 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/member/parameter/vo/MemberCoinInfoVo.java 14 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/member/parameter/vo/MemberInfoVo.java 23 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/member/parameter/vo/MemberPaymethodDetailListVo.java 16 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/member/parameter/vo/MemberPaymethodDetailVo.java 52 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/member/parameter/vo/MemberPersonCenterInfoVo.java 38 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/member/parameter/vo/MemberSendCodeWayVo.java 23 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/member/parameter/vo/NeedMoneyMemberVo.java 18 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/member/service/MemberService.java 94 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/member/service/MemberWalletContractService.java 23 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/member/service/impl/MemberServiceImpl.java 1006 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/member/service/impl/MemberWalletContractServiceImpl.java 33 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/okxApi/Direction.java 20 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/okxApi/GridElement.java 547 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/okxApi/IOkxStrategy.java 78 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/okxApi/OkxConfig.java 321 ●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/okxApi/OkxGridTradeService.java 1219 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/okxApi/OkxProfitRecycleStrategy.java 548 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/okxApi/OkxTradeExecutor.java 44 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/okxApi/OkxWebSocketClientMain.java 63 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/okxApi/OkxWebSocketClientManager.java 204 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/okxApi/TraderParam.java 211 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/okxApi/wsHandler/AbstractOkxPrivateChannelHandler.java 28 ●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/okxApi/wsHandler/handler/MarkPriceOkxChannelHandler.java 24 ●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/okxApi/wsHandler/handler/OrdersOkxChannelHandler.java 14 ●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/okxApi/wsHandler/handler/PositionsOkxChannelHandler.java 42 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/platform/controller/PlatformController.java 64 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/platform/dao/PlatformBannerDao.java 9 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/platform/dao/PlatformCnyUsdtExchangeDao.java 14 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/platform/dao/PlatformFeeSettingDao.java 18 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/platform/dao/PlatformNoticeDao.java 8 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/platform/dao/PlatformPaymentMethodDao.java 9 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/platform/dao/PlatformSymbolsCoinDao.java 13 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/platform/dao/PlatformSymbolsSkuDao.java 15 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/platform/dao/TradeSettingDao.java 22 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/platform/entity/PlatformBannerEntity.java 47 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/platform/entity/PlatformCnyUsdtExchangeEntity.java 28 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/platform/entity/PlatformFeeSettingEntity.java 53 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/platform/entity/PlatformLeverageSettingEntity.java 41 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/platform/entity/PlatformNoticeEntity.java 35 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/platform/entity/PlatformPaymentMethodEntity.java 44 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/platform/entity/PlatformSymbolsCoinEntity.java 29 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/platform/entity/PlatformSymbolsSkuEntity.java 34 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/platform/entity/PlatformTradeSettingEntity.java 68 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/platform/service/PlatformBannerService.java 11 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/platform/service/PlatformCnyUsdtExchangeService.java 13 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/platform/service/PlatformNoticeService.java 11 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/platform/service/PlatformPaymentMethodService.java 11 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/platform/service/PlatformSymbolsSkuService.java 12 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/platform/service/impl/PlatformBannerServiceImpl.java 30 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/platform/service/impl/PlatformCnyUsdtExchangeServiceImpl.java 38 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/platform/service/impl/PlatformNoticeServiceImpl.java 29 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/platform/service/impl/PlatformPaymentMethodServiceImpl.java 28 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/platform/service/impl/PlatformSymbolsSkuServiceImpl.java 24 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/platform/vo/PlatformCnyUsdtExchangeVo.java 13 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/symbols/controller/SymbolsController.java 71 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/symbols/dao/PlatformSymbolsContractDao.java 15 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/symbols/entity/PlatformSymbolsContractEntity.java 21 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/symbols/parameter/dto/KlineDetailDto.java 29 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/symbols/parameter/vo/HomeSymbolsVo.java 31 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/symbols/parameter/vo/KlineDataVo.java 40 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/symbols/service/SymbolsService.java 21 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/symbols/service/impl/SymbolsServiceImpl.java 185 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/test/controller/TestUserController.java 102 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/test/dao/TestUserDao.java 18 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/test/dto/TestUserDto.java 34 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/test/entity/TestUserEntity.java 26 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/test/mapper/TestUserEntityMapper.java 36 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/test/service/TestUserService.java 14 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/test/service/impl/TestUserServiceImpl.java 28 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/test/vo/TestUserVo.java 29 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/test/vo/TestVo.java 20 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/netty/ChatServer.java 11 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/netty/bean/RequestBean.java 90 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/netty/bean/ResponseBean.java 89 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/netty/common/ChannelManager.java 56 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/netty/common/Contans.java 23 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/netty/common/NettyTools.java 27 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/netty/dispatch/MsgDispatch.java 46 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/netty/handler/WebSocketServerHandler.java 202 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/netty/initalizer/WebSocketServerInitializer.java 39 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/netty/logic/MsgLogic.java 13 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/netty/logic/WebSocketLogic.java 41 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/netty/logic/impl/MsgLogicImpl.java 36 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/netty/server/WebSocketServer.java 68 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/quartz/job/BlockCoinUpdateJob.java 63 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/quartz/job/DayLineDataUpdateJob.java 52 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/quartz/job/KlineDataUpdateJob.java 153 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/quartz/job/LoopExecutorJob.java 70 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/quartz/job/NewestPriceUpdateJob.java 67 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/quartz/job/NotionalPoolingJob.java 55 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/quartz/job/UsdtCnyExchangePriceUpdateJob.java 67 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/rabbit/consumer/OperateOrderPriceConsumer.java 44 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/rabbit/consumer/TestConsumer.java 21 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/rabbit/consumer/WebsocketPriceConsumer.java 148 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/rabbit/init/OrderProducerInit.java 135 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/rabbit/pricequeue/AscBigDecimal.java 43 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/rabbit/pricequeue/DescBigDecimal.java 45 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/rabbit/pricequeue/OrderModel.java 83 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/rabbit/pricequeue/OrderOperatePriceService.java 132 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/rabbit/pricequeue/PricePriorityQueue.java 300 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/rabbit/pricequeue/WebsocketPriceService.java 224 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/rabbit/producer/OrderProducer.java 141 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/rabbit/producer/TestProducer.java 42 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/utils/CacheSettingUtils.java 82 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/utils/CalculateUtil.java 48 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/utils/CoinTypeConvert.java 59 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/utils/LogRecordUtils.java 39 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/utils/MessageSourceUtils.java 31 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/utils/OssUtils.java 33 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/utils/RedisUtils.java 583 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/utils/SSLClient.java 49 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/utils/ShareCodeUtil.java 118 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/utils/SmsUtils.java 96 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/utils/SpringContextHolder.java 66 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/utils/ThreadPoolUtils.java 50 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/utils/TypeJudgeUtils.java 50 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/utils/api/ApiClient.java 607 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/utils/api/ApiException.java 33 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/utils/api/request/CreateOrderRequest.java 52 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/utils/api/request/DepthRequest.java 26 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/utils/api/request/IntrustOrdersDetailRequest.java 62 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/utils/api/response/Account.java 8 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/utils/api/response/Accounts.java 48 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/utils/api/response/AccountsResponse.java 56 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/utils/api/response/ApiResponse.java 19 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/utils/api/response/Balance.java 57 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/utils/api/response/BalanceBean.java 37 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/utils/api/response/BalanceResponse.java 47 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/utils/api/response/Batchcancel.java 22 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/utils/api/response/BatchcancelBean.java 34 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/utils/api/response/BatchcancelResponse.java 47 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/utils/api/response/Currencys.java 4 ●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/utils/api/response/CurrencysResponse.java 55 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/utils/api/response/Depth.java 57 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/utils/api/response/DepthResponse.java 78 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/utils/api/response/DetailResponse.java 67 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/utils/api/response/Details.java 98 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/utils/api/response/HistoryTrade.java 57 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/utils/api/response/HistoryTradeResponse.java 67 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/utils/api/response/HistoryTradess.java 37 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/utils/api/response/IntrustDetail.java 194 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/utils/api/response/IntrustDetailResponse.java 47 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/utils/api/response/Kline.java 68 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/utils/api/response/KlineResponse.java 55 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/utils/api/response/KlineReturn.java 66 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/utils/api/response/MatchresultsOrdersDetail.java 112 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/utils/api/response/MatchresultsOrdersDetailResponse.java 47 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/utils/api/response/Merged.java 121 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/utils/api/response/MergedResponse.java 77 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/utils/api/response/OrdersDetail.java 178 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/utils/api/response/OrdersDetailResponse.java 50 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/utils/api/response/Place.java 4 ●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/utils/api/response/SubmitcancelResponse.java 47 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/utils/api/response/Symbol.java 9 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/utils/api/response/Symbols.java 98 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/utils/api/response/SymbolsResponse.java 67 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/utils/api/response/TimestampResponse.java 45 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/utils/api/response/Trade.java 38 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/utils/api/response/TradeBean.java 60 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/utils/api/response/TradeResponse.java 70 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/utils/mail/RequestEncoder.java 71 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/utils/mail/Sms106Send.java 78 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/utils/mail/SmsSend.java 164 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/utils/mail/SubMailSend.java 170 ●●●●● patch | view | raw | blame | history
src/main/resources/application-app.yml 116 ●●●●● patch | view | raw | blame | history
src/main/resources/application-dayline.yml 114 ●●●●● patch | view | raw | blame | history
src/main/resources/application-loop.yml 114 ●●●●● patch | view | raw | blame | history
src/main/resources/application-newprice.yml 114 ●●●●● patch | view | raw | blame | history
src/main/resources/application-test.yml 116 ●●●●● patch | view | raw | blame | history
src/main/resources/application.yml 115 ●●●●● patch | view | raw | blame | history
src/main/resources/i18n/messages.properties patch | view | raw | blame | history
src/main/resources/i18n/messages_en_US.properties 243 ●●●●● patch | view | raw | blame | history
src/main/resources/i18n/messages_zh_CN.properties 242 ●●●●● patch | view | raw | blame | history
src/main/resources/mapper/TestUserDao.xml 12 ●●●●● patch | view | raw | blame | history
src/main/resources/mapper/contract/ContractEntrustOrderDao.xml 34 ●●●●● patch | view | raw | blame | history
src/main/resources/mapper/contract/ContractHoldOrderDao.xml 48 ●●●●● patch | view | raw | blame | history
src/main/resources/mapper/contract/ContractOrderDao.xml 56 ●●●●● patch | view | raw | blame | history
src/main/resources/mapper/home/MemberQuickBuySaleDao.xml 16 ●●●●● patch | view | raw | blame | history
src/main/resources/mapper/member/AgentReturnDao.xml 18 ●●●●● patch | view | raw | blame | history
src/main/resources/mapper/member/AppVersionDao.xml 5 ●●●●● patch | view | raw | blame | history
src/main/resources/mapper/member/MemberAccountFlowEntityDao.xml 5 ●●●●● patch | view | raw | blame | history
src/main/resources/mapper/member/MemberAccountMoneyChangeDao.xml 67 ●●●●● patch | view | raw | blame | history
src/main/resources/mapper/member/MemberAuthenticationDao.xml 9 ●●●●● patch | view | raw | blame | history
src/main/resources/mapper/member/MemberCoinAddressDao.xml 70 ●●●●● patch | view | raw | blame | history
src/main/resources/mapper/member/MemberCoinChargeDao.xml 26 ●●●●● patch | view | raw | blame | history
src/main/resources/mapper/member/MemberDao.xml 47 ●●●●● patch | view | raw | blame | history
src/main/resources/mapper/member/MemberLevelRateDao.xml 9 ●●●●● patch | view | raw | blame | history
src/main/resources/mapper/member/MemberPaymentMethodDao.xml 8 ●●●●● patch | view | raw | blame | history
src/main/resources/mapper/member/MemberSelectSymbolsDao.xml 13 ●●●●● patch | view | raw | blame | history
src/main/resources/mapper/member/MemberSettingDao.xml 38 ●●●●● patch | view | raw | blame | history
src/main/resources/mapper/member/MemberWalletAgentDao.xml 10 ●●●●● patch | view | raw | blame | history
src/main/resources/mapper/member/MemberWalletCoinDao.xml 43 ●●●●● patch | view | raw | blame | history
src/main/resources/mapper/member/MemberWalletContractDao.xml 29 ●●●●● patch | view | raw | blame | history
src/main/resources/mapper/member/MemberWalletContractSimulateDao.xml 5 ●●●●● patch | view | raw | blame | history
src/main/resources/mapper/platform/PlatformCnyUsdtExchangeDao.xml 13 ●●●●● patch | view | raw | blame | history
src/main/resources/mapper/platform/PlatformFeeSettingDao.xml 36 ●●●●● patch | view | raw | blame | history
src/main/resources/mapper/platform/PlatformSymbolsCoinDao.xml 19 ●●●●● patch | view | raw | blame | history
src/main/resources/mapper/platform/PlatformSymbolsContractDao.xml 9 ●●●●● patch | view | raw | blame | history
src/main/resources/mapper/platform/PlatformSymbolsSkuDao.xml 8 ●●●●● patch | view | raw | blame | history
src/main/resources/mapper/platform/TradeSettingDao.xml 26 ●●●●● patch | view | raw | blame | history
src/main/resources/mapper/walletCoinOrder/OrderCoinDealDao.xml 46 ●●●●● patch | view | raw | blame | history
src/main/resources/mapper/walletCoinOrder/OrderCoinsDao.xml 29 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/ExcoinApplication.java
@@ -1,23 +1,29 @@
package com.xcong.excoin;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.amqp.RabbitAutoConfiguration;
import org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration;
import org.springframework.scheduling.annotation.EnableScheduling;
import springfox.documentation.swagger2.annotations.EnableSwagger2;
/**
 * @author helius
 * OKX 盈利回收策略 — 最小化启动入口。
 *
 * <p>关闭不需要的自动配置:DataSource / Redis / RabbitMQ / Security / MyBatis。
 */
@EnableScheduling
@EnableSwagger2
@SpringBootApplication
@MapperScan("com.xcong.excoin.modules.*.dao")
@SpringBootApplication(exclude = {
        DataSourceAutoConfiguration.class,
        RedisAutoConfiguration.class,
        RabbitAutoConfiguration.class,
        SecurityAutoConfiguration.class
})
public class ExcoinApplication {
    public static void main(String[] args) {
        System.setProperty("spring.devtools.restart.enabled", "false");
        SpringApplication.run(ExcoinApplication.class, args);
    }
}
src/main/java/com/xcong/excoin/common/LoginUserUtils.java
File was deleted
src/main/java/com/xcong/excoin/common/annotations/SubmitRepeat.java
File was deleted
src/main/java/com/xcong/excoin/common/annotations/UserAuth.java
File was deleted
src/main/java/com/xcong/excoin/common/aop/SubmitRepeatAspect.java
File was deleted
src/main/java/com/xcong/excoin/common/contants/AppContants.java
File was deleted
src/main/java/com/xcong/excoin/common/enumerates/CoinTypeEnum.java
File was deleted
src/main/java/com/xcong/excoin/common/enumerates/MemberWalletCoinEnum.java
File was deleted
src/main/java/com/xcong/excoin/common/enumerates/OrderClosingTypeEnum.java
File was deleted
src/main/java/com/xcong/excoin/common/enumerates/RabbitPriceTypeEnum.java
File was deleted
src/main/java/com/xcong/excoin/common/enumerates/SymbolEnum.java
File was deleted
src/main/java/com/xcong/excoin/common/exception/GlobalException.java
File was deleted
src/main/java/com/xcong/excoin/common/response/Result.java
File was deleted
src/main/java/com/xcong/excoin/common/response/ResultCode.java
File was deleted
src/main/java/com/xcong/excoin/common/system/base/BaseEntity.java
File was deleted
src/main/java/com/xcong/excoin/common/system/base/IBaseService.java
File was deleted
src/main/java/com/xcong/excoin/common/system/bean/LoginUserBean.java
File was deleted
src/main/java/com/xcong/excoin/common/system/controller/CommonController.java
File was deleted
src/main/java/com/xcong/excoin/common/system/controller/LoginController.java
File was deleted
src/main/java/com/xcong/excoin/common/system/dto/Base64UploadDto.java
File was deleted
src/main/java/com/xcong/excoin/common/system/dto/LoginDto.java
File was deleted
src/main/java/com/xcong/excoin/common/system/dto/RegisterDto.java
File was deleted
src/main/java/com/xcong/excoin/common/system/mapper/CandlestickMapper.java
File was deleted
src/main/java/com/xcong/excoin/common/system/service/CommonService.java
File was deleted
src/main/java/com/xcong/excoin/common/system/service/UserDetailsServiceImpl.java
File was deleted
src/main/java/com/xcong/excoin/common/system/service/impl/CommonServiceImpl.java
File was deleted
src/main/java/com/xcong/excoin/configurations/GlobalExceptionHandler.java
File was deleted
src/main/java/com/xcong/excoin/configurations/MybatisPlusConfig.java
File was deleted
src/main/java/com/xcong/excoin/configurations/RabbitMqConfig.java
File was deleted
src/main/java/com/xcong/excoin/configurations/RedisConfig.java
File was deleted
src/main/java/com/xcong/excoin/configurations/SwaggerConfig.java
File was deleted
src/main/java/com/xcong/excoin/configurations/WebMvcConfig.java
File was deleted
src/main/java/com/xcong/excoin/configurations/i18n/CustomLocaleResolver.java
File was deleted
src/main/java/com/xcong/excoin/configurations/i18n/LocaleResolverConfig.java
File was deleted
src/main/java/com/xcong/excoin/configurations/interceptor/MybatisInterceptor.java
File was deleted
src/main/java/com/xcong/excoin/configurations/properties/AliOssProperties.java
File was deleted
src/main/java/com/xcong/excoin/configurations/properties/ApplicationProperties.java
File was deleted
src/main/java/com/xcong/excoin/configurations/properties/CustomRabbitProperties.java
File was deleted
src/main/java/com/xcong/excoin/configurations/properties/SecurityProperties.java
File was deleted
src/main/java/com/xcong/excoin/configurations/security/CustomAccessDeniedHandler.java
File was deleted
src/main/java/com/xcong/excoin/configurations/security/CustomAuthenticationEntryPoint.java
File was deleted
src/main/java/com/xcong/excoin/configurations/security/TokenConfigurer.java
File was deleted
src/main/java/com/xcong/excoin/configurations/security/TokenFilter.java
File was deleted
src/main/java/com/xcong/excoin/configurations/security/UserAuthenticationArgumentResolver.java
File was deleted
src/main/java/com/xcong/excoin/configurations/security/WebSecurityConfig.java
File was deleted
src/main/java/com/xcong/excoin/modules/blackchain/controller/BlockController.java
File was deleted
src/main/java/com/xcong/excoin/modules/blackchain/model/EosResult.java
File was deleted
src/main/java/com/xcong/excoin/modules/blackchain/model/XrpTransResult.java
File was deleted
src/main/java/com/xcong/excoin/modules/blackchain/model/XrpTransactions.java
File was deleted
src/main/java/com/xcong/excoin/modules/blackchain/model/XrpTx.java
File was deleted
src/main/java/com/xcong/excoin/modules/blackchain/service/BchService.java
File was deleted
src/main/java/com/xcong/excoin/modules/blackchain/service/BigDecimalUtil.java
File was deleted
src/main/java/com/xcong/excoin/modules/blackchain/service/BlockSerive.java
File was deleted
src/main/java/com/xcong/excoin/modules/blackchain/service/BtcService.java
File was deleted
src/main/java/com/xcong/excoin/modules/blackchain/service/DateUtil.java
File was deleted
src/main/java/com/xcong/excoin/modules/blackchain/service/EosService.java
File was deleted
src/main/java/com/xcong/excoin/modules/blackchain/service/EthService.java
File was deleted
src/main/java/com/xcong/excoin/modules/blackchain/service/HttpUtil.java
File was deleted
src/main/java/com/xcong/excoin/modules/blackchain/service/Impl/BlockSeriveImpl.java
File was deleted
src/main/java/com/xcong/excoin/modules/blackchain/service/LtcService.java
File was deleted
src/main/java/com/xcong/excoin/modules/blackchain/service/UsdtEthService.java
File was deleted
src/main/java/com/xcong/excoin/modules/blackchain/service/UsdtService.java
File was deleted
src/main/java/com/xcong/excoin/modules/blackchain/service/XrpService.java
File was deleted
src/main/java/com/xcong/excoin/modules/coin/controller/CoinController.java
File was deleted
src/main/java/com/xcong/excoin/modules/coin/controller/OrderCoinController.java
File was deleted
src/main/java/com/xcong/excoin/modules/coin/dao/MemberAccountFlowEntityDao.java
File was deleted
src/main/java/com/xcong/excoin/modules/coin/dao/MemberAccountMoneyChangeDao.java
File was deleted
src/main/java/com/xcong/excoin/modules/coin/dao/MemberSelectSymbolsDao.java
File was deleted
src/main/java/com/xcong/excoin/modules/coin/dao/OrderCoinDealDao.java
File was deleted
src/main/java/com/xcong/excoin/modules/coin/dao/OrderCoinsDao.java
File was deleted
src/main/java/com/xcong/excoin/modules/coin/entity/MemberAccountFlowEntity.java
File was deleted
src/main/java/com/xcong/excoin/modules/coin/entity/MemberAccountMoneyChange.java
File was deleted
src/main/java/com/xcong/excoin/modules/coin/entity/OrderCoinsDealEntity.java
File was deleted
src/main/java/com/xcong/excoin/modules/coin/entity/OrderCoinsEntity.java
File was deleted
src/main/java/com/xcong/excoin/modules/coin/mapper/MemberAccountMoneyChangeMapper.java
File was deleted
src/main/java/com/xcong/excoin/modules/coin/mapper/OrderCoinsDealMapper.java
File was deleted
src/main/java/com/xcong/excoin/modules/coin/mapper/OrderWalletCoinDealMapper.java
File was deleted
src/main/java/com/xcong/excoin/modules/coin/mapper/OrderWalletCoinMapper.java
File was deleted
src/main/java/com/xcong/excoin/modules/coin/parameter/dto/CancelEntrustWalletCoinOrderDto.java
File was deleted
src/main/java/com/xcong/excoin/modules/coin/parameter/dto/FindAllWalletCoinOrderDto.java
File was deleted
src/main/java/com/xcong/excoin/modules/coin/parameter/dto/FindCollectDto.java
File was deleted
src/main/java/com/xcong/excoin/modules/coin/parameter/dto/InOrderCoinDto.java
File was deleted
src/main/java/com/xcong/excoin/modules/coin/parameter/dto/RecordsPageDto.java
File was deleted
src/main/java/com/xcong/excoin/modules/coin/parameter/dto/SubmitSalesWalletCoinOrderDto.java
File was deleted
src/main/java/com/xcong/excoin/modules/coin/parameter/dto/TransferOfBalanceDto.java
File was deleted
src/main/java/com/xcong/excoin/modules/coin/parameter/dto/TransferOfBalanceFromAgentDto.java
File was deleted
src/main/java/com/xcong/excoin/modules/coin/parameter/vo/AllWalletCoinVo.java
File was deleted
src/main/java/com/xcong/excoin/modules/coin/parameter/vo/FindCollectListVo.java
File was deleted
src/main/java/com/xcong/excoin/modules/coin/parameter/vo/MemberAccountMoneyChangeInfoVo.java
File was deleted
src/main/java/com/xcong/excoin/modules/coin/parameter/vo/MemberAccountMoneyChangeVo.java
File was deleted
src/main/java/com/xcong/excoin/modules/coin/parameter/vo/MemberAgentIntoInfoVo.java
File was deleted
src/main/java/com/xcong/excoin/modules/coin/parameter/vo/MemberSelectSymbolsVo.java
File was deleted
src/main/java/com/xcong/excoin/modules/coin/parameter/vo/MemberWalletAgentInfoVo.java
File was deleted
src/main/java/com/xcong/excoin/modules/coin/parameter/vo/MemberWalletCoinInfoVo.java
File was deleted
src/main/java/com/xcong/excoin/modules/coin/parameter/vo/MemberWalletCoinVo.java
File was deleted
src/main/java/com/xcong/excoin/modules/coin/parameter/vo/MemberWalletContractInfoVo.java
File was deleted
src/main/java/com/xcong/excoin/modules/coin/parameter/vo/OrderWalletCoinDealListVo.java
File was deleted
src/main/java/com/xcong/excoin/modules/coin/parameter/vo/OrderWalletCoinDealVo.java
File was deleted
src/main/java/com/xcong/excoin/modules/coin/parameter/vo/OrderWalletCoinListVo.java
File was deleted
src/main/java/com/xcong/excoin/modules/coin/parameter/vo/OrderWalletCoinVo.java
File was deleted
src/main/java/com/xcong/excoin/modules/coin/parameter/vo/TransactionPageOfWalletCoinVo.java
File was deleted
src/main/java/com/xcong/excoin/modules/coin/service/BlockCoinService.java
File was deleted
src/main/java/com/xcong/excoin/modules/coin/service/CoinService.java
File was deleted
src/main/java/com/xcong/excoin/modules/coin/service/OrderCoinService.java
File was deleted
src/main/java/com/xcong/excoin/modules/coin/service/impl/BlockCoinServiceImpl.java
File was deleted
src/main/java/com/xcong/excoin/modules/coin/service/impl/CoinServiceImpl.java
File was deleted
src/main/java/com/xcong/excoin/modules/coin/service/impl/OrderCoinServiceImpl.java
File was deleted
src/main/java/com/xcong/excoin/modules/contract/controller/ContractEntrustOrderController.java
File was deleted
src/main/java/com/xcong/excoin/modules/contract/controller/ContractHoldOrderController.java
File was deleted
src/main/java/com/xcong/excoin/modules/contract/controller/ContractOrderController.java
File was deleted
src/main/java/com/xcong/excoin/modules/contract/dao/ContractEntrustOrderDao.java
File was deleted
src/main/java/com/xcong/excoin/modules/contract/dao/ContractHoldOrderDao.java
File was deleted
src/main/java/com/xcong/excoin/modules/contract/dao/ContractOrderDao.java
File was deleted
src/main/java/com/xcong/excoin/modules/contract/entity/ContractEntrustOrderEntity.java
File was deleted
src/main/java/com/xcong/excoin/modules/contract/entity/ContractHoldOrderEntity.java
File was deleted
src/main/java/com/xcong/excoin/modules/contract/entity/ContractOrderEntity.java
File was deleted
src/main/java/com/xcong/excoin/modules/contract/mapper/ContractEntrustOrderEntityMapper.java
File was deleted
src/main/java/com/xcong/excoin/modules/contract/mapper/ContractHoldOrderEntityMapper.java
File was deleted
src/main/java/com/xcong/excoin/modules/contract/mapper/ContractOrderEntityMapper.java
File was deleted
src/main/java/com/xcong/excoin/modules/contract/parameter/dto/ChangeBondDto.java
File was deleted
src/main/java/com/xcong/excoin/modules/contract/parameter/dto/ChangeLeverRateDto.java
File was deleted
src/main/java/com/xcong/excoin/modules/contract/parameter/dto/OrderListDto.java
File was deleted
src/main/java/com/xcong/excoin/modules/contract/parameter/dto/ProfitOrLessDto.java
File was deleted
src/main/java/com/xcong/excoin/modules/contract/parameter/dto/SubmitEntrustDto.java
File was deleted
src/main/java/com/xcong/excoin/modules/contract/parameter/dto/SubmitOrderDto.java
File was deleted
src/main/java/com/xcong/excoin/modules/contract/parameter/dto/SymbolDto.java
File was deleted
src/main/java/com/xcong/excoin/modules/contract/parameter/vo/ContractEntrustVo.java
File was deleted
src/main/java/com/xcong/excoin/modules/contract/parameter/vo/ContractMoneyInfoVo.java
File was deleted
src/main/java/com/xcong/excoin/modules/contract/parameter/vo/HoldOrderDetailVo.java
File was deleted
src/main/java/com/xcong/excoin/modules/contract/parameter/vo/HoldOrderListVo.java
File was deleted
src/main/java/com/xcong/excoin/modules/contract/parameter/vo/OrderDetailVo.java
File was deleted
src/main/java/com/xcong/excoin/modules/contract/parameter/vo/OrderListVo.java
File was deleted
src/main/java/com/xcong/excoin/modules/contract/service/ContractEntrustOrderService.java
File was deleted
src/main/java/com/xcong/excoin/modules/contract/service/ContractHoldOrderService.java
File was deleted
src/main/java/com/xcong/excoin/modules/contract/service/ContractOrderService.java
File was deleted
src/main/java/com/xcong/excoin/modules/contract/service/RabbitOrderService.java
File was deleted
src/main/java/com/xcong/excoin/modules/contract/service/impl/ContractEntrustOrderServiceImpl.java
File was deleted
src/main/java/com/xcong/excoin/modules/contract/service/impl/ContractHoldOrderServiceImpl.java
File was deleted
src/main/java/com/xcong/excoin/modules/contract/service/impl/ContractOrderServiceImpl.java
File was deleted
src/main/java/com/xcong/excoin/modules/contract/service/impl/OrderWebsocketServiceImpl.java
File was deleted
src/main/java/com/xcong/excoin/modules/contract/service/impl/RabbitOrderServiceImpl.java
File was deleted
src/main/java/com/xcong/excoin/modules/home/controller/MemberQuickBuySaleController.java
File was deleted
src/main/java/com/xcong/excoin/modules/home/dao/MemberQuickBuySaleDao.java
File was deleted
src/main/java/com/xcong/excoin/modules/home/dto/MemberQuickBuySaleCommitDto.java
File was deleted
src/main/java/com/xcong/excoin/modules/home/dto/MemberQuickBuySaleDto.java
File was deleted
src/main/java/com/xcong/excoin/modules/home/entity/MemberQuickBuySaleEntity.java
File was deleted
src/main/java/com/xcong/excoin/modules/home/mapper/MemberQuickBuySaleEntityMapper.java
File was deleted
src/main/java/com/xcong/excoin/modules/home/service/MemberQuickBuySaleService.java
File was deleted
src/main/java/com/xcong/excoin/modules/home/service/impl/MemberQuickBuySaleServiceImpl.java
File was deleted
src/main/java/com/xcong/excoin/modules/home/vo/MemberQuickBuySaleDetailVo.java
File was deleted
src/main/java/com/xcong/excoin/modules/home/vo/MemberQuickBuySaleVo.java
File was deleted
src/main/java/com/xcong/excoin/modules/member/controller/MemberController.java
File was deleted
src/main/java/com/xcong/excoin/modules/member/dao/AgentReturnDao.java
File was deleted
src/main/java/com/xcong/excoin/modules/member/dao/AppVersionDao.java
File was deleted
src/main/java/com/xcong/excoin/modules/member/dao/MemberAuthenticationDao.java
File was deleted
src/main/java/com/xcong/excoin/modules/member/dao/MemberCoinAddressDao.java
File was deleted
src/main/java/com/xcong/excoin/modules/member/dao/MemberCoinChargeDao.java
File was deleted
src/main/java/com/xcong/excoin/modules/member/dao/MemberCoinWithdrawDao.java
File was deleted
src/main/java/com/xcong/excoin/modules/member/dao/MemberDao.java
File was deleted
src/main/java/com/xcong/excoin/modules/member/dao/MemberLevelRateDao.java
File was deleted
src/main/java/com/xcong/excoin/modules/member/dao/MemberPaymentMethodDao.java
File was deleted
src/main/java/com/xcong/excoin/modules/member/dao/MemberSettingDao.java
File was deleted
src/main/java/com/xcong/excoin/modules/member/dao/MemberWalletAgentDao.java
File was deleted
src/main/java/com/xcong/excoin/modules/member/dao/MemberWalletCoinDao.java
File was deleted
src/main/java/com/xcong/excoin/modules/member/dao/MemberWalletContractDao.java
File was deleted
src/main/java/com/xcong/excoin/modules/member/dao/MemberWalletContractSimulateDao.java
File was deleted
src/main/java/com/xcong/excoin/modules/member/entity/AgentReturnEntity.java
File was deleted
src/main/java/com/xcong/excoin/modules/member/entity/AppVersionEntity.java
File was deleted
src/main/java/com/xcong/excoin/modules/member/entity/MemberAuthenticationEntity.java
File was deleted
src/main/java/com/xcong/excoin/modules/member/entity/MemberCoinAddressEntity.java
File was deleted
src/main/java/com/xcong/excoin/modules/member/entity/MemberCoinChargeEntity.java
File was deleted
src/main/java/com/xcong/excoin/modules/member/entity/MemberCoinWithdrawEntity.java
File was deleted
src/main/java/com/xcong/excoin/modules/member/entity/MemberEntity.java
File was deleted
src/main/java/com/xcong/excoin/modules/member/entity/MemberLevelRateEntity.java
File was deleted
src/main/java/com/xcong/excoin/modules/member/entity/MemberPaymentMethodEntity.java
File was deleted
src/main/java/com/xcong/excoin/modules/member/entity/MemberSelectSymbolsEntity.java
File was deleted
src/main/java/com/xcong/excoin/modules/member/entity/MemberSettingEntity.java
File was deleted
src/main/java/com/xcong/excoin/modules/member/entity/MemberWalletAgentEntity.java
File was deleted
src/main/java/com/xcong/excoin/modules/member/entity/MemberWalletCoinEntity.java
File was deleted
src/main/java/com/xcong/excoin/modules/member/entity/MemberWalletContractEntity.java
File was deleted
src/main/java/com/xcong/excoin/modules/member/entity/MemberWalletContractSimulateEntity.java
File was deleted
src/main/java/com/xcong/excoin/modules/member/parameter/dto/MemberAddCoinAddressDto.java
File was deleted
src/main/java/com/xcong/excoin/modules/member/parameter/dto/MemberAuthenticationDto.java
File was deleted
src/main/java/com/xcong/excoin/modules/member/parameter/dto/MemberBindEmailDto.java
File was deleted
src/main/java/com/xcong/excoin/modules/member/parameter/dto/MemberBindPhoneDto.java
File was deleted
src/main/java/com/xcong/excoin/modules/member/parameter/dto/MemberDelCoinAddressDto.java
File was deleted
src/main/java/com/xcong/excoin/modules/member/parameter/dto/MemberDelPaymethodDto.java
File was deleted
src/main/java/com/xcong/excoin/modules/member/parameter/dto/MemberForgetPwdDto.java
File was deleted
src/main/java/com/xcong/excoin/modules/member/parameter/dto/MemberPaymethodDto.java
File was deleted
src/main/java/com/xcong/excoin/modules/member/parameter/dto/MemberSubmitCoinApplyDto.java
File was deleted
src/main/java/com/xcong/excoin/modules/member/parameter/dto/MemberTradersPwdDto.java
File was deleted
src/main/java/com/xcong/excoin/modules/member/parameter/dto/MemberUpdatePwdDto.java
File was deleted
src/main/java/com/xcong/excoin/modules/member/parameter/dto/MemberUpdateTradePwdDto.java
File was deleted
src/main/java/com/xcong/excoin/modules/member/parameter/dto/MemberUpdateTradersPwdTimeDto.java
File was deleted
src/main/java/com/xcong/excoin/modules/member/parameter/vo/AppVersionListVo.java
File was deleted
src/main/java/com/xcong/excoin/modules/member/parameter/vo/AppVersionVo.java
File was deleted
src/main/java/com/xcong/excoin/modules/member/parameter/vo/MemberAuthenticationInfoVo.java
File was deleted
src/main/java/com/xcong/excoin/modules/member/parameter/vo/MemberAvivableCoinInfoVo.java
File was deleted
src/main/java/com/xcong/excoin/modules/member/parameter/vo/MemberCoinAddressCountListVo.java
File was deleted
src/main/java/com/xcong/excoin/modules/member/parameter/vo/MemberCoinAddressCountVo.java
File was deleted
src/main/java/com/xcong/excoin/modules/member/parameter/vo/MemberCoinAddressListVo.java
File was deleted
src/main/java/com/xcong/excoin/modules/member/parameter/vo/MemberCoinAddressVo.java
File was deleted
src/main/java/com/xcong/excoin/modules/member/parameter/vo/MemberCoinInfoListVo.java
File was deleted
src/main/java/com/xcong/excoin/modules/member/parameter/vo/MemberCoinInfoVo.java
File was deleted
src/main/java/com/xcong/excoin/modules/member/parameter/vo/MemberInfoVo.java
File was deleted
src/main/java/com/xcong/excoin/modules/member/parameter/vo/MemberPaymethodDetailListVo.java
File was deleted
src/main/java/com/xcong/excoin/modules/member/parameter/vo/MemberPaymethodDetailVo.java
File was deleted
src/main/java/com/xcong/excoin/modules/member/parameter/vo/MemberPersonCenterInfoVo.java
File was deleted
src/main/java/com/xcong/excoin/modules/member/parameter/vo/MemberSendCodeWayVo.java
File was deleted
src/main/java/com/xcong/excoin/modules/member/parameter/vo/NeedMoneyMemberVo.java
File was deleted
src/main/java/com/xcong/excoin/modules/member/service/MemberService.java
File was deleted
src/main/java/com/xcong/excoin/modules/member/service/MemberWalletContractService.java
File was deleted
src/main/java/com/xcong/excoin/modules/member/service/impl/MemberServiceImpl.java
File was deleted
src/main/java/com/xcong/excoin/modules/member/service/impl/MemberWalletContractServiceImpl.java
File was deleted
src/main/java/com/xcong/excoin/modules/okxApi/Direction.java
New file
@@ -0,0 +1,20 @@
package com.xcong.excoin.modules.okxApi;
/**
 * 交易方向枚举。
 *
 * <ul>
 *   <li>{@link #LONG} — 多头(做多)</li>
 *   <li>{@link #SHORT} — 空头(做空)</li>
 * </ul>
 *
 * <p>从原 {@code TraderParam.Direction} 提取为独立枚举,供策略接口和 WS 处理器共用。
 *
 * @author Administrator
 */
public enum Direction {
    /** 多头方向 */
    LONG,
    /** 空头方向 */
    SHORT
}
src/main/java/com/xcong/excoin/modules/okxApi/GridElement.java
File was deleted
src/main/java/com/xcong/excoin/modules/okxApi/IOkxStrategy.java
New file
@@ -0,0 +1,78 @@
package com.xcong.excoin.modules.okxApi;
import java.math.BigDecimal;
/**
 * OKX 策略通用接口 — WS 频道处理器的回调契约。
 *
 * <p>定义所有 OKX 交易策略必须实现的核心回调方法,使得不同的策略实现
 * 可以无缝接入相同的 WebSocket 基础设施。
 *
 * <h3>实现类</h3>
 * <ul>
 *   <li>{@link OkxProfitRecycleStrategy} — 盈利回收循环策略</li>
 * </ul>
 *
 * <h3>WS 回调映射</h3>
 * <table>
 *   <tr><th>WS频道</th><th>回调方法</th><th>说明</th></tr>
 *   <tr><td>mark-price</td><td>onKline / setMarkPrice</td><td>价格驱动 + PnL计算</td></tr>
 *   <tr><td>positions</td><td>onPositionUpdate</td><td>仓位变更通知</td></tr>
 *   <tr><td>orders</td><td>onAutoOrder</td><td>条件单状态变更</td></tr>
 * </table>
 *
 * @author Administrator
 */
public interface IOkxStrategy {
    /**
     * K线/价格数据回调(公开频道 mark-price 推送)。
     *
     * @param price 最新价格(标记价或最新价)
     */
    void onKline(BigDecimal price);
    /**
     * 标记价格设置(用于 PnL 计算)。
     *
     * @param markPrice 标记价格
     */
    void setMarkPrice(BigDecimal markPrice);
    /**
     * 仓位更新回调(私有频道 positions 推送)。
     *
     * @param contract   合约名称
     * @param direction  交易方向(LONG / SHORT)
     * @param size       持仓张数(绝对值)
     * @param entryPrice 开仓均价
     */
    void onPositionUpdate(String contract, Direction direction,
                          BigDecimal size, BigDecimal entryPrice);
    /**
     * 自动订单状态变更回调(私有频道 orders 推送)。
     *
     * @param orderId   条件单算法 ID(algoId)
     * @param status    订单状态(如 "finished")
     * @param reason    状态原因(如 "filled")
     * @param orderType 订单类型(如 "entry-long", "plan-close-long-position")
     * @param tradeId   成交 ID
     */
    void onAutoOrder(String orderId, String status, String reason,
                     String orderType, String tradeId);
    /**
     * 策略是否处于活跃状态(非 STOPPED/WAITING_KLINE)。
     *
     * @return true 表示策略正在运行
     */
    boolean isStrategyActive();
    /**
     * 保存 WS 客户端引用(用于判断订阅状态)。
     *
     * @param wsClient OKX WebSocket 客户端
     */
    void setWsClient(OkxKlineWebSocketClient wsClient);
}
src/main/java/com/xcong/excoin/modules/okxApi/OkxConfig.java
@@ -1,47 +1,22 @@
package com.xcong.excoin.modules.okxApi;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
/**
 * OKX 交易模块全局配置,策略的唯一参数入口。
 * OKX 交易模块全局配置 — 盈利回收策略的参数入口。
 *
 * <h3>定位</h3>
 * 通过 Builder 模式将所有运行参数集中管理,避免策略参数散落在多个类中。
 * 运行时动态参数(step、gridElements、baseLongTraderParam、baseShortTraderParam)
 * 由 OkxGridTradeService 在策略执行过程中写入。
 *
 * <h3>与 GateConfig 的主要差异</h3>
 * <ul>
 *   <li>新增 {@code passphrase} 字段 — OKX API 认证需要 passphrase</li>
 *   <li>REST 基础路径:生产环境 {@code https://www.okx.com},测试环境 {@code https://www.okx.cab}</li>
 *   <li>WebSocket 分为 public/private 两个地址</li>
 *   <li>合约格式:{@code ETH-USDT-SWAP}(OKX 用短横线分隔)</li>
 *   <li>持仓模式默认值:{@code long_short_mode}(OKX)替代 {@code dual}(Gate)</li>
 *   <li>数据模型(GridElement、TraderParam)复用 gateApi 包中的定义</li>
 * </ul>
 * <p>通过 Builder 模式将所有运行参数集中管理,避免策略参数散落在多个类中。
 *
 * <h3>参数分类</h3>
 * <table>
 *   <tr><th>类别</th><th>参数</th><th>用途</th></tr>
 *   <tr><td>认证</td><td>apiKey, apiSecret, passphrase</td><td>REST/WS 签名认证</td></tr>
 *   <tr><td>交易标的</td><td>contract, leverage, quantity, contractMultiplier</td><td>合约、杠杆、张数、乘数</td></tr>
 *   <tr><td>持仓</td><td>marginMode, positionMode</td><td>全仓/逐仓、单向/双向</td></tr>
 *   <tr><td>网格策略</td><td>gridRate, gridQueueSize, priceScale</td><td>间距比例、队列容量、价格精度(交易所tick)</td></tr>
 *   <tr><td>止盈止损</td><td>overallTp, maxLoss</td><td>整体止盈/亏损阈值(USDT),触发后策略停止</td></tr>
 *   <tr><td>风控</td><td>marginRatioLimit, reopenMaxRetries</td><td>保证金占比上限、补仓重试次数</td></tr>
 *   <tr><td>盈亏计算</td><td>contractMultiplier, unrealizedPnlPriceMode</td><td>合约乘数、未实现盈亏计价模式</td></tr>
 *   <tr><td>运行时</td><td>step, gridElements, baseLongTraderParam, baseShortTraderParam</td><td>由策略动态填充</td></tr>
 *   <tr><td>交易标的</td><td>contract, leverage, baseQuantity</td><td>合约、杠杆、张数</td></tr>
 *   <tr><td>持仓</td><td>marginMode, positionMode</td><td>全仓/逐仓、双向持仓</td></tr>
 *   <tr><td>风控</td><td>maxLoss, maxPositionSize</td><td>最大亏损阈值、单边持仓上限</td></tr>
 *   <tr><td>盈亏计算</td><td>contractMultiplier, priceScale, unrealizedPnlPriceMode</td><td>合约乘数、价格精度、计价模式</td></tr>
 *   <tr><td>策略核心</td><td>profitTriggerRatio, reinvestRatio</td><td>盈利触发比例、再投资比例</td></tr>
 * </table>
 *
 * <h3>gridElements 生命周期</h3>
 * <ol>
 *   <li>项目启动时初始化为空 ArrayList</li>
 *   <li>队列生成逻辑中通过 {@code updateGridElements()} 填充,同时触发
 *       {@link GridElement#rebuildIndex(List)} 建立全局 O(1) 索引</li>
 *   <li>每次挂单/止盈操作后通过 {@link GridElement#refreshIndices()} 更新索引</li>
 * </ol>
 *
 * @author Administrator
 */
@@ -49,82 +24,55 @@
    /**
     * 未实现盈亏(unrealizedPnl)计价模式。
     *
     * <ul>
     *   <li>{@link #LAST_PRICE} — 按最新成交价计算,变动快、更贴近实际平仓价</li>
     *   <li>{@link #MARK_PRICE} — 按标记价格计算,变动平稳、过滤市场噪音</li>
     * </ul>
     */
    public enum PnLPriceMode {
        /** 按最新成交价计算未实现盈亏 */
        LAST_PRICE,
        /** 按标记价格计算未实现盈亏,需通过外部注入 */
        /** 按标记价格计算未实现盈亏 */
        MARK_PRICE
    }
    // ==================== 认证信息 ====================
    /** OKX API v5 密钥 */
    private final String apiKey;
    /** OKX API v5 签名密钥 */
    private final String apiSecret;
    /** OKX API v5 口令密码(passphrase),创建 API Key 时设置 */
    private final String passphrase;
    // ==================== 交易标的 ====================
    /** 合约名称(如 ETH-USDT-SWAP,注意 OKX 使用短横线分隔) */
    private final String contract;
    /** 杠杆倍数 */
    private final String leverage;
    /** 保证金模式(cross / isolated) */
    private final String marginMode;
    /** 持仓模式(long_short_mode=双向 / net_mode=单向) */
    private final String positionMode;
    // ==================== 策略参数 ====================
    /** 网格间距比例(如 0.0035 表示 0.35%) */
    private final BigDecimal gridRate;
    /** 整体止盈阈值(USDT) */
    private final BigDecimal overallTp;
    /** 最大亏损阈值(USDT) */
    private final BigDecimal maxLoss;
    /** 下单数量(合约张数) */
    private final String quantity;
    /** 基底开仓张数(初始化时多空各开的张数,如 "10") */
    private final String baseQuantity;
    /** 预期收益(USDT),unrealisedPnl + available > 初始本金 + 此值时重置 */
    private final BigDecimal expectedProfit;
    /** 最大亏损阈值(USDT),触发后策略停止 */
    private final BigDecimal maxLoss;
    /** 是否为生产环境 */
    private final boolean isProduction;
    /** 补仓最大重试次数 */
    private final int reopenMaxRetries;
    /** 网格队列容量 */
    private final int gridQueueSize;
    /** 保证金占初始本金比例上限 */
    private final BigDecimal marginRatioLimit;
    /** 合约乘数(单张合约代表的基础资产数量,如 ETH-USDT-SWAP=0.01) */
    /** 合约乘数(单张合约代表的基础资产数量,如 BTC-USDT-SWAP=0.01) */
    private final BigDecimal contractMultiplier;
    /** 价格精度(交易所价格的最小小数位数,如 1 表示 0.1 精度,2 表示 0.01 精度) */
    /** 价格精度(交易所价格的小数位数) */
    private final int priceScale;
    /** 未实现盈亏计价模式:最新价 / 标记价格 */
    /** 未实现盈亏计价模式 */
    private final PnLPriceMode unrealizedPnlPriceMode;
    /** 最大持仓张数(单方向),0=不限制 */
    private final int maxPositionSize;
    /** 策略重启跨度阈值:多空两边止盈触发数量均达到此值后触发重启,0=禁用 */
    private final int restartGridSpan;
    // ==================== 运行时参数 ====================
    // ==================== 盈利回收策略参数 ====================
    /** 网格绝对步长(shortBaseEntryPrice × gridRate),运行时由队列生成逻辑设置 */
    private BigDecimal step;
    /** 网格元素列表,由队列初始化时同步填充,包含完整的多空仓挂单状态 */
    private volatile List<GridElement> gridElements = new ArrayList<>();
    /** 基座多头挂单参数,在基座成交后由队列生成逻辑填充 */
    private TraderParam baseLongTraderParam;
    /** 基座空头挂单参数,在基座成交后由队列生成逻辑填充 */
    private TraderParam baseShortTraderParam;
    /** 盈利触发比例(默认0.5=50%),ROI=未实现盈亏/保证金达到此值时触发平仓 */
    private final BigDecimal profitTriggerRatio;
    /** 再投资比例(默认0.5=50%),收益A中用于开反方向仓位的比例 */
    private final BigDecimal reinvestRatio;
    // ==================== 风控参数 ====================
    /** 反向仓位倍数上限(默认10),反方向最大持仓 = baseQuantity × 此值 */
    private final int maxPositionMultiplier;
    /** 权益重置比例(默认0.05=5%),账户权益 ≥ 初始权益 × (1+此值) 时全平重置 */
    private final BigDecimal equityRestartRatio;
    // ==================== 构造器 ====================
@@ -136,56 +84,33 @@
        this.leverage = builder.leverage;
        this.marginMode = builder.marginMode;
        this.positionMode = builder.positionMode;
        this.gridRate = builder.gridRate;
        this.overallTp = builder.overallTp;
        this.maxLoss = builder.maxLoss;
        this.quantity = builder.quantity;
        this.baseQuantity = builder.baseQuantity;
        this.expectedProfit = builder.expectedProfit;
        this.maxLoss = builder.maxLoss;
        this.isProduction = builder.isProduction;
        this.reopenMaxRetries = builder.reopenMaxRetries;
        this.gridQueueSize = builder.gridQueueSize;
        this.marginRatioLimit = builder.marginRatioLimit;
        this.contractMultiplier = builder.contractMultiplier;
        this.priceScale = builder.priceScale;
        this.unrealizedPnlPriceMode = builder.unrealizedPnlPriceMode;
        this.maxPositionSize = builder.maxPositionSize;
        this.restartGridSpan = builder.restartGridSpan;
        this.profitTriggerRatio = builder.profitTriggerRatio;
        this.reinvestRatio = builder.reinvestRatio;
        this.maxPositionMultiplier = builder.maxPositionMultiplier;
        this.equityRestartRatio = builder.equityRestartRatio;
    }
    // ==================== REST/WS 地址 ====================
    /**
     * 返回 REST API 基础路径。
     * <p>实盘和模拟盘使用相同的 REST 地址,通过 {@code x-simulated-trading: 1} 请求头区分。
     * <ul>
     *   <li>生产网/测试网: {@code https://openapi.okx.com}</li>
     * </ul>
     */
    /** @return REST API 基础路径 */
    public String getRestBasePath() {
        return "https://openapi.okx.com";
    }
    /**
     * 根据环境返回 WebSocket 公开频道地址。
     * <ul>
     *   <li>测试网: {@code wss://wspap.okx.com:8443/ws/v5/public}</li>
     *   <li>生产网: {@code wss://ws.okx.com:8443/ws/v5/public}</li>
     * </ul>
     */
    /** @return WebSocket 公开频道地址 */
    public String getWsPublicUrl() {
        return isProduction
                ? "wss://ws.okx.com:8443/ws/v5/public"
                : "wss://wspap.okx.com:8443/ws/v5/public";
    }
    /**
     * 根据环境返回 WebSocket 私有频道地址。
     * <ul>
     *   <li>测试网: {@code wss://wspap.okx.com:8443/ws/v5/private}</li>
     *   <li>生产网: {@code wss://ws.okx.com:8443/ws/v5/private}</li>
     * </ul>
     */
    /** @return WebSocket 私有频道地址 */
    public String getWsPrivateUrl() {
        return isProduction
                ? "wss://ws.okx.com:8443/ws/v5/private"
@@ -194,96 +119,45 @@
    // ==================== 认证信息 ====================
    /** @return OKX API v5 密钥 */
    public String getApiKey() { return apiKey; }
    /** @return OKX API v5 签名密钥,用于 HMAC-SHA256 签名 */
    public String getApiSecret() { return apiSecret; }
    /** @return OKX API v5 口令密码(passphrase) */
    public String getPassphrase() { return passphrase; }
    // ==================== 交易标的 ====================
    /** @return 合约名称(如 ETH-USDT-SWAP,OKX 使用短横线分隔) */
    public String getContract() { return contract; }
    /** @return 杠杆倍数(如 "100" 表示 100x) */
    public String getLeverage() { return leverage; }
    // ==================== 持仓配置 ====================
    /** @return 保证金模式(cross=全仓 / isolated=逐仓) */
    public String getMarginMode() { return marginMode; }
    /** @return 持仓模式(long_short_mode=双向 / net_mode=单向) */
    public String getPositionMode() { return positionMode; }
    // ==================== 策略参数 ====================
    /** @return 网格间距比例(如 0.0015 表示 0.15%),用于生成价格队列和计算止盈价 */
    public BigDecimal getGridRate() { return gridRate; }
    /** @return 整体止盈阈值(USDT),累计已实现盈亏 ≥ 此值时策略停止 */
    public BigDecimal getOverallTp() { return overallTp; }
    /** @return 最大亏损阈值(USDT),累计已实现盈亏 ≤ -此值时策略停止 */
    public BigDecimal getMaxLoss() { return maxLoss; }
    /** @return 每次下单的张数(如 "1" 表示 1 张合约) */
    public String getQuantity() { return quantity; }
    /** @return 基底开仓张数(初始化时多空各开的张数,如 "10") */
    public String getBaseQuantity() { return baseQuantity; }
    /** @return 预期收益(USDT),unrealisedPnl + available > 初始本金 + 此值时重置 */
    public BigDecimal getExpectedProfit() { return expectedProfit; }
    /** @return 网格价格队列的容量上限(超出时截断尾部) */
    public int getGridQueueSize() { return gridQueueSize; }
    // ==================== 风险控制 ====================
    /** @return 保证金占初始本金比例上限(默认 0.2 即 20%),超限跳过开仓 */
    public BigDecimal getMarginRatioLimit() { return marginRatioLimit; }
    /** @return 补仓最大重试次数(当前版本未使用) */
    public int getReopenMaxRetries() { return reopenMaxRetries; }
    public BigDecimal getMaxLoss() { return maxLoss; }
    // ==================== 盈亏计算 ====================
    /** @return 合约乘数(单张合约代表的基础资产数量,如 ETH-USDT-SWAP=0.01) */
    public BigDecimal getContractMultiplier() { return contractMultiplier; }
    /** @return 价格精度(交易所价格的小数位数,如 1=0.1精度,2=0.01精度),用于价格四舍五入 */
    public int getPriceScale() { return priceScale; }
    /** @return 未实现盈亏计价模式:LAST_PRICE(最新成交价)/ MARK_PRICE(标记价格) */
    public PnLPriceMode getUnrealizedPnlPriceMode() { return unrealizedPnlPriceMode; }
    /** @return 最大持仓张数(单方向),0=不限制 */
    public int getMaxPositionSize() { return maxPositionSize; }
    /** @return 策略重启跨度阈值:多空两边止盈触发数均达到此值后触发重启,0=禁用 */
    public int getRestartGridSpan() { return restartGridSpan; }
    // ==================== 运行时参数 ====================
    // ==================== 盈利回收策略参数 ====================
    /** @return 网格绝对步长(shortBaseEntryPrice × gridRate),运行时设置 */
    public BigDecimal getStep() { return step; }
    /** 设置网格绝对步长(由队列生成逻辑在运行时计算并注入) */
    public void setStep(BigDecimal step) { this.step = step; }
    public BigDecimal getProfitTriggerRatio() { return profitTriggerRatio; }
    public BigDecimal getReinvestRatio() { return reinvestRatio; }
    // ==================== 网格元素列表 ====================
    // ==================== 风控参数 ====================
    /** @return 网格元素列表(队列初始化后填充),线程不安全,仅由策略线程单线程写入 */
    public List<GridElement> getGridElements() { return gridElements; }
    /** 设置网格元素列表(由队列生成逻辑写入),同时重建全局 ID 索引 */
    public void setGridElements(List<GridElement> gridElements) {
        this.gridElements = gridElements;
        GridElement.rebuildIndex(gridElements);
    }
    // ==================== 基座挂单参数 ====================
    /** @return 基座多头挂单参数 */
    public TraderParam getBaseLongTraderParam() { return baseLongTraderParam; }
    /** 设置基座多头挂单参数(由队列生成逻辑在基座成交后填充) */
    public void setBaseLongTraderParam(TraderParam baseLongTraderParam) { this.baseLongTraderParam = baseLongTraderParam; }
    /** @return 基座空头挂单参数 */
    public TraderParam getBaseShortTraderParam() { return baseShortTraderParam; }
    /** 设置基座空头挂单参数(由队列生成逻辑在基座成交后填充) */
    public void setBaseShortTraderParam(TraderParam baseShortTraderParam) { this.baseShortTraderParam = baseShortTraderParam; }
    /** @return 反向仓位倍数上限,反方向最大持仓 = baseQuantity × 此值 */
    public int getMaxPositionMultiplier() { return maxPositionMultiplier; }
    /** @return 权益重置比例,账户权益 ≥ 初始权益 × (1+此值) 时全平重置 */
    public BigDecimal getEquityRestartRatio() { return equityRestartRatio; }
    // ==================== 环境 ====================
    /** @return 是否为生产环境(true=实盘生产网 / false=模拟盘测试网) */
    public boolean isProduction() { return isProduction; }
    // ==================== Builder ====================
@@ -293,105 +167,52 @@
    }
    /**
     * OkxConfig 的流式构造器,提供合理的默认值。
     * OkxConfig 的流式构造器。
     *
     * <h3>必填项</h3>
     * {@code apiKey}、{@code apiSecret}、{@code passphrase} 必须设置,其余参数均有默认值。
     * {@code apiKey}、{@code apiSecret}、{@code passphrase} 必须设置。
     *
     * <h3>默认值</h3>
     * ETH-USDT-SWAP / 10x / cross(全仓) / long_short_mode(双向) / gridRate=0.35% /
     * overallTp=0.5 / maxLoss=7.5 / quantity=1 / isProduction=false
     * BTC-USDT-SWAP / 100x / cross / long_short_mode / baseQuantity=10 /
     * maxLoss=15 / profitTriggerRatio=0.5 / reinvestRatio=0.5 /
     * maxPositionMultiplier=10 / equityRestartRatio=0.05
     */
    public static class Builder {
        /** OKX API v5 密钥(必填) */
        private String apiKey;
        /** OKX API v5 签名密钥(必填) */
        private String apiSecret;
        /** OKX API v5 口令密码(必填) */
        private String passphrase;
        /** 合约名称,默认 ETH-USDT-SWAP */
        private String contract = "ETH-USDT-SWAP";
        /** 杠杆倍数,默认 "10" */
        private String leverage = "10";
        /** 保证金模式,默认 "cross"(全仓) */
        private String contract = "BTC-USDT-SWAP";
        private String leverage = "100";
        private String marginMode = "cross";
        /** 持仓模式,默认 "long_short_mode"(双向) */
        private String positionMode = "long_short_mode";
        /** 网格间距比例,默认 0.0035(0.35%) */
        private BigDecimal gridRate = new BigDecimal("0.0035");
        /** 整体止盈阈值(USDT),默认 0.5 */
        private BigDecimal overallTp = new BigDecimal("0.5");
        /** 最大亏损阈值(USDT),默认 7.5 */
        private BigDecimal maxLoss = new BigDecimal("7.5");
        /** 每次下单张数,默认 "1" */
        private String quantity = "1";
        /** 基底开仓张数,默认 "10"(初始化时多空各开10张) */
        private String baseQuantity = "10";
        /** 预期收益(USDT),默认 0.5 */
        private BigDecimal expectedProfit = new BigDecimal("0.5");
        /** 是否为生产环境,默认 false(测试网) */
        private BigDecimal maxLoss = new BigDecimal("15");
        private boolean isProduction = false;
        /** 补仓最大重试次数,默认 3 */
        private int reopenMaxRetries = 3;
        /** 网格队列容量,默认 300 */
        private int gridQueueSize = 300;
        /** 保证金占初始本金比例上限,默认 0.2(20%) */
        private BigDecimal marginRatioLimit = new BigDecimal("0.2");
        /** 合约乘数,默认 0.01(ETH-USDT-SWAP=0.01) */
        private BigDecimal contractMultiplier = new BigDecimal("0.01");
        /** 价格精度(交易所价格的小数位数),默认 2(0.01 精度,适配 ETH) */
        private int priceScale = 2;
        /** 未实现盈亏计价模式,默认 LAST_PRICE(最新成交价) */
        private PnLPriceMode unrealizedPnlPriceMode = PnLPriceMode.LAST_PRICE;
        /** 最大持仓张数(单方向),默认 0=不限制 */
        private int maxPositionSize = 0;
        /** 策略重启跨度阈值:多空两边止盈触发数量均达到此值后触发重启,默认 0=禁用 */
        private int restartGridSpan = 0;
        private BigDecimal profitTriggerRatio = new BigDecimal("0.5");
        private BigDecimal reinvestRatio = new BigDecimal("0.5");
        private int maxPositionMultiplier = 10;
        private BigDecimal equityRestartRatio = new BigDecimal("0.05");
        /** 设置 API Key */
        public Builder apiKey(String apiKey) { this.apiKey = apiKey; return this; }
        /** 设置 API Secret */
        public Builder apiSecret(String apiSecret) { this.apiSecret = apiSecret; return this; }
        /** 设置 API Passphrase */
        public Builder passphrase(String passphrase) { this.passphrase = passphrase; return this; }
        /** 设置合约名称(如 ETH-USDT-SWAP) */
        public Builder contract(String contract) { this.contract = contract; return this; }
        /** 设置杠杆倍数 */
        public Builder leverage(String leverage) { this.leverage = leverage; return this; }
        /** 设置保证金模式(cross=全仓 / isolated=逐仓) */
        public Builder marginMode(String marginMode) { this.marginMode = marginMode; return this; }
        /** 设置持仓模式(long_short_mode=双向 / net_mode=单向) */
        public Builder positionMode(String positionMode) { this.positionMode = positionMode; return this; }
        /** 设置网格间距比例 */
        public Builder gridRate(BigDecimal gridRate) { this.gridRate = gridRate; return this; }
        /** 设置整体止盈阈值(USDT) */
        public Builder overallTp(BigDecimal overallTp) { this.overallTp = overallTp; return this; }
        /** 设置最大亏损阈值(USDT) */
        public Builder maxLoss(BigDecimal maxLoss) { this.maxLoss = maxLoss; return this; }
        /** 设置每次下单张数 */
        public Builder quantity(String quantity) { this.quantity = quantity; return this; }
        /** 设置基底开仓张数 */
        public Builder baseQuantity(String baseQuantity) { this.baseQuantity = baseQuantity; return this; }
        /** 设置预期收益(USDT) */
        public Builder expectedProfit(BigDecimal expectedProfit) { this.expectedProfit = expectedProfit; return this; }
        /** 设置环境(true=实盘生产网 / false=模拟盘测试网) */
        public Builder isProduction(boolean isProduction) { this.isProduction = isProduction; return this; }
        /** 设置补仓最大重试次数 */
        public Builder reopenMaxRetries(int reopenMaxRetries) { this.reopenMaxRetries = reopenMaxRetries; return this; }
        /** 设置合约乘数(单张合约代表的基础资产数量) */
        public Builder contractMultiplier(BigDecimal contractMultiplier) { this.contractMultiplier = contractMultiplier; return this; }
        /** 设置价格精度(交易所价格的小数位数,如 1=0.1精度,2=0.01精度) */
        public Builder priceScale(int priceScale) { this.priceScale = priceScale; return this; }
        /** 设置保证金占初始本金比例上限 */
        public Builder marginRatioLimit(BigDecimal marginRatioLimit) { this.marginRatioLimit = marginRatioLimit; return this; }
        /** 设置网格队列容量 */
        public Builder gridQueueSize(int gridQueueSize) { this.gridQueueSize = gridQueueSize; return this; }
        /** 设置未实现盈亏计价模式 */
        public Builder unrealizedPnlPriceMode(PnLPriceMode mode) { this.unrealizedPnlPriceMode = mode; return this; }
        /** 设置最大持仓张数(单方向),0=不限制 */
        public Builder maxPositionSize(int maxPositionSize) { this.maxPositionSize = maxPositionSize; return this; }
        /** 设置策略重启跨度阈值:多空两边止盈触发数均达到此值后触发重启,0=禁用 */
        public Builder restartGridSpan(int restartGridSpan) { this.restartGridSpan = restartGridSpan; return this; }
        public Builder apiKey(String v) { this.apiKey = v; return this; }
        public Builder apiSecret(String v) { this.apiSecret = v; return this; }
        public Builder passphrase(String v) { this.passphrase = v; return this; }
        public Builder contract(String v) { this.contract = v; return this; }
        public Builder leverage(String v) { this.leverage = v; return this; }
        public Builder marginMode(String v) { this.marginMode = v; return this; }
        public Builder positionMode(String v) { this.positionMode = v; return this; }
        public Builder baseQuantity(String v) { this.baseQuantity = v; return this; }
        public Builder maxLoss(BigDecimal v) { this.maxLoss = v; return this; }
        public Builder isProduction(boolean v) { this.isProduction = v; return this; }
        public Builder contractMultiplier(BigDecimal v) { this.contractMultiplier = v; return this; }
        public Builder priceScale(int v) { this.priceScale = v; return this; }
        public Builder unrealizedPnlPriceMode(PnLPriceMode v) { this.unrealizedPnlPriceMode = v; return this; }
        public Builder profitTriggerRatio(BigDecimal v) { this.profitTriggerRatio = v; return this; }
        public Builder reinvestRatio(BigDecimal v) { this.reinvestRatio = v; return this; }
        public Builder maxPositionMultiplier(int v) { this.maxPositionMultiplier = v; return this; }
        public Builder equityRestartRatio(BigDecimal v) { this.equityRestartRatio = v; return this; }
        public OkxConfig build() {
            return new OkxConfig(this);
src/main/java/com/xcong/excoin/modules/okxApi/OkxGridTradeService.java
File was deleted
src/main/java/com/xcong/excoin/modules/okxApi/OkxProfitRecycleStrategy.java
New file
@@ -0,0 +1,548 @@
package com.xcong.excoin.modules.okxApi;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.xcong.excoin.utils.dingtalk.DingTalkUtils;
import lombok.extern.slf4j.Slf4j;
import java.math.BigDecimal;
import java.math.RoundingMode;
/**
 * OKX 盈利回收循环策略 — 永远持有多空双向底仓,盈利兑现 + 利润反向加仓。
 *
 * <h3>核心思想</h3>
 * <ol>
 *   <li>永远持有多空双向底仓</li>
 *   <li>盈利的一边不断兑现利润</li>
 *   <li>用部分利润强化亏损的一边</li>
 *   <li>利用市场波动不断放大利润</li>
 * </ol>
 *
 * <h3>策略流程(状态机)</h3>
 * <pre>
 *   INIT → 双开底仓 → MONITOR
 *     ↓
 *   盈利达到50% → 平50%盈利仓 → 利润拆分 → 反向加仓 → 继续监控
 *     ↓
 *   账户盈利5% → 全部平仓 → 重新双开
 * </pre>
 *
 * <h3>数学模型</h3>
 * <ul>
 *   <li>ROI = 未实现盈亏 / 该方向保证金</li>
 *   <li>触发条件:ROI ≥ profitTriggerRatio (默认50%)</li>
 *   <li>平仓张数:floor(positionSize / 2)</li>
 *   <li>收益 A = 已实现利润</li>
 *   <li>保证金 B = A × reinvestRatio (默认50%)</li>
 *   <li>单张保证金 = contractMultiplier × entryPrice / leverage</li>
 *   <li>补仓张数 = max(baseQty, floor(B / 单张保证金))</li>
 * </ul>
 *
 * <h3>风控</h3>
 * <ul>
 *   <li>风控1:反向仓位倍数上限 maxPositionMultiplier(默认10x)</li>
 *   <li>风控2:保证金占比检查(全局亏损 maxLoss 阈值)</li>
 *   <li>风控3:权益增长 equityRestartRatio(默认5%)全平重置</li>
 * </ul>
 *
 * @author Administrator
 */
@Slf4j
public class OkxProfitRecycleStrategy implements IOkxStrategy {
    public enum StrategyState {
        WAITING_KLINE,
        OPENING,
        ACTIVE,
        RESTARTING,
        STOPPED
    }
    private final OkxConfig config;
    private final OkxTradeExecutor executor;
    private volatile StrategyState state = StrategyState.WAITING_KLINE;
    // ---- 价格 ----
    private volatile BigDecimal lastPrice = BigDecimal.ZERO;
    private volatile BigDecimal markPrice = BigDecimal.ZERO;
    // ---- 持仓 ----
    private volatile BigDecimal longPositionSize = BigDecimal.ZERO;
    private volatile BigDecimal longEntryPrice = BigDecimal.ZERO;
    private volatile BigDecimal shortPositionSize = BigDecimal.ZERO;
    private volatile BigDecimal shortEntryPrice = BigDecimal.ZERO;
    // ---- 盈亏 ----
    private volatile BigDecimal cumulativePnl = BigDecimal.ZERO;
    private volatile BigDecimal initialPrincipal = BigDecimal.ZERO;
    private volatile boolean rebalancing = false;
    /** 循环计数器(每完成一次"平仓+反向加仓"计数+1) */
    private volatile int cycleCount = 0;
    /** 重置计数器(每完成一次权益重置计数+1) */
    private volatile int restartCount = 0;
    private volatile OkxKlineWebSocketClient wsClient;
    public OkxProfitRecycleStrategy(OkxConfig config) {
        this.config = config;
        this.executor = new OkxTradeExecutor(config);
    }
    // ==================== 生命周期 ====================
    public void init() {
        try {
            refreshInitialPrincipal();
            JSONObject posModeBody = new JSONObject();
            posModeBody.put("posMode", config.getPositionMode());
            executorPost("/api/v5/account/set-position-mode", posModeBody.toJSONString());
            log.info("[ProfitRecycle] 持仓模式: {}", config.getPositionMode());
            JSONObject levBody = new JSONObject();
            levBody.put("instId", config.getContract());
            levBody.put("lever", config.getLeverage());
            levBody.put("mgnMode", config.getMarginMode());
            executorPost("/api/v5/account/set-leverage", levBody.toJSONString());
            log.info("[ProfitRecycle] 杠杆: {}x {}", config.getLeverage(), config.getMarginMode());
            executor.cancelAllPriceTriggeredOrders();
            closeExistingPositions();
            log.info("[ProfitRecycle] 初始化完成, 本金: {} USDT, 合约: {}, 基础张数: {}",
                    initialPrincipal, config.getContract(), config.getBaseQuantity());
        } catch (Exception e) {
            log.error("[ProfitRecycle] 初始化失败", e);
        }
    }
    public void startStrategy() {
        if (state != StrategyState.WAITING_KLINE && state != StrategyState.STOPPED) {
            log.warn("[ProfitRecycle] 策略已在运行中, state:{}", state);
            return;
        }
        resetState();
        refreshInitialPrincipal();
        log.info("[ProfitRecycle] ✅ 策略启动 — 本金: {} USDT | 基础仓位: {}张 | 杠杆: {}x | "
                        + "触发ROI: {}% | 再投资: {}% | 仓位上限: {}x | 重置阈值: {}%",
                initialPrincipal, config.getBaseQuantity(), config.getLeverage(),
                config.getProfitTriggerRatio().multiply(new BigDecimal("100")),
                config.getReinvestRatio().multiply(new BigDecimal("100")),
                config.getMaxPositionMultiplier(),
                config.getEquityRestartRatio().multiply(new BigDecimal("100")));
    }
    public void stopStrategy() {
        state = StrategyState.STOPPED;
        executor.cancelAllPriceTriggeredOrders();
        closeExistingPositions();
        executor.shutdown();
        log.info("[ProfitRecycle] ⏹ 策略停止 — 累计盈亏: {} | 循环: {} | 重置: {}",
                cumulativePnl, cycleCount, restartCount);
    }
    @Override
    public boolean isStrategyActive() {
        return state != StrategyState.STOPPED && state != StrategyState.WAITING_KLINE;
    }
    private void resetState() {
        state = StrategyState.WAITING_KLINE;
        cumulativePnl = BigDecimal.ZERO;
        lastPrice = BigDecimal.ZERO;
        markPrice = BigDecimal.ZERO;
        longPositionSize = BigDecimal.ZERO;
        longEntryPrice = BigDecimal.ZERO;
        shortPositionSize = BigDecimal.ZERO;
        shortEntryPrice = BigDecimal.ZERO;
        rebalancing = false;
        cycleCount = 0;
    }
    // ==================== WS 回调 ====================
    @Override
    public void onKline(BigDecimal closePrice) {
        lastPrice = closePrice;
        if (state == StrategyState.WAITING_KLINE) {
            if (wsClient == null || !wsClient.areAllSubscribed()) return;
            state = StrategyState.OPENING;
            final String size = config.getBaseQuantity();
            log.info("[ProfitRecycle] 🚀 首根K线到达,多空双开各{}张", size);
            executor.openLong(size, ordId -> log.info("[ProfitRecycle] 多仓已提交 ordId:{}", ordId), null);
            executor.openShort(size, ordId -> log.info("[ProfitRecycle] 空仓已提交 ordId:{}", ordId), null);
            return;
        }
        if (state == StrategyState.ACTIVE) {
            checkAndRecycle();
        }
    }
    @Override
    public void setMarkPrice(BigDecimal markPrice) {
        this.markPrice = markPrice;
    }
    @Override
    public void onPositionUpdate(String contract, Direction direction,
                                 BigDecimal size, BigDecimal entryPrice) {
        if (state == StrategyState.STOPPED || state == StrategyState.WAITING_KLINE) return;
        boolean hasPos = size.abs().compareTo(BigDecimal.ZERO) > 0;
        boolean isLong = (direction == Direction.LONG);
        if (state == StrategyState.OPENING || state == StrategyState.RESTARTING) {
            if (isLong && hasPos) {
                longPositionSize = size;
                longEntryPrice = entryPrice;
                log.info("[ProfitRecycle] 多仓确认: {}张 @ {}", size, entryPrice);
                tryActivate();
            } else if (!isLong && hasPos) {
                shortPositionSize = size.abs();
                shortEntryPrice = entryPrice;
                log.info("[ProfitRecycle] 空仓确认: {}张 @ {}", size.abs(), entryPrice);
                tryActivate();
            }
        }
        if (state == StrategyState.ACTIVE) {
            if (isLong) {
                longPositionSize = hasPos ? size : BigDecimal.ZERO;
                longEntryPrice = hasPos ? entryPrice : BigDecimal.ZERO;
            } else {
                shortPositionSize = hasPos ? size.abs() : BigDecimal.ZERO;
                shortEntryPrice = hasPos ? entryPrice : BigDecimal.ZERO;
            }
        }
    }
    @Override
    public void onAutoOrder(String orderId, String status, String reason,
                            String orderType, String tradeId) {
        log.debug("[ProfitRecycle] 条件单: id={} status={}", orderId, status);
    }
    // ==================== 核心循环 ====================
    private void checkAndRecycle() {
        if (rebalancing) return;
        final BigDecimal price = resolvePrice();
        if (price.compareTo(BigDecimal.ZERO) <= 0) return;
        final BigDecimal mult = config.getContractMultiplier();
        final BigDecimal lev = new BigDecimal(config.getLeverage());
        final BigDecimal trigger = config.getProfitTriggerRatio();
        // 检查多仓
        if (longPositionSize.compareTo(BigDecimal.ZERO) > 0
                && longEntryPrice.compareTo(BigDecimal.ZERO) > 0) {
            BigDecimal pnl = longPositionSize.multiply(mult).multiply(price.subtract(longEntryPrice));
            BigDecimal margin = calcMargin(longPositionSize, longEntryPrice);
            BigDecimal roi = margin.compareTo(BigDecimal.ZERO) > 0
                    ? pnl.divide(margin, 4, RoundingMode.HALF_UP) : BigDecimal.ZERO;
            if (pnl.compareTo(margin.multiply(trigger)) >= 0) {
                log.info("[ProfitRecycle] 🔔 多头触发 | pnl={} margin={} ROI={}%", pnl, margin, roi.multiply(hundred()));
                executeRecycle(Direction.LONG, longPositionSize, pnl, longEntryPrice, price);
                return;
            }
        }
        // 检查空仓
        if (shortPositionSize.compareTo(BigDecimal.ZERO) > 0
                && shortEntryPrice.compareTo(BigDecimal.ZERO) > 0) {
            BigDecimal pnl = shortPositionSize.multiply(mult).multiply(shortEntryPrice.subtract(price));
            BigDecimal margin = calcMargin(shortPositionSize, shortEntryPrice);
            BigDecimal roi = margin.compareTo(BigDecimal.ZERO) > 0
                    ? pnl.divide(margin, 4, RoundingMode.HALF_UP) : BigDecimal.ZERO;
            if (pnl.compareTo(margin.multiply(trigger)) >= 0) {
                log.info("[ProfitRecycle] 🔔 空头触发 | pnl={} margin={} ROI={}%", pnl, margin, roi.multiply(hundred()));
                executeRecycle(Direction.SHORT, shortPositionSize, pnl, shortEntryPrice, price);
            }
        }
    }
    /**
     * 执行一次完整的盈利回收操作:
     * 平50%盈利仓 → 利润A → B=A×50% → 计算反方向张数 → 开反向仓
     */
    private void executeRecycle(Direction profitableSide,
                                 BigDecimal posSize, BigDecimal totalPnl,
                                 BigDecimal entryPrice, BigDecimal price) {
        rebalancing = true;
        final boolean isLongProfit = (profitableSide == Direction.LONG);
        final BigDecimal mult = config.getContractMultiplier();
        final BigDecimal lev = new BigDecimal(config.getLeverage());
        final String label = isLongProfit ? "多头" : "空头";
        // ---- Step 1: 平50%仓位 ----
        final int closeQty = Math.max(posSize.divide(two(), 0, RoundingMode.DOWN).intValue(), 1);
        final BigDecimal priceDiff = isLongProfit ? price.subtract(entryPrice) : entryPrice.subtract(price);
        final BigDecimal profitA = new BigDecimal(closeQty).multiply(mult).multiply(priceDiff);
        log.info("[ProfitRecycle] ═══ {} 触发回收 ═══", label);
        log.info("[ProfitRecycle] Step1 平仓: {}张(总{}张) → 预期利润A = {} USDT", closeQty, posSize, profitA);
        // ---- Step 2: B = A × reinvestRatio ----
        final BigDecimal reinvestRatio = config.getReinvestRatio();
        final BigDecimal marginB = profitA.multiply(reinvestRatio);
        log.info("[ProfitRecycle] Step2 拆分: B = {} × {} = {} USDT", profitA, reinvestRatio, marginB);
        // ---- Step 3: 计算反方向张数 (单张保证金法) ----
        // 单张保证金 = contractMultiplier × entryPrice / leverage
        final BigDecimal perContractMargin = mult.multiply(entryPrice).divide(lev, 8, RoundingMode.HALF_UP);
        final int rawQty = marginB.divide(perContractMargin, 0, RoundingMode.DOWN).intValue();
        final int baseQty = Integer.parseInt(config.getBaseQuantity());
        // 风控1: 反向仓位倍数上限
        final BigDecimal oppositeSize = isLongProfit ? shortPositionSize : longPositionSize;
        final int maxQty = baseQty * config.getMaxPositionMultiplier();
        final int availableSlots = maxQty - oppositeSize.intValue();
        int newQty = Math.max(rawQty, baseQty); // 至少开基础仓位
        if (availableSlots <= 0) {
            log.warn("[ProfitRecycle] 🛑 风控1触发: 反方向已达上限 {}张, 跳过加仓", maxQty);
            rebalancing = false;
            return;
        }
        if (newQty > availableSlots) {
            newQty = availableSlots;
            log.info("[ProfitRecycle] 风控1限制: 调整张数 {} → {}", Math.max(rawQty, baseQty), newQty);
        }
        final String openSize = String.valueOf(newQty);
        log.info("[ProfitRecycle] Step3 补仓: 单张保证金={} | raw={} | base={} | max={} | final={}张",
                perContractMargin, rawQty, baseQty, maxQty, openSize);
        // ---- Step 4: 执行平仓 → 回调中开反方向 ----
        final String closePosSide = isLongProfit ? "long" : "short";
        executor.marketClosePosition(String.valueOf(closeQty), closePosSide,
                () -> {
                    cumulativePnl = cumulativePnl.add(profitA);
                    cycleCount++;
                    updatePositionAfterClose(profitableSide, closeQty);
                    log.info("[ProfitRecycle] ✅ 平仓完成 | 累计盈亏: {} | 第{}次循环",
                            cumulativePnl, cycleCount);
                    // 开反方向
                    if (!isLongProfit) {
                        executor.openLong(openSize,
                                ordId -> log.info("[ProfitRecycle] 反方向开多{}张 ok ordId:{}", openSize, ordId),
                                () -> log.error("[ProfitRecycle] ❌ 反方向开多{}张失败", openSize));
                    } else {
                        executor.openShort(openSize,
                                ordId -> log.info("[ProfitRecycle] 反方向开空{}张 ok ordId:{}", openSize, ordId),
                                () -> log.error("[ProfitRecycle] ❌ 反方向开空{}张失败", openSize));
                    }
                    // 当前仓位状态
                    log.info("[ProfitRecycle] 当前仓位: LONG={}张 SHORT={}张",
                            longPositionSize, shortPositionSize);
                    // 风控检查
                    if (checkLossStop()) return;
                    if (checkEquityRestart()) return;
                    rebalancing = false;
                },
                () -> {
                    log.error("[ProfitRecycle] ❌ 平仓失败 direction:{}", closePosSide);
                    rebalancing = false;
                });
    }
    // ==================== 风控 ====================
    /** 风控2: 全局亏损超限 → 停止策略 */
    private boolean checkLossStop() {
        BigDecimal totalPnl = cumulativePnl.add(calcUnrealizedPnl());
        if (config.getMaxLoss() != null && config.getMaxLoss().compareTo(BigDecimal.ZERO) > 0
                && totalPnl.compareTo(config.getMaxLoss().negate()) <= 0) {
            String msg = StrUtil.format("[ProfitRecycle] 🛑 亏损超限! 合计:{} 已实现:{}",
                    totalPnl, cumulativePnl);
            log.warn(msg);
            DingTalkUtils.getDefault().sendActionCard("风险提醒", msg, config.getApiKey(), "");
            stopStrategy();
            return true;
        }
        return false;
    }
    /** 风控3: 账户权益增长≥5% → 全平重置 */
    private boolean checkEquityRestart() {
        BigDecimal equity = fetchCurrentEquity();
        if (equity.compareTo(BigDecimal.ZERO) <= 0) return false;
        BigDecimal threshold = initialPrincipal.multiply(
                BigDecimal.ONE.add(config.getEquityRestartRatio()));
        if (equity.compareTo(threshold) >= 0) {
            restartCount++;
            log.info("[ProfitRecycle] 🔄 权益重置触发! 当前权益: {} ≥ 目标: {} (初始: {} + {}%) | 第{}次重置",
                    equity, threshold, initialPrincipal,
                    config.getEquityRestartRatio().multiply(hundred()), restartCount);
            executeRestart();
            return true;
        }
        return false;
    }
    /**
     * 执行权益重置:全平 → 取消所有订单 → 刷新本金 → 重新双开底仓
     */
    private void executeRestart() {
        rebalancing = true;
        state = StrategyState.RESTARTING;
        log.info("[ProfitRecycle] 开始重置: 平所有仓位...");
        executor.cancelAllPriceTriggeredOrders();
        // 全平多空
        if (longPositionSize.compareTo(BigDecimal.ZERO) > 0) {
            executor.marketClosePosition(longPositionSize.toPlainString(), "long", null, null);
        }
        if (shortPositionSize.compareTo(BigDecimal.ZERO) > 0) {
            executor.marketClosePosition(shortPositionSize.toPlainString(), "short", null, null);
        }
        // 延迟后重新开仓
        executor.submitTask(() -> {
            try { Thread.sleep(2000); } catch (InterruptedException e) { Thread.currentThread().interrupt(); }
            refreshInitialPrincipal();
            resetState();
            state = StrategyState.OPENING;
            final String size = config.getBaseQuantity();
            log.info("[ProfitRecycle] 🔄 重置开仓: 多空各{}张, 新本金: {} USDT", size, initialPrincipal);
            executor.openLong(size, ordId -> log.info("[ProfitRecycle] 重置多仓 ordId:{}", ordId), null);
            executor.openShort(size, ordId -> log.info("[ProfitRecycle] 重置空仓 ordId:{}", ordId), null);
            rebalancing = false;
            // 等待 WS 仓位确认后 tryActivate()
        });
    }
    // ==================== 辅助 ====================
    private BigDecimal calcMargin(BigDecimal size, BigDecimal entry) {
        return size.multiply(config.getContractMultiplier())
                .multiply(entry)
                .divide(new BigDecimal(config.getLeverage()), 8, RoundingMode.HALF_UP);
    }
    private BigDecimal calcUnrealizedPnl() {
        BigDecimal price = resolvePrice();
        if (price.compareTo(BigDecimal.ZERO) <= 0) return BigDecimal.ZERO;
        BigDecimal m = config.getContractMultiplier();
        BigDecimal lp = BigDecimal.ZERO, sp = BigDecimal.ZERO;
        if (longPositionSize.compareTo(BigDecimal.ZERO) > 0 && longEntryPrice.compareTo(BigDecimal.ZERO) > 0)
            lp = longPositionSize.multiply(m).multiply(price.subtract(longEntryPrice));
        if (shortPositionSize.compareTo(BigDecimal.ZERO) > 0 && shortEntryPrice.compareTo(BigDecimal.ZERO) > 0)
            sp = shortPositionSize.multiply(m).multiply(shortEntryPrice.subtract(price));
        return lp.add(sp);
    }
    private BigDecimal resolvePrice() {
        return (config.getUnrealizedPnlPriceMode() == OkxConfig.PnLPriceMode.MARK_PRICE
                && markPrice.compareTo(BigDecimal.ZERO) > 0) ? markPrice : lastPrice;
    }
    private BigDecimal fetchCurrentEquity() {
        try {
            JSONObject account = executorGet("/api/v5/account/balance");
            JSONArray details = account.getJSONArray("data").getJSONObject(0).getJSONArray("details");
            if (details != null) for (int i = 0; i < details.size(); i++) {
                if ("USDT".equals(details.getJSONObject(i).getString("ccy")))
                    return details.getJSONObject(i).getBigDecimal("eq");
            }
        } catch (Exception e) { log.warn("[ProfitRecycle] 获取权益失败", e); }
        return BigDecimal.ZERO;
    }
    private void refreshInitialPrincipal() {
        BigDecimal eq = fetchCurrentEquity();
        if (eq.compareTo(BigDecimal.ZERO) > 0) this.initialPrincipal = eq;
    }
    private void updatePositionAfterClose(Direction side, int closed) {
        if (side == Direction.LONG) {
            longPositionSize = longPositionSize.subtract(new BigDecimal(closed));
            if (longPositionSize.compareTo(BigDecimal.ZERO) <= 0) {
                longPositionSize = BigDecimal.ZERO;
                longEntryPrice = BigDecimal.ZERO;
            }
        } else {
            shortPositionSize = shortPositionSize.subtract(new BigDecimal(closed));
            if (shortPositionSize.compareTo(BigDecimal.ZERO) <= 0) {
                shortPositionSize = BigDecimal.ZERO;
                shortEntryPrice = BigDecimal.ZERO;
            }
        }
    }
    private void tryActivate() {
        if ((state == StrategyState.OPENING || state == StrategyState.RESTARTING)
                && longPositionSize.compareTo(BigDecimal.ZERO) > 0
                && shortPositionSize.compareTo(BigDecimal.ZERO) > 0) {
            state = StrategyState.ACTIVE;
            log.info("[ProfitRecycle] ═══ 策略激活 ═══");
            log.info("[ProfitRecycle] LONG: {}张 @ {} | SHORT: {}张 @ {} | "
                            + "多保证金: {} | 空保证金: {}",
                    longPositionSize, longEntryPrice, shortPositionSize, shortEntryPrice,
                    calcMargin(longPositionSize, longEntryPrice),
                    calcMargin(shortPositionSize, shortEntryPrice));
        }
    }
    private void closeExistingPositions() {
        try {
            JSONObject resp = executorGet("/api/v5/account/positions?instType=SWAP");
            JSONArray data = resp.getJSONArray("data");
            if (data == null || data.isEmpty()) return;
            for (int i = 0; i < data.size(); i++) {
                JSONObject pos = data.getJSONObject(i);
                if (!config.getContract().equals(pos.getString("instId"))) continue;
                String posVal = pos.getString("pos");
                if (posVal == null || "0".equals(posVal)) continue;
                String posSide = pos.getString("posSide");
                String side = "long".equals(posSide) ? "sell" : "buy";
                JSONObject body = new JSONObject();
                body.put("instId", config.getContract());
                body.put("tdMode", "cross");
                body.put("side", side);
                body.put("posSide", posSide);
                body.put("ordType", "market");
                body.put("sz", posVal);
                executorPost("/api/v5/trade/order", body.toJSONString());
                log.info("[ProfitRecycle] 平旧仓 posSide:{} sz:{}", posSide, posVal);
            }
        } catch (Exception e) { log.warn("[ProfitRecycle] 平仓异常", e); }
    }
    // ==================== REST 快捷 ====================
    private JSONObject executorGet(String path) throws Exception { return executor.okGet(path); }
    private JSONObject executorPost(String path, String body) throws Exception { return executor.okPost(path, body); }
    private static BigDecimal two() { return new BigDecimal("2"); }
    private static BigDecimal hundred() { return new BigDecimal("100"); }
    // ==================== Getters ====================
    public BigDecimal getLastKlinePrice() { return lastPrice; }
    public BigDecimal getCumulativePnl() { return cumulativePnl; }
    public StrategyState getState() { return state; }
    public int getCycleCount() { return cycleCount; }
    public int getRestartCount() { return restartCount; }
    public BigDecimal getInitialPrincipal() { return initialPrincipal; }
    public BigDecimal getLongPositionSize() { return longPositionSize; }
    public BigDecimal getShortPositionSize() { return shortPositionSize; }
    public BigDecimal getLongEntryPrice() { return longEntryPrice; }
    public BigDecimal getShortEntryPrice() { return shortEntryPrice; }
    @Override
    public void setWsClient(OkxKlineWebSocketClient wsClient) { this.wsClient = wsClient; }
}
src/main/java/com/xcong/excoin/modules/okxApi/OkxTradeExecutor.java
@@ -330,6 +330,50 @@
    }
    /**
     * 对外暴露的市价平仓接口(含回调),供策略层直接调用。
     *
     * @param size      平仓张数(正数)
     * @param posSide   持仓方向(long=平多 / short=平空)
     * @param onSuccess 成功回调(可为 null)
     * @param onFailure 失败回调(可为 null)
     */
    public void marketClosePosition(String size, String posSide,
                                     Runnable onSuccess, Runnable onFailure) {
        executor.execute(() -> {
            String side = "long".equals(posSide) ? "sell" : "buy";
            try {
                JSONObject body = new JSONObject();
                body.put("instId", contract);
                body.put("tdMode", "cross");
                body.put("side", side);
                body.put("posSide", posSide);
                body.put("ordType", "market");
                body.put("sz", size);
                JSONObject resp = okPost("/api/v5/trade/order", body.toJSONString());
                String code = resp.getString("code");
                if (!"0".equals(code)) {
                    log.error("[TradeExec-OKX] 市价平仓失败, side:{}, posSide:{}, sz:{}, code:{}, msg:{}",
                            side, posSide, size, code, resp.getString("msg"));
                    if (onFailure != null) {
                        onFailure.run();
                    }
                    return;
                }
                log.info("[TradeExec-OKX] 市价平仓成功, side:{}, posSide:{}, sz:{}", side, posSide, size);
                if (onSuccess != null) {
                    onSuccess.run();
                }
            } catch (Exception e) {
                log.error("[TradeExec-OKX] 市价平仓失败, side:{}, posSide:{}, sz:{}", side, posSide, size, e);
                if (onFailure != null) {
                    onFailure.run();
                }
            }
        });
    }
    /**
     * 指定方向的市价平仓。
     *
     * @param sz      平仓张数
src/main/java/com/xcong/excoin/modules/okxApi/OkxWebSocketClientMain.java
File was deleted
src/main/java/com/xcong/excoin/modules/okxApi/OkxWebSocketClientManager.java
@@ -11,28 +11,55 @@
import java.math.BigDecimal;
/**
 * OKX 模块 Spring 容器入口 — 组件组装 + 生命周期管理。
 * OKX 盈利回收策略 — 唯一入口,所有参数集中在此。
 *
 * <h3>组装顺序({@code @PostConstruct})</h3>
 * <ol>
 *   <li>{@link OkxConfig} — 构建配置(API 密钥、合约、策略参数)</li>
 *   <li>{@link OkxGridTradeService} — init():切双向持仓 → 清旧条件单 → 平仓 → 设杠杆</li>
 *   <li>{@link OkxKlineWebSocketClient} — 注册 3 个频道处理器 → init():建立 WS 连接并订阅</li>
 *   <li>{@code gridTradeService.startGrid()} — 状态重置,等待首根 K 线</li>
 * </ol>
 * <pre>
 * ┌─────────────────────────────────────────────────────────────────┐
 * │                     🔧 全部参数在此修改                          │
 * ├──────────────────┬──────────────────────────────────────────────┤
 * │ 参数名            │ 值                                  │ 说明    │
 * ├──────────────────┼──────────────────────────────────────┼────────┤
 * │ apiKey           │ ac76252d-...                         │ API密钥 │
 * │ apiSecret        │ A8168543...                          │ 签名密钥│
 * │ passphrase       │ Aa12345678@                          │ 口令密码│
 * ├──────────────────┼──────────────────────────────────────┼────────┤
 * │ contract         │ BTC-USDT-SWAP                        │ 交易合约│
 * │ leverage         │ 50                                   │ 杠杆倍数│
 * │ baseQuantity     │ 10                                   │ 底仓张数│
 * ├──────────────────┼──────────────────────────────────────┼────────┤
 * │ profitTriggerRatio│ 0.5                                 │ 触发ROI │
 * │ reinvestRatio    │ 0.5                                  │ 补仓比例│
 * ├──────────────────┼──────────────────────────────────────┼────────┤
 * │ maxPositionMult  │ 10  (= base×10 = 100张上限)          │ 风控1   │
 * │ maxLoss          │ 15 USDT                              │ 风控2   │
 * │ equityRestartRatio│ 0.05 (= 5%)                         │ 风控3   │
 * ├──────────────────┼──────────────────────────────────────┼────────┤
 * │ contractMult     │ 0.01        (BTC 每张0.01个币)        │ 合约乘数│
 * │ priceScale       │ 2           (价格精度0.01)            │ 价格精度│
 * │ pnlPriceMode     │ LAST_PRICE                           │ 盈亏计价│
 * │ isProduction     │ false       (false=模拟盘)            │ 交易环境│
 * └──────────────────┴──────────────────────────────────────────────┘
 * </pre>
 *
 * <h3>3 个频道处理器</h3>
 * <ol>
 *   <li>MarkPriceOkxChannelHandler — 公开频道,标记价格 → onKline() + setMarkPrice()</li>
 *   <li>PositionsOkxChannelHandler — 私有频道,仓位 → onPositionUpdate()</li>
 *   <li>OrdersOkxChannelHandler — 私有频道,订单成交(含algoId) → onAutoOrder()</li>
 * </ol>
 * <h3>策略核心公式</h3>
 * <ul>
 *   <li>保证金 = 张数 × 合约乘数 × 开仓均价 / 杠杆</li>
 *   <li>ROI = 未实现盈亏 / 该方向保证金</li>
 *   <li>触发条件:ROI ≥ profitTriggerRatio</li>
 *   <li>平仓:floor(盈利仓位张数 / 2)</li>
 *   <li>补仓保证金 B = 已实现利润 × reinvestRatio</li>
 *   <li>单张保证金 = 合约乘数 × 开仓均价 / 杠杆</li>
 *   <li>补仓张数 = max(baseQuantity, floor(B / 单张保证金))</li>
 * </ul>
 *
 * <h3>销毁顺序({@code @PreDestroy})</h3>
 * <ol>
 *   <li>gridTradeService.stopGrid():取消所有条件单 → 关闭交易线程池</li>
 *   <li>wsClient.destroy():取消订阅 → 断开 WS → 关闭线程池</li>
 * </ol>
 * <h3>仓位演化示例 (BTC-USDT-SWAP, 50x, base10)</h3>
 * <pre>
 *   初始: LONG=10  SHORT=10
 *   多盈: LONG=5   SHORT=12
 *   多盈: LONG=3   SHORT=15
 *   多盈: LONG=2   SHORT=18
 *   → 权益达+5% → 全平重置 → LONG=10 SHORT=10
 * </pre>
 *
 * @author Administrator
 */
@@ -40,78 +67,117 @@
@Component
public class OkxWebSocketClientManager {
    // ╔══════════════════════════════════════════════════════════════╗
    // ║                  🔐 OKX API 认证信息                         ║
    // ╚══════════════════════════════════════════════════════════════╝
    private static final String OKX_API_KEY       = "ac76252d-e717-4459-a6f9-80512aed5ea0";
    private static final String OKX_API_SECRET    = "A8168543EF4F08A6DBFE27AB23956898";
    private static final String OKX_PASSPHRASE    = "Aa12345678@";
    // ╔══════════════════════════════════════════════════════════════╗
    // ║                    📊 交易标的参数                            ║
    // ╚══════════════════════════════════════════════════════════════╝
    private static final String CONTRACT          = "BTC-USDT-SWAP";    // 合约名称
    private static final String LEVERAGE          = "50";               // 杠杆倍数
    private static final String MARGIN_MODE       = "cross";            // 全仓 cross / 逐仓 isolated
    private static final String POSITION_MODE     = "long_short_mode";  // 双向持仓
    // ╔══════════════════════════════════════════════════════════════╗
    // ║                  🎯 策略核心参数                              ║
    // ╚══════════════════════════════════════════════════════════════╝
    /** 基础仓位张数 — 初始化时多空各开此张数,也是最小开仓单位 */
    private static final String BASE_QUANTITY     = "10";
    /** 盈利触发比例 — ROI=未实现盈亏/保证金 达到此值时触发平仓 */
    private static final BigDecimal PROFIT_TRIGGER_RATIO = new BigDecimal("0.5");  // 50%
    /** 再投资比例 — 已实现利润中用于补反向仓的比例 */
    private static final BigDecimal REINVEST_RATIO = new BigDecimal("0.5");  // 50%
    // ╔══════════════════════════════════════════════════════════════╗
    // ║                   🛡 风控参数                                ║
    // ╚══════════════════════════════════════════════════════════════╝
    /** 风控1: 反向仓位倍数上限 — 反向最大持仓 = baseQuantity × 此值 (10×10=100张) */
    private static final int MAX_POSITION_MULTIPLIER = 10;
    /** 风控2: 最大亏损阈值(USDT) — 全局盈亏≤-此值时停止策略 */
    private static final BigDecimal MAX_LOSS = new BigDecimal("15");
    /** 风控3: 权益重置比例 — 账户权益 ≥ 初始权益 × (1+此值) 时全平重新双开 */
    private static final BigDecimal EQUITY_RESTART_RATIO = new BigDecimal("0.05");  // 5%
    // ╔══════════════════════════════════════════════════════════════╗
    // ║                  ⚙ 技术与环境参数                            ║
    // ╚══════════════════════════════════════════════════════════════╝
    /** 合约乘数 — BTC-USDT-SWAP 每张=0.01 BTC */
    private static final BigDecimal CONTRACT_MULTIPLIER = new BigDecimal("0.01");
    /** 价格精度 — OKX 价格小数位数 (BTC=2, ETH=2) */
    private static final int PRICE_SCALE = 2;
    /** 盈亏计价模式 — LAST_PRICE(最新价) / MARK_PRICE(标记价) */
    private static final OkxConfig.PnLPriceMode PNL_PRICE_MODE = OkxConfig.PnLPriceMode.LAST_PRICE;
    /** false=模拟盘 (wspap.okx.com) / true=实盘 (ws.okx.com) */
    private static final boolean IS_PRODUCTION = false;
    // ==================== 以下为启动代码,通常无需修改 ====================
    private OkxKlineWebSocketClient wsClient;
    private OkxGridTradeService gridTradeService;
    private OkxProfitRecycleStrategy strategy;
    private OkxConfig config;
    @PostConstruct
    public void init() {
        log.info("[OKX管理器] 开始初始化...");
        log.info("[OKX] 正在初始化盈利回收策略...");
        try {
            // TODO: 替换为实际 API 密钥
            config = OkxConfig.builder()
                    .apiKey("ac76252d-e717-4459-a6f9-80512aed5ea0")
                    .apiSecret("A8168543EF4F08A6DBFE27AB23956898")
                    .passphrase("Aa12345678@")
                    .contract("ETH-USDT-SWAP")
                    .leverage("100")
                    .marginMode("cross")
                    .positionMode("long_short_mode")
                    .gridRate(new BigDecimal("0.0025"))
                    .expectedProfit(new BigDecimal("25"))
                    .maxLoss(new BigDecimal("15"))
                    .baseQuantity("1")
                    .quantity("1")
                    .restartGridSpan(6)
                    .maxPositionSize(2)
                    .priceScale(2)
                    .contractMultiplier(new BigDecimal("0.01"))
                    .unrealizedPnlPriceMode(OkxConfig.PnLPriceMode.LAST_PRICE)
                    .isProduction(false)
                    .reopenMaxRetries(3)
                    .apiKey(OKX_API_KEY)
                    .apiSecret(OKX_API_SECRET)
                    .passphrase(OKX_PASSPHRASE)
                    .contract(CONTRACT)
                    .leverage(LEVERAGE)
                    .marginMode(MARGIN_MODE)
                    .positionMode(POSITION_MODE)
                    .baseQuantity(BASE_QUANTITY)
                    .maxLoss(MAX_LOSS)
                    .priceScale(PRICE_SCALE)
                    .contractMultiplier(CONTRACT_MULTIPLIER)
                    .unrealizedPnlPriceMode(PNL_PRICE_MODE)
                    .isProduction(IS_PRODUCTION)
                    .profitTriggerRatio(PROFIT_TRIGGER_RATIO)
                    .reinvestRatio(REINVEST_RATIO)
                    .maxPositionMultiplier(MAX_POSITION_MULTIPLIER)
                    .equityRestartRatio(EQUITY_RESTART_RATIO)
                    .build();
            // 1. 初始化交易服务
            gridTradeService = new OkxGridTradeService(config);
            gridTradeService.init();
            strategy = new OkxProfitRecycleStrategy(config);
            strategy.init();
            // 2. 创建 WS 客户端并注册频道处理器
            wsClient = new OkxKlineWebSocketClient(config);
            wsClient.addPublicHandler(new MarkPriceOkxChannelHandler(config.getContract(), strategy));
            wsClient.addPrivateHandler(new PositionsOkxChannelHandler(config, strategy));
            wsClient.addPrivateHandler(new OrdersOkxChannelHandler(config, strategy));
            // 公开频道:标记价格(替代 K 线,同时驱动策略 onKline 和 PnL 计算)
            wsClient.addPublicHandler(new MarkPriceOkxChannelHandler(
                    config.getContract(), gridTradeService));
            // 私有频道:仓位
            wsClient.addPrivateHandler(new PositionsOkxChannelHandler(
                    config, gridTradeService));
            // 私有频道:条件单(orders 频道含 algoId,可追溯到源条件单)
            wsClient.addPrivateHandler(new OrdersOkxChannelHandler(
                    config, gridTradeService));
            gridTradeService.setWsClient(wsClient);
            strategy.setWsClient(wsClient);
            wsClient.init();
            log.info("[OKX管理器] WS已连接, 已注册 3 个频道处理器");
            log.info("[OKX] WS已连接 | 合约: {} | 杠杆: {}x | 基础张数: {} | "
                            + "触发ROI: {}% | 补仓比例: {}% | 仓位上限: {}x | 重置阈值: {}%",
                    CONTRACT, LEVERAGE, BASE_QUANTITY,
                    PROFIT_TRIGGER_RATIO.multiply(new BigDecimal("100")),
                    REINVEST_RATIO.multiply(new BigDecimal("100")),
                    MAX_POSITION_MULTIPLIER,
                    EQUITY_RESTART_RATIO.multiply(new BigDecimal("100")));
            // 3. 激活策略
            gridTradeService.startGrid();
            strategy.startStrategy();
        } catch (Exception e) {
            log.error("[OKX管理器] 初始化失败", e);
            log.error("[OKX] 初始化失败", e);
        }
    }
    @PreDestroy
    public void destroy() {
        log.info("[OKX管理器] 开始销毁...");
        if (gridTradeService != null) {
            gridTradeService.stopGrid();
        }
        if (wsClient != null) {
            wsClient.destroy();
        }
        log.info("[OKX管理器] 销毁完成");
        log.info("[OKX] 正在销毁...");
        if (strategy != null) strategy.stopStrategy();
        if (wsClient != null) wsClient.destroy();
        log.info("[OKX] 销毁完成");
    }
    public OkxKlineWebSocketClient getKlineWebSocketClient() { return wsClient; }
    public OkxGridTradeService getGridTradeService() { return gridTradeService; }
    public OkxProfitRecycleStrategy getStrategy() { return strategy; }
    public IOkxStrategy getActiveStrategy() { return strategy; }
}
src/main/java/com/xcong/excoin/modules/okxApi/TraderParam.java
File was deleted
src/main/java/com/xcong/excoin/modules/okxApi/wsHandler/AbstractOkxPrivateChannelHandler.java
@@ -2,7 +2,7 @@
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.xcong.excoin.modules.okxApi.OkxGridTradeService;
import com.xcong.excoin.modules.okxApi.IOkxStrategy;
import lombok.extern.slf4j.Slf4j;
import org.java_websocket.client.WebSocketClient;
@@ -54,8 +54,8 @@
    /** 交易对标识,如 "ETH-USDT-SWAP" */
    private final String instId;
    /** 网格交易服务实例 */
    private final OkxGridTradeService gridTradeService;
    /** 策略服务实例 */
    private final IOkxStrategy strategy;
    /** 订阅确认状态 */
    private volatile boolean subscribed = false;
@@ -63,24 +63,24 @@
    /**
     * 构造私有频道处理器。
     *
     * @param channelName      频道名称(如 "positions"、"orders-algo")
     * @param apiKey           OKX API Key
     * @param apiSecret        OKX API Secret
     * @param passphrase       OKX API Passphrase
     * @param instId           交易对标识(如 "ETH-USDT-SWAP")
     * @param gridTradeService 网格交易服务实例
     * @param channelName 频道名称(如 "positions"、"orders-algo")
     * @param apiKey      OKX API Key
     * @param apiSecret   OKX API Secret
     * @param passphrase  OKX API Passphrase
     * @param instId      交易对标识(如 "ETH-USDT-SWAP")
     * @param strategy    OKX 交易策略服务实例
     */
    public AbstractOkxPrivateChannelHandler(String channelName,
                                             String apiKey, String apiSecret,
                                             String passphrase,
                                             String instId,
                                             OkxGridTradeService gridTradeService) {
                                             IOkxStrategy strategy) {
        this.channelName = channelName;
        this.apiKey = apiKey;
        this.apiSecret = apiSecret;
        this.passphrase = passphrase;
        this.instId = instId;
        this.gridTradeService = gridTradeService;
        this.strategy = strategy;
    }
    /**
@@ -140,10 +140,10 @@
    }
    /**
     * @return 网格交易服务实例
     * @return 策略服务实例
     */
    protected OkxGridTradeService getGridTradeService() {
        return gridTradeService;
    protected IOkxStrategy getStrategy() {
        return strategy;
    }
    // ==================== 订阅状态 ====================
src/main/java/com/xcong/excoin/modules/okxApi/wsHandler/handler/MarkPriceOkxChannelHandler.java
@@ -2,7 +2,7 @@
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.xcong.excoin.modules.okxApi.OkxGridTradeService;
import com.xcong.excoin.modules.okxApi.IOkxStrategy;
import com.xcong.excoin.modules.okxApi.wsHandler.OkxChannelHandler;
import lombok.extern.slf4j.Slf4j;
import org.java_websocket.client.WebSocketClient;
@@ -19,8 +19,8 @@
 *
 * <h3>双回调</h3>
 * <ul>
 *   <li>{@link OkxGridTradeService#onKline(BigDecimal)} — 驱动网格策略(处理开仓/止盈逻辑)</li>
 *   <li>{@link OkxGridTradeService#setMarkPrice(BigDecimal)} — PnLPriceMode.MARK_PRICE 计算未实现盈亏</li>
 *   <li>{@link IOkxStrategy#onKline(BigDecimal)} — 驱动策略(处理开仓/止盈逻辑)</li>
 *   <li>{@link IOkxStrategy#setMarkPrice(BigDecimal)} — PnLPriceMode.MARK_PRICE 计算未实现盈亏</li>
 * </ul>
 *
 * <h3>订阅格式</h3>
@@ -58,8 +58,8 @@
    /** 交易对标识,如 "ETH-USDT-SWAP" */
    private final String instId;
    /** 网格交易服务,接收标记价格回调 */
    private final OkxGridTradeService gridTradeService;
    /** 策略服务实例,接收标记价格回调 */
    private final IOkxStrategy strategy;
    /** 订阅确认状态 */
    private volatile boolean subscribed = false;
@@ -67,12 +67,12 @@
    /**
     * 构造标记价格频道处理器。
     *
     * @param instId           交易对标识(如 "ETH-USDT-SWAP")
     * @param gridTradeService OKX 网格交易策略服务实例
     * @param instId   交易对标识(如 "ETH-USDT-SWAP")
     * @param strategy OKX 交易策略服务实例
     */
    public MarkPriceOkxChannelHandler(String instId, OkxGridTradeService gridTradeService) {
    public MarkPriceOkxChannelHandler(String instId, IOkxStrategy strategy) {
        this.instId = instId;
        this.gridTradeService = gridTradeService;
        this.strategy = strategy;
    }
    /**
@@ -164,9 +164,9 @@
            }
            BigDecimal markPrice = new BigDecimal(markPxStr);
            if (gridTradeService != null) {
                gridTradeService.setMarkPrice(markPrice);
                gridTradeService.onKline(markPrice);
            if (strategy != null) {
                strategy.setMarkPrice(markPrice);
                strategy.onKline(markPrice);
            }
        } catch (Exception e) {
            log.error("[OKX-WS] 处理 mark-price 数据失败", e);
src/main/java/com/xcong/excoin/modules/okxApi/wsHandler/handler/OrdersOkxChannelHandler.java
@@ -2,8 +2,8 @@
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.xcong.excoin.modules.okxApi.IOkxStrategy;
import com.xcong.excoin.modules.okxApi.OkxConfig;
import com.xcong.excoin.modules.okxApi.OkxGridTradeService;
import com.xcong.excoin.modules.okxApi.wsHandler.AbstractOkxPrivateChannelHandler;
import lombok.extern.slf4j.Slf4j;
import org.java_websocket.client.WebSocketClient;
@@ -70,14 +70,14 @@
    /**
     * 构造订单频道处理器。
     *
     * @param config           OKX 配置实例
     * @param gridTradeService OKX 网格交易策略服务实例
     * @param config   OKX 配置实例
     * @param strategy OKX 交易策略服务实例
     */
    public OrdersOkxChannelHandler(OkxConfig config, OkxGridTradeService gridTradeService) {
    public OrdersOkxChannelHandler(OkxConfig config, IOkxStrategy strategy) {
        super(CHANNEL_NAME,
                config.getApiKey(), config.getApiSecret(), config.getPassphrase(),
                config.getContract(),
                gridTradeService);
                strategy);
        this.config = config;
    }
@@ -141,8 +141,8 @@
                log.info("[OKX-WS] orders fill, algoId:{}, state:filled, orderType:{}, side:{}, posSide:{}, fillSz:{}, tradeId:{}",
                        algoId, orderType, side, posSide, fillSz, tradeId);
                if (getGridTradeService() != null) {
                    getGridTradeService().onAutoOrder(algoId, "finished", state, orderType, tradeId);
                if (getStrategy() != null) {
                    getStrategy().onAutoOrder(algoId, "finished", state, orderType, tradeId);
                }
            }
        } catch (Exception e) {
src/main/java/com/xcong/excoin/modules/okxApi/wsHandler/handler/PositionsOkxChannelHandler.java
@@ -2,17 +2,17 @@
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.xcong.excoin.modules.okxApi.Direction;
import com.xcong.excoin.modules.okxApi.IOkxStrategy;
import com.xcong.excoin.modules.okxApi.OkxConfig;
import com.xcong.excoin.modules.okxApi.OkxGridTradeService;
import com.xcong.excoin.modules.okxApi.wsHandler.AbstractOkxPrivateChannelHandler;
import com.xcong.excoin.modules.okxApi.TraderParam;
import lombok.extern.slf4j.Slf4j;
import java.math.BigDecimal;
/**
 * OKX 仓位频道处理器(positions),接收仓位更新推送并回调
 * {@link OkxGridTradeService#onPositionUpdate(String, TraderParam.Direction, BigDecimal, BigDecimal)}。
 * {@link IOkxStrategy#onPositionUpdate(String, Direction, BigDecimal, BigDecimal)}。
 *
 * <h3>订阅格式</h3>
 * 私有频道,需要先登录认证。订阅 arg 使用 instType: "SWAP"(不指定具体 instId,
@@ -21,24 +21,10 @@
 * {"op":"subscribe","args":[{"channel":"positions","instType":"SWAP"}]}
 * </pre>
 *
 * <h3>数据推送格式</h3>
 * <pre>
 * {
 *   "arg": {"channel":"positions","instType":"SWAP"},
 *   "data": [{
 *     "instId": "ETH-USDT-SWAP",
 *     "posSide": "long",        // "long" 或 "short"
 *     "pos": "1",               // 持仓张数
 *     "avgPx": "3000",          // 开仓均价
 *     ...
 *   }]
 * }
 * </pre>
 *
 * <h3>数据映射</h3>
 * <ul>
 *   <li>posSide "long" → {@link TraderParam.Direction#LONG},映射为 DUAL_LONG</li>
 *   <li>posSide "short" → {@link TraderParam.Direction#SHORT},映射为 DUAL_SHORT</li>
 *   <li>posSide "long" → {@link Direction#LONG}</li>
 *   <li>posSide "short" → {@link Direction#SHORT}</li>
 *   <li>pos → 持仓张数(绝对值)</li>
 *   <li>avgPx → 开仓均价</li>
 * </ul>
@@ -57,14 +43,14 @@
    /**
     * 构造仓位频道处理器。
     *
     * @param config           OKX 配置实例(提供合约名称等)
     * @param gridTradeService OKX 网格交易策略服务实例
     * @param config   OKX 配置实例(提供合约名称等)
     * @param strategy OKX 交易策略服务实例
     */
    public PositionsOkxChannelHandler(OkxConfig config, OkxGridTradeService gridTradeService) {
    public PositionsOkxChannelHandler(OkxConfig config, IOkxStrategy strategy) {
        super(CHANNEL_NAME,
                config.getApiKey(), config.getApiSecret(), config.getPassphrase(),
                config.getContract(),
                gridTradeService);
                strategy);
        this.config = config;
    }
@@ -107,11 +93,11 @@
                // 解析持仓方向:OKX 的 posSide 可以是 "long" 或 "short"
                String posSide = posData.getString("posSide");
                TraderParam.Direction direction;
                Direction direction;
                if ("long".equals(posSide)) {
                    direction = TraderParam.Direction.LONG;
                    direction = Direction.LONG;
                } else if ("short".equals(posSide)) {
                    direction = TraderParam.Direction.SHORT;
                    direction = Direction.SHORT;
                } else {
                    log.debug("[OKX-WS] positions 忽略 net 方向: {}", posSide);
                    continue;
@@ -128,8 +114,8 @@
//                log.info("[OKX-WS] positions 持仓更新, instId:{}, posSide:{}, pos:{}, avgPx:{}",
//                        dataInstId, posSide, size, entryPrice);
                if (getGridTradeService() != null) {
                    getGridTradeService().onPositionUpdate(contract, direction, size, entryPrice);
                if (getStrategy() != null) {
                    getStrategy().onPositionUpdate(contract, direction, size, entryPrice);
                }
            }
        } catch (Exception e) {
src/main/java/com/xcong/excoin/modules/platform/controller/PlatformController.java
File was deleted
src/main/java/com/xcong/excoin/modules/platform/dao/PlatformBannerDao.java
File was deleted
src/main/java/com/xcong/excoin/modules/platform/dao/PlatformCnyUsdtExchangeDao.java
File was deleted
src/main/java/com/xcong/excoin/modules/platform/dao/PlatformFeeSettingDao.java
File was deleted
src/main/java/com/xcong/excoin/modules/platform/dao/PlatformNoticeDao.java
File was deleted
src/main/java/com/xcong/excoin/modules/platform/dao/PlatformPaymentMethodDao.java
File was deleted
src/main/java/com/xcong/excoin/modules/platform/dao/PlatformSymbolsCoinDao.java
File was deleted
src/main/java/com/xcong/excoin/modules/platform/dao/PlatformSymbolsSkuDao.java
File was deleted
src/main/java/com/xcong/excoin/modules/platform/dao/TradeSettingDao.java
File was deleted
src/main/java/com/xcong/excoin/modules/platform/entity/PlatformBannerEntity.java
File was deleted
src/main/java/com/xcong/excoin/modules/platform/entity/PlatformCnyUsdtExchangeEntity.java
File was deleted
src/main/java/com/xcong/excoin/modules/platform/entity/PlatformFeeSettingEntity.java
File was deleted
src/main/java/com/xcong/excoin/modules/platform/entity/PlatformLeverageSettingEntity.java
File was deleted
src/main/java/com/xcong/excoin/modules/platform/entity/PlatformNoticeEntity.java
File was deleted
src/main/java/com/xcong/excoin/modules/platform/entity/PlatformPaymentMethodEntity.java
File was deleted
src/main/java/com/xcong/excoin/modules/platform/entity/PlatformSymbolsCoinEntity.java
File was deleted
src/main/java/com/xcong/excoin/modules/platform/entity/PlatformSymbolsSkuEntity.java
File was deleted
src/main/java/com/xcong/excoin/modules/platform/entity/PlatformTradeSettingEntity.java
File was deleted
src/main/java/com/xcong/excoin/modules/platform/service/PlatformBannerService.java
File was deleted
src/main/java/com/xcong/excoin/modules/platform/service/PlatformCnyUsdtExchangeService.java
File was deleted
src/main/java/com/xcong/excoin/modules/platform/service/PlatformNoticeService.java
File was deleted
src/main/java/com/xcong/excoin/modules/platform/service/PlatformPaymentMethodService.java
File was deleted
src/main/java/com/xcong/excoin/modules/platform/service/PlatformSymbolsSkuService.java
File was deleted
src/main/java/com/xcong/excoin/modules/platform/service/impl/PlatformBannerServiceImpl.java
File was deleted
src/main/java/com/xcong/excoin/modules/platform/service/impl/PlatformCnyUsdtExchangeServiceImpl.java
File was deleted
src/main/java/com/xcong/excoin/modules/platform/service/impl/PlatformNoticeServiceImpl.java
File was deleted
src/main/java/com/xcong/excoin/modules/platform/service/impl/PlatformPaymentMethodServiceImpl.java
File was deleted
src/main/java/com/xcong/excoin/modules/platform/service/impl/PlatformSymbolsSkuServiceImpl.java
File was deleted
src/main/java/com/xcong/excoin/modules/platform/vo/PlatformCnyUsdtExchangeVo.java
File was deleted
src/main/java/com/xcong/excoin/modules/symbols/controller/SymbolsController.java
File was deleted
src/main/java/com/xcong/excoin/modules/symbols/dao/PlatformSymbolsContractDao.java
File was deleted
src/main/java/com/xcong/excoin/modules/symbols/entity/PlatformSymbolsContractEntity.java
File was deleted
src/main/java/com/xcong/excoin/modules/symbols/parameter/dto/KlineDetailDto.java
File was deleted
src/main/java/com/xcong/excoin/modules/symbols/parameter/vo/HomeSymbolsVo.java
File was deleted
src/main/java/com/xcong/excoin/modules/symbols/parameter/vo/KlineDataVo.java
File was deleted
src/main/java/com/xcong/excoin/modules/symbols/service/SymbolsService.java
File was deleted
src/main/java/com/xcong/excoin/modules/symbols/service/impl/SymbolsServiceImpl.java
File was deleted
src/main/java/com/xcong/excoin/modules/test/controller/TestUserController.java
File was deleted
src/main/java/com/xcong/excoin/modules/test/dao/TestUserDao.java
File was deleted
src/main/java/com/xcong/excoin/modules/test/dto/TestUserDto.java
File was deleted
src/main/java/com/xcong/excoin/modules/test/entity/TestUserEntity.java
File was deleted
src/main/java/com/xcong/excoin/modules/test/mapper/TestUserEntityMapper.java
File was deleted
src/main/java/com/xcong/excoin/modules/test/service/TestUserService.java
File was deleted
src/main/java/com/xcong/excoin/modules/test/service/impl/TestUserServiceImpl.java
File was deleted
src/main/java/com/xcong/excoin/modules/test/vo/TestUserVo.java
File was deleted
src/main/java/com/xcong/excoin/modules/test/vo/TestVo.java
File was deleted
src/main/java/com/xcong/excoin/netty/ChatServer.java
File was deleted
src/main/java/com/xcong/excoin/netty/bean/RequestBean.java
File was deleted
src/main/java/com/xcong/excoin/netty/bean/ResponseBean.java
File was deleted
src/main/java/com/xcong/excoin/netty/common/ChannelManager.java
File was deleted
src/main/java/com/xcong/excoin/netty/common/Contans.java
File was deleted
src/main/java/com/xcong/excoin/netty/common/NettyTools.java
File was deleted
src/main/java/com/xcong/excoin/netty/dispatch/MsgDispatch.java
File was deleted
src/main/java/com/xcong/excoin/netty/handler/WebSocketServerHandler.java
File was deleted
src/main/java/com/xcong/excoin/netty/initalizer/WebSocketServerInitializer.java
File was deleted
src/main/java/com/xcong/excoin/netty/logic/MsgLogic.java
File was deleted
src/main/java/com/xcong/excoin/netty/logic/WebSocketLogic.java
File was deleted
src/main/java/com/xcong/excoin/netty/logic/impl/MsgLogicImpl.java
File was deleted
src/main/java/com/xcong/excoin/netty/server/WebSocketServer.java
File was deleted
src/main/java/com/xcong/excoin/quartz/job/BlockCoinUpdateJob.java
File was deleted
src/main/java/com/xcong/excoin/quartz/job/DayLineDataUpdateJob.java
File was deleted
src/main/java/com/xcong/excoin/quartz/job/KlineDataUpdateJob.java
File was deleted
src/main/java/com/xcong/excoin/quartz/job/LoopExecutorJob.java
File was deleted
src/main/java/com/xcong/excoin/quartz/job/NewestPriceUpdateJob.java
File was deleted
src/main/java/com/xcong/excoin/quartz/job/NotionalPoolingJob.java
File was deleted
src/main/java/com/xcong/excoin/quartz/job/UsdtCnyExchangePriceUpdateJob.java
File was deleted
src/main/java/com/xcong/excoin/rabbit/consumer/OperateOrderPriceConsumer.java
File was deleted
src/main/java/com/xcong/excoin/rabbit/consumer/TestConsumer.java
File was deleted
src/main/java/com/xcong/excoin/rabbit/consumer/WebsocketPriceConsumer.java
File was deleted
src/main/java/com/xcong/excoin/rabbit/init/OrderProducerInit.java
File was deleted
src/main/java/com/xcong/excoin/rabbit/pricequeue/AscBigDecimal.java
File was deleted
src/main/java/com/xcong/excoin/rabbit/pricequeue/DescBigDecimal.java
File was deleted
src/main/java/com/xcong/excoin/rabbit/pricequeue/OrderModel.java
File was deleted
src/main/java/com/xcong/excoin/rabbit/pricequeue/OrderOperatePriceService.java
File was deleted
src/main/java/com/xcong/excoin/rabbit/pricequeue/PricePriorityQueue.java
File was deleted
src/main/java/com/xcong/excoin/rabbit/pricequeue/WebsocketPriceService.java
File was deleted
src/main/java/com/xcong/excoin/rabbit/producer/OrderProducer.java
File was deleted
src/main/java/com/xcong/excoin/rabbit/producer/TestProducer.java
File was deleted
src/main/java/com/xcong/excoin/utils/CacheSettingUtils.java
File was deleted
src/main/java/com/xcong/excoin/utils/CalculateUtil.java
File was deleted
src/main/java/com/xcong/excoin/utils/CoinTypeConvert.java
File was deleted
src/main/java/com/xcong/excoin/utils/LogRecordUtils.java
File was deleted
src/main/java/com/xcong/excoin/utils/MessageSourceUtils.java
File was deleted
src/main/java/com/xcong/excoin/utils/OssUtils.java
File was deleted
src/main/java/com/xcong/excoin/utils/RedisUtils.java
File was deleted
src/main/java/com/xcong/excoin/utils/SSLClient.java
File was deleted
src/main/java/com/xcong/excoin/utils/ShareCodeUtil.java
File was deleted
src/main/java/com/xcong/excoin/utils/SmsUtils.java
File was deleted
src/main/java/com/xcong/excoin/utils/SpringContextHolder.java
File was deleted
src/main/java/com/xcong/excoin/utils/ThreadPoolUtils.java
File was deleted
src/main/java/com/xcong/excoin/utils/TypeJudgeUtils.java
File was deleted
src/main/java/com/xcong/excoin/utils/api/ApiClient.java
File was deleted
src/main/java/com/xcong/excoin/utils/api/ApiException.java
File was deleted
src/main/java/com/xcong/excoin/utils/api/request/CreateOrderRequest.java
File was deleted
src/main/java/com/xcong/excoin/utils/api/request/DepthRequest.java
File was deleted
src/main/java/com/xcong/excoin/utils/api/request/IntrustOrdersDetailRequest.java
File was deleted
src/main/java/com/xcong/excoin/utils/api/response/Account.java
File was deleted
src/main/java/com/xcong/excoin/utils/api/response/Accounts.java
File was deleted
src/main/java/com/xcong/excoin/utils/api/response/AccountsResponse.java
File was deleted
src/main/java/com/xcong/excoin/utils/api/response/ApiResponse.java
File was deleted
src/main/java/com/xcong/excoin/utils/api/response/Balance.java
File was deleted
src/main/java/com/xcong/excoin/utils/api/response/BalanceBean.java
File was deleted
src/main/java/com/xcong/excoin/utils/api/response/BalanceResponse.java
File was deleted
src/main/java/com/xcong/excoin/utils/api/response/Batchcancel.java
File was deleted
src/main/java/com/xcong/excoin/utils/api/response/BatchcancelBean.java
File was deleted
src/main/java/com/xcong/excoin/utils/api/response/BatchcancelResponse.java
File was deleted
src/main/java/com/xcong/excoin/utils/api/response/Currencys.java
File was deleted
src/main/java/com/xcong/excoin/utils/api/response/CurrencysResponse.java
File was deleted
src/main/java/com/xcong/excoin/utils/api/response/Depth.java
File was deleted
src/main/java/com/xcong/excoin/utils/api/response/DepthResponse.java
File was deleted
src/main/java/com/xcong/excoin/utils/api/response/DetailResponse.java
File was deleted
src/main/java/com/xcong/excoin/utils/api/response/Details.java
File was deleted
src/main/java/com/xcong/excoin/utils/api/response/HistoryTrade.java
File was deleted
src/main/java/com/xcong/excoin/utils/api/response/HistoryTradeResponse.java
File was deleted
src/main/java/com/xcong/excoin/utils/api/response/HistoryTradess.java
File was deleted
src/main/java/com/xcong/excoin/utils/api/response/IntrustDetail.java
File was deleted
src/main/java/com/xcong/excoin/utils/api/response/IntrustDetailResponse.java
File was deleted
src/main/java/com/xcong/excoin/utils/api/response/Kline.java
File was deleted
src/main/java/com/xcong/excoin/utils/api/response/KlineResponse.java
File was deleted
src/main/java/com/xcong/excoin/utils/api/response/KlineReturn.java
File was deleted
src/main/java/com/xcong/excoin/utils/api/response/MatchresultsOrdersDetail.java
File was deleted
src/main/java/com/xcong/excoin/utils/api/response/MatchresultsOrdersDetailResponse.java
File was deleted
src/main/java/com/xcong/excoin/utils/api/response/Merged.java
File was deleted
src/main/java/com/xcong/excoin/utils/api/response/MergedResponse.java
File was deleted
src/main/java/com/xcong/excoin/utils/api/response/OrdersDetail.java
File was deleted
src/main/java/com/xcong/excoin/utils/api/response/OrdersDetailResponse.java
File was deleted
src/main/java/com/xcong/excoin/utils/api/response/Place.java
File was deleted
src/main/java/com/xcong/excoin/utils/api/response/SubmitcancelResponse.java
File was deleted
src/main/java/com/xcong/excoin/utils/api/response/Symbol.java
File was deleted
src/main/java/com/xcong/excoin/utils/api/response/Symbols.java
File was deleted
src/main/java/com/xcong/excoin/utils/api/response/SymbolsResponse.java
File was deleted
src/main/java/com/xcong/excoin/utils/api/response/TimestampResponse.java
File was deleted
src/main/java/com/xcong/excoin/utils/api/response/Trade.java
File was deleted
src/main/java/com/xcong/excoin/utils/api/response/TradeBean.java
File was deleted
src/main/java/com/xcong/excoin/utils/api/response/TradeResponse.java
File was deleted
src/main/java/com/xcong/excoin/utils/mail/RequestEncoder.java
File was deleted
src/main/java/com/xcong/excoin/utils/mail/Sms106Send.java
File was deleted
src/main/java/com/xcong/excoin/utils/mail/SmsSend.java
File was deleted
src/main/java/com/xcong/excoin/utils/mail/SubMailSend.java
File was deleted
src/main/resources/application-app.yml
File was deleted
src/main/resources/application-dayline.yml
File was deleted
src/main/resources/application-loop.yml
File was deleted
src/main/resources/application-newprice.yml
File was deleted
src/main/resources/application-test.yml
File was deleted
src/main/resources/application.yml
@@ -4,113 +4,10 @@
    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.cj.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: 120.27.238.55
    # Redis服务器连接端口
    port: 6479
    # Redis 密码
    password: d3y6dsdl;f.327
    lettuce:
      pool:
        # 连接池中的最小空闲连接
        min-idle: 8
        # 连接池中的最大空闲连接
        max-idle: 500
        # 连接池最大连接数(使用负值表示没有限制)
        max-active: 2000
        # 连接池最大阻塞等待时间(使用负值表示没有限制)
        max-wait: 10000
    # 连接超时时间(毫秒)
    timeout: 500000
  devtools:
    restart:
      enabled: false
  rabbitmq:
    host: 120.27.238.55
    port: 5672
    username: ct_rabbit
    password: 123456
    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
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==
logging:
  level:
    com.xcong.excoin.modules.okxApi: INFO
src/main/resources/i18n/messages.properties
src/main/resources/i18n/messages_en_US.properties
File was deleted
src/main/resources/i18n/messages_zh_CN.properties
File was deleted
src/main/resources/mapper/TestUserDao.xml
File was deleted
src/main/resources/mapper/contract/ContractEntrustOrderDao.xml
File was deleted
src/main/resources/mapper/contract/ContractHoldOrderDao.xml
File was deleted
src/main/resources/mapper/contract/ContractOrderDao.xml
File was deleted
src/main/resources/mapper/home/MemberQuickBuySaleDao.xml
File was deleted
src/main/resources/mapper/member/AgentReturnDao.xml
File was deleted
src/main/resources/mapper/member/AppVersionDao.xml
File was deleted
src/main/resources/mapper/member/MemberAccountFlowEntityDao.xml
File was deleted
src/main/resources/mapper/member/MemberAccountMoneyChangeDao.xml
File was deleted
src/main/resources/mapper/member/MemberAuthenticationDao.xml
File was deleted
src/main/resources/mapper/member/MemberCoinAddressDao.xml
File was deleted
src/main/resources/mapper/member/MemberCoinChargeDao.xml
File was deleted
src/main/resources/mapper/member/MemberDao.xml
File was deleted
src/main/resources/mapper/member/MemberLevelRateDao.xml
File was deleted
src/main/resources/mapper/member/MemberPaymentMethodDao.xml
File was deleted
src/main/resources/mapper/member/MemberSelectSymbolsDao.xml
File was deleted
src/main/resources/mapper/member/MemberSettingDao.xml
File was deleted
src/main/resources/mapper/member/MemberWalletAgentDao.xml
File was deleted
src/main/resources/mapper/member/MemberWalletCoinDao.xml
File was deleted
src/main/resources/mapper/member/MemberWalletContractDao.xml
File was deleted
src/main/resources/mapper/member/MemberWalletContractSimulateDao.xml
File was deleted
src/main/resources/mapper/platform/PlatformCnyUsdtExchangeDao.xml
File was deleted
src/main/resources/mapper/platform/PlatformFeeSettingDao.xml
File was deleted
src/main/resources/mapper/platform/PlatformSymbolsCoinDao.xml
File was deleted
src/main/resources/mapper/platform/PlatformSymbolsContractDao.xml
File was deleted
src/main/resources/mapper/platform/PlatformSymbolsSkuDao.xml
File was deleted
src/main/resources/mapper/platform/TradeSettingDao.xml
File was deleted
src/main/resources/mapper/walletCoinOrder/OrderCoinDealDao.xml
File was deleted
src/main/resources/mapper/walletCoinOrder/OrderCoinsDao.xml
File was deleted