Compare commits

...

21 Commits

Author SHA1 Message Date
b171122a32 update 2025-06-17 15:56:12 +08:00
417d0671de upload 2025-06-17 11:53:31 +08:00
5c8182cdf9 upload 2025-06-17 11:41:45 +08:00
759863f1aa update 2025-06-17 11:16:24 +08:00
6c3b4ec367 change router struct 2025-06-17 10:50:08 +08:00
a8bc73ae99 statics file change 2025-06-16 16:17:18 +08:00
90d1ef301d v2 2025-06-16 15:48:55 +08:00
346ade21f1 change use strings builder 2025-06-16 10:38:00 +08:00
396192ce6e add not found condition 2025-06-16 10:26:31 +08:00
kenneth
b6aff77084 update 2025-06-14 21:12:52 +08:00
3bd4c5d672 v1_1 2025-06-13 17:37:30 +08:00
1b72f51e4a v1 2025-06-13 17:23:16 +08:00
3150ba80bc statics use fs.FS 2025-06-12 10:49:14 +08:00
8bdf9e9b57 update dockerfile 2025-06-12 10:37:16 +08:00
b71e718308 update 2025-06-12 10:20:26 +08:00
96d537c044 update 2025-06-06 14:31:58 +08:00
38ee553cf3 gorm update 2025-05-07 15:32:05 +08:00
68606c76f9 gorm wire 2025-05-07 14:12:53 +08:00
461531c308 v1 2025-04-14 15:42:22 +08:00
371b89ee8d 2 2025-04-14 15:28:51 +08:00
f100427f8b 1 2025-04-07 11:21:43 +08:00
1061 changed files with 15831 additions and 23967 deletions

View File

@ -1,10 +1,16 @@
log/
LICENSE
*.exe
main
testpaper
management
configs/
upload/
doc/
logs/
log/
modd.conf
*.yaml
LICENSE
README.md
Makefile
.gitignore

4
.gitignore vendored
View File

@ -29,7 +29,7 @@ go.work
*.log
*.yaml
!config.dev.yaml
!configs/config.dev.yaml
!sqlc.yaml
upload/
public/

View File

@ -1,16 +0,0 @@
# Build Stage
FROM golang:1.24.0-alpine3.21 AS builder
ENV GO111MODULE=on \
GOPROXY=https://goproxy.cn,direct
WORKDIR /app
COPY ../ .
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o testpaper main.go
# Run Stage
FROM zc1185230223/alpine:3.21
WORKDIR /app
COPY --from=builder /app/testpaper .
RUN touch config.yaml
EXPOSE 15001
CMD ["/app/testpaper", "api", "-c", "config.yaml"]

0
LICENSE Normal file
View File

View File

@ -1,48 +1,57 @@
DB_URL=postgresql://root:secret@localhost:5432/management?sslmode=disable
.PHONY: network
network:
docker network create management
.PHONY: redis
redis:
docker run --network management --name rd -d -p 6379:6379 redis:7.2.4 --requirepass "secret"
docker run --network management --name rd -d -p 6379:6379 redis:7.4-alpine --requirepass "secret"
.PHONY: postgres
postgres:
docker run --name postgres --network management -p 5432:5432 -e POSTGRES_USER=root -e POSTGRES_PASSWORD=secret -d postgres:16-alpine
docker run --name postgres --network management -p 5432:5432 -e POSTGRES_USER=root -e POSTGRES_PASSWORD=secret -d postgres:17-alpine
createdb:
.PHONY: create_db
create_db:
docker exec -it postgres createdb --username=root --owner=root management
dropdb:
.PHONY: drop_db
drop_db:
docker exec -it postgres dropdb management
.PHONY: psql
psql:
docker exec -it postgres psql -U root -d management
migrateinit:
migrate create -ext sql -dir internal/db/migration -seq init_schema
.PHONY: migrate_init
migrate_init:
migrate create -ext sql -dir internal/erpserver/repository/migration -seq init_schema
migrateup:
migrate -path internal/db/migration -database "$(DB_URL)" -verbose up
.PHONY: migrate_up
migrate_up:
migrate -path internal/erpserver/repository/migration -database "$(DB_URL)" -verbose up
migratedown:
migrate -path internal/db/migration -database "$(DB_URL)" -verbose down
db:
sql2dbml --postgres doc/ss.sql -o doc/db.dbm
db_docs:
dbdocs build doc/db.dbml
.PHONY: migrate_down
migrate_down:
migrate -path internal/erpserver/repository/migration -database "$(DB_URL)" -verbose down
.PHONY: db_schema
db_schema:
dbml2sql --postgres -o internal/db/migration/000001_init_schema.up.sql doc/db.dbml
dbml2sql --postgres -o internal/erpserver/repository/migration/000001_init_schema.up.sql doc/db.dbml
sqlc:
sqlc generate
.PHONY: wire
wire:
wire ./...
.PHONY: templ
templ:
templ generate
.PHONY: test
test:
go test -v -cover ./...
server:
modd
.PHONY: network redis postgres createdb dropdb psql migrateinit migrateup migratedown db_docs db_schema test server
.PHONY: ab
ab:
ab -c 200 -n 5000 -H "Cookie: token=7a-zLwSNZmSF8LnMG-qC90I_pjs89tyaK_XR8HYBMZA" http://localhost:9001/system/role/list

View File

@ -183,7 +183,7 @@ xm-select .xm-body .xm-option.selected .xm-option-icon { color: var(--global-pri
.own-pannel {
position: relative;
border: 1px solid #eee;
/*border: 1px solid #eee;*/
border-radius: 2px;
/*box-shadow: 1px 1px 4px rgb(0 0 0 / 8%);*/
background-color: #fff;
@ -206,3 +206,36 @@ xm-select .xm-body .xm-option.selected .xm-option-icon { color: var(--global-pri
height: 100%;
overflow-y: auto;
}
.userinfo {
display: flex;
padding: 20px;
}
.userinfo .logo {
width: 60px;
height: 60px;
}
.userinfo .logo img {
display:block;
width: 60px;
height: 60px;
border-radius: 50%;
}
.userinfo .info {
margin-left: 20px;
}
.userinfo .info p {
font-size: 12px;
color: #666666;
}
.userinfo .info .name {
font-size: 15px;
color: #333333;
margin-bottom: 8px;
margin-top: 5px;
}

View File

Before

Width:  |  Height:  |  Size: 74 KiB

After

Width:  |  Height:  |  Size: 74 KiB

View File

Before

Width:  |  Height:  |  Size: 8.4 KiB

After

Width:  |  Height:  |  Size: 8.4 KiB

View File

Before

Width:  |  Height:  |  Size: 9.9 MiB

After

Width:  |  Height:  |  Size: 9.9 MiB

View File

Before

Width:  |  Height:  |  Size: 197 KiB

After

Width:  |  Height:  |  Size: 197 KiB

View File

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

View File

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

Before

Width:  |  Height:  |  Size: 322 KiB

After

Width:  |  Height:  |  Size: 322 KiB

Some files were not shown because too many files have changed in this diff Show More