{
  "responseField": {
    //1对多 配置 bo-menu  menu_detail  _filterPrimaryIds
    "menu_detail": {
      "dataFromType": "Database",
      "show": "null func_name,func_id,menu_id,mf_id",
      "bridgeColumn": "func_name,func_id,menu_id,mf_id,is_enabled",
      "original": "is_enabled",
      "where": "and menu_id in @_filterPrimaryIds",
      //表示列表查询,不需要分页
      "isList": true,
      "selectSql": {
        //获取用户权限,包含删除的,权限管理里面需要剔除 where (concat(menu_id,mf_id)) not in (select concat(menu_id,mf_id) from bo_popedom where  object_id=@objectId and object_type=3)  
        "list": "select 'ui' bat_o,tb_mf.mf_id,tb_f.func_name,tb_f.func_id,IFNULL(tb_mf.is_enabled,0) is_enabled,IFNULL(tb_mf.menu_id,@menuId) menu_id from bo_sys_function tb_f left join bo_menu_function tb_mf on (tb_f.func_id=tb_mf.func_id and tb_mf.menu_id in @_filterPrimaryIds) order by tb_f.sort_id"
      },
      "saveSqlPrimary": {
        //"primaryWhere": " monitor_id = @monitorId and data_date = @dataDate  ",
        "primaryWhere": " menu_id = @menuId and func_id = @funcId ",

        "primaryColumn": [
          {
            "colName": "menu_id",
            "field": "menuId", //存储子表里面关联主表对应的字段列
            "isIdentity": false,
            "primaryColumn": "menu_id",
            "primaryField": "menuId", //来源主表的字段列
            "tableId": 1
          }
        ],
        "childPrimaryColumn": [
          {
            //多对多情况关联表主键
            "colName": "menu_id",
            "field": "menuId",
            "tableId": 1
          },
          {
            //多对多情况关联表主键
            "colName": "func_id",
            "field": "funcId",
            "tableId": 1
          }
        ]
      },
      "columns": {
        "mfId": {
          //每次保存时候都重置主键,用于多列更新
          "guidMethod": "NEW_ID"
        }
      }
    },
    "menu": {
      "isList": true,
      "extend": "menu_detail",
      "selectSql": {
        //获取用户权限,包含删除的,权限管理里面需要剔除 where (concat(menu_id,mf_id)) not in (select concat(menu_id,mf_id) from bo_popedom where  object_id=@objectId and object_type=3)  
        "list": "select 'ui' bat_o,'0' mf_id,tb_f.func_name,tb_f.func_id,IFNULL(tb_mf.is_enabled,0) is_enabled,IFNULL(tb_mf.menu_id,@menuId) menu_id from bo_sys_function tb_f left join bo_menu_function tb_mf on (tb_f.func_id=tb_mf.func_id and tb_mf.menu_id=@menuId) order by tb_f.sort_id"
      },
      "columns": {
        "isEnabled": {
          "listPropertie": {
            //直接显示值
            "showMethodOut": "v"
          }
        }
      }
    }
  }
}
文档更新时间: 2021-12-31 20:17   作者:admin