mirror of
https://github.com/go-admin-team/go-admin.git
synced 2026-09-21 10:13:01 +00:00
refactor🎨 参数设置删除修改
This commit is contained in:
@@ -21,7 +21,7 @@ func registerSysConfigRouter(v1 *gin.RouterGroup, authMiddleware *jwt.GinJWTMidd
|
||||
r.GET("/:id", api.GetSysConfig)
|
||||
r.POST("", api.InsertSysConfig)
|
||||
r.PUT("/:id", api.UpdateSysConfig)
|
||||
r.DELETE("/:id", api.DeleteSysConfig)
|
||||
r.DELETE("", api.DeleteSysConfig)
|
||||
}
|
||||
|
||||
r1 := v1.Group("/configKey").Use(authMiddleware.MiddlewareFunc())
|
||||
|
||||
@@ -97,7 +97,7 @@ func (s *SysConfigById) Generate() *SysConfigById {
|
||||
}
|
||||
|
||||
func (s *SysConfigById) GetId() interface{} {
|
||||
return s.Id
|
||||
return s.Ids
|
||||
}
|
||||
|
||||
func (s *SysConfigById) Bind(ctx *gin.Context) error {
|
||||
|
||||
@@ -104,7 +104,7 @@ func (e *SysConfig) RemoveSysConfig(d *dto.SysConfigById, c *system.SysConfig) e
|
||||
var data system.SysConfig
|
||||
|
||||
db := e.Orm.Model(&data).
|
||||
Where(d.GetId()).Delete(c)
|
||||
Where(d.Ids).Delete(c)
|
||||
if db.Error != nil {
|
||||
err = db.Error
|
||||
e.Log.Errorf("Service RemoveSysConfig error:%s", err)
|
||||
|
||||
Reference in New Issue
Block a user