feat: 添加测试服务及相关测试用例,重构 demo 服务逻辑

This commit is contained in:
Rogee
2025-09-15 18:37:02 +08:00
parent dd097e9aec
commit f0b7e0202c
4 changed files with 53 additions and 9 deletions

View File

@@ -63,11 +63,11 @@ func (d *demo) Foo(
file *multipart.FileHeader,
req *FooUploadReq,
) error {
_, err := services.Class.First(ctx)
_, err := services.Test.Test(ctx)
if err != nil {
// /
appErr := errorx.Wrap(err).
WithMsg("获取班级失败").
WithMsg("获取测试失败").
WithData(fiber.Map{"route": "/v1/test"}).
WithParams("handler", "Test.Hello")
return appErr