format🥚 代码格式化

This commit is contained in:
zhangwenjian
2021-05-31 18:10:23 +08:00
parent a7cc943b8e
commit a54d4ba0c1
96 changed files with 143 additions and 151 deletions
+1 -1
View File
@@ -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)
}
}
+1 -1
View File
@@ -192,4 +192,4 @@ func (e SysChinaAreaData) DeleteSysChinaAreaData(c *gin.Context) {
return
}
e.OK(control.GetId(), "删除成功")
}
}
+1 -1
View File
@@ -195,4 +195,4 @@ func (e SysFileDir) DeleteSysFileDir(c *gin.Context) {
return
}
e.OK(control.Id, "删除成功")
}
}
+1 -1
View File
@@ -206,4 +206,4 @@ func (e SysFileInfo) DeleteSysFileInfo(c *gin.Context) {
return
}
e.OK(control.Id, "删除成功")
}
}
+1 -1
View File
@@ -73,4 +73,4 @@ func (e ServerMonitor) ServerInfo(c *gin.Context) {
"cpu": cpuDic,
"disk": diskDic,
})
}
}
+3 -3
View File
@@ -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 -6
View File
@@ -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
+1 -1
View File
@@ -13,4 +13,4 @@ func init() {
func registerFileRouter(v1 *gin.RouterGroup) {
var api = apis.File{}
v1.POST("/public/uploadFile", api.UploadFile)
}
}
+1 -1
View File
@@ -37,4 +37,4 @@ func InitRouter() {
// 注册业务路由
// TODO: 这里可存放业务路由,里边并无实际路由只有演示代码
initRouter(r, authMiddleware)
}
}
+1 -1
View File
@@ -22,4 +22,4 @@ func registerMonitorRouter(v1 *gin.RouterGroup) {
c.Status(http.StatusOK)
})
}
}
}
+1 -1
View File
@@ -39,4 +39,4 @@ func checkRoleRouter(r *gin.Engine, authMiddleware *jwt.GinJWTMiddleware) {
for _, f := range routerCheckRole {
f(v1, authMiddleware)
}
}
}
+1 -1
View File
@@ -18,4 +18,4 @@ func registerSysServerMonitorRouter(v1 *gin.RouterGroup, authMiddleware *jwt.Gin
{
r.GET("", api.ServerInfo)
}
}
}
+4 -4
View File
@@ -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) {
}
}
+1 -1
View File
@@ -103,4 +103,4 @@ func (e *SysChinaAreaData) RemoveSysChinaAreaData(d *dto.SysChinaAreaDataById, p
return errors.New("无权删除该数据")
}
return nil
}
}
+1 -1
View File
@@ -165,4 +165,4 @@ func SysFileDirCall(list *[]models.SysFileDir, m models.SysFileDir) models.SysFi
}
return m
}
}
+1 -1
View File
@@ -123,4 +123,4 @@ func (e *SysFileInfo) RemoveSysFileInfo(d *dto.SysFileInfoById, p *actions.DataP
return err
}
return nil
}
}