xiaoyong931011
2021-06-30 1071bf97c5ff951e2810fc2a65acb71cf8421f0c
gc-user/src/main/java/com/xzx/gc/user/service/JhyInfoService.java
@@ -3,6 +3,7 @@
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.convert.Convert;
import cn.hutool.core.util.StrUtil;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.xzx.gc.common.exception.RestException;
@@ -118,7 +119,7 @@
        List<AccountInfo> accountInfos = accountMapper.selectByExample(exampleAccount);
        if(CollUtil.isNotEmpty(accountInfos)){
            AccountInfo accountInfo = accountInfos.get(0);
            Integer collectScore = Integer.parseInt(accountInfo.getCollectScore());
            Integer collectScore = Integer.parseInt(StrUtil.isEmpty(accountInfo.getCollectScore())?"0":accountInfo.getCollectScore());
//            collectScore = collectScore + model.getScore();
            accountInfo.setCollectScore(model.getScore().toString());
            accountMapper.updateByPrimaryKey(accountInfo);
@@ -142,8 +143,7 @@
        List<AccountInfo> accountInfos = accountMapper.selectByExample(exampleAccount);
        if(CollUtil.isNotEmpty(accountInfos)){
            AccountInfo accountInfo = accountInfos.get(0);
            Integer collectScore = Integer.parseInt(accountInfo.getCollectScore());
            getScoreNumVo.setScore(new BigDecimal(collectScore));
            getScoreNumVo.setScore(new BigDecimal(StrUtil.isEmpty(accountInfo.getCollectScore())?"0":accountInfo.getCollectScore()));
        }
        return getScoreNumVo;
    }