fix
Helius
2021-07-01 2723b71882f6b34d7c443019d1bb5674250c1893
gc-user/src/main/java/com/xzx/gc/user/service/JhyInfoService.java
@@ -119,7 +119,7 @@
        List<AccountInfo> accountInfos = accountMapper.selectByExample(exampleAccount);
        if(CollUtil.isNotEmpty(accountInfos)){
            AccountInfo accountInfo = accountInfos.get(0);
            Integer collectScore = Integer.parseInt(StrUtil.isEmpty(accountInfo.getCollectScore())?"0":accountInfo.getCollectScore());
            String collectScore = StrUtil.isEmpty(accountInfo.getCollectScore())?"0":accountInfo.getCollectScore();
//            collectScore = collectScore + model.getScore();
            accountInfo.setCollectScore(model.getScore().toString());
            accountMapper.updateByPrimaryKey(accountInfo);
@@ -127,9 +127,9 @@
            ScoreDetails scoreDetailsRet = new ScoreDetails();
            scoreDetailsRet.setUserId(model.getUserId());
            scoreDetailsRet.setType(ScoreDetails.SCORE_TYPE_ADMIN_RECHARGE);
            scoreDetailsRet.setOriginalScore(new BigDecimal(collectScore));
            scoreDetailsRet.setCurrentScore(new BigDecimal(model.getScore()));
            scoreDetailsRet.setChangeScore(new BigDecimal(model.getScore()));
            scoreDetailsRet.setOriginalScore(new BigDecimal(collectScore).setScale( 0, BigDecimal.ROUND_DOWN ));
            scoreDetailsRet.setCurrentScore(new BigDecimal(model.getScore()).setScale( 0, BigDecimal.ROUND_DOWN ));
            scoreDetailsRet.setChangeScore(new BigDecimal(model.getScore()).setScale( 0, BigDecimal.ROUND_DOWN ));
            scoreDetailsRet.setCreatedTime(new Date());
            accountMapper.insertScoreDetailsRet(scoreDetailsRet);
        }
@@ -143,7 +143,7 @@
        List<AccountInfo> accountInfos = accountMapper.selectByExample(exampleAccount);
        if(CollUtil.isNotEmpty(accountInfos)){
            AccountInfo accountInfo = accountInfos.get(0);
            getScoreNumVo.setScore(new BigDecimal(StrUtil.isEmpty(accountInfo.getCollectScore())?"0":accountInfo.getCollectScore()));
            getScoreNumVo.setScore(new BigDecimal(StrUtil.isEmpty(accountInfo.getCollectScore())?"0":accountInfo.getCollectScore()).setScale( 0, BigDecimal.ROUND_DOWN ));
        }
        return getScoreNumVo;
    }