From ce32fc7f2c6a5bc9886a1f4df411096a1bb38e79 Mon Sep 17 00:00:00 2001 From: "meilin.huang" <954537473@qq.com> Date: Sat, 1 Jul 2023 14:34:42 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E4=BB=A3=E7=A0=81=E9=87=8D?= =?UTF-8?q?=E6=9E=84=E3=80=81=E5=88=86=E9=A1=B5=E6=95=B0=E6=8D=AE=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E6=94=AF=E6=8C=81=E5=A4=9A=E9=80=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/pagetable/PageTable.vue | 75 +++---- .../views/login/component/AccountLogin.vue | 2 +- mayfly_go_web/src/views/ops/db/DbList.vue | 63 +++--- .../views/ops/db/component/tab/TableData.vue | 5 +- .../src/views/ops/machine/FileManage.vue | 34 +-- .../src/views/ops/machine/MachineList.vue | 43 ++-- .../src/views/ops/machine/ScriptManage.vue | 39 ++-- .../ops/machine/authcert/AuthCertList.vue | 21 +- .../src/views/ops/mongo/MongoList.vue | 46 ++-- .../src/views/ops/redis/DataOperation.vue | 2 +- .../src/views/ops/redis/RedisList.vue | 37 ++-- mayfly_go_web/src/views/ops/tag/TeamList.vue | 19 +- .../src/views/system/account/AccountList.vue | 45 ++-- .../src/views/system/config/ConfigList.vue | 14 +- .../src/views/system/role/RoleList.vue | 40 ++-- .../src/views/system/syslog/SyslogList.vue | 20 +- server/internal/db/api/db.go | 33 +-- server/internal/db/application/db.go | 4 +- server/internal/db/application/db_sql_exec.go | 4 +- server/internal/db/domain/repository/db.go | 2 +- .../db/domain/repository/db_sql_exec.go | 2 +- .../db/infrastructure/persistence/db.go | 45 ++-- .../db/infrastructure/persistence/db_sql.go | 4 +- .../infrastructure/persistence/db_sql_exec.go | 10 +- server/internal/machine/api/auth_cert.go | 13 +- server/internal/machine/api/machine.go | 20 +- .../internal/machine/application/auth_cert.go | 4 +- .../internal/machine/application/machine.go | 8 +- .../machine/application/machine_file.go | 9 +- .../machine/application/machine_script.go | 9 +- .../machine/domain/repository/auth_cert.go | 2 +- .../machine/domain/repository/machine.go | 3 +- .../machine/domain/repository/machine_file.go | 2 +- .../domain/repository/machine_script.go | 2 +- .../domain/repository/machine_task_config.go | 2 +- .../infrastructure/persistence/auth_cert.go | 18 +- .../infrastructure/persistence/machine.go | 43 ++-- .../persistence/machine_file.go | 16 +- .../persistence/machine_script.go | 16 +- server/internal/mongo/api/mongo.go | 13 +- server/internal/mongo/application/mongo.go | 4 +- .../internal/mongo/domain/repository/mongo.go | 2 +- .../mongo/infrastructure/persistence/mongo.go | 37 ++-- server/internal/redis/api/redis.go | 13 +- server/internal/redis/application/redis.go | 4 +- .../internal/redis/domain/repository/redis.go | 2 +- .../infrastructure/persistence/redis_repo.go | 39 ++-- server/internal/sys/api/account.go | 12 +- server/internal/sys/api/role.go | 11 +- server/internal/sys/application/account.go | 7 +- server/internal/sys/application/config.go | 4 +- server/internal/sys/application/msg.go | 4 +- server/internal/sys/application/resource.go | 16 +- server/internal/sys/application/role.go | 11 +- server/internal/sys/application/syslog.go | 4 +- .../internal/sys/domain/repository/account.go | 2 +- .../internal/sys/domain/repository/config.go | 2 +- server/internal/sys/domain/repository/msg.go | 2 +- .../sys/domain/repository/resource.go | 2 - server/internal/sys/domain/repository/role.go | 2 +- .../internal/sys/domain/repository/syslog.go | 2 +- .../sys/infrastructure/persistence/account.go | 21 +- .../sys/infrastructure/persistence/config.go | 14 +- .../sys/infrastructure/persistence/msg.go | 8 +- .../infrastructure/persistence/resource.go | 20 +- .../sys/infrastructure/persistence/role.go | 24 ++- .../sys/infrastructure/persistence/syslog.go | 8 +- server/internal/tag/api/team.go | 12 +- server/internal/tag/application/team.go | 9 +- server/internal/tag/domain/repository/team.go | 2 +- .../tag/domain/repository/team_member.go | 2 +- .../infrastructure/persistence/tag_tree.go | 14 +- .../persistence/tag_tree_team.go | 10 +- .../tag/infrastructure/persistence/team.go | 14 +- .../infrastructure/persistence/team_member.go | 36 ++-- server/pkg/consts/gormx.go | 33 +++ server/pkg/ginx/ginx.go | 8 +- server/pkg/gormx/gormx.go | 137 ++++++++++++ server/pkg/gormx/query.go | 143 +++++++++++++ server/pkg/model/model.go | 200 ------------------ server/pkg/model/page.go | 10 +- 81 files changed, 937 insertions(+), 759 deletions(-) create mode 100644 server/pkg/consts/gormx.go create mode 100644 server/pkg/gormx/gormx.go create mode 100644 server/pkg/gormx/query.go diff --git a/mayfly_go_web/src/components/pagetable/PageTable.vue b/mayfly_go_web/src/components/pagetable/PageTable.vue index 89ae69f9..644fbd4a 100644 --- a/mayfly_go_web/src/components/pagetable/PageTable.vue +++ b/mayfly_go_web/src/components/pagetable/PageTable.vue @@ -72,7 +72,8 @@ 动态表头显示,根据表格每条配置项中的show字段来决定改列是否显示或者隐藏 columns 就是我们表格配置的数组对象 --> - +
@@ -84,15 +85,10 @@ - - - - + + +