Parcourir la source

用户不存在提示语

lyhzzz il y a 2 ans
Parent
commit
1db0c7b12e

+ 3 - 0
src/main/java/com/fdkankan/ucenter/service/impl/AppService.java

@@ -136,6 +136,9 @@ public class AppService {
         String redisValue = "";
         if(userId!= null){
             User user = userService.getById(userId);
+            if(user == null){
+                throw new BusinessException(LoginConstant.FAILURE_CODE_3015, LoginConstant.FAILURE_MSG_3015);
+            }
             redisValue = JSONObject.toJSONString(user);
             if(!stripeService.checkUserStripePay(user.getId(),user.getUserName())){
                 throw new BusinessException(LoginConstant.FAILURE_CODE_3016, LoginConstant.FAILURE_MSG_3016);