Explorar o código

角色新增修改bug 修复

eganwu hai 1 ano
pai
achega
fc96671627
Modificáronse 1 ficheiros con 4 adicións e 3 borrados
  1. 4 3
      src/custom/restcontroller/webmanage/role/role.java

+ 4 - 3
src/custom/restcontroller/webmanage/role/role.java

@@ -111,10 +111,11 @@ public class role extends Controller {
         String rolename = content.getString("rolename", "sys_role");
         String remarks = content.getString("remarks", "sys_role");
         String usertype = content.getString("usertype", "sys_role");
-        JSONArray fielddatatypelimit = content.getJSONArray("fielddatatypelimit");
-        if (fielddatatypelimit == null) {
-            fielddatatypelimit = new JSONArray();
+        JSONArray fielddatatypelimit = new JSONArray();
+        if (content.containsKey("fielddatatypelimit")) {
+            fielddatatypelimit = content.getJSONArray("fielddatatypelimit");
         }
+
         SQLFactory sqlFactory = null;
         if (roleid <= 0 || dbConnect.runSqlQuery("select roleid from sys_role where roleid=" + roleid).isEmpty()) {
             roleid = createTableID("sys_role");