refactor🎨 部分功能重写

This commit is contained in:
wenjianzhang committed 2021-05-21 18:25:51 +08:00
1 parent 765775c54d
commit 408dcc5057
28 files changed
+649 -982

No files matched your search

+9 -5
View File
@@ -59,11 +59,7 @@ type SysUserControl struct {
func (s *SysUserControl) Bind(ctx *gin.Context) error {
log := api.GetRequestLogger(ctx)
//err := ctx.ShouldBindUri(s)
//if err != nil {
// log.Debugf("ShouldBindUri error: %s", err.Error())
// return err
//}
err := ctx.ShouldBind(s)
if err != nil {
log.Debugf("ShouldBind error: %s", err.Error())
@@ -107,6 +103,14 @@ func (s *SysUserById) Generate() dto.Control {
return &cp
}
func (s *SysUserById) GetId() interface{} {
if len(s.Ids) > 0 {
s.Ids = append(s.Ids, s.Id)
return s.Ids
}
return s.Id
}
func (s *SysUserById) GenerateM() (common.ActiveRecord, error) {
return &models.SysUser{}, nil
}