refactor(blazing): 重构登录模块并移除示例代码

- 重构了登录控制器和登录服务,使用了cool框架的控制器和服务结构
- 移除了注册相关代码和不必要的示例代码
- 更新了登录服务,关联了服务器列表模型
- 删除了与示例相关的模型和服务文件
This commit is contained in:
2025-06-28 16:16:28 +08:00
parent f4f3102021
commit 3298bad0f2
16 changed files with 372 additions and 192 deletions

View File

@@ -1,23 +0,0 @@
package service
import (
"blazing/cool"
"blazing/modules/blazing/model"
)
type DemoGoodsService struct {
*cool.Service
}
func NewDemoGoodsService() *DemoGoodsService {
return &DemoGoodsService{
&cool.Service{
Model: model.NewDemoGoods(),
ListQueryOp: &cool.QueryOp{
Join: []*cool.JoinOp{},
},
},
}
}

View File

@@ -1,19 +0,0 @@
package service
import (
"blazing/cool"
"blazing/modules/blazing/model"
)
type DemoSampleService struct {
*cool.Service
}
func NewDemoSampleService() *DemoSampleService {
return &DemoSampleService{
&cool.Service{
Model: model.NewDemoSample(),
},
}
}

View File

@@ -1,21 +0,0 @@
package service
import (
"blazing/cool"
)
type DemoTestService struct {
*cool.Service
}
func NewDemoTestService() *DemoTestService {
return &DemoTestService{
&cool.Service{},
}
}
func (s *DemoTestService) GetDemoTestList() (interface{}, error) {
// gsvc.SetRegistry(etcd.New(`127.0.0.1:2379`))
return nil, nil
}

View File

@@ -2,6 +2,7 @@ package service
import (
"blazing/cool"
"blazing/modules/blazing/model"
"context"
"encoding/binary"
"encoding/hex"
@@ -20,7 +21,9 @@ type LoginService struct {
func NewLoginServiceService() *LoginService {
return &LoginService{
&cool.Service{},
&cool.Service{
Model: model.NewServerList(),
},
}
}