From 817cf20960789a20ac87617b2371063013699396 Mon Sep 17 00:00:00 2001
From: xiaoyong931011 <15274802129@163.com>
Date: Tue, 09 Nov 2021 15:48:59 +0800
Subject: [PATCH] 20211108

---
 gc-user/src/main/java/com/xzx/gc/user/service/JhyInfoService.java |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/gc-user/src/main/java/com/xzx/gc/user/service/JhyInfoService.java b/gc-user/src/main/java/com/xzx/gc/user/service/JhyInfoService.java
index 2637795..1de845d 100644
--- a/gc-user/src/main/java/com/xzx/gc/user/service/JhyInfoService.java
+++ b/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.ObjectUtil;
 import cn.hutool.core.util.StrUtil;
 import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageInfo;
@@ -101,8 +102,10 @@
                 String userId = jhyInfoListVo.getUserId();
                 if(StrUtil.isNotEmpty(userId)){
                     AccountInfo accountInfo = accountMapper.selectOneByUserId(userId);
-                    String collectScore = StrUtil.isEmpty(accountInfo.getCollectScore()) ? "0" : accountInfo.getCollectScore();
-                    jhyInfoListVo.setScore(new BigDecimal(collectScore).setScale( 2, BigDecimal.ROUND_DOWN ));
+                    if(ObjectUtil.isNotEmpty(accountInfo)){
+                        String collectScore = StrUtil.isEmpty(accountInfo.getCollectScore()) ? "0" : accountInfo.getCollectScore();
+                        jhyInfoListVo.setScore(new BigDecimal(collectScore).setScale( 2, BigDecimal.ROUND_DOWN ));
+                    }
 
                     Example example = new Example(UserLoginInfo.class);
                     Example.Criteria criteria = example.createCriteria();

--
Gitblit v1.9.1