优化字典模块
This commit is contained in:
@@ -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