format🥚 代码格式化

This commit is contained in:
zhangwenjian committed 2021-05-31 18:10:23 +08:00
1 parent a7cc943b8e
commit a54d4ba0c1
8 files changed
+4 -12

No files matched your search

-2
View File
@@ -25,7 +25,6 @@ func (m *SysApiSearch) GetNeedSearch() interface{} {
return *m
}
type SysApiControl struct {
Id int `uri:"id" comment:"编码"` // 编码
Handle string `json:"handle" comment:"handle"`
@@ -64,7 +63,6 @@ func (s *SysApiById) GetId() interface{} {
return s.Id
}
func (s *SysApiById) Generate() dto.Control {
o := *s
return &o
+1
View File
@@ -69,6 +69,7 @@ type GetSetSysConfigReq struct {
func (s *GetSetSysConfigReq) Generate(model *models.SysConfig) {
model.ConfigValue = s.ConfigValue
}
type UpdateSetSysConfigReq map[string]string
// SysConfigByKeyReq 根据Key获取配置
-1
View File
@@ -99,7 +99,6 @@ func (s *SysDeptById) GetId() interface{} {
return s.Id
}
func (s *SysDeptById) GenerateM() (*models.SysDept, error) {
return &models.SysDept{}, nil
}
-2
View File
@@ -24,7 +24,6 @@ func (m *SysMenuSearch) GetNeedSearch() interface{} {
return *m
}
// SysMenuControl 增、改使用的结构体
type SysMenuControl struct {
MenuId int `uri:"id" comment:"编码"` // 编码
@@ -97,7 +96,6 @@ type SysMenuById struct {
common.ControlBy
}
func (s *SysMenuById) Generate() *SysMenuById {
cp := *s
return &cp
+2 -4
View File
@@ -138,16 +138,14 @@ func (e *SysConfig) UpdateSetSysConfig(c *[]dto.GetSetSysConfigReq) error {
for _, req := range m {
var data models.SysConfig
if err := e.Orm.Where("config_key = ?", req.ConfigKey).
First(&data).Error;
err != nil {
First(&data).Error; err != nil {
e.Log.Errorf("Service GetSysConfigPage error:%s", err)
return err
}
if data.ConfigValue != req.ConfigValue {
data.ConfigValue = req.ConfigValue
if err := e.Orm.Save(&data).Error;
err != nil {
if err := e.Orm.Save(&data).Error; err != nil {
e.Log.Errorf("Service GetSysConfigPage error:%s", err)
return err
}
-1
View File
@@ -1,6 +1,5 @@
package router
import (
"github.com/gin-gonic/gin"
jwt "github.com/go-admin-team/go-admin-core/sdk/pkg/jwtauth"
-1
View File
@@ -54,7 +54,6 @@ func LoggerToFile() gin.HandlerFunc {
return
}
rt, bl := c.Get("result")
var result = ""
if bl {
+1 -1
View File
@@ -10,7 +10,7 @@ import (
"github.com/go-admin-team/go-admin-core/sdk/pkg/response"
)
//权限检查中间件
// AuthCheckRole 权限检查中间件
func AuthCheckRole() gin.HandlerFunc {
return func(c *gin.Context) {
log := api.GetRequestLogger(c)