mirror of
https://github.com/go-admin-team/go-admin.git
synced 2026-09-21 10:13:01 +00:00
format🥚 代码格式化
This commit is contained in:
@@ -200,4 +200,4 @@ func ossUpload(name string, path string) error {
|
||||
func qiniuUpload(name string, path string) error {
|
||||
oss := file_store.ALiYunOSS{}
|
||||
return oss.UpLoad(name, path)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -192,4 +192,4 @@ func (e SysChinaAreaData) DeleteSysChinaAreaData(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
e.OK(control.GetId(), "删除成功")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -195,4 +195,4 @@ func (e SysFileDir) DeleteSysFileDir(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
e.OK(control.Id, "删除成功")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -206,4 +206,4 @@ func (e SysFileInfo) DeleteSysFileInfo(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
e.OK(control.Id, "删除成功")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -73,4 +73,4 @@ func (e ServerMonitor) ServerInfo(c *gin.Context) {
|
||||
"cpu": cpuDic,
|
||||
"disk": diskDic,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,8 +6,8 @@ import (
|
||||
|
||||
type SysChinaAreaData struct {
|
||||
models.Model
|
||||
PId string `json:"p_id" gorm:"size:11;comment:上级编码"`
|
||||
Name string `json:"name" gorm:"size:128;comment:名称"`
|
||||
PId string `json:"p_id" gorm:"size:11;comment:上级编码"`
|
||||
Name string `json:"name" gorm:"size:128;comment:名称"`
|
||||
models.ControlBy
|
||||
models.ModelTime
|
||||
}
|
||||
@@ -23,4 +23,4 @@ func (e *SysChinaAreaData) Generate() models.ActiveRecord {
|
||||
|
||||
func (e *SysChinaAreaData) GetId() interface{} {
|
||||
return e.Id
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,12 +6,12 @@ import (
|
||||
|
||||
type SysFileInfo struct {
|
||||
models.Model
|
||||
Type string `json:"type" gorm:"size:255;comment:类型"` //
|
||||
Name string `json:"name" gorm:"size:255;comment:名称"` //
|
||||
Size string `json:"size" gorm:"size:11;comment:大小"` //
|
||||
PId int `json:"p_id" gorm:"size:11;comment:目录"` //
|
||||
Source string `json:"source" gorm:"size:255;comment:来源"` //
|
||||
Url string `json:"url" gorm:"size:255;comment:地址"` //
|
||||
Type string `json:"type" gorm:"size:255;comment:类型"` //
|
||||
Name string `json:"name" gorm:"size:255;comment:名称"` //
|
||||
Size string `json:"size" gorm:"size:11;comment:大小"` //
|
||||
PId int `json:"p_id" gorm:"size:11;comment:目录"` //
|
||||
Source string `json:"source" gorm:"size:255;comment:来源"` //
|
||||
Url string `json:"url" gorm:"size:255;comment:地址"` //
|
||||
FullUrl string `json:"full_url" gorm:"size:255;comment:全地址"` //
|
||||
models.ControlBy
|
||||
models.ModelTime
|
||||
|
||||
@@ -13,4 +13,4 @@ func init() {
|
||||
func registerFileRouter(v1 *gin.RouterGroup) {
|
||||
var api = apis.File{}
|
||||
v1.POST("/public/uploadFile", api.UploadFile)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,4 +37,4 @@ func InitRouter() {
|
||||
// 注册业务路由
|
||||
// TODO: 这里可存放业务路由,里边并无实际路由只有演示代码
|
||||
initRouter(r, authMiddleware)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,4 +22,4 @@ func registerMonitorRouter(v1 *gin.RouterGroup) {
|
||||
c.Status(http.StatusOK)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,4 +39,4 @@ func checkRoleRouter(r *gin.Engine, authMiddleware *jwt.GinJWTMiddleware) {
|
||||
for _, f := range routerCheckRole {
|
||||
f(v1, authMiddleware)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,4 +18,4 @@ func registerSysServerMonitorRouter(v1 *gin.RouterGroup, authMiddleware *jwt.Gin
|
||||
{
|
||||
r.GET("", api.ServerInfo)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -55,9 +55,9 @@ func (s *SysChinaAreaDataControl) Bind(ctx *gin.Context) error {
|
||||
|
||||
func (s *SysChinaAreaDataControl) Generate() (*models2.SysChinaAreaData, error) {
|
||||
return &models2.SysChinaAreaData{
|
||||
Model: common.Model{Id: s.Id},
|
||||
PId: s.PId,
|
||||
Name: s.Name,
|
||||
Model: common.Model{Id: s.Id},
|
||||
PId: s.PId,
|
||||
Name: s.Name,
|
||||
}, nil
|
||||
}
|
||||
|
||||
@@ -94,4 +94,4 @@ func (s *SysChinaAreaDataById) Bind(ctx *gin.Context) error {
|
||||
|
||||
func (s *SysChinaAreaDataById) SetUpdateBy(id int) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -103,4 +103,4 @@ func (e *SysChinaAreaData) RemoveSysChinaAreaData(d *dto.SysChinaAreaDataById, p
|
||||
return errors.New("无权删除该数据")
|
||||
}
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
@@ -165,4 +165,4 @@ func SysFileDirCall(list *[]models.SysFileDir, m models.SysFileDir) models.SysFi
|
||||
}
|
||||
|
||||
return m
|
||||
}
|
||||
}
|
||||
|
||||
@@ -123,4 +123,4 @@ func (e *SysFileInfo) RemoveSysFileInfo(d *dto.SysFileInfoById, p *actions.DataP
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user