{
  "responseField": {
    "common": {
      "columns": {
        "url": {
          "fieldSort": 1000,
          "guidMethod": "None",
          "field": "url",
          "alias": "url"
        }
      }
    },
    "global": {
      "dataFromType": "Database",
      "show": "id",
      "auth": true
    },
    // #region 配置审核列表
    "file": { // 自定义条件
      "where": " and object_id=@commId",
      // 自定义排序
      "order": " sort asc",
      //表示列表查询,不需要分页
      "isList": true
    },
    // #endregion 配置审核列表,
    "file_detail": {
      "extend": "basis_detail",
      "bridgeColumn": "id,object_id,object_type,name,size,url,suffix,sort,position",
      "auth": true,
      "where": "and object_id in @_filterPrimaryIds",
      "saveSqlPrimary": {
        //"primaryWhere": " monitor_id = @monitorId and data_date = @dataDate  ",
        // 当主键为自增情况,通过唯一键控制修改
        //"primaryWhere": " object_id = @objectId and createUserId = @createUserId ",
        // 如果主键直接作为唯一的, "guidMethod": "NEW_ID" 不需要设置
        "primaryWhere": " id = @id ",
        "primaryColumn": [
          {
            "colName": "object_id",
            "field": "objectId", //存储子表里面关联主表对应的字段列
            "isIdentity": false,
            "primaryColumn": "comm_id",
            "primaryField": "commId", //来源主表的字段列
            "tableId": 1
          }
        ],
        "childPrimaryColumn": [
          {
            //多对多情况关联表主键
            "colName": "comm_id",
            "field": "commId",
            "tableId": 1
          }
        ]
      },
      "columns": {
        //"id": {
        //  //每次保存时候都重置主键,用于多列更新
        //  "guidMethod": "NEW_ID"
        //}
      }
    }
    // #endreigon 1对多配置
  }
}
文档更新时间: 2022-02-04 16:00   作者:admin