调整日志输出方式,更新数据库日志存储结构;首页查询统计数据接口实现
This commit is contained in:
@@ -28,7 +28,10 @@ var (
|
||||
ClientPermissionLink *clientPermissionLink
|
||||
Coupon *coupon
|
||||
Edge *edge
|
||||
LogsLogin *logsLogin
|
||||
LogsRequest *logsRequest
|
||||
LogsUserBandwidth *logsUserBandwidth
|
||||
LogsUserUsage *logsUserUsage
|
||||
Permission *permission
|
||||
Product *product
|
||||
Proxy *proxy
|
||||
@@ -58,7 +61,10 @@ func SetDefault(db *gorm.DB, opts ...gen.DOOption) {
|
||||
ClientPermissionLink = &Q.ClientPermissionLink
|
||||
Coupon = &Q.Coupon
|
||||
Edge = &Q.Edge
|
||||
LogsLogin = &Q.LogsLogin
|
||||
LogsRequest = &Q.LogsRequest
|
||||
LogsUserBandwidth = &Q.LogsUserBandwidth
|
||||
LogsUserUsage = &Q.LogsUserUsage
|
||||
Permission = &Q.Permission
|
||||
Product = &Q.Product
|
||||
Proxy = &Q.Proxy
|
||||
@@ -89,7 +95,10 @@ func Use(db *gorm.DB, opts ...gen.DOOption) *Query {
|
||||
ClientPermissionLink: newClientPermissionLink(db, opts...),
|
||||
Coupon: newCoupon(db, opts...),
|
||||
Edge: newEdge(db, opts...),
|
||||
LogsLogin: newLogsLogin(db, opts...),
|
||||
LogsRequest: newLogsRequest(db, opts...),
|
||||
LogsUserBandwidth: newLogsUserBandwidth(db, opts...),
|
||||
LogsUserUsage: newLogsUserUsage(db, opts...),
|
||||
Permission: newPermission(db, opts...),
|
||||
Product: newProduct(db, opts...),
|
||||
Proxy: newProxy(db, opts...),
|
||||
@@ -121,7 +130,10 @@ type Query struct {
|
||||
ClientPermissionLink clientPermissionLink
|
||||
Coupon coupon
|
||||
Edge edge
|
||||
LogsLogin logsLogin
|
||||
LogsRequest logsRequest
|
||||
LogsUserBandwidth logsUserBandwidth
|
||||
LogsUserUsage logsUserUsage
|
||||
Permission permission
|
||||
Product product
|
||||
Proxy proxy
|
||||
@@ -154,7 +166,10 @@ func (q *Query) clone(db *gorm.DB) *Query {
|
||||
ClientPermissionLink: q.ClientPermissionLink.clone(db),
|
||||
Coupon: q.Coupon.clone(db),
|
||||
Edge: q.Edge.clone(db),
|
||||
LogsLogin: q.LogsLogin.clone(db),
|
||||
LogsRequest: q.LogsRequest.clone(db),
|
||||
LogsUserBandwidth: q.LogsUserBandwidth.clone(db),
|
||||
LogsUserUsage: q.LogsUserUsage.clone(db),
|
||||
Permission: q.Permission.clone(db),
|
||||
Product: q.Product.clone(db),
|
||||
Proxy: q.Proxy.clone(db),
|
||||
@@ -194,7 +209,10 @@ func (q *Query) ReplaceDB(db *gorm.DB) *Query {
|
||||
ClientPermissionLink: q.ClientPermissionLink.replaceDB(db),
|
||||
Coupon: q.Coupon.replaceDB(db),
|
||||
Edge: q.Edge.replaceDB(db),
|
||||
LogsLogin: q.LogsLogin.replaceDB(db),
|
||||
LogsRequest: q.LogsRequest.replaceDB(db),
|
||||
LogsUserBandwidth: q.LogsUserBandwidth.replaceDB(db),
|
||||
LogsUserUsage: q.LogsUserUsage.replaceDB(db),
|
||||
Permission: q.Permission.replaceDB(db),
|
||||
Product: q.Product.replaceDB(db),
|
||||
Proxy: q.Proxy.replaceDB(db),
|
||||
@@ -224,7 +242,10 @@ type queryCtx struct {
|
||||
ClientPermissionLink *clientPermissionLinkDo
|
||||
Coupon *couponDo
|
||||
Edge *edgeDo
|
||||
LogsLogin *logsLoginDo
|
||||
LogsRequest *logsRequestDo
|
||||
LogsUserBandwidth *logsUserBandwidthDo
|
||||
LogsUserUsage *logsUserUsageDo
|
||||
Permission *permissionDo
|
||||
Product *productDo
|
||||
Proxy *proxyDo
|
||||
@@ -254,7 +275,10 @@ func (q *Query) WithContext(ctx context.Context) *queryCtx {
|
||||
ClientPermissionLink: q.ClientPermissionLink.WithContext(ctx),
|
||||
Coupon: q.Coupon.WithContext(ctx),
|
||||
Edge: q.Edge.WithContext(ctx),
|
||||
LogsLogin: q.LogsLogin.WithContext(ctx),
|
||||
LogsRequest: q.LogsRequest.WithContext(ctx),
|
||||
LogsUserBandwidth: q.LogsUserBandwidth.WithContext(ctx),
|
||||
LogsUserUsage: q.LogsUserUsage.WithContext(ctx),
|
||||
Permission: q.Permission.WithContext(ctx),
|
||||
Product: q.Product.WithContext(ctx),
|
||||
Proxy: q.Proxy.WithContext(ctx),
|
||||
|
||||
Reference in New Issue
Block a user