Browse Source

增加判断条件

xusonglin 5 years ago
parent
commit
e1e9bae412

+ 1 - 1
src/main/java/com/jkcredit/invoice/hub/service/apiUser/ApiUserServiceImpl.java

@@ -42,7 +42,7 @@ public class ApiUserServiceImpl extends BaseService implements ApiUserService {
         String userId = "";
         if (object != null) {
             JSONObject jsonObject = JSON.parseObject(JSON.toJSONString(object));
-            if (!param.getAppSecret().equals(jsonObject.get("appSecret")) || !jsonObject.get("status").equals("1")) {
+            if (!param.getAppSecret().equals(jsonObject.get("appSecret")) || jsonObject.get("status") == null || !jsonObject.get("status").equals("1")) {
                 availableUser = validateUser(param.getAppKey(), param.getAppSecret(), userId);
             } else {
                 userId = jsonObject.get("userId").toString();