集成分库分表

https://doc.rg1008.com/docs/rg_pass_ht/rg_pass_ht-1d7cf4m900vpg

分表日志

https://doc.rg1008.com/docs/rg_pass_ht/rg_pass_ht-1d7j3385434es


app.json

 "operation": {
    "dimension": {
      //维数据以 value name格式输出
      "kv": true
    },
    "verifyApi": false, //接口合法性验证, 格式如  36位guid|有效时间戳
    "defaultApp": "basis",
    "userBehavior": true,
    "userBehaviorDbType": "MySql",
    "userFilter": true, //用户认证,特定用户访问特定接口
    "userLog": true, //用户操作日志,
    "opLogDbType": "MySql", //操作日志存储的数据库类别  MySql Oracle PostgreSql Sqlite Sqlserver
    "trackLogDbType": "MySql", //业务和异常日志  File MySql Oracle PostgreSql Sqlite Sqlserver
    "systemLogDbType": "MySql", //业务和异常日志  File MySql Oracle PostgreSql Sqlite Sqlserver
    "systemLog": true,
    "browerMinute": 2,
    "authExpires": 300, // 60,
    "password": "abcd!!12", //默认密码,
    "sqlDebug": false, //数据库sql调试, operation
    "analysisDebug": false //性能调试
  },

bo_operation_behavior.xml


<?xml version="1.0" encoding="utf-8"?>
<mappers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <!--用户行为 UUID(),-->
  <mapper id="i_user_behavior" title="将用户行为保存到用户行为表" cache="false" author="cbg">
    <sql connName="ConnLog">
      <![CDATA[insert into bo_user_behavior (accept,accept_encoding,accept_language,area_code,cache_control,client_ip,connection,content_length,content_type,create_time,domain,from_app_id,host,id,origin,owner_id,page_title,pragma,proxy_connection,query_string,referer,route_url,scheme,screen_color_depth,screen_height,screen_width,screen_x,screen_y,sys_id,user_agent,user_id,x_requested_with) values  (@accept,@acceptEncoding,@acceptLanguage,@filterAreaCode,@cacheControl,@clientIp,@connection,@contentLength,@contentType,@createTime,@domain,@fromAppId,@host,@id,@origin,@ownerId,@pageTitle,@pragma,@proxyConnection,@queryString,@referer,@routeUrl,@scheme,@screenColorDepth,@screenHeight,@screenWidth,@screenX,@screenY,@sysId,@userAgent,@userId,@xRequestedWith)]]>
    </sql>
  </mapper>
  <!--操作日志-->
  <mapper id="i_log_system" title="执行操作日志入库(系统日志)" cache="false" author="cbg">
    <sql connName="ConnLog">
      <![CDATA[ insert into bo_sys_log (area_code,client_ip,create_id,from_app_id,log_content,log_id,log_json,log_path,log_time,log_type,owner_id,query_string,sys_id) values  (@filterAreaCode,@clientIp,@createId,@fromAppId,@logContent,@logId,@logJson,@logPath,@logTime,@logType,@ownerId,@queryString,@sysId)]]>
    </sql>
  </mapper>
  <!--链路信息-->
  <mapper id="i_track_log" title="链路信息" cache="false" author="cbg">
    <sql connName="ConnLog">
      <![CDATA[
        insert into bo_track_log (dictionary_url,exception,area_code,client_ip,create_date,create_user_id,create_user_name,from_app_id,log_body,log_content,log_id,log_param,log_path,log_primay_id,log_query,log_sql,log_type,module_key,owner_id,response_field,sys_id) values  (@dictionaryUrl,@exception,@areaCode,@clientIp,@createDate,@createUserId,@createUserName,@fromAppId,@logBody,@logContent,@logId,@logParam,@logPath,@logPrimayId,@logQuery,@logSql,@logType,@moduleKey,@ownerId,@responseField,@sysId);
      ]]>
    </sql>
  </mapper>
  <!--操作日志-->
  <mapper id="i_op_log" title="插入数据到日志表" cache="false" author="cbg">
    <sql connName="ConnOpLog">
      <![CDATA[
        insert into bo_op_log (dictionary_url,exception,area_code,client_ip,create_date,create_user_id,create_user_name,from_app_id,log_body,log_content,log_id,log_param,log_path,log_primay_id,log_query,log_sql,log_type,module_key,owner_id,response_field,sys_id) values  (@dictionaryUrl,@exception,@areaCode,@clientIp,@createDate,@createUserId,@createUserName,@fromAppId,@logBody,@logContent,@logId,@logParam,@logPath,@logPrimayId,@logQuery,@logSql,@logType,@moduleKey,@ownerId,@responseField,@sysId);
      ]]>
    </sql>
  </mapper>
</mappers>
文档更新时间: 2024-12-02 17:00   作者:admin