refactor(service): 重构服务模块结构并优化模型配置
This commit is contained in:
10
common/util/convert.go
Normal file
10
common/util/convert.go
Normal file
@@ -0,0 +1,10 @@
|
||||
package util
|
||||
|
||||
import "github.com/gogf/gf/v2/util/gconv"
|
||||
|
||||
// ConvertTo 转换为指定类型
|
||||
func ConvertTo[T any](v interface{}) *T {
|
||||
var t T
|
||||
_ = gconv.Struct(v, &t)
|
||||
return &t
|
||||
}
|
||||
Reference in New Issue
Block a user