Helius
2020-07-30 497d9399da3fe78f7ef1934f92953d00df3ac549
Merge branch 'master' into follow
4 files modified
17 ■■■■ changed files
src/main/java/com/xcong/excoin/modules/blackchain/service/EthService.java 2 ●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/contract/service/impl/ContractEntrustOrderServiceImpl.java 6 ●●●●● patch | view | raw | blame | history
src/test/java/com/xcong/excoin/GuijiTest.java 5 ●●●●● patch | view | raw | blame | history
src/test/java/com/xcong/excoin/RedisTest.java 4 ●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/blackchain/service/EthService.java
@@ -263,7 +263,7 @@
        BigInteger nonce = ethGetTransactionCount.getTransactionCount();
        BigInteger value = Convert.toWei(amount, Convert.Unit.ETHER).toBigInteger();
        RawTransaction rawTransaction = RawTransaction.createEtherTransaction(nonce,
                Convert.toWei("70", Convert.Unit.GWEI).toBigInteger(),
                Convert.toWei("50", Convert.Unit.GWEI).toBigInteger(),
                Convert.toWei("60000", Convert.Unit.WEI).toBigInteger(), toAddress, value);
        byte[] signedMessage = TransactionEncoder.signMessage(rawTransaction, credentials);
        String hexValue = Numeric.toHexString(signedMessage);
src/main/java/com/xcong/excoin/modules/contract/service/impl/ContractEntrustOrderServiceImpl.java
@@ -73,14 +73,16 @@
            // 开多委托价不能大于当前价
            if (submitEntrustDto.getEntrustType() == ContractEntrustOrderEntity.ENTRUST_TYPE_OPEN_MORE) {
                if (submitEntrustDto.getEntrustPrice().compareTo(newPrice) > -1) {
                    return Result.fail(MessageSourceUtils.getString("entrust_price_judge_more"));
//                    return Result.fail(MessageSourceUtils.getString("entrust_price_judge_more"));
                    submitEntrustDto.setEntrustPrice(newPrice);
                }
            }
            // 开空委托价不能小于当前价
            if (submitEntrustDto.getEntrustType() == ContractEntrustOrderEntity.ENTRUST_TYPE_OPEN_LESS) {
                if (submitEntrustDto.getEntrustPrice().compareTo(newPrice) < 1) {
                    return Result.fail(MessageSourceUtils.getString("entrust_price_judge_less"));
//                    return Result.fail(MessageSourceUtils.getString("entrust_price_judge_less"));
                    submitEntrustDto.setEntrustPrice(newPrice);
                }
            }
src/test/java/com/xcong/excoin/GuijiTest.java
@@ -41,7 +41,6 @@
    @Resource
    private MemberWalletCoinDao memberWalletCoinDao;
    @Test
    public void pool() throws ExecutionException, InterruptedException {
        //List<MemberCoinChargeEntity> list = memberCoinChargeDao.selectAllBySymbolAndTag(CoinTypeEnum.USDT.name(), "ERC20", 1);
        List<MemberCoinChargeEntity> list = new ArrayList<MemberCoinChargeEntity>();
@@ -104,10 +103,10 @@
     */
    @Test
    public void pushFee() {
        String toAddress = "";
        String toAddress = "0xbc6050a2898511bda406660267e6667448070552";
        EthService ethService = new EthService();
        try {
            String hash = ethService.ethSend(TOTAL_PRIVATE, TOTAL_ADDRESS, toAddress, ETH_FEE);
            String hash = ethService.ethSend(TOTAL_PRIVATE, TOTAL_ADDRESS, toAddress, "0.0032");
            System.out.println("转手续费:"+hash);
        } catch (InterruptedException e) {
            // TODO Auto-generated catch block
src/test/java/com/xcong/excoin/RedisTest.java
@@ -27,9 +27,9 @@
    @Test
    public void redisResetTest() {
        MemberEntity member = memberDao.selectById(1L);
        MemberEntity member = memberDao.selectById(72L);
        member.setPassword(new BCryptPasswordEncoder().encode(member.getPassword()));
        redisUtils.set("app_d95747766852410c80ed81ba9e72d15d", JSONObject.toJSONString(member), 36000);
        redisUtils.set("app_21c8fb68f5de4bbfb91a03813833db8a", JSONObject.toJSONString(member), 36000);
    }
}