自定义保存Sql语句

https://doc.rg1008.com/docs/rg_pass_api/rg_pass_api-1drnmetf6pnh4

通过mappers控制

{
  "responseField": {
    "global": {
      "dataFromType": "Database",
      "show": "config_id",
      "auth": true
    },
    "manager": {
      "popedomVerify": {
        // #region 权限共享(直接使用个人信息修改权限)
        "popeMkey": "bo-user", // 关联模块
        "popeResField": "my_detail", // 引用field
        "popeMenuId": "bt-deve-bt-20200-c197f4fb-153b-46b4", // 关联栏目
        "verifyMenuId": "bt-deve-bt-20200-c197f4fb-153b-46b4" // 
        // #endregion 权限共享
      },
      "mappers": {
        "my": {
          "saveSql": {
            "insert": "insert into zt_user_config (config_id,words_pre_day,times_per_day,jump_type,once_seconds,line_words,login_id,end_space,word_space,up_space,down_space,word_ship_space,create_user_id,create_time,modify_time,modify_user_id) select @_userId,1,1,jump_type,once_seconds,line_words,@_userId,end_space,word_space,up_space,down_space,word_ship_space,@_userId,@createTime,@modifyTime,@_userId from zt_user_config where config_id=1",
            "modify": "",
            "update": "update zt_user_config set {s-if:wordsPreDayY} words_pre_day=words_pre_day+1{e-if:wordsPreDayY}{s-if:wordsPreDayN} words_pre_day=0{e-if:wordsPreDayN},words_pre_day=words_pre_day+1,modify_time=@_defaultDate where config_id=@_userId",
            "updateA": "",
            "insertA": "",
            "modifyB": "",
            "modifyA": "",
            "delete": "",
            "deleteA": ""
          }
        }
      }
    },
    "manager_detail": {
      "popedomVerify": {
        // #region 权限共享(直接使用个人信息修改权限)
        "popeMkey": "bo-user", // 关联模块
        "popeResField": "my_detail", // 引用field
        "popeMenuId": "bt-deve-bt-20200-c197f4fb-153b-46b4", // 关联栏目
        "verifyMenuId": "bt-deve-bt-20200-c197f4fb-153b-46b4" // 
        // #endregion 权限共享
      },
      //"wheres": [
      //  "{where_sql}",
      //  // #region  not exists
      //  "{s-if:_mapperType}",
      //  "{op-eq:my}",
      //  " and scripture_id=@scriptureId",
      //  "{op-eq:my}",
      //  "{e-if:_mapperType}"
      //  // #endregion 
      //],
      //开启扩展入库配置
      "saveSqlExtand": true
    }
  }
}
文档更新时间: 2023-05-18 10:36   作者:admin