优化字典模块
This commit is contained in:
1 parent
4b953d8fa9
commit
e98b30edd3
10 files changed
+1014
-204
No files matched your search
@@ -45,7 +45,11 @@ func (c *DictController) GetDictTypes() {
|
||||
status = &statusVal
|
||||
}
|
||||
|
||||
dictTypes, err := services.GetDictTypes(tenantId, userId, parentId, status)
|
||||
// 分页参数
|
||||
page, _ := c.GetInt("page", 1)
|
||||
pageSize, _ := c.GetInt("pageSize", 20)
|
||||
|
||||
dictTypes, total, err := services.GetDictTypes(tenantId, userId, parentId, status, page, pageSize)
|
||||
if err != nil {
|
||||
c.Data["json"] = map[string]interface{}{
|
||||
"success": false,
|
||||
@@ -57,7 +61,12 @@ func (c *DictController) GetDictTypes() {
|
||||
|
||||
c.Data["json"] = map[string]interface{}{
|
||||
"success": true,
|
||||
"data": dictTypes,
|
||||
"data": map[string]interface{}{
|
||||
"list": dictTypes,
|
||||
"total": total,
|
||||
"page": page,
|
||||
"pageSize": pageSize,
|
||||
},
|
||||
}
|
||||
c.ServeJSON()
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user