多账号数据共享条件参数 @userId @mergeUserId

and (create_user_id=@_userId  or create_user_id in @_mergeUserId)))

 //按被保人身份证统计
    "bbrcard": {
      //控制第三方权限配置
      "presetSql": [
        //{
        //  "connName": "ConnIdc",
        //  "value": "",
        //  "name": ""
        //}
      ],
      //请求的结果处理
      "njcResult": {
        "args": [],
        "moduleName": "~/Config/AppNodeJs/{ownerId}-plugins/{mkey}/{resField}",
        "functionName": null
      },
      //请求的参数设置
      "njcArgs": {
        "args": [],
        "moduleName": "~/Config/AppNodeJs/{ownerId}-plugins/{mkey}/{resField}-query",
        "functionName": null
      },
      "guidMethod": "None",
      //来源组合接口
      "dataFromType": "Merge",
      "original": "",
      "auth": true,
      //开启只执行responseField里面配置
      "onlySqlList": true,
      "source": [
        {
          "field": "policy",
          "connName": "ConnBt",
          "dataFromType": "Database",
          //多条数据
          "multi": true,
          "sql": [
            {
              "value": " select max(bd_bbr) bd_bbr,count(policy_id) bd_count,max(bd_bbr_day) bd_bbr_day",
              "sortId": 1

            },
            {
              "value": ",(select sum(bz_price) from bt_policy_item tb_pi where policy_id in (select policy_id from bt_policy ",
              "sortId": 5

            },
            {
              "value": " where bd_bbr_idcard=@bdBbrIdcard  and (create_user_id=@_userId  or create_user_id in @_mergeUserId))) bz_price",
              "sortId": 10

            },
            {
              "value": " from bt_policy tb_p where bd_bbr_idcard=@bdBbrIdcard  and (tb_p.create_user_id=@_userId  or tb_p.create_user_id in @_mergeUserId)",
              "sortId": 15

            }
          ]
        },
        {
          "field": "user",
          "connName": "ConnBo",
          "dataFromType": "Database",
          //多条数据
          "multi": true,
          "sql": [
            {
              "value": "select head_icon from bo_user  where id_card=@bdBbrIdcard",
              "sortId": 1

            }
          ]
        }
      ]
    },
文档更新时间: 2021-10-16 10:31   作者:admin