IUserBehaviorProvider

  //用户行为日志
  "ConnUserBehavior": {
    "name": "ConnTrackLog",
    "databaseType": "MySql",
    "providerName": "MySql.Data.MySqlClient",
    "remark": "",
    "read": [
    "Data Source=localhost;Initial Catalog={ownerId}_auth_log_ub;User Id=root;Password={password};charset=utf8"
    ],
    "write": [
    "Data Source=localhost;Initial Catalog={ownerId}_auth_log_ub;User Id=root;Password={password};charset=utf8"
    ]
  },

关键字替换规则


                    StringBuilder sbSqld = new StringBuilder(mapperD.Sql);

                    sbSqld
                    .Replace("_@suffixYM", DateTime.Now.ToString("_yyyyMM"))
                    .Replace("_@suffixY", DateTime.Now.ToString("_yyyy"))
                    .Replace("_@suffixM", DateTime.Now.ToString("_MM"))
                    .Replace("_@suffix", DateTime.Now.ToString("_yyyyMMdd"));


                    string sqlD = sbSqld.ToString();

存储数据库

如果单张表,可以把前缀删除

文档更新时间: 2021-08-07 12:50   作者:admin