{
  "diffTableNo": 0,
  "isRESTful": true,
  "base": {
    "connName": "ConnBt",
    "isRearEnd": true,
    "isFrontEnd": true
  },
  "responseField": {
    "statistics-my": {
      //动态构建sql语句方式  start
      "show": "family_id,img_url,family_name,{bd_count},{bbr_count}",
      "where": " and create_user_id=@_userId",
      //动态构建sql语句方式 end
      "isList": true
      //自定义SQL语句  start
      //"selectSql": {
      //  //where tb_f.create_user_id=@_userId
      //  "list": "select family_id,img_url,family_name,{bd_count},{bbr_count} from bt_family ",
      //  "detail": null,
      //  "page": null,
      //  "count": null,
      //  "listField": "*",
      //  "pageField": "*",
      //  "detailField": "*"
      //}
      //自定义SQL语句  end
    }
  },
  "tables": [
    {
      "id": 1,
      //对应表名
      "name": "bt_family",
      "isPrimary": true,
      "primaryColumn": [
        {
          "colName": "family_id",
          "alias": "family_id",
          "field": "familyId"
        }
      ],
      "type": "Table"
    }
  ],
  //统计时候节点可以不要
  "selectSql": {
    "auth": false,
    "primaryWhere": "family_id =@familyId",
    "tableName": "bt_family",
    "order": "family_id",
    "listField": "*",
    "detailField": "*"
  },
  //字段如果没有特殊处理,节点可以不要
  "columns": {
    "imgUrl": {
      "fieldSort": 9999,
      "extendAlias": "image",
      "tableId": 1,
      "dataType": "varchar",
      "title": "图片地址",
      "remark": "图片地址,库里面存储相对路径,返回前台是完整路径",
      "guidMethod": 0,
      "isRequired": false,
      "isData": true,
      "filter": {
        "isMust": false
      },
      "field": "imgUrl",
      "name": "img_url",
      "alias": "img_url",
      "isDate": false,
      "isPrimary": false,
      "isIdentity": false,
      "maxLength": 255
    },
    "bdCount": {
      "extendAlias": "input_basis",
      "fieldSort": 9999,
      "tableId": 1,
      "dataType": "varchar",
      "title": "保单数",
      "isData": false,
      "filter": {
        "isMust": false
      },
      "sql": "(select count(policy_id) from bt_policy tb_p where bt_family.family_id=tb_p.family_id) bd_count",
      "selectSql": {
        "oracle": null,
        "sqlserver": null,
        "mysql": null,
        "sqlite": null
      },
      "field": "bdCount",
      "name": "bd_count",
      "alias": "bd_count",
      "isDate": false,
      "isPrimary": false,
      "isIdentity": false,
      "maxLength": 200
    },
    "bbrCount": {
      "extendAlias": "input_basis",
      "fieldSort": 9999,
      "tableId": 1,
      "dataType": "varchar",
      "title": "被保人数",
      "isData": false,
      "filter": {
        "isMust": false
      },
      "sql": "(select count(bd_bbr) from bt_policy tb_p where bt_family.family_id=tb_p.family_id and tb_p.bd_bbr is not null and  tb_p.bd_bbr!='') bbr_count",
      "selectSql": {
        "oracle": null,
        "sqlserver": null,
        "mysql": null,
        "sqlite": null
      },
      "field": "bbrCount",
      "name": "bbr_count",
      "alias": "bbr_count",
      "isDate": false,
      "isPrimary": false,
      "isIdentity": false,
      "maxLength": 200
    }
  }
}
文档更新时间: 2021-06-26 08:00   作者:admin