feat✨优化配置信息
This commit is contained in:
1 parent
f56839926e
commit
6222765e20
5 files changed
+46
-30
No files matched your search
@@ -26,14 +26,14 @@ func (m *SysConfigSearch) GetNeedSearch() interface{} {
|
||||
}
|
||||
|
||||
// Bind 映射上下文中的结构体数据
|
||||
func (m *SysConfigSearch) Bind(ctx *gin.Context) error {
|
||||
log := api.GetRequestLogger(ctx)
|
||||
err := ctx.ShouldBind(m)
|
||||
if err != nil {
|
||||
log.Debugf("ShouldBind error: %s", err.Error())
|
||||
}
|
||||
return err
|
||||
}
|
||||
//func (m *SysConfigSearch) Bind(ctx *gin.Context) error {
|
||||
// log := api.GetRequestLogger(ctx)
|
||||
// err := ctx.ShouldBind(m)
|
||||
// if err != nil {
|
||||
// log.Debugf("ShouldBind error: %s", err.Error())
|
||||
// }
|
||||
// return err
|
||||
//}
|
||||
|
||||
// SysConfigControl 增、改使用的结构体
|
||||
type SysConfigControl struct {
|
||||
|
||||
@@ -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)
|
||||
@@ -129,4 +129,4 @@ func (e *SysConfig) GetSysConfigByKEY(c *dto.SysConfigControl) error {
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user