作者 tangxuhui

错误修复

1 -{"D:\\workspaceGo\\src\\allied-creation-basic\\pkg\\port\\beego":1629527715980690100}  
  1 +{"D:\\workspaceGo\\src\\allied-creation-basic\\pkg\\port\\beego":1629534039183149400}
@@ -3,7 +3,7 @@ package domain @@ -3,7 +3,7 @@ package domain
3 // 字典 3 // 字典
4 type Dictionary struct { 4 type Dictionary struct {
5 // 字典编号 主键 5 // 字典编号 主键
6 - DictionaryId int64 `json:"dictionaryId"` 6 + DictionaryId int64 `json:"dictionaryId,string"`
7 // 字典编码 7 // 字典编码
8 DictCode string `json:"dictCode"` 8 DictCode string `json:"dictCode"`
9 // 字典名称 9 // 字典名称
@@ -14,8 +14,6 @@ type Dictionary struct { @@ -14,8 +14,6 @@ type Dictionary struct {
14 DictName string 14 DictName string
15 // 备注信息 15 // 备注信息
16 Describe string 16 Describe string
17 - // 是否可见【1:不可以】【2:可以】  
18 - IsShow int  
19 // 字典值列表 17 // 字典值列表
20 DictItems []domain.DictionaryItem 18 DictItems []domain.DictionaryItem
21 } 19 }
@@ -119,7 +119,7 @@ func (repository *DictionaryRepository) Find(queryOptions map[string]interface{} @@ -119,7 +119,7 @@ func (repository *DictionaryRepository) Find(queryOptions map[string]interface{}
119 query.SetOffsetAndLimit(20) 119 query.SetOffsetAndLimit(20)
120 query.SetOrderDirect("dictionary_id", "DESC") 120 query.SetOrderDirect("dictionary_id", "DESC")
121 if v, ok := queryOptions["dictCodeIn"]; ok { 121 if v, ok := queryOptions["dictCodeIn"]; ok {
122 - query.Where("dict_code IN (?)", pg.Array(v)) 122 + query.WhereIn("dict_code IN (?)", v)
123 } 123 }
124 if count, err := query.SelectAndCount(); err != nil { 124 if count, err := query.SelectAndCount(); err != nil {
125 return 0, dictionarys, err 125 return 0, dictionarys, err
@@ -12,9 +12,11 @@ type DictionaryController struct { @@ -12,9 +12,11 @@ type DictionaryController struct {
12 12
13 func (controller *DictionaryController) returnPageListData(count int64, data interface{}, err error, pageNumber int) { 13 func (controller *DictionaryController) returnPageListData(count int64, data interface{}, err error, pageNumber int) {
14 dataMap := map[string]interface{}{ 14 dataMap := map[string]interface{}{
15 - "totalRow": count, 15 + "grid": map[string]interface{}{
  16 + "total": count,
16 "pageNumber": pageNumber, 17 "pageNumber": pageNumber,
17 "list": data, 18 "list": data,
  19 + },
18 } 20 }
19 controller.Response(dataMap, err) 21 controller.Response(dataMap, err)
20 } 22 }