mirror of
https://github.com/go-admin-team/go-admin.git
synced 2026-09-21 10:13:01 +00:00
fix🐛 :修复内容模块问题(#357)
This commit is contained in:
@@ -12,8 +12,8 @@ import (
|
||||
type SysCategorySearch struct {
|
||||
dto.Pagination `search:"-"`
|
||||
Name string `form:"name" search:"type:exact;column:name;table:sys_category" comment:"名称"`
|
||||
|
||||
Status string `form:"status" search:"type:exact;column:status;table:sys_category" comment:"状态"`
|
||||
Status string `form:"status" search:"type:exact;column:status;table:sys_category" comment:"状态"`
|
||||
CateId int `form:"cateId" search:"type:exact;column:cate_id;table:sys_category" comment:"分类id"`
|
||||
}
|
||||
|
||||
func (m *SysCategorySearch) GetNeedSearch() interface{} {
|
||||
@@ -35,16 +35,11 @@ func (m *SysCategorySearch) Generate() dto.Index {
|
||||
}
|
||||
|
||||
type SysCategoryControl struct {
|
||||
ID int `uri:"Id" comment:"标识"` // 标识
|
||||
|
||||
Name string `json:"name" comment:"名称"`
|
||||
|
||||
Img string `json:"img" comment:"图标"`
|
||||
|
||||
Sort string `json:"sort" comment:"排序"`
|
||||
|
||||
Status string `json:"status" comment:"状态"`
|
||||
|
||||
ID int `uri:"Id" comment:"标识"`
|
||||
Name string `json:"name" comment:"名称"`
|
||||
Img string `json:"img" comment:"图标"`
|
||||
Sort int `json:"sort" comment:"排序"`
|
||||
Status int `json:"status" comment:"状态"`
|
||||
Remark string `json:"remark" comment:"备注"`
|
||||
}
|
||||
|
||||
@@ -93,4 +88,4 @@ func (s *SysCategoryById) Generate() dto.Control {
|
||||
|
||||
func (s *SysCategoryById) GenerateM() (common.ActiveRecord, error) {
|
||||
return &models.SysCategory{}, nil
|
||||
}
|
||||
}
|
||||
@@ -11,6 +11,8 @@ import (
|
||||
|
||||
type SysContentSearch struct {
|
||||
dto.Pagination `search:"-"`
|
||||
Name string `form:"name" search:"type:exact;column:name;table:sys_category" comment:"名称"`
|
||||
Status string `form:"status" search:"type:exact;column:status;table:sys_category" comment:"状态"`
|
||||
}
|
||||
|
||||
func (m *SysContentSearch) GetNeedSearch() interface{} {
|
||||
@@ -33,13 +35,13 @@ func (m *SysContentSearch) Generate() dto.Index {
|
||||
|
||||
type SysContentControl struct {
|
||||
ID int `uri:"ID" comment:""` //
|
||||
CateId string `json:"cateId" comment:""`
|
||||
CateId int `json:"cateId" comment:""`
|
||||
Name string `json:"name" comment:""`
|
||||
Status string `json:"status" comment:""`
|
||||
Status int `json:"status" comment:""`
|
||||
Img string `json:"img" comment:""`
|
||||
Content string `json:"content" comment:""`
|
||||
Remark string `json:"remark" comment:""`
|
||||
Sort string `json:"sort" comment:""`
|
||||
Sort int `json:"sort" comment:""`
|
||||
}
|
||||
|
||||
func (s *SysContentControl) Bind(ctx *gin.Context) error {
|
||||
@@ -63,7 +65,7 @@ func (s *SysContentControl) Generate() dto.Control {
|
||||
|
||||
func (s *SysContentControl) GenerateM() (common.ActiveRecord, error) {
|
||||
return &models.SysContent{
|
||||
Id: s.ID,
|
||||
Model: common.Model{s.ID},
|
||||
CateId: s.CateId,
|
||||
Name: s.Name,
|
||||
Status: s.Status,
|
||||
@@ -89,4 +91,4 @@ func (s *SysContentById) Generate() dto.Control {
|
||||
|
||||
func (s *SysContentById) GenerateM() (common.ActiveRecord, error) {
|
||||
return &models.SysContent{}, nil
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user