Bladeren bron

授权许可证

lyhzzz 2 jaren geleden
bovenliggende
commit
8ecc0fb78c
1 gewijzigde bestanden met toevoegingen van 4 en 1 verwijderingen
  1. 4 1
      src/main/java/com/fdkankan/ucenter/controller/AuthLicenseController.java

+ 4 - 1
src/main/java/com/fdkankan/ucenter/controller/AuthLicenseController.java

@@ -35,7 +35,6 @@ public class AuthLicenseController {
     public ResultData getAuthInfo(){
         JSONObject jsonObject = null;
         try {
-            System.out.println(1/0);
             jsonObject = AuthLicenseUtil.readLicense();
             JSONObject licenseInfo = jsonObject.getJSONObject("licenseInfo");
             JSONObject snInfo = licenseInfo.getJSONObject("snInfo");
@@ -52,6 +51,10 @@ public class AuthLicenseController {
                 snInfo.set("sn", snPassWord);
             }
         }catch (Exception e){
+            jsonObject = new JSONObject();
+            JSONObject licenseInfo = new JSONObject();
+            licenseInfo.set("snInfo",new JSONObject());
+            jsonObject.set("licenseInfo",licenseInfo);
         }
         return ResultData.ok(jsonObject);
     }